Exemplo n.º 1
0
 protected override void Harass()
 {
     if (Menu.Item(Menu.Name + ".harass.q").GetValue <bool>() && Q.IsReady() && ManaManager.Check("harass-q"))
     {
         Casting.SkillShot(Q, Q.GetHitChance("harass"));
     }
     if (Menu.Item(Menu.Name + ".harass.e").GetValue <bool>() && E.IsReady() && ManaManager.Check("harass-e"))
     {
         foreach (var enemy in GameObjects.EnemyHeroes.Where(e => E.IsInRange(e)))
         {
             if (Rend.IsKillable(enemy, true))
             {
                 E.Cast();
             }
             else
             {
                 var buff = Rend.GetBuff(enemy);
                 if (buff != null &&
                     buff.Count >= Menu.Item(Menu.Name + ".harass.e-min").GetValue <Slider>().Value)
                 {
                     if (enemy.Distance(Player) > E.Range * 0.8 || buff.EndTime - Game.Time < 0.3)
                     {
                         E.Cast();
                     }
                 }
             }
         }
     }
 }
Exemplo n.º 2
0
 protected override void Killsteal()
 {
     if (Menu.Item(Menu.Name + ".killsteal.e").GetValue <bool>() && E.IsReady() &&
         GameObjects.EnemyHeroes.Any(h => h.IsValidTarget(E.Range) && Rend.IsKillable(h, false)))
     {
         CastE();
     }
 }
Exemplo n.º 3
0
        protected override void LaneClear()
        {
            if (!ResourceManager.Check("lane-clear"))
            {
                return;
            }

            var useQ = Menu.Item(Menu.Name + ".lane-clear.q").GetValue <bool>() && Q.IsReady();
            var useE = Menu.Item(Menu.Name + ".lane-clear.e").GetValue <bool>() && E.IsReady();

            if (!useQ && !useE)
            {
                return;
            }

            var minE    = ItemData.Runaans_Hurricane_Ranged_Only.GetItem().IsOwned(Player) ? 3 : 2;
            var minQ    = Menu.Item(Menu.Name + ".lane-clear.q-min").GetValue <Slider>().Value;
            var minions = MinionManager.GetMinions(Q.Range);

            if (minions.Count == 0)
            {
                return;
            }
            if (useQ && minions.Count >= minQ && !Player.IsWindingUp && !Player.IsDashing())
            {
                foreach (var minion in minions.Where(x => x.Health <= Q.GetDamage(x)))
                {
                    var killcount = 0;
                    foreach (var colminion in
                             QGetCollisions(Player, Player.ServerPosition.Extend(minion.ServerPosition, Q.Range)))
                    {
                        if (colminion.Health <= Q.GetDamage(colminion))
                        {
                            killcount++;
                        }
                        else
                        {
                            break;
                        }
                    }

                    if (killcount >= minQ)
                    {
                        Q.Cast(minion.ServerPosition);
                        break;
                    }
                }
            }
            if (useE)
            {
                var killable = minions.Where(m => E.IsInRange(m) && Rend.IsKillable(m, false)).ToList();
                if (killable.Count >= minE)
                {
                    CastE();
                }
            }
        }
Exemplo n.º 4
0
        protected override void JungleClear()
        {
            if (!ResourceManager.Check("jungle-clear"))
            {
                return;
            }

            var useQ = Menu.Item(Menu.Name + ".jungle-clear.q").GetValue <bool>() && Q.IsReady();
            var useE = Menu.Item(Menu.Name + ".jungle-clear.e").GetValue <bool>() && E.IsReady();

            if (!useQ && !useE)
            {
                return;
            }

            var minions = MinionManager.GetMinions(
                Q.Range, MinionTypes.All, MinionTeam.Neutral, MinionOrderTypes.MaxHealth);

            if (minions.Count == 0)
            {
                return;
            }
            if (useQ && minions.Count >= 1 && !Player.IsWindingUp && !Player.IsDashing())
            {
                foreach (var minion in minions.Where(x => x.Health <= Q.GetDamage(x)))
                {
                    var killcount = 0;
                    foreach (var colminion in
                             QGetCollisions(Player, Player.ServerPosition.Extend(minion.ServerPosition, Q.Range)))
                    {
                        if (colminion.Health <= Q.GetDamage(colminion))
                        {
                            killcount++;
                        }
                        else
                        {
                            break;
                        }
                    }

                    if (killcount >= 1)
                    {
                        Q.Cast(minion.ServerPosition);
                        break;
                    }
                }
            }
            if (useE)
            {
                var killable = minions.Where(m => E.IsInRange(m) && Rend.IsKillable(m, false)).ToList();
                if (killable.Count >= 1)
                {
                    CastE();
                }
            }
        }
Exemplo n.º 5
0
        protected override void Combo()
        {
            var useQ = Menu.Item(Menu.Name + ".combo.q").GetValue <bool>() && Q.IsReady() && ManaManager.Check("combo-q");
            var useE = Menu.Item(Menu.Name + ".combo.e").GetValue <bool>() && E.IsReady();

            if (useQ)
            {
                Casting.SkillShot(Q, Q.GetHitChance("combo"));
            }

            if (useE)
            {
                var target = TargetSelector.GetTarget(E);
                if (target != null && Rend.HasBuff(target))
                {
                    if (target.Distance(Player) > Orbwalking.GetRealAutoAttackRange(target))
                    {
                        var minion =
                            GameObjects.EnemyMinions.FirstOrDefault(
                                m => m.IsValidTarget(Orbwalking.GetRealAutoAttackRange(m)) && Rend.IsKillable(m, true));
                        if (minion != null)
                        {
                            E.Cast();
                        }
                    }
                    else if (E.IsInRange(target))
                    {
                        if (Rend.IsKillable(target, false))
                        {
                            E.Cast();
                        }
                        else
                        {
                            var buff = Rend.GetBuff(target);
                            if (buff != null &&
                                buff.Count >= Menu.Item(Menu.Name + ".combo.e-min").GetValue <Slider>().Value)
                            {
                                if (target.Distance(Player) > E.Range * 0.8 || buff.EndTime - Game.Time < 0.3)
                                {
                                    E.Cast();
                                }
                            }
                        }
                    }
                }
            }
        }
Exemplo n.º 6
0
 private void OnOrbwalkingNonKillableMinion(AttackableUnit unit)
 {
     try
     {
         if (Menu.Item(Menu.Name + ".lasthit.e-unkillable").GetValue <bool>() && E.IsReady() &&
             ResourceManager.Check("lasthit"))
         {
             var target = unit as Obj_AI_Base;
             if (target != null && Rend.IsKillable(target, true))
             {
                 CastE();
             }
         }
     }
     catch (Exception ex)
     {
         Global.Logger.AddItem(new LogItem(ex));
     }
 }
Exemplo n.º 7
0
 protected override void Harass()
 {
     if (Menu.Item(Menu.Name + ".harass.q").GetValue <bool>() && Q.IsReady() && ResourceManager.Check("harass-q") &&
         !Player.IsWindingUp && !Player.IsDashing())
     {
         var target = TargetSelector.GetTarget(Q);
         if (target != null)
         {
             var prediction = Q.GetPrediction(target);
             if (prediction.Hitchance >= Q.GetHitChance("harass"))
             {
                 Q.Cast(prediction.CastPosition);
             }
             else if (prediction.Hitchance == HitChance.Collision)
             {
                 QCollisionCheck(target);
             }
         }
     }
     if (Menu.Item(Menu.Name + ".harass.e").GetValue <bool>() && E.IsReady() && ResourceManager.Check("harass-e"))
     {
         foreach (var enemy in GameObjects.EnemyHeroes.Where(e => E.IsInRange(e)))
         {
             if (Rend.IsKillable(enemy, enemy.HealthPercent < 10))
             {
                 CastE();
             }
             else
             {
                 var buff = Rend.GetBuff(enemy);
                 if (buff != null &&
                     buff.Count >= Menu.Item(Menu.Name + ".harass.e-min").GetValue <Slider>().Value)
                 {
                     if (enemy.Distance(Player) > E.Range * 0.8 || buff.EndTime - Game.Time < 0.3)
                     {
                         CastE();
                     }
                 }
             }
         }
     }
 }
Exemplo n.º 8
0
        protected override void Harass()
        {
            if (Menu.Item(Menu.Name + ".harass.q").GetValue <bool>() && Q.IsReady() && ResourceManager.Check("harass-q") &&
                !Player.IsWindingUp && !Player.IsDashing())
            {
                var target = TargetSelector.GetTarget(Q);
                if (target != null)
                {
                    var prediction = Q.GetPrediction(target);
                    if (prediction.Hitchance >= Q.GetHitChance("harass"))
                    {
                        Q.Cast(prediction.CastPosition);
                    }
                    else if (prediction.Hitchance == HitChance.Collision)
                    {
                        QCollisionCheck(target);
                    }
                }
            }

            if (Menu.Item(Menu.Name + ".harass.e").GetValue <bool>() && E.IsReady() && ResourceManager.Check("harass-e"))
            {
                var target = TargetSelector.GetTarget(E, false);
                if (target != null && Rend.HasBuff(target))
                {
                    if (Rend.IsKillable(target, false))
                    {
                        CastE();
                    }
                    if (target.Distance(Player) > Orbwalking.GetRealAutoAttackRange(target))
                    {
                        if (
                            GameObjects.EnemyMinions.Any(
                                m => m.IsValidTarget(E.Range * 0.95f) && Rend.IsKillable(m, m.HealthPercent < 10)))
                        {
                            CastE();
                        }
                        else
                        {
                            var dashObjects =
                                GameObjects.EnemyMinions.Where(
                                    m => m.IsValidTarget(Orbwalking.GetRealAutoAttackRange(m))).ToList();
                            var minion =
                                dashObjects.FirstOrDefault(
                                    m =>
                                    m.Health > Player.GetAutoAttackDamage(m) * 1.1f &&
                                    m.Health < Player.GetAutoAttackDamage(m) + Rend.GetDamage(m, 1));
                            if (minion != null)
                            {
                                Orbwalker.ForceTarget(minion);
                                if (Orbwalking.CanAttack())
                                {
                                    ObjectManager.Player.IssueOrder(GameObjectOrder.AttackUnit, minion);
                                }
                            }
                        }
                    }
                    else if (E.IsInRange(target))
                    {
                        if (Rend.IsKillable(target, false))
                        {
                            CastE();
                        }
                        else
                        {
                            var buff = Rend.GetBuff(target);
                            if (buff != null &&
                                buff.Count >= Menu.Item(Menu.Name + ".harass.e-min").GetValue <Slider>().Value)
                            {
                                if (target.Distance(Player) > E.Range * 0.8 && !target.IsFacing(Player) ||
                                    buff.EndTime - Game.Time < 0.3)
                                {
                                    CastE();
                                }
                            }
                        }
                    }
                }
            }
        }
Exemplo n.º 9
0
        protected override void OnPreUpdate()
        {
            if (E.IsReady())
            {
                if (Menu.Item(Menu.Name + ".miscellaneous.e-death").GetValue <bool>())
                {
                    if (IncomingDamageManager.GetDamage(Player) > Player.Health &&
                        GameObjects.EnemyHeroes.Any(e => e.IsValidTarget(E.Range) && Rend.HasBuff(e)))
                    {
                        CastE();
                    }
                }

                var eBig    = Menu.Item(Menu.Name + ".lasthit.e-big").GetValue <bool>();
                var eJungle = Menu.Item(Menu.Name + ".lasthit.e-jungle").GetValue <bool>();
                if (eBig || eJungle)
                {
                    if (eJungle && Player.Level >= 3 || eBig)
                    {
                        var creeps =
                            GameObjects.Jungle.Where(e => e.IsValidTarget(E.Range) && Rend.IsKillable(e, false))
                            .ToList();
                        if (eJungle && creeps.Any() ||
                            eBig &&
                            creeps.Any(
                                m =>
                                m.CharData.BaseSkinName.StartsWith("SRU_Dragon") ||
                                m.CharData.BaseSkinName.StartsWith("SRU_Baron")))
                        {
                            CastE();
                            return;
                        }
                    }
                }

                var eSiege = (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LaneClear ||
                              Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LastHit) &&
                             Menu.Item(Menu.Name + ".lasthit.e-siege").GetValue <bool>();
                var eTurret = (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LaneClear ||
                               Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LastHit) &&
                              Menu.Item(Menu.Name + ".lasthit.e-turret").GetValue <bool>();
                var eReset = Orbwalker.ActiveMode != Orbwalking.OrbwalkingMode.None &&
                             Orbwalker.ActiveMode != Orbwalking.OrbwalkingMode.Flee &&
                             Orbwalker.ActiveMode != Orbwalking.OrbwalkingMode.Combo &&
                             Menu.Item(Menu.Name + ".miscellaneous.e-reset").GetValue <bool>();

                IEnumerable <Obj_AI_Minion> minions = new HashSet <Obj_AI_Minion>();
                if (eSiege || eTurret || eReset)
                {
                    minions =
                        GameObjects.EnemyMinions.Where(
                            e => e.IsValidTarget(E.Range) && Rend.IsKillable(e, e.HealthPercent < 25));
                }

                if (ResourceManager.Check("lasthit"))
                {
                    if (eSiege)
                    {
                        if (
                            minions.Any(
                                m =>
                                m.CharData.BaseSkinName.Contains("MinionSiege") ||
                                m.CharData.BaseSkinName.Contains("Super")))
                        {
                            CastE();
                            return;
                        }
                    }
                    if (eTurret)
                    {
                        if (minions.Any(m => Utils.UnderAllyTurret(m.Position)))
                        {
                            CastE();
                            return;
                        }
                    }
                }

                if (eReset && minions.Any() && ResourceManager.Check("misc") &&
                    GameObjects.EnemyHeroes.Any(e => Rend.HasBuff(e) && e.IsValidTarget(E.Range)))
                {
                    CastE();
                    return;
                }
            }

            if (ShouldSave())
            {
                R.Cast();
            }
        }
Exemplo n.º 10
0
        protected override void Combo()
        {
            var useQ = Menu.Item(Menu.Name + ".combo.q").GetValue <bool>() && Q.IsReady() &&
                       ResourceManager.Check("combo-q");
            var useE = Menu.Item(Menu.Name + ".combo.e").GetValue <bool>() && E.IsReady();

            if (useQ && !Player.IsWindingUp && !Player.IsDashing())
            {
                var target = TargetSelector.GetTarget(Q);
                if (target != null)
                {
                    var prediction = Q.GetPrediction(target);
                    if (prediction.Hitchance >= Q.GetHitChance("combo"))
                    {
                        Q.Cast(prediction.CastPosition);
                    }
                    else if (prediction.Hitchance == HitChance.Collision)
                    {
                        QCollisionCheck(target);
                    }
                }
            }

            var dashObjects = new List <Obj_AI_Base>();

            if (useE)
            {
                var target = TargetSelector.GetTarget(E, false);
                if (target != null && Rend.HasBuff(target))
                {
                    if (target.Distance(Player) > Orbwalking.GetRealAutoAttackRange(target))
                    {
                        if (
                            GameObjects.EnemyMinions.Any(
                                m =>
                                m.IsValidTarget(Orbwalking.GetRealAutoAttackRange(m)) &&
                                Rend.IsKillable(m, (m.HealthPercent < 10))))
                        {
                            CastE();
                        }
                        else
                        {
                            dashObjects =
                                GetDashObjects(
                                    GameObjects.EnemyMinions.Where(
                                        m => m.IsValidTarget(Orbwalking.GetRealAutoAttackRange(m)))
                                    .Select(e => e as Obj_AI_Base)
                                    .ToList());
                            var minion =
                                dashObjects.FirstOrDefault(
                                    m =>
                                    m.Health > Player.GetAutoAttackDamage(m) * 1.1f &&
                                    m.Health < Player.GetAutoAttackDamage(m) + Rend.GetDamage(m, 1));
                            if (minion != null)
                            {
                                Orbwalker.ForceTarget(minion);
                            }
                        }
                    }
                    else if (E.IsInRange(target))
                    {
                        if (Rend.IsKillable(target, false))
                        {
                            CastE();
                        }
                        else
                        {
                            var buff = Rend.GetBuff(target);
                            if (buff != null &&
                                buff.Count >= Menu.Item(Menu.Name + ".combo.e-min").GetValue <Slider>().Value)
                            {
                                if (target.Distance(Player) > E.Range * 0.8 && !target.IsFacing(Player))
                                {
                                    CastE();
                                }
                            }
                        }
                    }
                }
            }

            if (Menu.Item(Menu.Name + ".combo.minions").GetValue <bool>() && !Player.IsWindingUp && !Player.IsDashing() &&
                !GameObjects.EnemyHeroes.Any(
                    e => e.IsValidTarget() && e.Distance(Player) < Orbwalking.GetRealAutoAttackRange(e) * 1.1f))
            {
                if (dashObjects.Count <= 0)
                {
                    dashObjects = GetDashObjects().ToList();
                }
                var minion = dashObjects.FirstOrDefault();
                if (minion != null)
                {
                    Orbwalker.ForceTarget(minion);
                }
            }
            else
            {
                Orbwalker.ForceTarget(null);
            }
        }
Exemplo n.º 11
0
        protected override void Combo()
        {
            var useQ = Menu.Item(Menu.Name + ".combo.q").GetValue <bool>() && Q.IsReady() && ManaManager.Check("combo-q");
            var useE = Menu.Item(Menu.Name + ".combo.e").GetValue <bool>() && E.IsReady();

            if (useQ)
            {
                Casting.SkillShot(Q, Q.GetHitChance("combo"));
            }

            if (useE)
            {
                var target = TargetSelector.GetTarget(E);
                if (target != null && Rend.HasBuff(target))
                {
                    if (target.Distance(Player) > Orbwalking.GetRealAutoAttackRange(target))
                    {
                        if (
                            GameObjects.EnemyMinions.Any(
                                m => m.IsValidTarget(Orbwalking.GetRealAutoAttackRange(m)) && Rend.IsKillable(m, true)))
                        {
                            E.Cast();
                        }
                        else
                        {
                            var minion =
                                GetDashObjects(
                                    GameObjects.EnemyMinions.Where(
                                        m => m.IsValidTarget(Orbwalking.GetRealAutoAttackRange(m)))
                                    .Select(e => e as Obj_AI_Base)
                                    .ToList())
                                .Find(
                                    m =>
                                    m.Health > Player.GetAutoAttackDamage(m) &&
                                    m.Health < Player.GetAutoAttackDamage(m) + Rend.GetDamage(m, 1));
                            if (minion != null)
                            {
                                Orbwalker.ForceTarget(minion);
                            }
                        }
                    }
                    else if (E.IsInRange(target))
                    {
                        if (Rend.IsKillable(target, false))
                        {
                            E.Cast();
                        }
                        else
                        {
                            var buff = Rend.GetBuff(target);
                            if (buff != null &&
                                buff.Count >= Menu.Item(Menu.Name + ".combo.e-min").GetValue <Slider>().Value)
                            {
                                if (target.Distance(Player) > E.Range * 0.8 && !target.IsFacing(Player))
                                {
                                    E.Cast();
                                }
                            }
                        }
                    }
                }
            }

            if (Menu.Item(Menu.Name + ".combo.minions").GetValue <bool>() &&
                !GameObjects.EnemyHeroes.Any(
                    e => e.IsValidTarget() && e.Distance(Player) < Orbwalking.GetRealAutoAttackRange(e) * 1.1f) &&
                !Player.IsWindingUp && !Player.IsDashing())
            {
                var obj = GetDashObjects().FirstOrDefault();
                if (obj != null)
                {
                    Orbwalker.ForceTarget(obj);
                }
            }
            else
            {
                Orbwalker.ForceTarget(null);
            }
        }
Exemplo n.º 12
0
        protected override void OnPreUpdate()
        {
            if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LaneClear ||
                Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LastHit)
            {
                var eBig    = Menu.Item(Menu.Name + ".lasthit.e-big").GetValue <bool>();
                var eJungle = Menu.Item(Menu.Name + ".lasthit.e-jungle").GetValue <bool>();
                var eSiege  = Menu.Item(Menu.Name + ".lasthit.e-siege").GetValue <bool>();
                var eTurret = Menu.Item(Menu.Name + ".lasthit.e-turret").GetValue <bool>();
                var eReset  = Menu.Item(Menu.Name + ".miscellaneous.e-reset").GetValue <bool>();

                IEnumerable <Obj_AI_Minion> minions = new HashSet <Obj_AI_Minion>();
                if (eSiege || eTurret || eReset)
                {
                    minions = GameObjects.EnemyMinions.Where(e => e.IsValidTarget(E.Range) && Rend.IsKillable(e, true));
                }

                if (E.IsReady())
                {
                    if (ManaManager.Check("lasthit"))
                    {
                        if (eSiege)
                        {
                            if (
                                minions.Any(
                                    m =>
                                    (m.CharData.BaseSkinName.Contains("MinionSiege") ||
                                     m.CharData.BaseSkinName.Contains("Super"))))
                            {
                                E.Cast();
                                return;
                            }
                        }
                        if (eTurret)
                        {
                            if (minions.Any(m => Utils.UnderAllyTurret(m.Position)))
                            {
                                E.Cast();
                                return;
                            }
                        }
                    }
                    if (eBig || eJungle)
                    {
                        var enemySmites =
                            GameObjects.EnemyHeroes.Where(
                                e =>
                                !e.IsDead && e.Distance(Player) < SummonerManager.Smite.Range * 1.5f &&
                                SummonerManager.IsSmiteReady(e));
                        var allySmites =
                            (from ally in
                             GameObjects.AllyHeroes.Where(
                                 e => !e.IsDead && e.Distance(Player) < SummonerManager.Smite.Range)
                             let spell = SummonerManager.GetSmiteSpell(ally)
                                         where
                                         spell != null &&
                                         (spell.IsReady() || spell.Cooldown - spell.CooldownExpires - Game.Time <= 3)
                                         select ally).ToList();

                        if (eJungle && Player.Level > 3 ||
                            eBig && (enemySmites.Any() || !allySmites.Any() || Player.CountEnemiesInRange(1000) > 1))
                        {
                            var creeps =
                                GameObjects.Jungle.Where(e => e.IsValidTarget(E.Range) && Rend.IsKillable(e, false))
                                .ToList();
                            if (eJungle && creeps.Any() ||
                                eBig &&
                                creeps.Any(
                                    m =>
                                    (m.CharData.BaseSkinName.StartsWith("SRU_Dragon") ||
                                     m.CharData.BaseSkinName.StartsWith("SRU_Baron"))))
                            {
                                E.Cast();
                                return;
                            }
                        }
                    }
                }

                if (eReset && E.IsReady() && ManaManager.Check("misc") &&
                    GameObjects.EnemyHeroes.Any(e => Rend.HasBuff(e) && e.IsValidTarget(E.Range)))
                {
                    if (minions.Any())
                    {
                        E.Cast();
                        return;
                    }
                }
            }
            if (Menu.Item(Menu.Name + ".ultimate.save").GetValue <bool>() && SoulBound.Unit != null && R.IsReady() &&
                !SoulBound.Unit.InFountain())
            {
                SoulBound.Clean();
                var enemies = SoulBound.Unit.CountEnemiesInRange(500);
                if ((SoulBound.Unit.HealthPercent <= 10 && SoulBound.Unit.CountEnemiesInRange(500) > 0) ||
                    (SoulBound.Unit.HealthPercent <= 5 && SoulBound.TotalDamage > SoulBound.Unit.Health && enemies == 0) ||
                    (SoulBound.Unit.HealthPercent <= 50 && SoulBound.TotalDamage > SoulBound.Unit.Health && enemies > 0))
                {
                    R.Cast();
                }
            }
            if (Menu.Item(Menu.Name + ".miscellaneous.w-baron").GetValue <KeyBind>().Active&& W.IsReady() &&
                Player.Distance(SummonersRift.River.Baron) <= W.Range)
            {
                W.Cast(SummonersRift.River.Baron);
            }
            if (Menu.Item(Menu.Name + ".miscellaneous.w-dragon").GetValue <KeyBind>().Active&& W.IsReady() &&
                Player.Distance(SummonersRift.River.Dragon) <= W.Range)
            {
                W.Cast(SummonersRift.River.Dragon);
            }

            if (SoulBound.Unit == null)
            {
                SoulBound.Unit =
                    GameObjects.AllyHeroes.FirstOrDefault(
                        a =>
                        a.Buffs.Any(
                            b =>
                            b.Caster.IsMe &&
                            b.Name.Equals("kalistacoopstrikeally", StringComparison.OrdinalIgnoreCase)));
            }
            if (SoulBound.Unit != null && SoulBound.Unit.Distance(Player) < R.Range && R.IsReady())
            {
                var blitz = Menu.Item(Menu.Name + ".ultimate.blitzcrank.r").GetValue <bool>();
                var tahm  = Menu.Item(Menu.Name + ".ultimate.tahm-kench.r").GetValue <bool>();
                foreach (var enemy in
                         GameObjects.EnemyHeroes.Where(e => (blitz || tahm) && !e.IsDead && e.Distance(Player) < 3000))
                {
                    if (blitz)
                    {
                        var blitzBuff =
                            enemy.Buffs.FirstOrDefault(
                                b =>
                                b.IsActive && b.Caster.NetworkId.Equals(SoulBound.Unit.NetworkId) &&
                                b.Name.Equals("rocketgrab2", StringComparison.OrdinalIgnoreCase));
                        if (blitzBuff != null)
                        {
                            if (!HeroListManager.Check("blitzcrank", enemy))
                            {
                                if (!SoulBound.Unit.UnderTurret(false) && SoulBound.Unit.Distance(enemy) > 750f &&
                                    SoulBound.Unit.Distance(Player) > R.Range / 3f)
                                {
                                    R.Cast();
                                }
                            }
                            return;
                        }
                    }
                    if (tahm)
                    {
                        var tahmBuff =
                            enemy.Buffs.FirstOrDefault(
                                b =>
                                b.IsActive && b.Caster.NetworkId.Equals(SoulBound.Unit.NetworkId) &&
                                b.Name.Equals("tahmkenchwdevoured", StringComparison.OrdinalIgnoreCase));
                        if (tahmBuff != null)
                        {
                            if (!HeroListManager.Check("tahm-kench", enemy))
                            {
                                if (!SoulBound.Unit.UnderTurret(false) &&
                                    (SoulBound.Unit.Distance(enemy) > Player.AttackRange ||
                                     GameObjects.AllyHeroes.Where(
                                         a => a.NetworkId != SoulBound.Unit.NetworkId && a.NetworkId != Player.NetworkId)
                                     .Any(t => t.Distance(Player) > 600) ||
                                     GameObjects.AllyTurrets.Any(t => t.Distance(Player) < 600)))
                                {
                                    R.Cast();
                                }
                            }
                            return;
                        }
                    }
                }
            }
        }
Exemplo n.º 13
0
        protected override void LaneClear()
        {
            if (!ManaManager.Check("lane-clear"))
            {
                return;
            }

            var useQ = Menu.Item(Menu.Name + ".lane-clear.q").GetValue <bool>() && Q.IsReady();
            var useE = Menu.Item(Menu.Name + ".lane-clear.e").GetValue <bool>() && E.IsReady();

            if (!useQ && !useE)
            {
                return;
            }

            var minQ1   = Menu.Item(Menu.Name + ".lane-clear.q-min-1").GetValue <Slider>().Value;
            var minQ2   = Menu.Item(Menu.Name + ".lane-clear.q-min-2").GetValue <Slider>().Value;
            var minQ3   = Menu.Item(Menu.Name + ".lane-clear.q-min-3").GetValue <Slider>().Value;
            var minE    = Menu.Item(Menu.Name + ".lane-clear.e-min").GetValue <Slider>().Value;
            var minQ    = 0;
            var minions = MinionManager.GetMinions(
                Q.Range, MinionTypes.All, MinionTeam.NotAlly, MinionOrderTypes.MaxHealth);

            if (minions.Count == 0)
            {
                return;
            }
            if (minions.Count >= 10)
            {
                minQ = minQ3;
            }
            else if (minions.Count <= 7)
            {
                minQ = minQ2;
            }
            else if (minions.Count <= 4)
            {
                minQ = minQ1;
            }
            if (useQ && minions.Count >= minQ && !Player.IsWindingUp && !Player.IsDashing())
            {
                foreach (var minion in minions.Where(x => x.Health <= Q.GetDamage(x)))
                {
                    var killcount = 0;

                    foreach (var colminion in
                             QGetCollisions(Player, Player.ServerPosition.Extend(minion.ServerPosition, Q.Range)))
                    {
                        if (colminion.Health <= Q.GetDamage(colminion))
                        {
                            killcount++;
                        }
                        else
                        {
                            break;
                        }
                    }
                    if (killcount >= minQ)
                    {
                        Q.Cast(minion.ServerPosition);
                        break;
                    }
                }
            }
            if (useE)
            {
                var killable = minions.Where(m => E.IsInRange(m) && Rend.IsKillable(m, false)).ToList();
                if (killable.Count >= minE ||
                    (killable.Count >= 1 && Menu.Item(Menu.Name + ".lane-clear.e-jungle").GetValue <bool>() &&
                     killable.Any(m => m.Team == GameObjectTeam.Neutral)))
                {
                    E.Cast();
                }
            }
        }
Exemplo n.º 14
0
        private void OnCorePreUpdate(EventArgs args)
        {
            try
            {
                if (Orbwalker.ActiveMode != Orbwalking.OrbwalkingMode.Combo &&
                    Orbwalker.ActiveMode != Orbwalking.OrbwalkingMode.Flee)
                {
                    var eBig    = Menu.Item(Menu.Name + ".lasthit.e-big").GetValue <bool>();
                    var eTurret = Menu.Item(Menu.Name + ".lasthit.e-turret").GetValue <bool>();
                    var eReset  = Menu.Item(Menu.Name + ".miscellaneous.e-reset").GetValue <bool>();

                    IEnumerable <Obj_AI_Minion> minions = new HashSet <Obj_AI_Minion>();
                    if (eBig || eTurret || eReset)
                    {
                        minions =
                            GameObjects.EnemyMinions.Where(e => e.IsValidTarget(E.Range) && Rend.IsKillable(e, true));
                    }

                    if (E.IsReady())
                    {
                        if (eBig)
                        {
                            var creeps =
                                GameObjects.Jungle.Where(e => e.IsValidTarget(E.Range) && Rend.IsKillable(e, false))
                                .Concat(minions)
                                .ToList();
                            if (
                                creeps.Any(
                                    m =>
                                    (m.CharData.BaseSkinName.Contains("MinionSiege") ||
                                     m.CharData.BaseSkinName.Contains("Super") ||
                                     m.CharData.BaseSkinName.StartsWith("SRU_Dragon") ||
                                     m.CharData.BaseSkinName.StartsWith("SRU_Baron"))))
                            {
                                E.Cast();
                                return;
                            }
                        }

                        if (eTurret && ManaManager.Check("lasthit"))
                        {
                            var minion =
                                minions.FirstOrDefault(
                                    m => Utils.UnderAllyTurret(m.Position) && Rend.IsKillable(m, false));
                            if (minion != null)
                            {
                                E.Cast();
                                return;
                            }
                        }
                    }

                    if (eReset && E.IsReady() && ManaManager.Check("misc") &&
                        GameObjects.EnemyHeroes.Any(e => Rend.HasBuff(e) && e.IsValidTarget(E.Range)))
                    {
                        if (minions.Any())
                        {
                            E.Cast();
                            return;
                        }
                    }
                }
                if (Menu.Item(Menu.Name + ".ultimate.save").GetValue <bool>() && SoulBound.Unit != null && R.IsReady() &&
                    !SoulBound.Unit.InFountain())
                {
                    SoulBound.Clean();
                    var enemies = SoulBound.Unit.CountEnemiesInRange(500);
                    if ((SoulBound.Unit.HealthPercent <= 10 && SoulBound.Unit.CountEnemiesInRange(500) > 0) ||
                        (SoulBound.Unit.HealthPercent <= 5 && SoulBound.TotalDamage > SoulBound.Unit.Health &&
                         enemies == 0) ||
                        (SoulBound.Unit.HealthPercent <= 50 && SoulBound.TotalDamage > SoulBound.Unit.Health &&
                         enemies > 0))
                    {
                        R.Cast();
                    }
                }
                if (Menu.Item(Menu.Name + ".miscellaneous.w-baron").GetValue <KeyBind>().Active&& W.IsReady() &&
                    Player.Distance(SummonersRift.River.Baron) <= W.Range)
                {
                    W.Cast(SummonersRift.River.Baron);
                }
                if (Menu.Item(Menu.Name + ".miscellaneous.w-dragon").GetValue <KeyBind>().Active&& W.IsReady() &&
                    Player.Distance(SummonersRift.River.Dragon) <= W.Range)
                {
                    W.Cast(SummonersRift.River.Dragon);
                }

                if (SoulBound.Unit == null)
                {
                    SoulBound.Unit =
                        GameObjects.AllyHeroes.FirstOrDefault(
                            a =>
                            a.Buffs.Any(
                                b =>
                                b.Caster.IsMe &&
                                b.Name.Equals("kalistacoopstrikeally", StringComparison.OrdinalIgnoreCase)));
                }
            }
            catch (Exception ex)
            {
                Global.Logger.AddItem(new LogItem(ex));
            }
        }