Example #1
0
        void LaneClear()
        {
            _spellQ.Speed = _spellQFarmSpeed;
            var minions = MinionManager.GetMinions(ObjectManager.Player.ServerPosition, _spellQ.Range, MinionTypes.All, MinionTeam.NotAlly);

            bool jungleMobs = minions.Any(x => x.Team == GameObjectTeam.Neutral);

            if ((_menu.Item("farmQ").GetValue <bool>() && ObjectManager.Player.ManaPercent >= _menu.Item("farmPercent").GetValue <Slider>().Value&& ObjectManager.Player.Level >= _menu.Item("farmStartAtLevel").GetValue <Slider>().Value) || jungleMobs)
            {
                MinionManager.FarmLocation farmLocation = _spellQ.GetLineFarmLocation(minions);

                if (farmLocation.Position.IsValid())
                {
                    if (farmLocation.MinionsHit >= 2 || jungleMobs)
                    {
                        CastQ(farmLocation.Position);
                    }
                }
            }

            minions = MinionManager.GetMinions(ObjectManager.Player.ServerPosition, _spellW.Range, MinionTypes.All, MinionTeam.NotAlly);

            if (minions.Count() > 0)
            {
                jungleMobs = minions.Any(x => x.Team == GameObjectTeam.Neutral);

                if ((_menu.Item("farmW").GetValue <bool>() && ObjectManager.Player.ManaPercent >= _menu.Item("farmPercent").GetValue <Slider>().Value&& ObjectManager.Player.Level >= _menu.Item("farmStartAtLevel").GetValue <Slider>().Value) || jungleMobs)
                {
                    CastW(true);
                }
            }
        }
Example #2
0
        public static void CastBasicFarm(Spell spell)
        {
            if (!spell.IsReady())
                return;
            var minion = MinionManager.GetMinions(ObjectManager.Player.ServerPosition, spell.Range, MinionTypes.All, MinionTeam.NotAlly);

            if (minion.Count == 0)
                return;

            if (spell.Type == SkillshotType.SkillshotCircle)
            {
                spell.UpdateSourcePosition();

                var predPosition = spell.GetCircularFarmLocation(minion);

                if (predPosition.MinionsHit >= 2)
                {
                    spell.Cast(predPosition.Position);
                }
            }
            else if (spell.Type == SkillshotType.SkillshotLine || spell.Type == SkillshotType.SkillshotCone)
            {
                spell.UpdateSourcePosition();

                var predPosition = spell.GetLineFarmLocation(minion);

                if (predPosition.MinionsHit >= 2)
                    spell.Cast(predPosition.Position);
            }
        }
Example #3
0
        static void LaneClear()
        {
            _spellQ.Speed = _spellQFarmSpeed;
            var minions = LeagueSharp.Common.MinionManager.GetMinions(EloBuddy.ObjectManager.Player.ServerPosition, _spellQ.Range, LeagueSharp.Common.MinionTypes.All, LeagueSharp.Common.MinionTeam.NotAlly);

            bool jungleMobs = minions.Any(x => x.Team == EloBuddy.GameObjectTeam.Neutral);

            if ((FarmM["farmQ"].Cast <CheckBox>().CurrentValue&& EloBuddy.ObjectManager.Player.ManaPercent >= FarmM["farmPercent"].Cast <Slider>().CurrentValue) || jungleMobs)
            {
                LeagueSharp.Common.MinionManager.FarmLocation farmLocation = _spellQ.GetLineFarmLocation(minions);

                if (LeagueSharp.Common.Geometry.IsValid(farmLocation.Position))
                {
                    if (farmLocation.MinionsHit >= 2 || jungleMobs)
                    {
                        CastQ(farmLocation.Position);
                    }
                }
            }

            minions = LeagueSharp.Common.MinionManager.GetMinions(EloBuddy.ObjectManager.Player.ServerPosition, _spellW.Range, LeagueSharp.Common.MinionTypes.All, LeagueSharp.Common.MinionTeam.NotAlly);

            if (minions.Count() > 0)
            {
                jungleMobs = minions.Any(x => x.Team == EloBuddy.GameObjectTeam.Neutral);

                if ((FarmM["farmW"].Cast <CheckBox>().CurrentValue&& EloBuddy.ObjectManager.Player.ManaPercent >= FarmM["farmPercent"].Cast <Slider>().CurrentValue&& EloBuddy.ObjectManager.Player.Level >= FarmM["farmStartAtLevel"].Cast <Slider>().CurrentValue) || jungleMobs)
                {
                    CastW(true);
                }
            }
        }
Example #4
0
        public override void ExecuteLaneClear()
        {
            var qJ = Program.laneclear["UseQ.Lane"].Cast <ComboBox>().CurrentValue;

            if (qJ != 0)
            {
                var minionsQ = MinionManager.GetMinions(ObjectManager.Player.ServerPosition, Q.Range, MinionTypes.All);
                if (minionsQ != null)
                {
                    if (Q.IsReady())
                    {
                        var locQ = Q.GetLineFarmLocation(minionsQ);
                        if (minionsQ.Count == minionsQ.Count(m => ObjectManager.Player.LSDistance(m) < Q.Range) &&
                            locQ.MinionsHit > qJ && locQ.Position.IsValid())
                        {
                            Q.Cast(locQ.Position);
                        }
                    }
                }
            }
            var wJ = Program.laneclear["UseW.Lane"].Cast <ComboBox>().CurrentValue;

            if (wJ != 0)
            {
                var minionsW = MinionManager.GetMinions(ObjectManager.Player.ServerPosition,
                                                        Orbwalking.GetRealAutoAttackRange(null) + 165, MinionTypes.All);
                if (minionsW != null && minionsW.Count >= wJ)
                {
                    if (W.IsReady())
                    {
                        W.Cast();
                    }
                }
            }
        }
Example #5
0
        private static void LogicQ()
        {
            var t = TargetSelector.GetTarget(Q.Range, DamageType.Magical);
            if (t.LSIsValidTarget())
            {
                if (OktwCommon.GetKsDamage(t, Q) > t.Health && !SebbyLib.Orbwalking.InAutoAttackRange(t))
                    Program.CastSpell(Q, t);

                if (W.Instance.CooldownExpires - Game.Time < W.Instance.Cooldown - 1.3 && W.Instance.Name == "PickACard" && (W.Instance.CooldownExpires - Game.Time > 3 || Player.CountEnemiesInRange(950) == 0))
                {
                    if (Program.Combo && Player.Mana > RMANA + QMANA)
                        Program.CastSpell(Q, t);
                    if (Program.Farm && Player.Mana > RMANA + QMANA + WMANA + EMANA && getCheckBoxItem(qMenu, "harrasQ") && OktwCommon.CanHarras())
                        Program.CastSpell(Q, t);
                }

                foreach (var enemy in Program.Enemies.Where(enemy => enemy.LSIsValidTarget(Q.Range) && !OktwCommon.CanMove(enemy)))
                    Q.Cast(enemy, true, true);

            }
            else if (Program.LaneClear && Player.ManaPercent > getSliderItem(farmMenu, "Mana") && getCheckBoxItem(farmMenu, "farmQ") && Player.Mana > RMANA + QMANA)
            {
                var minionList = Cache.GetMinions(Player.ServerPosition, Q.Range);
                var farmPosition = Q.GetLineFarmLocation(minionList, Q.Width);
                if (farmPosition.MinionsHit > getSliderItem(farmMenu, "LCminions"))
                    Q.Cast(farmPosition.Position);
            }
        }
Example #6
0
        private static void Laneclear()
        {
            var allMinionsQ = MinionManager.GetMinions(ObjectManager.Player.ServerPosition, _q.Range);
            var allMinionsE = MinionManager.GetMinions(ObjectManager.Player.ServerPosition, _e.Range);
            var mymana      = (_player.Mana >= (_player.MaxMana * getSliderItem(farmMenu, "Energylane")) / 100);

            var useItemsl = getCheckBoxItem(farmMenu, "UseItemslane");
            var useQl     = getCheckBoxItem(farmMenu, "UseQL");
            var useEl     = getCheckBoxItem(farmMenu, "UseEL");

            if (_q.IsReady() && useQl && mymana)
            {
                var fl2 = _q.GetLineFarmLocation(allMinionsQ, _q.Width);

                if (fl2.MinionsHit >= 3)
                {
                    _q.Cast(fl2.Position);
                }
                else
                {
                    foreach (var minion in allMinionsQ)
                    {
                        if (!Orbwalking.InAutoAttackRange(minion) &&
                            minion.Health < 0.75 * _player.LSGetSpellDamage(minion, SpellSlot.Q))
                        {
                            _q.Cast(minion);
                        }
                    }
                }
            }

            if (_e.IsReady() && useEl && mymana)
            {
                if (allMinionsE.Count > 2)
                {
                    _e.Cast();
                }
                else
                {
                    foreach (var minion in allMinionsE)
                    {
                        if (!Orbwalking.InAutoAttackRange(minion) &&
                            minion.Health < 0.75 * _player.LSGetSpellDamage(minion, SpellSlot.E))
                        {
                            _e.Cast();
                        }
                    }
                }
            }

            if (useItemsl && _tiamat.IsReady() && allMinionsE.Count > 2)
            {
                _tiamat.Cast();
            }
            if (useItemsl && _hydra.IsReady() && allMinionsE.Count > 2)
            {
                _hydra.Cast();
            }
        }
Example #7
0
 private static void Clear()
 {
     if (getCheckBoxItem(clearMenu, "E") && E.IsReady())
     {
         var minionObj = GetMinions(E.Range, MinionTypes.All, MinionTeam.NotAlly, MinionOrderTypes.MaxHealth);
         if (minionObj.Any())
         {
             var pos = E.GetCircularFarmLocation(minionObj.Cast <Obj_AI_Base>().ToList());
             if (pos.MinionsHit > 1)
             {
                 if (E.Cast(pos.Position, getCheckBoxItem(miscMenu, "Packet")))
                 {
                     if (getCheckBoxItem(clearMenu, "Q") && Q.IsReady())
                     {
                         Q.Cast(pos.Position, getCheckBoxItem(miscMenu, "Packet"));
                     }
                     return;
                 }
             }
             else
             {
                 var obj = minionObj.FirstOrDefault(i => i.MaxHealth >= 1200);
                 if (obj != null && E.Cast(obj, getCheckBoxItem(miscMenu, "Packet")).IsCasted())
                 {
                     return;
                 }
             }
         }
     }
     if (getCheckBoxItem(clearMenu, "Q") && Q.IsReady())
     {
         var minionObj =
             GetMinions(Q2.Range, MinionTypes.All, MinionTeam.NotAlly, MinionOrderTypes.MaxHealth)
             .Cast <Obj_AI_Base>()
             .ToList();
         if (minionObj.Any() &&
             (!getCheckBoxItem(clearMenu, "E") || !E.IsReady() ||
              (E.IsReady() && E.GetCircularFarmLocation(minionObj).MinionsHit == 1)))
         {
             if (getCheckBoxItem(clearMenu, "E") &&
                 Flag.Where(i => minionObj.Count(a => Q2.WillHit(a, i.ServerPosition)) > 1)
                 .Any(i => Q.Cast(i.ServerPosition, getCheckBoxItem(miscMenu, "Packet"))))
             {
                 return;
             }
             var pos = Q.GetLineFarmLocation(minionObj.Where(i => Q.IsInRange(i)).ToList());
             if (pos.MinionsHit > 0 && Q.Cast(pos.Position, getCheckBoxItem(miscMenu, "Packet")))
             {
                 return;
             }
         }
     }
     if (getCheckBoxItem(clearMenu, "W") && W.IsReady() &&
         Player.HealthPercent < getSliderItem(clearMenu, "WHpU") &&
         GetMinions(W.Range, MinionTypes.All, MinionTeam.NotAlly).Any() &&
         W.Cast(getCheckBoxItem(miscMenu, "Packet")))
     {
     }
 }
Example #8
0
        private void Clear()
        {
            var minis         = MinionManager.GetMinions(325f, MinionTypes.All, MinionTeam.NotAlly);
            var killableWithE =
                minis.Where(m => HealthPrediction.GetHealthPrediction(m, 245) < E.GetDamage(m))
                .OrderByDescending(m => m.MaxHealth)
                .FirstOrDefault();

            if (config.Item("useeLC", true).GetValue <bool>() && E.IsReady() && killableWithE != null &&
                (!player.Spellbook.IsAutoAttacking || killableWithE.MaxHealth > 2000))
            {
                E.Cast(killableWithE);
            }
            if (config.Item("gotoAxeLC", true).GetValue <bool>())
            {
                GotoAxe(Game.CursorPos);
            }
            float perc = config.Item("minmana", true).GetValue <Slider>().Value / 100f;

            if (player.Mana < player.MaxMana * perc || player.Spellbook.IsAutoAttacking)
            {
                return;
            }
            if (config.Item("useqLC", true).GetValue <bool>() && Q.IsReady())
            {
                var         minisForQ    = MinionManager.GetMinions(Q.Range, MinionTypes.All, MinionTeam.NotAlly);
                var         farmLocation = Q.GetLineFarmLocation(minisForQ);
                Obj_AI_Base targetMini   = null;
                if (config.Item("qMinHit", true).GetValue <Slider>().Value <= farmLocation.MinionsHit)
                {
                    targetMini =
                        minisForQ.Where(m => Q.CountHits(minisForQ, m.Position) >= farmLocation.MinionsHit)
                        .OrderBy(m => m.Distance(player))
                        .FirstOrDefault();
                }
                if (targetMini == null)
                {
                    targetMini =
                        minisForQ.Where(m => minisForQ.Where(b => b.Distance(m) < Q.Width).Sum(b => b.Health) > 700)
                        .OrderByDescending(b => Q.CountHits(minisForQ, b.Position))
                        .FirstOrDefault();
                }
                if (targetMini != null)
                {
                    Q.Cast(targetMini.Position);
                }
            }
            if (config.Item("usewLC", true).GetValue <bool>() && W.IsReady())
            {
                if (minis.Sum(m => m.Health) > 750 || minis.Count > 3 || player.HealthPercent < 50)
                {
                    W.Cast();
                }
            }
        }
Example #9
0
        private void Clear()
        {
            var perc = getSliderItem(menuLC, "minmana") / 100f;

            if (player.Mana < player.MaxMana * perc || Orbwalker.IsAutoAttacking)
            {
                return;
            }
            if (getCheckBoxItem(menuLC, "useqLC"))
            {
                var minions = MinionManager.GetMinions(
                    ObjectManager.Player.ServerPosition, Q.Range, MinionTypes.All, MinionTeam.NotAlly);
                var bestPositionQ = Q.GetLineFarmLocation(minions, qWidth);

                if (bestPositionQ.MinionsHit >= getSliderItem(menuLC, "qMinHit") && !Q.IsCharging)
                {
                    Q.StartCharging(bestPositionQ.Position.To3D());
                    return;
                }
                if (Q.IsCharging && minions.Count(m => HealthPrediction.GetHealthPrediction(m, 500) < 0) > 0)
                {
                    var qMini = minions.FirstOrDefault();
                    if (qMini != null)
                    {
                        Q.Cast(qMini.Position, getCheckBoxItem(config, "packets"));
                    }
                }
            }

            if (getCheckBoxItem(menuLC, "useeLC") && E.IsReady() && !Q.IsCharging)
            {
                var minions = MinionManager.GetMinions(
                    ObjectManager.Player.ServerPosition, E.Range, MinionTypes.All, MinionTeam.NotAlly);
                var bestPositionE = E.GetLineFarmLocation(minions);
                if (bestPositionE.MinionsHit >= getSliderItem(menuLC, "eMinHit"))
                {
                    E.Cast(bestPositionE.Position);
                    return;
                }
            }
            if (W.IsReady() && !activatedW && getCheckBoxItem(menuLC, "usewLC") &&
                getSliderItem(menuLC, "wMinHit") <=
                Environment.Minion.countMinionsInrange(player.Position, W.Range))
            {
                W.Cast(getCheckBoxItem(config, "packets"));
            }
            if (W.IsReady() && activatedW && getCheckBoxItem(menuLC, "usewLC") &&
                MinionManager.GetMinions(
                    ObjectManager.Player.ServerPosition, W.Range, MinionTypes.All, MinionTeam.NotAlly)
                .Count(m => HealthPrediction.GetHealthPrediction(m, 500) < 0) > 0)
            {
                W.Cast(getCheckBoxItem(config, "packets"));
            }
        }
Example #10
0
        private void Clear()
        {
            float perc = config.Item("minmana", true).GetValue <Slider>().Value / 100f;

            if (player.Mana < player.MaxMana * perc || player.Spellbook.IsAutoAttacking)
            {
                return;
            }
            if (config.Item("useqLC", true).GetValue <bool>())
            {
                var minions = MinionManager.GetMinions(
                    ObjectManager.Player.ServerPosition, Q.Range, MinionTypes.All, MinionTeam.NotAlly);
                MinionManager.FarmLocation bestPositionQ = Q.GetLineFarmLocation(minions, qWidth);

                if (bestPositionQ.MinionsHit >= config.Item("qMinHit", true).GetValue <Slider>().Value&& !Q.IsCharging)
                {
                    Q.StartCharging(bestPositionQ.Position.To3D());
                    return;
                }
                if (Q.IsCharging && minions.Count(m => HealthPrediction.GetHealthPrediction(m, 500) < 0) > 0)
                {
                    var qMini = minions.FirstOrDefault();
                    if (qMini != null)
                    {
                        Q.Cast(qMini.Position);
                    }
                }
            }

            if (config.Item("useeLC", true).GetValue <bool>() && E.IsReady() && !Q.IsCharging)
            {
                var minions = MinionManager.GetMinions(
                    ObjectManager.Player.ServerPosition, E.Range, MinionTypes.All, MinionTeam.NotAlly);
                MinionManager.FarmLocation bestPositionE = E.GetLineFarmLocation(minions);
                if (bestPositionE.MinionsHit >= config.Item("eMinHit", true).GetValue <Slider>().Value)
                {
                    E.Cast(bestPositionE.Position);
                    return;
                }
            }
            if (W.IsReady() && !activatedW && config.Item("usewLC", true).GetValue <bool>() &&
                config.Item("wMinHit", true).GetValue <Slider>().Value <=
                Environment.Minion.countMinionsInrange(player.Position, W.Range))
            {
                W.Cast();
            }
            if (W.IsReady() && activatedW && config.Item("usewLC", true).GetValue <bool>() &&
                MinionManager.GetMinions(
                    ObjectManager.Player.ServerPosition, W.Range, MinionTypes.All, MinionTeam.NotAlly)
                .Count(m => HealthPrediction.GetHealthPrediction(m, 500) < 0) > 0)
            {
                W.Cast();
            }
        }
Example #11
0
        private void LogicQ()
        {
            var t  = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Magical);
            var t2 = TargetSelector.GetTarget(1500, TargetSelector.DamageType.Magical);

            if (t.IsValidTarget() && t2.IsValidTarget() && t == t2 && !(Config.Item("separate", true).GetValue <bool>() && Program.LaneClear))
            {
                if (Q.IsCharging)
                {
                    Program.CastSpell(Q, t);
                    if (OktwCommon.GetPassiveTime(Player, "XerathArcanopulseChargeUp") < 1 || (Player.CountEnemiesInRange(800) > 0) || Player.Distance(t) > 1450)
                    {
                        Q.Cast(Q.GetPrediction(t).CastPosition);
                    }
                    else if (OktwCommon.GetPassiveTime(Player, "XerathArcanopulseChargeUp") < 2 || (Player.CountEnemiesInRange(1000) > 0))
                    {
                        Q.CastIfHitchanceEquals(t, HitChance.VeryHigh);
                    }

                    return;
                }
                else if (t.IsValidTarget(Q.Range - 300))
                {
                    if (t.Health < OktwCommon.GetKsDamage(t, Q))
                    {
                        Q.StartCharging();
                    }
                    else if (Program.Combo && Player.Mana > EMANA + QMANA)
                    {
                        Q.StartCharging();
                    }
                    else if (t.IsValidTarget(1200) && Program.Farm && Player.Mana > RMANA + EMANA + QMANA + QMANA && Config.Item("harras" + t.ChampionName).GetValue <bool>() && !Player.UnderTurret(true) && OktwCommon.CanHarras())
                    {
                        Q.StartCharging();
                    }
                    else if ((Program.Combo || Program.Farm) && Player.Mana > RMANA + WMANA)
                    {
                        foreach (var enemy in HeroManager.Enemies.Where(enemy => enemy.IsValidTarget(Q.Range) && !OktwCommon.CanMove(enemy)))
                        {
                            Q.StartCharging();
                        }
                    }
                }
            }
            else if (Program.LaneClear && Q.Range > 1000 && Player.CountEnemiesInRange(1450) == 0 && (Q.IsCharging || (Player.ManaPercent > Config.Item("Mana", true).GetValue <Slider>().Value&& Config.Item("farmQ", true).GetValue <bool>() && Player.Mana > RMANA + QMANA + WMANA)))
            {
                var allMinionsQ = Cache.GetMinions(Player.ServerPosition, Q.Range);
                var Qfarm       = Q.GetLineFarmLocation(allMinionsQ, Q.Width);
                if (Qfarm.MinionsHit > Config.Item("LCminions", true).GetValue <Slider>().Value || (Q.IsCharging && Qfarm.MinionsHit > 0))
                {
                    Q.Cast(Qfarm.Position);
                }
            }
        }
Example #12
0
        public static Vector2 GetLineFarmMinions(this LeagueSharp.Common.Spell spell, int minionCount)
        {
            List <Obj_AI_Base> minions = MinionManager.GetMinions(ObjectManager.Player.Position, spell.Range);

            MinionManager.FarmLocation location = spell.GetLineFarmLocation(minions);
            if (location.MinionsHit >= minionCount && spell.IsInRange(location.Position.To3D()))
            {
                return(location.Position);
            }

            return(new Vector2(0, 0));
        }
Example #13
0
 private static void LaneClear()
 {
     if (getCheckBoxItem(SpellConfig, "farmE"))
     {
         if (E.IsReady() && Player.Mana > Q.ManaCost + W.ManaCost + E.ManaCost + R.ManaCost)
         {
             var minions = MinionManager.GetMinions(Player.ServerPosition, E.Range, MinionTypes.All, MinionTeam.NotAlly);
             var Efarm   = Q.GetLineFarmLocation(minions, E.Width);
             if (Efarm.MinionsHit >= 3)
             {
                 E.Cast(Efarm.Position);
             }
         }
     }
 }
Example #14
0
        public static IEnumerable <Obj_AI_Base> GetMins(this LeagueSharp.Common.Spell spell, FarmMode farmMode, GameObjectTeam minionTeam,
                                                        MinionType minionType = MinionType.All, MinionGroup minionGroup = MinionGroup.Alone, int minionCount = 1)
        {
            IEnumerable <Obj_AI_Base> list = ObjectManager.Get <Obj_AI_Minion>().Where(m => m.LSIsValidTarget(spell.Range));
            IEnumerable <Obj_AI_Base> mobs;

            if (farmMode == FarmMode.JungleClear)
            {
                mobs = list.Where(w => w.Team == minionTeam);
                if (minionType == MinionType.BigMobs)
                {
                    IEnumerable <Obj_AI_Base> oMob = (from fMobs in mobs
                                                      from fBigBoys in
                                                      new[]
                    {
                        "SRU_Blue", "SRU_Gromp", "SRU_Murkwolf", "SRU_Razorbeak", "SRU_Red",
                        "SRU_Krug", "SRU_Dragon", "SRU_Baron", "Sru_Crab"
                    }
                                                      where fBigBoys == fMobs.BaseSkinName
                                                      select fMobs).AsEnumerable();

                    mobs = oMob;
                }
            }
            else
            {
                mobs = list;
            }

            var objAiBases        = mobs as IList <Obj_AI_Base> ?? mobs.ToList();
            List <Obj_AI_Base> m1 = objAiBases.ToList();

            var locLine = spell.GetLineFarmLocation(m1);

            if (locLine.MinionsHit >= 3 && spell.IsInRange(locLine.Position.To3D()))
            {
                spell.Cast(locLine.Position);
            }

            var locCircular = spell.GetCircularFarmLocation(m1, spell.Width);

            if (locCircular.MinionsHit >= minionCount && spell.IsInRange(locCircular.Position.To3D()))
            {
                spell.Cast(locCircular.Position);
            }

            return(null);
        }
Example #15
0
        private static void LogicQ()
        {
            var t = TargetSelector.GetTarget(Q.Range, DamageType.Magical);

            if (t.IsValidTarget())
            {
                missileManager.Target = t;
                if (EMissile == null || !EMissile.IsValid)
                {
                    if (Program.Combo && Player.Mana > RMANA + QMANA)
                    {
                        Program.CastSpell(Q, t);
                    }
                    else if (Program.Farm && Player.Mana > RMANA + WMANA + QMANA + QMANA &&
                             getCheckBoxItem(QMenu, "harrasQ") && getCheckBoxItem(harassMenu, "harras" + t.NetworkId) &&
                             OktwCommon.CanHarras())
                    {
                        Program.CastSpell(Q, t);
                    }
                    else if (Q.GetDamage(t) * 2 + OktwCommon.GetEchoLudenDamage(t) >
                             t.Health - OktwCommon.GetIncomingDamage(t))
                    {
                        Q.Cast(t, true);
                    }
                }
                if (!Program.None && Player.Mana > RMANA + WMANA)
                {
                    foreach (
                        var enemy in
                        Program.Enemies.Where(enemy => enemy.IsValidTarget(Q.Range) && !OktwCommon.CanMove(enemy)))
                    {
                        Q.Cast(enemy, true);
                    }
                }
            }
            else if (Program.LaneClear && Player.ManaPercent > getSliderItem(FarmMenu, "Mana") &&
                     getCheckBoxItem(FarmMenu, "farmQ") && Player.Mana > RMANA + QMANA)
            {
                var minionList   = Cache.GetMinions(Player.ServerPosition, Q.Range);
                var farmPosition = Q.GetLineFarmLocation(minionList, Q.Width);
                if (farmPosition.MinionsHit > getSliderItem(FarmMenu, "LCminions"))
                {
                    Q.Cast(farmPosition.Position);
                }
            }
        }
Example #16
0
        private static void Clear()
        {
            if (Illaoi.ManaPercent < getSliderItem(clearMenu, "clear.mana"))
            {
                return;
            }

            var minionCount = MinionManager.GetMinions(Illaoi.Position, Q.Range, MinionTypes.All, MinionTeam.NotAlly);

            if (Q.IsReady() && getCheckBoxItem(clearMenu, "q.clear"))
            {
                var mfarm = Q.GetLineFarmLocation(minionCount);
                if (minionCount.Count >= getSliderItem(clearMenu, "q.minion.hit"))
                {
                    Q.Cast(mfarm.Position);
                }
            }
        }
Example #17
0
        private static void OnGameUpdate(EventArgs args)
        {
            if (Player.IsDead || Player.LSIsRecalling())
            {
                return;
            }
            var lanemana = getSliderItem(laneClearMenu, "LaneMana");
            var MinionsW = MinionManager.GetMinions(ObjectManager.Player.ServerPosition, W.Range + W.Width);
            var MinionsE = MinionManager.GetMinions(ObjectManager.Player.ServerPosition, E.Range + E.Width);
            var Wfarmpos = W.GetLineFarmLocation(MinionsW, W.Width);
            var Efarmpos = E.GetCircularFarmLocation(MinionsE, E.Width);

            if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LaneClear) && Wfarmpos.MinionsHit >= 3 &&
                getCheckBoxItem(laneClearMenu, "LaneclearW") &&
                Player.ManaPercent >= lanemana)
            {
                W.Cast(Wfarmpos.Position);
            }
            if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LaneClear) && Efarmpos.MinionsHit >= 3 &&
                MinionsE.Count >= 1 && getCheckBoxItem(laneClearMenu, "LaneclearE") &&
                Player.ManaPercent >= lanemana)
            {
                E.Cast(Efarmpos.Position);
            }

            if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo))
            {
                Combo();
            }
            if (getCheckBoxItem(comboMenu, "KS"))
            {
                KS();
            }
            if (getCheckBoxItem(comboMenu, "ZhoUlt"))
            {
                ZhoUlt();
            }
            if (getKeyBindItem(miscMenu, "AutoHarras"))
            {
                AutoHarras();
            }
        }
Example #18
0
        private static void Clear()
        {
            var   mob  = Jungle.GetNearest(player.Position);
            float perc = config.Item("minmana", true).GetValue <Slider>().Value / 100f;

            if (player.Mana < player.MaxMana * perc)
            {
                return;
            }
            if (config.Item("useeLC", true).GetValue <bool>() && E.CanCast(mob) && CheckWalls(player, mob))
            {
                E.CastOnUnit(mob);
            }
            MinionManager.FarmLocation bestPositionQ =
                Q.GetLineFarmLocation(MinionManager.GetMinions(Q.Range, MinionTypes.All, MinionTeam.NotAlly));
            if (bestPositionQ.MinionsHit >= config.Item("qMinHit", true).GetValue <Slider>().Value&&
                config.Item("useqLC", true).GetValue <bool>())
            {
                Q.Cast(bestPositionQ.Position);
            }
        }
Example #19
0
        private static void Clear()
        {
            var mob  = Jungle.GetNearest(player.Position);
            var perc = getSliderItem(menuLC, "minmana") / 100f;

            if (player.Mana < player.MaxMana * perc)
            {
                return;
            }
            if (getCheckBoxItem(menuLC, "useeLC") && E.CanCast(mob) && CheckWalls(player, mob))
            {
                E.CastOnUnit(mob, getCheckBoxItem(config, "packets"));
            }
            var bestPositionQ =
                Q.GetLineFarmLocation(MinionManager.GetMinions(Q.Range, MinionTypes.All, MinionTeam.NotAlly));

            if (bestPositionQ.MinionsHit >= getSliderItem(menuLC, "qMinHit") && getCheckBoxItem(menuLC, "useqLC"))
            {
                Q.Cast(bestPositionQ.Position, getCheckBoxItem(config, "packets"));
            }
        }
Example #20
0
        private void LogicQ()
        {
            var t = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Magical);

            if (t.IsValidTargetLS())
            {
                if (OktwCommon.GetKsDamage(t, Q) > t.Health && !Orbwalking.InAutoAttackRange(t))
                {
                    Program.CastSpell(Q, t);
                }

                if (W.Instance.CooldownExpires - Game.Time < W.Instance.Cooldown - 1.3 && !Player.HasBuff("pickacard_tracker") && (W.Instance.CooldownExpires - Game.Time > 3 || Player.CountEnemiesInRange(950) == 0))
                {
                    if (Program.Combo && Player.Mana > RMANA + QMANA)
                    {
                        Program.CastSpell(Q, t);
                    }
                    if (Program.Farm && Player.Mana > RMANA + QMANA + WMANA + EMANA && Config.Item("harrasQ", true).GetValue <bool>() && OktwCommon.CanHarras())
                    {
                        Program.CastSpell(Q, t);
                    }
                }

                foreach (var enemy in HeroManager.Enemies.Where(enemy => enemy.IsValidTargetLS(Q.Range) && !OktwCommon.CanMove(enemy)))
                {
                    Q.Cast(enemy, true, true);
                }
            }
            else if (Program.LaneClear && Player.ManaPercent > Config.Item("Mana", true).GetValue <Slider>().Value&& Config.Item("farmQ", true).GetValue <bool>() && Player.Mana > RMANA + QMANA)
            {
                var minionList   = Cache.GetMinions(Player.ServerPosition, Q.Range);
                var farmPosition = Q.GetLineFarmLocation(minionList, Q.Width);
                if (farmPosition.MinionsHit > Config.Item("LCminions", true).GetValue <Slider>().Value)
                {
                    Q.Cast(farmPosition.Position);
                }
            }
        }
Example #21
0
        private void Clear()
        {
            float perc = config.Item("minmana", true).GetValue <Slider>().Value / 100f;

            if (player.Mana < player.MaxMana * perc)
            {
                return;
            }
            MinionManager.FarmLocation bestPositionE =
                E.GetCircularFarmLocation(MinionManager.GetMinions(E.Range, MinionTypes.All, MinionTeam.NotAlly));
            MinionManager.FarmLocation bestPositionQ =
                Q.GetLineFarmLocation(MinionManager.GetMinions(Q.Range, MinionTypes.All, MinionTeam.NotAlly));
            if (config.Item("useeLC", true).GetValue <bool>() && E.IsReady() &&
                bestPositionE.MinionsHit > config.Item("ehitLC", true).GetValue <Slider>().Value)
            {
                E.Cast(bestPositionE.Position);
            }
            if (config.Item("useqLC", true).GetValue <bool>() && Q.IsReady() &&
                bestPositionQ.MinionsHit > config.Item("qhitLC", true).GetValue <Slider>().Value)
            {
                Q.Cast(bestPositionQ.Position);
            }
        }
Example #22
0
        static void LaneClear()
        {
            if (Q.IsReady() && getCheckBoxItem(laneclearMenu, "laneclearUseQ") && Player.ManaPercent > getSliderItem(laneclearMenu, "laneclearQmana"))
            {
                var allMinionsQ = MinionManager.GetMinions(Player.ServerPosition, Q.Range, MinionTypes.All, MinionTeam.Enemy);
                var locQ        = Q.GetLineFarmLocation(allMinionsQ);

                if (locQ.MinionsHit >= getSliderItem(laneclearMenu, "laneclearQmc"))
                {
                    Q.Cast(locQ.Position);
                }
            }

            if (W.IsReady() && getCheckBoxItem(laneclearMenu, "laneclearUseW"))
            {
                var minioncount = MinionManager.GetMinions(Player.Position, 1500).Count;

                if (minioncount > 0)
                {
                    if (Player.ManaPercent > getSliderItem(laneclearMenu, "laneclearbluemana"))
                    {
                        if (minioncount >= getSliderItem(laneclearMenu, "laneclearredmc"))
                        {
                            CardSelector.StartSelecting(Cards.Red);
                        }
                        else
                        {
                            CardSelector.StartSelecting(Cards.Blue);
                        }
                    }
                    else
                    {
                        CardSelector.StartSelecting(Cards.Blue);
                    }
                }
            }
        }
Example #23
0
        private void Clear()
        {
            var perc = getSliderItem(laneClearMenu, "minmana") / 100f;

            if (player.Mana < player.MaxMana * perc)
            {
                return;
            }
            var bestPositionE =
                E.GetCircularFarmLocation(MinionManager.GetMinions(E.Range, MinionTypes.All, MinionTeam.NotAlly));
            var bestPositionQ =
                Q.GetLineFarmLocation(MinionManager.GetMinions(Q.Range, MinionTypes.All, MinionTeam.NotAlly));

            if (getCheckBoxItem(laneClearMenu, "useeLC") && E.IsReady() &&
                bestPositionE.MinionsHit > getSliderItem(laneClearMenu, "ehitLC"))
            {
                E.Cast(bestPositionE.Position, getCheckBoxItem(config, "packets"));
            }
            if (getCheckBoxItem(laneClearMenu, "useqLC") && Q.IsReady() &&
                bestPositionQ.MinionsHit > getSliderItem(laneClearMenu, "qhitLC"))
            {
                Q.Cast(bestPositionQ.Position, getCheckBoxItem(config, "packets"));
            }
        }
Example #24
0
        public static void Farm(Spell spell, int minHit = 2, float overrideWidth = -1f)
        {
            if (!spell.IsReady())
            {
                return;
            }
            var minions =
                MinionManager.GetMinions(
                    ObjectManager.Player.ServerPosition, spell.Range, MinionTypes.All, MinionTeam.NotAlly,
                    MinionOrderTypes.MaxHealth).ToList();

            if (minions.Count == 0)
            {
                return;
            }

            if (spell.Type == SkillshotType.SkillshotCircle)
            {
                spell.UpdateSourcePosition();

                var prediction = spell.GetCircularFarmLocation(minions, overrideWidth);
                if (prediction.MinionsHit >= minHit)
                {
                    spell.Cast(prediction.Position);
                }
            }
            else if (spell.Type == SkillshotType.SkillshotLine)
            {
                spell.UpdateSourcePosition();

                var prediction = spell.GetLineFarmLocation(minions, overrideWidth);
                if (prediction.MinionsHit >= minHit)
                {
                    spell.Cast(prediction.Position);
                }
            }
        }
Example #25
0
        protected void CastBasicFarm(Spell spell)
        {
            if(!spell.IsReady())
				return;
            var minion = MinionManager.GetMinions(Player.ServerPosition, spell.Range, MinionTypes.All, MinionTeam.NotAlly);

            if (minion.Count == 0)
                return;

            if (spell.Type == SkillshotType.SkillshotCircle)
            {
                spell.UpdateSourcePosition();

                var predPosition = spell.GetCircularFarmLocation(minion);

                if (predPosition.MinionsHit >= 2)
                {
                    spell.Cast(predPosition.Position, Player.ChampionName == "Kartus" || packets());
                }
            }
            else if (spell.Type == SkillshotType.SkillshotLine)
            {
                spell.UpdateSourcePosition();

                var predPosition = spell.GetLineFarmLocation(minion);

                if(predPosition.MinionsHit >= 2)
                    spell.Cast(predPosition.Position, packets());
            }
        }
Example #26
0
        private static void LogicQ()
        {
            var t  = TargetSelector.GetTarget(Q.Range, DamageType.Magical);
            var t2 = TargetSelector.GetTarget(1500, DamageType.Magical);

            if (t.IsValidTarget() && t2.IsValidTarget() && t == t2 &&
                !(getCheckBoxItem(farmMenu, "separate") && Program.LaneClear))
            {
                if (Q.IsCharging)
                {
                    Program.CastSpell(Q, t);
                    if (OktwCommon.GetPassiveTime(Player, "XerathArcanopulseChargeUp") < 1 || (Player.CountEnemiesInRange(800) > 0) || Player.Distance(t) > 1450)
                    {
                        Q.Cast(t);
                    }
                    else if (OktwCommon.GetPassiveTime(Player, "XerathArcanopulseChargeUp") < 2 || (Player.CountEnemiesInRange(1000) > 0))
                    {
                        Q.CastIfHitchanceEquals(t, HitChance.VeryHigh);
                    }
                }
                else if (t.IsValidTarget(Q.Range - 300))
                {
                    if (t.Health < OktwCommon.GetKsDamage(t, Q))
                    {
                        Q.StartCharging();
                    }
                    else if (Program.Combo && Player.Mana > EMANA + QMANA)
                    {
                        Q.StartCharging();
                    }
                    else if (t.IsValidTarget(1200) && Program.Farm && Player.Mana > RMANA + EMANA + QMANA + QMANA &&
                             getCheckBoxItem(harassMenu, "harras" + t.NetworkId) && !Player.UnderTurret(true) &&
                             OktwCommon.CanHarras())
                    {
                        Q.StartCharging();
                    }
                    else if ((Program.Combo || Program.Farm) && Player.Mana > RMANA + WMANA)
                    {
                        foreach (
                            var enemy in
                            Program.Enemies.Where(
                                enemy => enemy.IsValidTarget(Q.Range) && !OktwCommon.CanMove(enemy)))
                        {
                            Q.StartCharging();
                        }
                    }
                }
            }
            else if (Program.LaneClear && Q.Range > 1000 && Player.CountEnemiesInRange(1450) == 0 &&
                     (Q.IsCharging ||
                      (Player.ManaPercent > getSliderItem(farmMenu, "Mana") && getCheckBoxItem(farmMenu, "farmQ") &&
                       Player.Mana > RMANA + QMANA + WMANA)))
            {
                var allMinionsQ = Cache.GetMinions(Player.ServerPosition, Q.Range);
                var Qfarm       = Q.GetLineFarmLocation(allMinionsQ, Q.Width);
                if (Qfarm.MinionsHit > getSliderItem(farmMenu, "LCminions") ||
                    (Q.IsCharging && Qfarm.MinionsHit > 0))
                {
                    Q.Cast(Qfarm.Position);
                }
            }
        }
Example #27
0
        private static void Laneclear()
        {
            var allMinionsQ    = MinionManager.GetMinions(ObjectManager.Player.ServerPosition, _q.Range, MinionTypes.All);
            var rangedMinionsQ = MinionManager.GetMinions(
                ObjectManager.Player.ServerPosition,
                _q.Range + _q.Width,
                MinionTypes.Ranged);
            var rangedMinionsE = MinionManager.GetMinions(
                ObjectManager.Player.ServerPosition,
                _e.Range + _e.Width,
                MinionTypes.Ranged);
            var allMinionsE = MinionManager.GetMinions(
                ObjectManager.Player.ServerPosition,
                _e.Range + _e.Width,
                MinionTypes.All);
            var useItemsl = getCheckBoxItem(clearMenu, "UseItemslane");
            var useQl     = getCheckBoxItem(clearMenu, "UseQL");
            var useEl     = getCheckBoxItem(clearMenu, "UseEL");
            var useWl     = getCheckBoxItem(clearMenu, "UseWL");
            var usewhp    = (100 * (_player.Health / _player.MaxHealth)) < getSliderItem(clearMenu, "UseWLHP");

            if (_q.IsReady() && useQl)
            {
                var fl1 = _q.GetLineFarmLocation(rangedMinionsQ, _q.Width);
                var fl2 = _q.GetLineFarmLocation(allMinionsQ, _q.Width);

                if (fl1.MinionsHit >= 3)
                {
                    _q.Cast(fl1.Position);
                }
                else if (fl2.MinionsHit >= 2 || allMinionsQ.Count == 1)
                {
                    _q.Cast(fl2.Position);
                }
                else
                {
                    foreach (var minion in allMinionsQ)
                    {
                        if (!Orbwalking.InAutoAttackRange(minion) &&
                            minion.Health < 0.75 * _player.LSGetSpellDamage(minion, SpellSlot.Q))
                        {
                            _q.Cast(minion);
                        }
                    }
                }
            }

            if (_e.IsReady() && useEl)
            {
                var fl1 = _e.GetCircularFarmLocation(rangedMinionsE, _e.Width);
                var fl2 = _e.GetCircularFarmLocation(allMinionsE, _e.Width);

                if (fl1.MinionsHit >= 3)
                {
                    _e.Cast(fl1.Position);
                }
                else if (fl2.MinionsHit >= 2 || allMinionsE.Count == 1)
                {
                    _e.Cast(fl2.Position);
                }
                else
                {
                    foreach (var minion in allMinionsE)
                    {
                        if (!Orbwalking.InAutoAttackRange(minion) &&
                            minion.Health < 0.75 * _player.LSGetSpellDamage(minion, SpellSlot.E))
                        {
                            _e.Cast(minion);
                        }
                    }
                }
            }

            if (usewhp && useWl && _w.IsReady() && allMinionsQ.Count > 0)
            {
                _w.Cast();
            }

            foreach (var minion in allMinionsQ)
            {
                if (useItemsl && _tiamat.IsReady() && minion.LSIsValidTarget(_tiamat.Range))
                {
                    _tiamat.Cast();
                }
                if (useItemsl && _hydra.IsReady() && minion.LSIsValidTarget(_tiamat.Range))
                {
                    _hydra.Cast();
                }
            }
        }
Example #28
0
        private void Clear()
        {
            var target = Jungle.GetNearest(player.Position, GetTargetRange());

            if (config.Item("useqLC", true).GetValue <bool>() && Q.IsReady() && !E.IsCharging)
            {
                if (target != null && Q.CanCast(target))
                {
                    Q.Cast(target.Position);
                }
                else
                {
                    MinionManager.FarmLocation bestPositionQ =
                        Q.GetLineFarmLocation(MinionManager.GetMinions(Q.Range, MinionTypes.All, MinionTeam.NotAlly));
                    if (bestPositionQ.MinionsHit >= config.Item("qMinHit", true).GetValue <Slider>().Value)
                    {
                        Q.Cast(bestPositionQ.Position);
                    }
                }
            }
            if (config.Item("usewLC", true).GetValue <bool>() && W.IsReady() && !E.IsCharging)
            {
                if (target != null && target.Distance(player) < W.Range)
                {
                    W.Cast();
                }
                else
                {
                    if (Environment.Minion.countMinionsInrange(player.Position, W.Range) >=
                        config.Item("wMinHit", true).GetValue <Slider>().Value)
                    {
                        W.Cast();
                    }
                }
            }
            if (config.Item("collectBlobs", true).GetValue <bool>() && !E.IsCharging)
            {
                var blob =
                    ObjectManager.Get <Obj_AI_Base>()
                    .Where(
                        o =>
                        !o.IsDead && o.IsValid && o.Name == "BlobDrop" && o.Team == player.Team &&
                        o.Distance(player) < Orbwalking.GetRealAutoAttackRange(player))
                    .OrderBy(o => o.Distance(player))
                    .FirstOrDefault();
                if (blob != null && Orbwalking.CanMove(300) && !EloBuddy.SDK.Orbwalker.CanAutoAttack && !player.Spellbook.IsAutoAttacking)
                {
                    orbwalker.SetMovement(false);
                    Orbwalking.Move = false;
                    EloBuddy.Player.IssueOrder(GameObjectOrder.MoveTo, blob.Position);
                }
            }
            if (config.Item("useeLC", true).GetValue <bool>() && E.IsReady())
            {
                if (target != null && target.IsValidTargetLS())
                {
                    CastE(target);
                }
                else
                {
                    MinionManager.FarmLocation bestPositionE =
                        E.GetCircularFarmLocation(
                            MinionManager.GetMinions(eRanges[E.Level - 1], MinionTypes.All, MinionTeam.NotAlly));
                    var castPos = Vector3.Zero;
                    if (bestPositionE.MinionsHit < config.Item("eMinHit", true).GetValue <Slider>().Value&&
                        farmPos.IsValid())
                    {
                        castPos = farmPos;
                    }
                    if (bestPositionE.MinionsHit >= config.Item("eMinHit", true).GetValue <Slider>().Value)
                    {
                        castPos = bestPositionE.Position.To3D();
                    }
                    if (castPos.IsValid())
                    {
                        farmPos = bestPositionE.Position.To3D();
                        LeagueSharp.Common.Utility.DelayAction.Add(5000, () => { farmPos = Vector3.Zero; });
                        CastE(castPos);
                    }
                }
            }
        }
Example #29
0
        public static void doLaneClear(AIHeroClient target)
        {
            List <Obj_AI_Base> minions = MinionManager.GetMinions(ObjectManager.Player.ServerPosition, 1000, MinionTypes.All, MinionTeam.NotAlly);

            if (YasuoSharp.laneclear["useElc"].Cast <CheckBox>().CurrentValue&& E.IsReady())
            {
                foreach (var minion in minions.Where(minion => minion.LSIsValidTarget(E.Range) && enemyIsJumpable(minion)))
                {
                    if (minion.Health < Player.LSGetSpellDamage(minion, E.Slot) ||
                        Q.IsReady() && minion.Health < (Player.LSGetSpellDamage(minion, E.Slot) + Player.LSGetSpellDamage(minion, Q.Slot)))
                    {
                        if (useENormal(minion))
                        {
                            return;
                        }
                    }
                }
            }

            if (Q.IsReady() && YasuoSharp.laneclear["useQlc"].Cast <CheckBox>().CurrentValue)
            {
                if (isQEmpovered() && !(target != null && Player.LSDistance(target) < 1050))
                {
                    if (canCastFarQ())
                    {
                        List <Vector2>             minionPs = YasMath.GetCastMinionsPredictedPositions(minions, getNewQSpeed(), 50f, 1200f, Player.ServerPosition, 900f, false, SkillshotType.SkillshotLine);
                        MinionManager.FarmLocation farm     = QEmp.GetLineFarmLocation(minionPs); //MinionManager.GetBestLineFarmLocation(minionPs, 50f, 900f);
                        if (farm.MinionsHit >= YasuoSharp.laneclear["useEmpQHit"].Cast <Slider>().CurrentValue)
                        {
                            //Console.WriteLine("Cast q simp Emp");
                            QEmp.Cast(farm.Position, false);
                            return;
                        }
                    }
                    else
                    {
                        if (minions.Count(min => min.IsValid && !min.IsDead && min.LSDistance(getDashEndPos()) < QCir.Range) >= YasuoSharp.laneclear["useEmpQHit"].Cast <Slider>().CurrentValue)
                        {
                            QCir.Cast(Player.Position, false);
                            Console.WriteLine("Cast q circ simp");
                        }
                    }
                }
                else
                {
                    if (!isDashigPro)
                    {
                        List <Vector2> minionPs = YasMath.GetCastMinionsPredictedPositions(minions, getNewQSpeed() * 0.3f, 30f, float.MaxValue, Player.ServerPosition, 465, false, SkillshotType.SkillshotLine);
                        Vector2        clos     = LeagueSharp.Common.Geometry.Closest(Player.ServerPosition.LSTo2D(), minionPs);
                        if (Player.LSDistance(clos) < 475)
                        {
                            Console.WriteLine("Cast q simp");
                            Q.Cast(clos, false);
                            return;
                        }
                    }
                    else
                    {
                        if (minions.Count(min => !min.IsDead && min.IsValid && min.LSDistance(getDashEndPos()) < QCir.Range) > 1)
                        {
                            QCir.Cast(Player.Position, false);
                            Console.WriteLine("Cast q circ simp");
                            return;
                        }
                    }
                }
            }
        }
Example #30
0
        public override void ExecuteLaneClear()
        {
            List <Obj_AI_Base> laneMinions;

            var laneWValue = Program.laneclear["Lane.UseW"].Cast <ComboBox>().CurrentValue;

            if (laneWValue != 0 && W.IsReady())
            {
                var totalAa =
                    ObjectManager.Get <Obj_AI_Minion>()
                    .Where(
                        m =>
                        m.LSIsValidTarget(Orbwalking.GetRealAutoAttackRange(null) + 65 + W.Range))
                    .Sum(mob => (int)mob.Health);

                totalAa = (int)(totalAa / ObjectManager.Player.TotalAttackDamage);
                if (totalAa > laneWValue * 5)
                {
                    W.Cast();
                }
            }

            var laneQValue = Program.laneclear["Lane.UseQ"].Cast <ComboBox>().CurrentValue;

            if (laneQValue != 0 && W.IsReady())
            {
                if (laneQValue == 1 || laneQValue == 3)
                {
                    var vMinions = MinionManager.GetMinions(ObjectManager.Player.Position, Q.Range);
                    foreach (var minions in vMinions
                             .Where(minions => minions.Health < ObjectManager.Player.LSGetSpellDamage(minions, SpellSlot.Q))
                             .Where(
                                 m =>
                                 m.LSIsValidTarget(Q.Range) &&
                                 m.LSDistance(ObjectManager.Player.Position) > GetRealAARange)
                             )
                    {
                        var qP  = Q.GetPrediction(minions);
                        var hit = qP.CastPosition.LSExtend(ObjectManager.Player.Position, -140);
                        if (qP.HitChance >= EloBuddy.SDK.Enumerations.HitChance.High)
                        {
                            Q.Cast(hit);
                        }
                    }
                }
                if (laneQValue == 2 || laneQValue == 3)
                {
                    var minions = MinionManager.GetMinions(ObjectManager.Player.ServerPosition, E.Range * 1);

                    foreach (var n in from n in minions
                             let xH =
                                 HealthPrediction.GetHealthPrediction(n,
                                                                      (int)(ObjectManager.Player.AttackCastDelay * 1000), Game.Ping / 2 + 100)
                                 where xH < 0
                                 where n.Health < Q.GetDamage(n)
                                 select n)
                    {
                        Q.Cast(n);
                    }
                }
            }

            var laneEValue = Program.laneclear["Lane.UseE"].Cast <ComboBox>().CurrentValue;

            if (laneEValue != 0 && E.IsReady())
            {
                laneMinions = MinionManager.GetMinions(ObjectManager.Player.ServerPosition, E.Range,
                                                       MinionTypes.All);

                if (laneMinions != null)
                {
                    var locE = E.GetLineFarmLocation(laneMinions);
                    if (laneMinions.Count == laneMinions.Count(m => ObjectManager.Player.LSDistance(m) < E.Range) &&
                        locE.MinionsHit > laneEValue && locE.Position.IsValid())
                    {
                        E.Cast(locE.Position);
                    }
                }
            }

            var laneRValue = Program.laneclear["Lane.UseR"].Cast <ComboBox>().CurrentValue;

            if (laneRValue != 0 && R.IsReady() && UltiBuffStacks < Program.laneclear["Lane.UseRLim"].Cast <Slider>().CurrentValue)
            {
                switch (laneRValue)
                {
                case 1:
                {
                    var vMinions = MinionManager.GetMinions(ObjectManager.Player.Position, Q.Range);
                    foreach (var minions in vMinions
                             .Where(minions => minions.Health < R.GetDamage(minions))
                             .Where(
                                 m =>
                                 m.LSIsValidTarget(R.Range) &&
                                 m.LSDistance(ObjectManager.Player.Position) > GetRealAARange)
                             )
                    {
                        R.Cast(minions);
                    }

                    break;
                }

                case 2:
                {
                    laneMinions = MinionManager.GetMinions(ObjectManager.Player.ServerPosition, R.Range + R.Width + 30,
                                                           MinionTypes.Ranged);

                    if (laneMinions != null)
                    {
                        var locR = R.GetCircularFarmLocation(laneMinions, R.Width * 0.75f);
                        if (locR.MinionsHit >= laneEValue && R.IsInRange(locR.Position.To3D()))
                        {
                            R.Cast(locR.Position);
                        }
                    }

                    break;
                }
                }
            }
        }
Example #31
0
        private void Clear()
        {
            var target = Jungle.GetNearest(player.Position, GetTargetRange());

            if (getCheckBoxItem(menuLC, "useqLC") && Q.IsReady() && !E.IsCharging)
            {
                if (target != null && Q.CanCast(target))
                {
                    Q.Cast(target.Position, getCheckBoxItem(config, "packets"));
                }
                else
                {
                    var bestPositionQ =
                        Q.GetLineFarmLocation(MinionManager.GetMinions(Q.Range, MinionTypes.All, MinionTeam.NotAlly));
                    if (bestPositionQ.MinionsHit >= getSliderItem(menuLC, "qMinHit"))
                    {
                        Q.Cast(bestPositionQ.Position, getCheckBoxItem(config, "packets"));
                    }
                }
            }
            if (getCheckBoxItem(menuLC, "usewLC") && W.IsReady() && !E.IsCharging)
            {
                if (target != null && target.LSDistance(player) < W.Range)
                {
                    W.Cast(getCheckBoxItem(config, "packets"));
                }
                else
                {
                    if (Helpers.Environment.Minion.countMinionsInrange(player.Position, W.Range) >=
                        getSliderItem(menuLC, "wMinHit"))
                    {
                        W.Cast(getCheckBoxItem(config, "packets"));
                    }
                }
            }
            if (getCheckBoxItem(menuLC, "collectBlobs") && !E.IsCharging)
            {
                var blob =
                    ObjectManager.Get <Obj_AI_Base>()
                    .Where(
                        o =>
                        !o.IsDead && o.IsValid && o.Name == "BlobDrop" && o.Team == player.Team &&
                        o.LSDistance(player) < Orbwalking.GetRealAutoAttackRange(player))
                    .OrderBy(o => o.LSDistance(player))
                    .FirstOrDefault();
                if (blob != null && !Orbwalker.CanAutoAttack && !Orbwalker.IsAutoAttacking)
                {
                    Orbwalker.DisableMovement = true;
                    Player.IssueOrder(GameObjectOrder.MoveTo, blob.Position);
                }
            }
            if (getCheckBoxItem(menuLC, "useeLC") && E.IsReady())
            {
                if (target != null && target.LSIsValidTarget())
                {
                    CastE(target);
                }
                else
                {
                    var bestPositionE =
                        E.GetCircularFarmLocation(
                            MinionManager.GetMinions(eRanges[E.Level - 1], MinionTypes.All, MinionTeam.NotAlly));
                    var castPos = Vector3.Zero;
                    if (bestPositionE.MinionsHit < getSliderItem(menuLC, "eMinHit") &&
                        farmPos.IsValid())
                    {
                        castPos = farmPos;
                    }
                    if (bestPositionE.MinionsHit >= getSliderItem(menuLC, "eMinHit"))
                    {
                        castPos = bestPositionE.Position.To3D();
                    }
                    if (castPos.IsValid())
                    {
                        farmPos = bestPositionE.Position.To3D();
                        Utility.DelayAction.Add(5000, () => { farmPos = Vector3.Zero; });
                        CastE(castPos);
                    }
                }
            }
        }
Example #32
0
        private static void Clear()
        {
            var minions =
                MinionManager.GetMinions(400, MinionTypes.All, MinionTeam.NotAlly)
                .Where(m => m.IsValidTargetLS(400))
                .ToList();

            if (minions.Count() > 2)
            {
                if (Items.HasItem(3077) && Items.CanUseItem(3077))
                {
                    Items.UseItem(3077);
                }
                if (Items.HasItem(3074) && Items.CanUseItem(3074))
                {
                    Items.UseItem(3074);
                }
            }
            float perc = (float)config.Item("minmana", true).GetValue <Slider>().Value / 100f;

            if (me.Mana < me.MaxMana * perc)
            {
                return;
            }

            Q.SetSkillshot(
                Q.Instance.SData.SpellCastTime, Q.Instance.SData.LineWidth, Q.Instance.SData.MissileSpeed, false,
                SkillshotType.SkillshotLine);
            var minionsSpells = MinionManager.GetMinions(W.Range, MinionTypes.All, MinionTeam.NotAlly);

            if (W.IsReady() && minionsSpells.Count() > 1 && config.Item("usewC", true).GetValue <bool>() &&
                me.Spellbook.GetSpell(SpellSlot.W).SData.Mana <= me.Mana)
            {
                W.Cast();
            }
            var minHit = config.Item("useeCmin", true).GetValue <Slider>().Value;

            if (E.IsReady() && me.Spellbook.GetSpell(SpellSlot.Q).SData.Mana <= me.Mana &&
                CombatHelper.SejuaniCountFrostMinion(E.Range) >= minHit &&
                (!(!Q.IsReady() && me.Mana - me.Spellbook.GetSpell(SpellSlot.Q).SData.Mana < me.MaxMana * perc) ||
                 !(!W.IsReady() && me.Mana - me.Spellbook.GetSpell(SpellSlot.W).SData.Mana < me.MaxMana * perc)))
            {
                E.Cast();
            }
            if (config.Item("useqC", true).GetValue <bool>() && Q.IsReady() &&
                me.Spellbook.GetSpell(SpellSlot.Q).SData.Mana <= me.Mana)
            {
                var minionsForQ = MinionManager.GetMinions(
                    ObjectManager.Player.ServerPosition, Q.Range, MinionTypes.All, MinionTeam.NotAlly);
                MinionManager.FarmLocation bestPosition = Q.GetLineFarmLocation(minionsForQ);
                if (bestPosition.Position.IsValid())
                {
                    if (bestPosition.MinionsHit >= 2)
                    {
                        Q.Cast(bestPosition.Position);
                    }
                }
            }

            Q.SetSkillshot(
                Q.Instance.SData.SpellCastTime, Q.Instance.SData.LineWidth, Q.Instance.SData.MissileSpeed, true,
                SkillshotType.SkillshotLine);
        }
Example #33
0
        private void LogicQ()
        {
            foreach (var enemy in HeroManager.Enemies.Where(enemy => enemy.IsValidTargetLS(1600) && Q.GetDamage(enemy) + GetWDmg(enemy) > enemy.Health))
            {
                if (enemy.IsValidTargetLS(R.Range))
                {
                    CastQ(enemy);
                }
                return;
            }

            if (Config.Item("maxQ", true).GetValue <bool>() && (Q.Range < 1500) && Player.CountEnemiesInRange(AArange) == 0)
            {
                return;
            }

            var t = Orbwalker.GetTarget() as AIHeroClient;

            if (!t.IsValidTargetLS())
            {
                t = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Physical);
            }

            if (t.IsValidTargetLS())
            {
                if (Q.IsCharging)
                {
                    if (Config.Item("fastQ", true).GetValue <bool>())
                    {
                        Q.Cast(Q.GetPrediction(t).CastPosition);
                    }

                    if (GetQEndTime() > 2)
                    {
                        Program.CastSpell(Q, t);
                    }
                    else
                    {
                        Q.Cast(Q.GetPrediction(t).CastPosition);
                    }
                    return;
                }

                if ((OktwCommon.GetBuffCount(t, "varuswdebuff") == 3 && CanCast && !E.IsReady()) || !EloBuddy.Player.Instance.IsInAutoAttackRange(t))
                {
                    if ((Program.Combo || (OktwCommon.GetBuffCount(t, "varuswdebuff") == 3 && Program.Farm)) && Player.Mana > RMANA + QMANA)
                    {
                        CastQ(t);
                    }
                    else if (Program.Farm && Player.Mana > RMANA + EMANA + QMANA + QMANA && Config.Item("harras" + t.ChampionName).GetValue <bool>() && !Player.UnderTurret(true) && OktwCommon.CanHarras())
                    {
                        CastQ(t);
                    }
                    else if (!Program.None && Player.Mana > RMANA + WMANA)
                    {
                        foreach (var enemy in HeroManager.Enemies.Where(enemy => enemy.IsValidTargetLS(Q.Range) && !OktwCommon.CanMove(enemy)))
                        {
                            CastQ(enemy);
                        }
                    }
                }
            }
            else if (Program.LaneClear && Config.Item("farmQ", true).GetValue <bool>() && Player.Mana > RMANA + QMANA + WMANA && Q.Range > 1500 && Player.CountEnemiesInRange(1450) == 0 && (Q.IsCharging || (Player.ManaPercentage() > Config.Item("Mana", true).GetValue <Slider>().Value)))
            {
                var allMinionsQ = Cache.GetMinions(Player.ServerPosition, Q.Range);
                var Qfarm       = Q.GetLineFarmLocation(allMinionsQ, Q.Width);
                if (Qfarm.MinionsHit > 3 || (Q.IsCharging && Qfarm.MinionsHit > 0))
                {
                    Q.Cast(Qfarm.Position);
                }
            }
        }