Esempio n. 1
0
        /// <summary>
        ///     Fired on an incoming gapcloser.
        /// </summary>
        /// <param name="sender">The sender.</param>
        /// <param name="args">The <see cref="Gapcloser.GapcloserArgs" /> instance containing the event data.</param>
        public void OnGapcloser(Obj_AI_Hero sender, Gapcloser.GapcloserArgs args)
        {
            if (UtilityClass.Player.IsDead)
            {
                return;
            }

            if (sender == null || !sender.IsEnemy || Invulnerable.Check(sender))
            {
                return;
            }

            /// <summary>
            ///     The Anti-Gapcloser E.
            /// </summary>
            if (SpellClass.E.Ready)
            {
                var enabledOption2 = MenuClass.Gapcloser2["enabled"];
                if (enabledOption2 == null || !enabledOption2.As <MenuBool>().Enabled)
                {
                    return;
                }

                var spellOption2 = MenuClass.SubGapcloser2[$"{sender.ChampionName.ToLower()}.{args.SpellName.ToLower()}"];
                if (spellOption2 == null || !spellOption2.As <MenuBool>().Enabled)
                {
                    return;
                }

                switch (args.Type)
                {
                case Gapcloser.Type.Targeted:
                    if (sender.IsMelee &&
                        args.Target.IsMe)
                    {
                        var targetPos = UtilityClass.Player.ServerPosition.Extend(args.StartPosition, -450);
                        if (targetPos.PointUnderEnemyTurret())
                        {
                            return;
                        }

                        SpellClass.E.Cast(args.StartPosition);
                    }
                    break;

                default:
                    var targetPos2 = UtilityClass.Player.ServerPosition.Extend(args.EndPosition, -450);
                    if (targetPos2.PointUnderEnemyTurret())
                    {
                        return;
                    }

                    if (args.EndPosition.Distance(UtilityClass.Player.ServerPosition) <= SpellClass.E.Range)
                    {
                        SpellClass.E.Cast(args.EndPosition);
                    }
                    break;
                }
            }

            if (!CanTrap(sender))
            {
                return;
            }

            /// <summary>
            ///     The Anti-Gapcloser W.
            /// </summary>
            if (SpellClass.W.Ready &&
                args.EndPosition.Distance(UtilityClass.Player.ServerPosition) <= SpellClass.W.Range)
            {
                var enabledOption = MenuClass.Gapcloser2["enabled"];
                if (enabledOption == null || !enabledOption.As <MenuBool>().Enabled)
                {
                    return;
                }

                var spellOption = MenuClass.SubGapcloser[$"{sender.ChampionName.ToLower()}.{args.SpellName.ToLower()}"];
                if (spellOption == null || !spellOption.As <MenuBool>().Enabled)
                {
                    return;
                }

                SpellClass.W.Cast(args.EndPosition);
                UpdateEnemyTrapTime(sender.NetworkId);
            }
        }
Esempio n. 2
0
        /// <summary>
        ///     Fired when the game is updated.
        /// </summary>
        public void Combo(EntropyEventArgs args)
        {
            /// <summary>
            ///     The R Shooting Logic.
            /// </summary>
            if (SpellClass.R.Ready &&
                IsUltimateShooting() &&
                MenuClass.R["combo"].As <MenuBool>().Value)
            {
                var validEnemiesInsideCone = Extensions.GetBestEnemyHeroesTargetsInRange(SpellClass.R2.Range)
                                             .Where(t => t.IsValidTarget() && !Invulnerable.Check(t) && UltimateCone().IsInsidePolygon(t.Position))
                                             .ToList();
                if (validEnemiesInsideCone.Any())
                {
                    // ReSharper disable once ConvertIfStatementToConditionalTernaryExpression
                    if (MenuClass.R["customization"]["nearmouse"].As <MenuBool>().Value)
                    {
                        var target = validEnemiesInsideCone.MinBy(o => o.Distance(Hud.CursorPositionUnclipped));
                        if (target != null)
                        {
                            SpellClass.R2.Cast(target);
                        }
                    }
                    else
                    {
                        var target = validEnemiesInsideCone.FirstOrDefault();
                        if (target != null)
                        {
                            SpellClass.R2.Cast(target);
                        }
                    }
                }
                else
                {
                    SpellClass.R2.Cast(Hud.CursorPositionUnclipped);
                }
            }

            /// <summary>
            ///     The W Combo Logic.
            /// </summary>
            if (SpellClass.W.Ready &&
                !UtilityClass.Player.Position.IsUnderEnemyTurret() &&
                MenuClass.W["combo"].As <MenuBool>().Value)
            {
                if (!IsReloading() &&
                    ObjectCache.EnemyHeroes.Any(t => t.DistanceToPlayer() < UtilityClass.Player.GetAutoAttackRange(t)) &&
                    MenuClass.W["customization"]["noenemiesaa"].As <MenuBool>().Value)
                {
                    return;
                }

                foreach (var target in ObjectCache.EnemyHeroes.Where(t =>
                                                                     t.HasBuff("jhinespotteddebuff") &&
                                                                     t.IsValidTarget(SpellClass.W.Range - 100f) &&
                                                                     !Invulnerable.Check(t, DamageType.Magical, false) &&
                                                                     MenuClass.W["whitelist"][t.CharName.ToLower()].As <MenuBool>().Value))
                {
                    if (MenuClass.W["customization"]["onlyslowed"].As <MenuBool>().Value)
                    {
                        if (target.HasBuffOfType(BuffType.Slow))
                        {
                            SpellClass.W.Cast(target);
                        }
                    }
                    else
                    {
                        SpellClass.W.Cast(target);
                    }
                }
            }

            /// <summary>
            ///     The Q Combo on Reload Logic.
            /// </summary>
            if (SpellClass.Q.Ready &&
                IsReloading() &&
                MenuClass.Q["customization"]["comboonreload"].As <MenuBool>().Enabled)
            {
                var bestTarget = Extensions.GetBestEnemyHeroTargetInRange(SpellClass.Q.Range);
                if (bestTarget.IsValidTarget() &&
                    !Invulnerable.Check(bestTarget, DamageType.Magical, false))
                {
                    SpellClass.Q.CastOnUnit(bestTarget);
                }
            }

            /// <summary>
            ///     The E Combo Logic.
            /// </summary>
            if (SpellClass.E.Ready &&
                MenuClass.E["combo"].As <MenuBool>().Enabled)
            {
                var bestTarget = Extensions.GetBestEnemyHeroTargetInRange(SpellClass.E.Range);
                if (bestTarget.IsValidTarget() &&
                    !Invulnerable.Check(bestTarget, DamageType.Magical, false))
                {
                    if (MenuClass.E["customization"]["comboonreload"].As <MenuBool>().Enabled)
                    {
                        if (IsReloading())
                        {
                            SpellClass.E.Cast(bestTarget);
                        }
                    }
                    else
                    {
                        SpellClass.E.Cast(bestTarget);
                    }
                }
            }
        }
Esempio n. 3
0
        /// <summary>
        ///     Called while processing Spellcasting operations.
        ///     Port this berbb :^)
        /// </summary>
        /// <param name="sender">The sender.</param>
        /// <param name="args">The <see cref="GameObjectProcessSpellCastEventArgs" /> instance containing the event data.</param>
        public static void AutoShield(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
        {
            if (sender.IsMe ||
                Invulnerable.Check(GameObjects.Player, DamageType.True, false))
            {
                return;
            }

            /// <summary>
            ///     Block Traps.
            /// </summary>
            if (ObjectManager.Get <Obj_AI_Minion>().Any(
                    m =>
                    m.Distance(GameObjects.Player) < 175 &&
                    m.CharData.BaseSkinName.Equals("caitlyntrap")))
            {
                Vars.E.Cast();
                return;
            }

            if (args.Target == null ||
                !sender.LSIsValidTarget())
            {
                return;
            }

            /// <summary>
            ///     Block Dragon's AutoAttacks.
            /// </summary>
            if (args.Target.IsMe &&
                sender is Obj_AI_Minion)
            {
                if (sender.CharData.BaseSkinName.Equals("SRU_Baron") ||
                    sender.CharData.BaseSkinName.Contains("SRU_Dragon") ||
                    sender.CharData.BaseSkinName.Equals("SRU_RiftHerald"))
                {
                    Vars.E.Cast();
                }
            }
            else if (sender.IsEnemy &&
                     sender is AIHeroClient)
            {
                /// <summary>
                ///     Block Gangplank's Barrels.
                /// </summary>
                if ((sender as AIHeroClient).ChampionName.Equals("Gangplank"))
                {
                    if (AutoAttack.IsAutoAttack(args.SData.Name) ||
                        args.SData.Name.Equals("GangplankQProceed"))
                    {
                        if ((args.Target as Obj_AI_Minion).Health == 1 &&
                            (args.Target as Obj_AI_Minion).CharData.BaseSkinName.Equals("gangplankbarrel"))
                        {
                            if (GameObjects.Player.Distance(args.Target) < 450)
                            {
                                Vars.E.Cast();
                            }
                        }
                    }
                    else if (args.SData.Name.Equals("GangplankEBarrelFuseMissile"))
                    {
                        if (GameObjects.Player.Distance(args.End) < 450)
                        {
                            Vars.E.Cast();
                        }
                    }
                }

                if (!args.Target.IsMe)
                {
                    return;
                }

                if (args.SData.Name.Contains("Summoner") ||
                    args.SData.Name.Equals("KatarinaE") ||
                    args.SData.Name.Equals("TalonCutthroat") ||
                    args.SData.Name.Equals("HextechGunblade") ||
                    args.SData.Name.Equals("BilgewaterCutlass") ||
                    args.SData.Name.Equals("ItemSwordOfFeastAndFamine"))
                {
                    return;
                }

                switch (args.SData.TargettingType)
                {
                /// <summary>
                ///     Special check for the AutoAttacks.
                /// </summary>
                case SpellDataTargetType.Unit:
                case SpellDataTargetType.Self:
                case SpellDataTargetType.LocationAoe:

                    if (args.SData.Name.Equals("NasusE") ||
                        args.SData.Name.Equals("GangplankE") ||
                        args.SData.Name.Equals("TrundleCircle") ||
                        args.SData.Name.Equals("TormentedSoil") ||
                        args.SData.Name.Equals("SwainDecrepify") ||
                        args.SData.Name.Equals("MissFortuneScattershot") ||
                        args.SData.Name.Equals("OrianaDissonanceCommand"))
                    {
                        return;
                    }

                    if (AutoAttack.IsAutoAttack(args.SData.Name))
                    {
                        if ((!sender.IsMelee && args.SData.Name.Contains("Card")) ||
                            sender.Buffs.Any(b => AutoAttack.IsAutoAttackReset(args.SData.Name)))
                        {
                            Vars.E.Cast();
                        }

                        return;
                    }

                    switch (sender.CharData.BaseSkinName)
                    {
                    case "Zed":
                        DelayAction.Add(200, () => { Vars.E.Cast(); });
                        break;

                    case "Caitlyn":
                    case "Nocturne":
                        DelayAction.Add(750, () => { Vars.E.Cast(); });
                        break;

                    default:
                        DelayAction.Add(Vars.getSliderItem(Vars.EMenu, "delay"), () => { Vars.E.Cast(); });
                        break;
                    }
                    break;

                default:
                    break;
                }
            }
        }
Esempio n. 4
0
        /// <summary>
        ///     Called when the game updates itself.
        /// </summary>
        /// <param name="args">The <see cref="EventArgs" /> instance containing the event data.</param>
        public static void Harass(EventArgs args)
        {
            /// <summary>
            ///     The E Harass Logic.
            /// </summary>
            if (Vars.E.IsReady() && Vars.Menu["spells"]["e"]["harass"].GetValue <MenuSliderButton>().BValue &&
                GameObjects.Player.ManaPercent
                > ManaManager.GetNeededMana(Vars.E.Slot, Vars.Menu["spells"]["e"]["harass"]))
            {
                if (
                    GameObjects.EnemyHeroes.Any(
                        t =>
                        t.IsValidTarget(Vars.E.Range) &&
                        (t.HasBuffOfType(BuffType.Poison) ||
                         !Vars.Menu["spells"]["e"]["harasspoison"].GetValue <MenuBool>().Value) &&
                        !Invulnerable.Check(t, DamageType.Magical, false)))
                {
                    foreach (var target in
                             GameObjects.EnemyHeroes.Where(
                                 t =>
                                 t.IsValidTarget(Vars.E.Range) &&
                                 (t.HasBuffOfType(BuffType.Poison) ||
                                  !Vars.Menu["spells"]["e"]["harasspoison"].GetValue <MenuBool>().Value) &&
                                 !Invulnerable.Check(t, DamageType.Magical, false)))
                    {
                        DelayAction.Add(
                            Vars.Menu["spells"]["e"]["delay"].GetValue <MenuSlider>().Value,
                            () => { Vars.E.CastOnUnit(target); });
                    }
                }
                else
                {
                    DelayAction.Add(
                        Vars.Menu["spells"]["e"]["delay"].GetValue <MenuSlider>().Value,
                        () =>
                    {
                        foreach (var minion in
                                 Targets.Minions.Where(
                                     m =>
                                     Vars.GetRealHealth(m)
                                     < (float)GameObjects.Player.GetSpellDamage(m, SpellSlot.E)
                                     + (m.HasBuffOfType(BuffType.Poison)
                                               ? (float)
                                        GameObjects.Player.GetSpellDamage(
                                            m,
                                            SpellSlot.E,
                                            DamageStage.Empowered)
                                               : 0)))
                        {
                            Vars.E.CastOnUnit(minion);
                        }
                    });
                }
            }

            if (!Targets.Target.IsValidTarget() || Invulnerable.Check(Targets.Target, DamageType.Magical, false))
            {
                return;
            }

            /// <summary>
            ///     The Q Harass Logic.
            /// </summary>
            if (Vars.Q.IsReady() && Targets.Target.IsValidTarget(Vars.Q.Range) &&
                GameObjects.Player.ManaPercent
                > ManaManager.GetNeededMana(Vars.Q.Slot, Vars.Menu["spells"]["q"]["harass"]) &&
                Vars.Menu["spells"]["q"]["harass"].GetValue <MenuSliderButton>().BValue)
            {
                Vars.Q.Cast(Vars.Q.GetPrediction(Targets.Target).CastPosition);
                return;
            }

            /// <summary>
            ///     The W Harass Logic.
            /// </summary>
            DelayAction.Add(
                1000,
                () =>
            {
                if (Vars.W.IsReady() && Targets.Target.IsValidTarget(Vars.W.Range) &&
                    !Targets.Target.IsValidTarget(500f) &&
                    GameObjects.Player.ManaPercent
                    > ManaManager.GetNeededMana(Vars.W.Slot, Vars.Menu["spells"]["w"]["harass"]) &&
                    Vars.Menu["spells"]["w"]["harass"].GetValue <MenuSliderButton>().BValue)
                {
                    Vars.W.Cast(Vars.W.GetPrediction(Targets.Target).CastPosition);
                }
            });
        }
Esempio n. 5
0
        /// <summary>
        ///     Called when the game updates itself.
        /// </summary>
        /// <param name="args">The <see cref="EventArgs" /> instance containing the event data.</param>
        public static void Killsteal(EventArgs args)
        {
            if (GameObjects.Player.HealthPercent
                <= Vars.Menu["spells"]["q"]["shield"].GetValue <MenuSliderButton>().SValue &&
                Vars.Menu["spells"]["q"]["shield"].GetValue <MenuSliderButton>().BValue)
            {
                return;
            }

            /// <summary>
            ///     The KillSteal Q Logic.
            /// </summary>
            if (Vars.Q.IsReady() && Vars.Menu["spells"]["q"]["killsteal"].GetValue <MenuBool>().Value)
            {
                foreach (var target in
                         GameObjects.EnemyHeroes.Where(
                             t =>
                             t.IsValidTarget(Vars.Q.Range - 50f) && !Invulnerable.Check(t, DamageType.Magical) &&
                             Vars.GetRealHealth(t)
                             < (float)GameObjects.Player.GetSpellDamage(t, SpellSlot.Q)
                             * (1
                                + (t.HasBuff("RyzeE")
                                  ? new double[] { 40, 55, 70, 85, 100 }[
                                       GameObjects.Player.Spellbook.GetSpell(SpellSlot.E).Level - 1] / 100
                                  : 0))))
                {
                    if (!Vars.Q.GetPrediction(target).CollisionObjects.Any())
                    {
                        Vars.Q.Cast(Vars.Q.GetPrediction(target).UnitPosition);
                    }
                }
            }

            /// <summary>
            ///     The KillSteal W Logic.
            /// </summary>
            if (Vars.W.IsReady() && Vars.Menu["spells"]["w"]["killsteal"].GetValue <MenuBool>().Value)
            {
                foreach (var target in
                         GameObjects.EnemyHeroes.Where(
                             t =>
                             t.IsValidTarget(Vars.W.Range) && !Invulnerable.Check(t, DamageType.Magical, false) &&
                             Vars.GetRealHealth(t) < (float)GameObjects.Player.GetSpellDamage(t, SpellSlot.W)))
                {
                    Vars.W.CastOnUnit(target);
                }
            }

            /// <summary>
            ///     The KillSteal E Logic.
            /// </summary>
            if (Vars.E.IsReady() && Vars.Menu["spells"]["e"]["killsteal"].GetValue <MenuBool>().Value)
            {
                foreach (var target in
                         GameObjects.EnemyHeroes.Where(
                             t =>
                             t.IsValidTarget(Vars.E.Range) && !Invulnerable.Check(t, DamageType.Magical, false) &&
                             Vars.GetRealHealth(t) < (float)GameObjects.Player.GetSpellDamage(t, SpellSlot.E)))
                {
                    Vars.E.CastOnUnit(target);
                }
            }
        }
Esempio n. 6
0
        /// <summary>
        ///     Called when the game updates itself.
        /// </summary>
        /// <param name="args">The <see cref="EventArgs" /> instance containing the event data.</param>
        public static void Combo(EventArgs args)
        {
            /// <summary>
            ///     The R Logics.
            /// </summary>
            if (Vars.R.IsReady() &&
                GameObjects.Player.CountEnemyHeroesInRange(Vars.AARange) == 0)
            {
                /// <summary>
                ///     The R Combo Logic.
                /// </summary>
                if (Vars.getCheckBoxItem(Vars.RMenu, "combo"))
                {
                    foreach (var target in GameObjects.EnemyHeroes.Where(
                                 t =>
                                 !Invulnerable.Check(t) &&
                                 t.LSIsValidTarget(2000f) &&
                                 Vars.getCheckBoxItem(Vars.WhiteList2Menu, t.ChampionName.ToLower())))
                    {
                        Vars.R.Cast(Vars.R.GetPrediction(target).UnitPosition);
                        return;
                    }
                }

                if (!Targets.Target.LSIsValidTarget())
                {
                    return;
                }

                /// <summary>
                ///     The Automatic R Logic.
                /// </summary>
                if (Vars.getCheckBoxItem(Vars.RMenu, "logical"))
                {
                    if (Bools.IsImmobile(Targets.Target) &&
                        !Invulnerable.Check(Targets.Target))
                    {
                        Vars.R.Cast(Targets.Target.ServerPosition);
                        return;
                    }
                }
            }


            if (Invulnerable.Check(Targets.Target) ||
                Targets.Target.LSIsValidTarget(Vars.AARange))
            {
                return;
            }

            /// <summary>
            ///     The Q Combo Logic.
            /// </summary>
            if (Vars.Q.IsReady() &&
                Targets.Target.LSIsValidTarget(Vars.Q.Range) &&
                Vars.getCheckBoxItem(Vars.QMenu, "combo"))
            {
                if (!Vars.Q.GetPrediction(Targets.Target).CollisionObjects.Any())
                {
                    Vars.Q.Cast(Vars.Q.GetPrediction(Targets.Target).UnitPosition);
                    return;
                }
            }

            /// <summary>
            ///     The W Combo Logic.
            /// </summary>
            if (Vars.W.IsReady() &&
                Targets.Target.LSIsValidTarget(Vars.W.Range) &&
                !Targets.Target.LSIsValidTarget(Vars.AARange) &&
                Vars.getCheckBoxItem(Vars.WMenu, "combo"))
            {
                if (GameObjects.Player.CountAllyHeroesInRange(Vars.W.Range) < 2 ||
                    GameObjects.Player.TotalAttackDamage <
                    GameObjects.Player.TotalMagicalDamage)
                {
                    Vars.W.Cast(Vars.W.GetPrediction(Targets.Target).UnitPosition);
                }
            }
        }
Esempio n. 7
0
        /// <summary>
        ///     Called when the game updates itself.
        /// </summary>
        /// <param name="args">The <see cref="EventArgs" /> instance containing the event data.</param>
        public static void Automatic(EventArgs args)
        {
            if (GameObjects.Player.LSIsRecalling())
            {
                return;
            }

            /// <summary>
            ///     The No AA while in Combo option.
            /// </summary>
            if (Vars.getCheckBoxItem(Vars.MiscMenu, "noaa"))
            {
                PortAIO.OrbwalkerManager.SetAttack(Bools.HasSheenBuff() || GameObjects.Player.ManaPercent < 10 || !Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo) || (!Vars.Q.IsReady() && !Vars.W.IsReady() && !Vars.E.IsReady()));
            }

            /// <summary>
            ///     The Tear Stacking Logic.
            /// </summary>
            if (Vars.Q.IsReady() &&
                Bools.HasTear(GameObjects.Player) &&
                !GameObjects.Player.LSIsRecalling() &&
                Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.None) &&
                GameObjects.Player.CountEnemyHeroesInRange(1500) == 0 &&
                GameObjects.Player.ManaPercent >
                ManaManager.GetNeededMana(Vars.Q.Slot, Vars.getSliderItem(Vars.MiscMenu, "tear")) &&
                Vars.getSliderItem(Vars.MiscMenu, "tear") != 101)
            {
                Vars.Q.Cast(GameObjects.Player.ServerPosition.LSExtend(Game.CursorPos, Vars.Q.Range - 5f));
            }

            /// <summary>
            ///     The Automatic Q Logic.
            /// </summary>
            if (Vars.Q.IsReady() &&
                Vars.getCheckBoxItem(Vars.QMenu, "logical"))
            {
                foreach (var target in GameObjects.EnemyHeroes.Where(
                             t =>
                             Bools.IsImmobile(t) &&
                             !Invulnerable.Check(t) &&
                             t.LSIsValidTarget(Vars.Q.Range)))
                {
                    Vars.Q.Cast(target.ServerPosition);
                    return;
                }
            }

            /// <summary>
            ///     The Automatic W Logic.
            /// </summary>
            DelayAction.Add(1000, () =>
            {
                if (Vars.W.IsReady() &&
                    !Vars.Q.IsReady() &&
                    Vars.getCheckBoxItem(Vars.WMenu, "logical"))
                {
                    foreach (var target in GameObjects.EnemyHeroes.Where(
                                 t =>
                                 Bools.IsImmobile(t) &&
                                 !Invulnerable.Check(t) &&
                                 t.LSIsValidTarget(Vars.W.Range)))
                    {
                        Vars.W.Cast(target.ServerPosition);
                    }
                }
            });
        }
Esempio n. 8
0
        /// <summary>
        ///     Called when the game updates itself.
        /// </summary>
        /// <param name="args">The <see cref="EventArgs" /> instance containing the event data.</param>
        public static void Combo(EventArgs args)
        {
            if (Bools.HasSheenBuff() || !Targets.Target.IsValidTarget() || Invulnerable.Check(Targets.Target))
            {
                return;
            }

            /// <summary>
            ///     The Wall Logic.
            /// </summary>
            if (Vars.W.IsReady() && GameObjects.Player.ManaPercent > 30 && Targets.Target.IsValidTarget(Vars.W.Range) &&
                Vars.Menu["spells"]["w"]["combo"].GetValue <MenuBool>().Value &&
                Vars.Menu["spells"]["w"]["whitelist"][Targets.Target.ChampionName.ToLower()].GetValue <MenuBool>()
                .Value)
            {
                if (
                    GameObjects.Player.Distance(
                        GameObjects.Player.ServerPosition.Extend(
                            Targets.Target.ServerPosition,
                            GameObjects.Player.Distance(Targets.Target) + Targets.Target.BoundingRadius + 20f))
                    < Vars.W.Range)
                {
                    Vars.W.Cast(
                        GameObjects.Player.ServerPosition.Extend(
                            Targets.Target.ServerPosition,
                            GameObjects.Player.Distance(Targets.Target) + Targets.Target.BoundingRadius + 20f));
                }
            }

            /// <summary>
            ///     The E Combo Logic.
            /// </summary>
            if (Vars.E.IsReady() && Vars.Menu["spells"]["e"]["combo"].GetValue <MenuBool>().Value)
            {
                foreach (var target in
                         GameObjects.EnemyHeroes.Where(t => t.HasBuff("chilled") && t.IsValidTarget(Vars.E.Range)))
                {
                    Vars.E.CastOnUnit(target);
                }
            }

            /// <summary>
            ///     The R Combo Logic.
            /// </summary>
            if (Vars.R.IsReady() && Targets.Target.IsValidTarget(Vars.R.Range) &&
                GameObjects.Player.Spellbook.GetSpell(SpellSlot.R).ToggleState == 1 &&
                Vars.Menu["spells"]["r"]["combo"].GetValue <MenuBool>().Value)
            {
                Vars.R.Cast(Targets.Target.ServerPosition);
            }

            /// <summary>
            ///     The Q Combo Logic.
            /// </summary>
            if (Vars.Q.IsReady() && Targets.Target.IsValidTarget(Vars.Q.Range) &&
                GameObjects.Player.Spellbook.GetSpell(SpellSlot.Q).ToggleState == 1 &&
                Vars.Menu["spells"]["q"]["combo"].GetValue <MenuBool>().Value)
            {
                Vars.Q.Cast(Vars.Q.GetPrediction(Targets.Target).UnitPosition);
            }
        }
Esempio n. 9
0
        /// <summary>
        ///     Called when the game updates itself.
        /// </summary>
        /// <param name="args">The <see cref="EventArgs" /> instance containing the event data.</param>
        public static void Combo(EventArgs args)
        {
            if (Bools.HasSheenBuff() && Targets.Target.IsValidTarget(Vars.AaRange) || !Targets.Target.IsValidTarget() ||
                Invulnerable.Check(Targets.Target, DamageType.Magical, false))
            {
                return;
            }

            /// <summary>
            ///     The W->E Combo Logic.
            /// </summary>
            if (Vars.W.IsReady() && Targets.Target.IsValidTarget(Vars.W.Range) &&
                Vars.Menu["spells"]["w"]["combo"].GetValue <MenuBool>().Value &&
                (Vars.E.IsReady() || !Vars.Menu["spells"]["w"]["combofull"].GetValue <MenuBool>().Value))
            {
                switch (
                    Vars.Menu["spells"]["w"]["selection"][Targets.Target.ChampionName.ToLower()].GetValue <MenuList>()
                    .Index)
                {
                case 0:
                    Vars.W.Cast(
                        Vars.W.GetPrediction(Targets.Target).CastPosition,
                        GameObjects.Player.ServerPosition);
                    break;

                case 1:
                    Vars.W.Cast(
                        Vars.W.GetPrediction(Targets.Target).CastPosition,
                        GameObjects.Player.ServerPosition.Extend(
                            Targets.Target.ServerPosition,
                            GameObjects.Player.Distance(Targets.Target) * 2));
                    break;

                default:
                    Vars.W.Cast(
                        Vars.W.GetPrediction(Targets.Target).CastPosition,
                        Vars.GetRealHealth(Targets.Target)
                        < (float)GameObjects.Player.GetSpellDamage(Targets.Target, SpellSlot.Q)
                        * (Taliyah.TerrainObject != null ? 1 : 3)
                        + (float)GameObjects.Player.GetSpellDamage(Targets.Target, SpellSlot.W)
                        + (float)GameObjects.Player.GetSpellDamage(Targets.Target, SpellSlot.E)
                                ? GameObjects.Player.ServerPosition
                                : GameObjects.Player.ServerPosition.Extend(
                            Targets.Target.ServerPosition,
                            GameObjects.Player.Distance(Targets.Target) * 2));
                    break;
                }
            }

            if (Vars.W.IsReady() && Vars.Menu["spells"]["w"]["combo"].GetValue <MenuBool>().Value)
            {
                return;
            }

            /// <summary>
            ///     The E Combo Logic.
            /// </summary>
            if (Vars.E.IsReady() && Targets.Target.IsValidTarget(Vars.W.Range) &&
                Vars.Menu["spells"]["e"]["combo"].GetValue <MenuBool>().Value)
            {
                Vars.E.Cast(Targets.Target.ServerPosition);
            }

            /// <summary>
            ///     The Q Combo Logic.
            /// </summary>
            if (Vars.Q.IsReady() && !Vars.E.IsReady() && Targets.Target.IsValidTarget(Vars.Q.Range - 50f) &&
                Vars.Menu["spells"]["q"]["combo"].GetValue <MenuBool>().Value)
            {
                if (Taliyah.TerrainObject != null &&
                    Vars.Menu["spells"]["q"]["combofull"].GetValue <MenuBool>().Value)
                {
                    return;
                }

                Vars.Q.Cast(Vars.Q.GetPrediction(Targets.Target).UnitPosition);
            }
        }
Esempio n. 10
0
        /// <summary>
        ///     Called when the game updates itself.
        /// </summary>
        /// <param name="args">The <see cref="EventArgs" /> instance containing the event data.</param>
        public static void Automatic(EventArgs args)
        {
            if (GameObjects.Player.IsRecalling())
            {
                return;
            }

            /// <summary>
            ///     The Q LastHit Logic.
            /// </summary>
            if (Vars.Q.IsReady() && Variables.Orbwalker.ActiveMode != OrbwalkingMode.Combo &&
                GameObjects.Player.ManaPercent
                > ManaManager.GetNeededMana(Vars.Q.Slot, Vars.Menu["spells"]["q"]["farmhelper"]) &&
                Vars.Menu["spells"]["q"]["farmhelper"].GetValue <MenuSliderButton>().BValue)
            {
                foreach (var minion in
                         Targets.Minions.Where(
                             m =>
                             !m.IsValidTarget(GameObjects.Player.GetRealAutoAttackRange()) &&
                             Vars.GetRealHealth(m) > GameObjects.Player.GetAutoAttackDamage(m) &&
                             Vars.GetRealHealth(m) < (float)GameObjects.Player.GetSpellDamage(m, SpellSlot.Q))
                         .OrderBy(o => o.MaxHealth))
                {
                    if (!Vars.Q.GetPrediction(minion).CollisionObjects.Any())
                    {
                        Vars.Q.Cast(Vars.Q.GetPrediction(minion).UnitPosition);
                    }
                }
            }

            /// <summary>
            ///     The Tear Stacking Logic.
            /// </summary>
            if (Vars.Q.IsReady() && !Targets.Minions.Any() && Bools.HasTear(GameObjects.Player) &&
                Variables.Orbwalker.ActiveMode == OrbwalkingMode.None &&
                GameObjects.Player.CountEnemyHeroesInRange(1500) == 0 &&
                GameObjects.Player.ManaPercent
                > ManaManager.GetNeededMana(Vars.Q.Slot, Vars.Menu["miscellaneous"]["tear"]) &&
                Vars.Menu["miscellaneous"]["tear"].GetValue <MenuSliderButton>().BValue)
            {
                Vars.Q.Cast(Game.CursorPos);
            }

            /// <summary>
            ///     The Semi-Automatic R Logic.
            /// </summary>
            if (Vars.R.IsReady() && Vars.Menu["spells"]["r"]["bool"].GetValue <MenuBool>().Value &&
                Vars.Menu["spells"]["r"]["key"].GetValue <MenuKeyBind>().Active)
            {
                var target =
                    GameObjects.EnemyHeroes.Where(
                        t =>
                        !Invulnerable.Check(t, DamageType.Magical, false) && t.IsValidTarget(2000f) &&
                        Vars.Menu["spells"]["r"]["whitelist"][t.ChampionName.ToLower()].GetValue <MenuBool>().Value)
                    .OrderBy(o => o.Health)
                    .FirstOrDefault();
                if (target != null)
                {
                    Vars.R.Cast(Vars.R.GetPrediction(target).UnitPosition);
                }
            }

            if (GameObjects.Player.TotalAttackDamage < GameObjects.Player.TotalMagicalDamage)
            {
                return;
            }

            /// <summary>
            ///     Initializes the orbwalkingmodes.
            /// </summary>
            switch (Variables.Orbwalker.ActiveMode)
            {
            case OrbwalkingMode.Combo:
                if (!GameObjects.EnemyHeroes.Contains(Variables.Orbwalker.GetTarget()))
                {
                    return;
                }

                break;

            case OrbwalkingMode.LaneClear:
                if (!(Variables.Orbwalker.GetTarget() is Obj_HQ) &&
                    !(Variables.Orbwalker.GetTarget() is Obj_AI_Turret) &&
                    !(Variables.Orbwalker.GetTarget() is Obj_BarracksDampener))
                {
                    return;
                }

                break;

            default:
                if (!GameObjects.Jungle.Contains(Variables.Orbwalker.GetTarget()) &&
                    !GameObjects.EnemyHeroes.Contains(Variables.Orbwalker.GetTarget()) &&
                    !(Variables.Orbwalker.GetTarget() is Obj_HQ) &&
                    !(Variables.Orbwalker.GetTarget() is Obj_AI_Turret) &&
                    !(Variables.Orbwalker.GetTarget() is Obj_BarracksDampener))
                {
                    return;
                }

                break;
            }

            /// <summary>
            ///     The Automatic W Logic.
            /// </summary>
            if (Vars.W.IsReady() &&
                ObjectManager.Player.ManaPercent
                > ManaManager.GetNeededMana(Vars.W.Slot, Vars.Menu["spells"]["w"]["logical"]) &&
                Vars.Menu["spells"]["w"]["logical"].GetValue <MenuSliderButton>().BValue)
            {
                foreach (var target in
                         GameObjects.AllyHeroes.Where(
                             t => !t.IsMe && t.Spellbook.IsAutoAttacking && t.IsValidTarget(Vars.W.Range, false)))
                {
                    Vars.W.Cast(Vars.W.GetPrediction(target).UnitPosition);
                }
            }
        }
Esempio n. 11
0
        /// <summary>
        ///     Called when the game updates itself.
        /// </summary>
        /// <param name="args">The <see cref="EventArgs" /> instance containing the event data.</param>
        public static void Killsteal(EventArgs args)
        {
            /// <summary>
            ///     The KillSteal R Logic.
            /// </summary>
            if (Vars.R.IsReady() && Vars.R.Instance.Name.Equals("JhinRShot") &&
                Vars.Menu["spells"]["r"]["killsteal"].GetValue <MenuBool>().Value)
            {
                foreach (var target in
                         GameObjects.EnemyHeroes.Where(
                             t =>
                             !Invulnerable.Check(t) && !Jhin.Cone.IsOutside((Vector2)t.ServerPosition) &&
                             t.IsValidTarget(Vars.R.Range) &&
                             Vars.GetRealHealth(t)
                             < (float)
                             GameObjects.Player.GetSpellDamage(
                                 t,
                                 SpellSlot.R,
                                 Jhin.ShotsCount == 3 ? DamageStage.Empowered : DamageStage.Default)))
                {
                    Vars.R.Cast(Vars.R.GetPrediction(target).UnitPosition);
                    return;
                }
            }

            if (Vars.R.Instance.Name.Equals("JhinRShot"))
            {
                return;
            }

            /// <summary>
            ///     The KillSteal Q Logic.
            /// </summary>
            if (Vars.Q.IsReady() && Vars.Menu["spells"]["q"]["killsteal"].GetValue <MenuBool>().Value)
            {
                foreach (var target in
                         GameObjects.EnemyHeroes.Where(
                             t =>
                             !Invulnerable.Check(t) && t.IsValidTarget(Vars.Q.Range) &&
                             Vars.GetRealHealth(t) < (float)GameObjects.Player.GetSpellDamage(t, SpellSlot.Q)))
                {
                    Vars.Q.CastOnUnit(target);
                    return;
                }
            }

            /// <summary>
            ///     The KillSteal W Logic.
            /// </summary>
            if (Vars.W.IsReady() && Vars.Menu["spells"]["w"]["killsteal"].GetValue <MenuBool>().Value)
            {
                foreach (var target in
                         GameObjects.EnemyHeroes.Where(
                             t =>
                             !Invulnerable.Check(t) && !t.IsValidTarget(GameObjects.Player.GetRealAutoAttackRange()) &&
                             t.IsValidTarget(Vars.W.Range - 100f) &&
                             Vars.GetRealHealth(t)
                             < (float)GameObjects.Player.GetSpellDamage(t, SpellSlot.W, DamageStage.Empowered)))
                {
                    Vars.W.Cast(Vars.W.GetPrediction(target).UnitPosition);
                }
            }
        }
Esempio n. 12
0
        /// <summary>
        ///     Fired when the game is updated.
        /// </summary>
        /// <param name="args">The <see cref="EventArgs" /> instance containing the event data.</param>
        public static void Clear(EventArgs args)
        {
            if (Bools.HasSheenBuff())
            {
                return;
            }

            /// <summary>
            ///     The Clear Q Logics.
            /// </summary>
            if (Vars.Q.IsReady())
            {
                if (Targets.Minions.Any() &&
                    GameObjects.Player.ManaPercent
                    > ManaManager.GetNeededMana(Vars.Q.Slot, Vars.Menu["spells"]["q"]["laneclear"]) &&
                    Vars.Menu["spells"]["q"]["laneclear"].GetValue <MenuSliderButton>().BValue)
                {
                    /// <summary>
                    ///     The Aggressive LaneClear Q Logic.
                    /// </summary>
                    if (GameObjects.EnemyHeroes.Any(t => !Invulnerable.Check(t) && t.IsValidTarget(Vars.Q.Range)))
                    {
                        if (Vars.Q.GetLineFarmLocation(Targets.Minions, Vars.Q.Width).MinionsHit >= 3 &&
                            !new Geometry.Rectangle(
                                GameObjects.Player.ServerPosition,
                                GameObjects.Player.ServerPosition.Extend(
                                    Targets.Minions[0].ServerPosition,
                                    Vars.Q.Range),
                                Vars.Q.Width).IsOutside(
                                (Vector2)
                                Vars.Q.GetPrediction(
                                    GameObjects.EnemyHeroes.FirstOrDefault(
                                        t => !Invulnerable.Check(t) && t.IsValidTarget(Vars.Q.Range)))
                                .UnitPosition))
                        {
                            Vars.Q.Cast(Vars.Q.GetLineFarmLocation(Targets.Minions, Vars.Q.Width).Position);
                        }
                    }

                    /// <summary>
                    ///     The LaneClear Q Logic.
                    /// </summary>
                    else if (
                        !GameObjects.EnemyHeroes.Any(
                            t => !Invulnerable.Check(t) && t.IsValidTarget(Vars.Q.Range + 100f)))
                    {
                        if (Vars.Q.GetLineFarmLocation(Targets.Minions, Vars.Q.Width).MinionsHit >= 3)
                        {
                            Vars.Q.Cast(Vars.Q.GetLineFarmLocation(Targets.Minions, Vars.Q.Width).Position);
                        }
                    }
                }

                /// <summary>
                ///     The JungleClear Q Logic.
                /// </summary>
                else if (Targets.JungleMinions.Any() &&
                         GameObjects.Player.ManaPercent
                         > ManaManager.GetNeededMana(Vars.Q.Slot, Vars.Menu["spells"]["q"]["jungleclear"]) &&
                         Vars.Menu["spells"]["q"]["jungleclear"].GetValue <MenuSliderButton>().BValue)
                {
                    Vars.Q.Cast(Targets.JungleMinions[0].ServerPosition);
                }
            }
        }
Esempio n. 13
0
        /// <summary>
        ///     Called when the game updates itself.
        /// </summary>
        /// <param name="args">The <see cref="EventArgs" /> instance containing the event data.</param>
        public static void Killsteal(EventArgs args)
        {
            /// <summary>
            ///     The Q KillSteal Logic.
            /// </summary>
            if (Vars.Q.IsReady())
            {
                /// <summary>
                ///     Normal Q KillSteal Logic.
                /// </summary>
                if (Vars.Menu["spells"]["q"]["killsteal"].GetValue <MenuBool>().Value)
                {
                    foreach (var target in
                             GameObjects.EnemyHeroes.Where(
                                 t =>
                                 !Invulnerable.Check(t) && t.IsValidTarget(Vars.Q.Range) &&
                                 Vars.GetRealHealth(t) < (float)GameObjects.Player.GetSpellDamage(t, SpellSlot.Q)))
                    {
                        Vars.Q.CastOnUnit(target);
                    }
                }

                var passiveMultiplier = GameObjects.Player.Level < 4
                                            ? 0.25
                                            : GameObjects.Player.Level < 7
                                                  ? 0.3
                                                  : GameObjects.Player.Level < 9
                                                        ? 0.35
                                                        : GameObjects.Player.Level < 11
                                                              ? 0.4
                                                              : GameObjects.Player.Level < 13
                                                                    ? 0.45
                                                                    : 0.5;

                /// <summary>
                ///     Extended Q KillSteal Logic.
                /// </summary>
                if (Vars.Menu["spells"]["q"]["extended"]["exkillsteal"].GetValue <MenuBool>().Value)
                {
                    /// <summary>
                    ///     Through enemy minions.
                    /// </summary>
                    foreach (var minion
                             in from minion in Targets.Minions.Where(m => m.IsValidTarget(Vars.Q.Range))
                             let polygon =
                                 new Geometry.Sector(
                                     (Vector2)minion.ServerPosition,
                                     (Vector2)
                                     minion.ServerPosition.Extend(
                                         GameObjects.Player.ServerPosition,
                                         -(Vars.Q2.Range - Vars.Q.Range)),
                                     40f * (float)Math.PI / 180f,
                                     Vars.Q2.Range - Vars.Q.Range - 50f)
                                 let target =
                                     GameObjects.EnemyHeroes.FirstOrDefault(
                                         t =>
                                         !Invulnerable.Check(t) && t.IsValidTarget(Vars.Q2.Range - 50f) &&
                                         Vars.GetRealHealth(t)
                                         < (float)GameObjects.Player.GetSpellDamage(t, SpellSlot.Q, DamageStage.SecondForm)
                                         + GameObjects.Player.TotalAttackDamage * passiveMultiplier
                                         + (Vars.GetRealHealth(minion)
                                            < (float)GameObjects.Player.GetSpellDamage(minion, SpellSlot.Q)
                                            + (MissFortune.PassiveTarget == null ||
                                               minion.NetworkId != MissFortune.PassiveTarget?.NetworkId
                                             ? GameObjects.Player.TotalAttackDamage * passiveMultiplier
                                             : 0)
                                          ? (float)
                                            GameObjects.Player.GetSpellDamage(t, SpellSlot.Q, DamageStage.SecondForm)
                                            / 2
                                          : 0) &&
                                         (t.NetworkId == MissFortune.PassiveTarget?.NetworkId ||
                                          Targets.Minions.All(m => polygon.IsOutside((Vector2)m.ServerPosition))))
                                     where target != null
                                     where
                                     !polygon.IsOutside((Vector2)target.ServerPosition) &&
                                     !polygon.IsOutside(
                                         (Vector2)
                                         Movement.GetPrediction(
                                             target,
                                             GameObjects.Player.Distance(target) / Vars.Q.Speed + Vars.Q.Delay).UnitPosition)
                                     select minion)
                    {
                        Vars.Q.CastOnUnit(minion);
                    }

                    /// <summary>
                    ///     Through enemy heroes.
                    /// </summary>
                    foreach (var target
                             in from target in GameObjects.EnemyHeroes.Where(t => t.IsValidTarget(Vars.Q.Range))
                             let polygon =
                                 new Geometry.Sector(
                                     (Vector2)target.ServerPosition,
                                     (Vector2)
                                     target.ServerPosition.Extend(
                                         GameObjects.Player.ServerPosition,
                                         -(Vars.Q2.Range - Vars.Q.Range)),
                                     40f * (float)Math.PI / 180f,
                                     Vars.Q2.Range - Vars.Q.Range - 50f)
                                 let target2 =
                                     GameObjects.EnemyHeroes.FirstOrDefault(
                                         t =>
                                         !Invulnerable.Check(t) && t.IsValidTarget(Vars.Q2.Range - 50f) &&
                                         Vars.GetRealHealth(t)
                                         < (float)GameObjects.Player.GetSpellDamage(t, SpellSlot.Q, DamageStage.SecondForm)
                                         + GameObjects.Player.TotalAttackDamage * passiveMultiplier &&
                                         (t.NetworkId == MissFortune.PassiveTarget?.NetworkId ||
                                          Targets.Minions.All(m => polygon.IsOutside((Vector2)m.ServerPosition))))
                                     where target2 != null
                                     where
                                     !polygon.IsOutside((Vector2)target2.ServerPosition) &&
                                     !polygon.IsOutside(
                                         (Vector2)
                                         Movement.GetPrediction(
                                             target2,
                                             GameObjects.Player.Distance(target) / Vars.Q.Speed + Vars.Q.Delay).UnitPosition)
                                     select target)
                    {
                        Vars.Q.CastOnUnit(target);
                    }
                }
            }
        }
Esempio n. 14
0
        /// <summary>
        ///     Called when the game updates itself.
        /// </summary>
        /// <param name="args">The <see cref="EventArgs" /> instance containing the event data.</param>
        public static void Killsteal(EventArgs args)
        {
            /// <summary>
            ///     The KillSteal W Logic.
            /// </summary>
            if (Vars.W.IsReady() && Vars.Menu["spells"]["w"]["killsteal"].GetValue <MenuBool>().Value)
            {
                foreach (var target in
                         GameObjects.EnemyHeroes.Where(
                             t =>
                             !Invulnerable.Check(t) && t.IsValidTarget(Vars.W.Range) &&
                             !t.IsValidTarget(GameObjects.Player.GetRealAutoAttackRange()) &&
                             Vars.GetRealHealth(t) < (float)GameObjects.Player.GetSpellDamage(t, SpellSlot.W)))
                {
                    Vars.W.Cast(Vars.W.GetPrediction(target).CastPosition);
                    return;
                }
            }

            /// <summary>
            ///     The KillSteal Q Logic.
            /// </summary>
            if (Vars.Q.IsReady() && Vars.Menu["spells"]["q"]["killsteal"].GetValue <MenuBool>().Value)
            {
                foreach (var target in
                         GameObjects.EnemyHeroes.Where(
                             t =>
                             !Invulnerable.Check(t) && t.IsValidTarget(Vars.Q.Range) &&
                             !t.IsValidTarget(GameObjects.Player.GetRealAutoAttackRange()) &&
                             !Vars.AnyWallInBetween(
                                 GameObjects.Player.ServerPosition,
                                 Vars.Q.GetPrediction(t).UnitPosition) &&
                             Vars.GetRealHealth(t) < (float)GameObjects.Player.GetSpellDamage(t, SpellSlot.Q)))
                {
                    Vars.Q.Cast(Vars.Q.GetPrediction(target).UnitPosition);
                    return;
                }
            }

            /// <summary>
            ///     The KillSteal R Logic.
            /// </summary>
            if (Vars.R.IsReady() && Vars.Menu["spells"]["r"]["killsteal"].GetValue <MenuBool>().Value)
            {
                foreach (var target in
                         GameObjects.EnemyHeroes.Where(
                             t =>
                             !Invulnerable.Check(t) && t.IsValidTarget(Vars.R.Range + 150f) &&
                             Vars.GetRealHealth(t)
                             < (float)
                             GameObjects.Player.GetSpellDamage(
                                 t,
                                 SpellSlot.R,
                                 t.IsValidTarget(Vars.R.Range) ? DamageStage.Default : DamageStage.Detonation)))
                {
                    Vars.R.Cast(Vars.R.GetPrediction(target).UnitPosition);

                    if (Vars.E.IsReady() && Vars.Menu["miscellaneous"]["cancel"].GetValue <MenuBool>().Value)
                    {
                        Vars.E.Cast(
                            GameObjects.Player.ServerPosition.Extend(Game.CursorPos, GameObjects.Player.BoundingRadius));
                    }
                }
            }
        }
Esempio n. 15
0
        /// <summary>
        ///     Called when the game updates itself.
        /// </summary>
        /// <param name="args">The <see cref="EventArgs" /> instance containing the event data.</param>
        public static void Combo(EventArgs args)
        {
            if (Bools.HasSheenBuff())
            {
                return;
            }

            /// <summary>
            ///     The E Combo Logic.
            /// </summary>
            if (Vars.E.IsReady() && Vars.Menu["spells"]["e"]["combo"].GetValue <MenuBool>().Value)
            {
                foreach (var target in
                         GameObjects.EnemyHeroes.Where(
                             t =>
                             t.IsValidTarget(Vars.E.Range) &&
                             (t.HasBuffOfType(BuffType.Poison) ||
                              !Vars.Menu["spells"]["e"]["combopoison"].GetValue <MenuBool>().Value) &&
                             !Invulnerable.Check(t, DamageType.Magical)))
                {
                    DelayAction.Add(
                        Vars.Menu["spells"]["e"]["delay"].GetValue <MenuSlider>().Value,
                        () => { Vars.E.CastOnUnit(target); });
                }
            }

            if (!Targets.Target.IsValidTarget() || Invulnerable.Check(Targets.Target, DamageType.Magical, false))
            {
                return;
            }

            /// <summary>
            ///     The R Combo Logic.
            /// </summary>
            if (Vars.R.IsReady() && Vars.Menu["spells"]["r"]["combo"].GetValue <MenuSliderButton>().BValue &&
                Vars.Menu["spells"]["r"]["combo"].GetValue <MenuSliderButton>().SValue <= Targets.RTargets.Count)
            {
                Vars.R.Cast(Targets.RTargets[0].ServerPosition);
            }
            if (Targets.Target.HasBuffOfType(BuffType.Poison))
            {
                return;
            }

            /// <summary>
            ///     The Q Combo Logic.
            /// </summary>
            if (Vars.Q.IsReady() && Targets.Target.IsValidTarget(Vars.Q.Range) &&
                Vars.Menu["spells"]["q"]["combo"].GetValue <MenuBool>().Value)
            {
                Vars.Q.Cast(Vars.Q.GetPrediction(Targets.Target).CastPosition);
                return;
            }

            DelayAction.Add(
                1000,
                () =>
            {
                /// <summary>
                ///     The W Combo Logic.
                /// </summary>
                if (Vars.W.IsReady() && Targets.Target.IsValidTarget(Vars.W.Range - 100f) &&
                    !Targets.Target.IsValidTarget(500f) &&
                    Vars.Menu["spells"]["w"]["combo"].GetValue <MenuBool>().Value)
                {
                    Vars.W.Cast(Vars.W.GetPrediction(Targets.Target).CastPosition);
                }
            });
        }
Esempio n. 16
0
        /// <summary>
        ///     Called when the game updates itself.
        /// </summary>
        /// <param name="args">The <see cref="EventArgs" /> instance containing the event data.</param>
        public static void Automatic(EventArgs args)
        {
            if (GameObjects.Player.LSIsRecalling())
            {
                return;
            }

            /// <summary>
            ///     The R Stacking Manager.
            /// </summary>
            if (GameObjects.Player.InFountain() &&
                Bools.HasTear(GameObjects.Player) &&
                GameObjects.Player.Spellbook.GetSpell(SpellSlot.R).ToggleState == 1 &&
                Vars.getCheckBoxItem(Vars.MiscMenu, "tear"))
            {
                Vars.R.Cast(Game.CursorPos);
            }

            /// <summary>
            ///     The Automatic Q Logic.
            /// </summary>
            if (Vars.Q.IsReady() &&
                GameObjects.Player.Spellbook.GetSpell(SpellSlot.Q).ToggleState == 1 &&
                Vars.getCheckBoxItem(Vars.QMenu, "logical"))
            {
                foreach (var target in GameObjects.EnemyHeroes.Where(
                             t =>
                             Bools.IsImmobile(t) &&
                             !Invulnerable.Check(t) &&
                             t.LSIsValidTarget(Vars.Q.Range)))
                {
                    Vars.Q.Cast(Vars.Q.GetPrediction(target).UnitPosition);
                }
            }

            /// <summary>
            ///     The Automatic W Logic.
            /// </summary>
            if (Vars.W.IsReady() &&
                Vars.getCheckBoxItem(Vars.WMenu, "logical"))
            {
                foreach (var target in GameObjects.EnemyHeroes.Where(
                             t =>
                             Bools.IsImmobile(t) &&
                             !Invulnerable.Check(t) &&
                             t.LSIsValidTarget(Vars.W.Range)))
                {
                    Vars.W.Cast(
                        GameObjects.Player.ServerPosition.LSExtend(
                            target.ServerPosition, GameObjects.Player.Distance(target) + 20f));
                }
            }
            /// <summary>
            ///     The Q Missile Manager.
            /// </summary>
            if (Vars.Q.IsReady() &&
                Anivia.QMissile != null &&
                GameObjects.Player.Spellbook.GetSpell(SpellSlot.Q).ToggleState != 1)
            {
                if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LaneClear) || Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.JungleClear))
                {
                    /// <summary>
                    ///     The Q Clear Logic.
                    /// </summary>
                    if (Anivia.QMissile.Position.CountEnemyHeroesInRange(Vars.Q.Width * 2 - 5f) > 0)
                    {
                        Vars.Q.Cast();
                    }

                    if (Vars.getSliderItem(Vars.QMenu, "clear") == 101)
                    {
                        return;
                    }

                    if (Targets.QMinions.Count() >= 2)
                    {
                        Vars.Q.Cast();
                    }
                }
                else
                {
                    if (!Vars.getCheckBoxItem(Vars.QMenu, "combo"))
                    {
                        return;
                    }

                    if (Anivia.QMissile.Position.CountEnemyHeroesInRange(Vars.Q.Width * 2 - 5f) > 0)
                    {
                        Vars.Q.Cast();
                    }
                }
            }

            /// <summary>
            ///     The R Missile Manager.
            /// </summary>
            if (Vars.R.IsReady() &&
                Anivia.RMissile != null &&
                !GameObjects.Player.InFountain() &&
                GameObjects.Player.Spellbook.GetSpell(SpellSlot.R).ToggleState != 1)
            {
                if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LaneClear) || Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.JungleClear))
                {
                    /// <summary>
                    ///     The R Clear Logic.
                    /// </summary>
                    if (Vars.getSliderItem(Vars.RMenu, "clear") == 101)
                    {
                        return;
                    }

                    if (!Targets.RMinions.Any() ||
                        GameObjects.Player.ManaPercent <
                        ManaManager.GetNeededMana(Vars.R.Slot, Vars.getSliderItem(Vars.RMenu, "clear")))
                    {
                        Vars.R.Cast();
                    }
                }
                else
                {
                    /// <summary>
                    ///     The Default R Logic.
                    /// </summary>
                    if (!Vars.getCheckBoxItem(Vars.RMenu, "combo"))
                    {
                        return;
                    }

                    if (Anivia.RMissile.Position.CountEnemyHeroesInRange(Vars.R.Width + 250f) < 1)
                    {
                        Vars.R.Cast();
                    }
                }
            }
        }
Esempio n. 17
0
        /// <summary>
        ///     Called when the game updates itself.
        /// </summary>
        /// <param name="args">The <see cref="EventArgs" /> instance containing the event data.</param>
        public static void Killsteal(EventArgs args)
        {
            /// <summary>
            ///     The KillSteal W Logic.
            /// </summary>
            if (Vars.W.IsReady() &&
                Vars.getCheckBoxItem(Vars.WMenu, "killsteal"))
            {
                foreach (var target in
                         GameObjects.EnemyHeroes.Where(
                             t =>
                             !Invulnerable.Check(t) &&
                             t.LSIsValidTarget(Vars.W.Range) &&
                             !t.LSIsValidTarget(Vars.AARange) &&
                             Vars.GetRealHealth(t) <
                             (float)GameObjects.Player.LSGetSpellDamage(t, SpellSlot.W)))
                {
                    Vars.W.Cast(Vars.W.GetPrediction(target).CastPosition);
                    return;
                }
            }

            /// <summary>
            ///     The KillSteal Q Logic.
            /// </summary>
            if (Vars.Q.IsReady() &&
                Vars.getCheckBoxItem(Vars.QMenu, "killsteal"))
            {
                foreach (var target in
                         GameObjects.EnemyHeroes.Where(
                             t =>
                             !Invulnerable.Check(t) &&
                             t.LSIsValidTarget(Vars.Q.Range) &&
                             !t.LSIsValidTarget(Vars.AARange) &&
                             Vars.GetRealHealth(t) <
                             (float)GameObjects.Player.LSGetSpellDamage(t, SpellSlot.Q)))
                {
                    Vars.Q.Cast(Vars.Q.GetPrediction(target).UnitPosition);
                    return;
                }
            }

            /// <summary>
            ///     The KillSteal R Logic.
            /// </summary>
            if (Vars.R.IsReady() &&
                Vars.getCheckBoxItem(Vars.RMenu, "killsteal"))
            {
                foreach (var target in
                         GameObjects.EnemyHeroes.Where(
                             t =>
                             !Invulnerable.Check(t) &&
                             !t.LSIsValidTarget(Vars.AARange) &&
                             t.LSIsValidTarget(Vars.R.Range + 150f) &&
                             Vars.GetRealHealth(t) <
                             (float)GameObjects.Player.LSGetSpellDamage(t, SpellSlot.R, (t.LSIsValidTarget(Vars.R.Range)
                                    ? DamageStage.Default
                                    : DamageStage.Detonation))))
                {
                    Vars.R.Cast(Vars.R.GetPrediction(target).UnitPosition);
                }
            }
        }
Esempio n. 18
0
        /// <summary>
        ///     Fired when the game is updated.
        /// </summary>
        public void Harass()
        {
            /// <summary>
            ///     The Q Harass Logic.
            /// </summary>
            var bestTargetQ = Extensions.GetBestEnemyHeroTargetInRange(SpellClass.Q2.Range + 60f);

            if (SpellClass.Q.Ready &&
                bestTargetQ != null &&
                MenuClass.Spells["q"]["harass"].As <MenuSliderBool>().Enabled)
            {
                var manaPercent = UtilityClass.Player.ManaPercent();
                var minEnemies  = MenuClass.Spells["q"]["customization"]["minenemies"];
                var bestTargetDistanceToPlayer = UtilityClass.Player.Distance(bestTargetQ);
                var harassManaManager          = MenuClass.Spells["q"]["harass"].As <MenuSliderBool>().Value;
                var enemiesInSplashRange       = bestTargetQ.CountEnemyHeroesInRange(SplashRange);

                if (!IsUsingFishBones())
                {
                    if (manaPercent <= harassManaManager)
                    {
                        return;
                    }

                    if (minEnemies != null &&
                        enemiesInSplashRange >= minEnemies.As <MenuSlider>().Value)
                    {
                        SpellClass.Q.Cast();
                    }

                    if (bestTargetDistanceToPlayer > SpellClass.Q.Range + bestTargetQ.BoundingRadius)
                    {
                        SpellClass.Q.Cast();
                    }
                }
                else
                {
                    if (manaPercent <= harassManaManager)
                    {
                        SpellClass.Q.Cast();
                        return;
                    }

                    if (minEnemies != null &&
                        enemiesInSplashRange < minEnemies.As <MenuSlider>().Value&&
                        bestTargetDistanceToPlayer <= SpellClass.Q.Range + bestTargetQ.BoundingRadius)
                    {
                        SpellClass.Q.Cast();
                    }
                }
            }

            /// <summary>
            ///     The W Harass Logic.
            /// </summary>
            if (SpellClass.W.Ready &&
                UtilityClass.Player.ManaPercent()
                > ManaManager.GetNeededMana(SpellClass.W.Slot, MenuClass.Spells["w"]["harass"]) &&
                MenuClass.Spells["w"]["harass"].As <MenuSliderBool>().Enabled)
            {
                var bestTarget = Extensions.GetBestEnemyHeroTargetInRange(SpellClass.W.Range);
                if (bestTarget != null &&
                    !Invulnerable.Check(bestTarget) &&
                    MenuClass.Spells["w"]["whitelist"][bestTarget.ChampionName.ToLower()].As <MenuBool>().Enabled)
                {
                    SpellClass.W.Cast(bestTarget);
                }
            }
        }
Esempio n. 19
0
        /// <summary>
        ///     Fired when the game is updated.
        /// </summary>
        /// <param name="args">The <see cref="EventArgs" /> instance containing the event data.</param>
        public static void Clear(EventArgs args)
        {
            if (Bools.HasSheenBuff())
            {
                return;
            }

            /// <summary>
            ///     The Clear W Logic.
            /// </summary>
            if (Vars.W.IsReady() &&
                GameObjects.Player.ManaPercent
                > ManaManager.GetNeededMana(Vars.W.Slot, Vars.Menu["spells"]["w"]["laneclear"]) &&
                Vars.Menu["spells"]["w"]["laneclear"].GetValue <MenuSliderButton>().BValue)
            {
                if (
                    GameObjects.EnemyHeroes.Any(
                        t => !Invulnerable.Check(t, DamageType.True, false) && t.IsValidTarget(Vars.W.Range - 150f)))
                {
                    return;
                }

                if (Vars.W.GetLineFarmLocation(Targets.Minions, Vars.W.Width).MinionsHit >= 4)
                {
                    Vars.W.Cast(Vars.W.GetLineFarmLocation(Targets.Minions, Vars.W.Width).Position);
                }
            }

            /// <summary>
            ///     The Clear Q Logic.
            /// </summary>
            if (Vars.Q.IsReady())
            {
                /// <summary>
                ///     The LaneClear Q Logic.
                /// </summary>
                if (Targets.Minions.Any() &&
                    GameObjects.Player.ManaPercent
                    > ManaManager.GetNeededMana(Vars.Q.Slot, Vars.Menu["spells"]["q"]["laneclear"]) &&
                    Vars.Menu["spells"]["q"]["laneclear"].GetValue <MenuSliderButton>().BValue)
                {
                    foreach (var minion in
                             Targets.Minions.Where(
                                 m =>
                                 m.IsValidTarget(Vars.Q.Range) && Targets.Minions.Count(m2 => m2.Distance(m) < 350f) >= 3 &&
                                 Vars.GetRealHealth(m) < (float)GameObjects.Player.GetSpellDamage(m, SpellSlot.Q)))
                    {
                        Vars.Q.CastOnUnit(minion);
                    }
                }

                /// <summary>
                ///     The JungleClear Q Logic.
                /// </summary>
                else if (Targets.JungleMinions.Any() &&
                         GameObjects.Player.ManaPercent
                         > ManaManager.GetNeededMana(Vars.Q.Slot, Vars.Menu["spells"]["q"]["jungleclear"]) &&
                         Vars.Menu["spells"]["q"]["jungleclear"].GetValue <MenuSliderButton>().BValue)
                {
                    Vars.Q.CastOnUnit(Targets.JungleMinions[0]);
                }
            }
        }
Esempio n. 20
0
        /// <summary>
        ///     Called when the game updates itself.
        /// </summary>
        /// <param name="args">The <see cref="EventArgs" /> instance containing the event data.</param>
        public static void Combo(EventArgs args)
        {
            if (Orianna.BallPosition == null)
            {
                return;
            }

            /// <summary>
            ///     The W Combo Logic.
            /// </summary>
            if (Vars.W.IsReady() &&
                GameObjects.EnemyHeroes.Any(
                    t =>
                    t.Distance((Vector2)Orianna.BallPosition) < Vars.W.Range) &&
                Vars.Menu["spells"]["w"]["combo"].GetValue <MenuBool>().Value)
            {
                Vars.W.Cast();
                return;
            }

            /// <summary>
            ///     The E Combo Logic.
            /// </summary>
            if (Vars.E.IsReady() &&
                GameObjects.Player.Mana - Vars.E.Instance.ManaCost
                > Vars.Q.Instance.ManaCost + Vars.W.Instance.ManaCost &&
                Vars.Menu["spells"]["e"]["combo"].GetValue <MenuBool>().Value)
            {
                foreach (
                    var ally in
                    GameObjects.AllyHeroes.OrderBy(o => o.Health).Where(t => t.IsValidTarget(Vars.E.Range, false)))
                {
                    var polygon = new Geometry.Rectangle(
                        ally.ServerPosition,
                        ally.ServerPosition.Extend(
                            (Vector2)Orianna.BallPosition,
                            ally.Distance((Vector2)Orianna.BallPosition)),
                        Vars.Q.Width);

                    var objAiHero =
                        GameObjects.EnemyHeroes.FirstOrDefault(
                            t =>
                            t.IsValidTarget() && !Invulnerable.Check(t, DamageType.Magical) &&
                            !polygon.IsOutside((Vector2)t.ServerPosition));
                    if (objAiHero != null)
                    {
                        Vars.E.CastOnUnit(ally);
                        return;
                    }
                }
            }

            /// <summary>
            ///     The Combo R Logic.
            /// </summary>
            if (Vars.R.IsReady() &&
                GameObjects.EnemyHeroes.Any(
                    t =>
                    t.Distance((Vector2)Orianna.BallPosition) < Vars.R.Range - 25f &&
                    Vars.GetRealHealth(t)
                    < (float)GameObjects.Player.GetSpellDamage(t, SpellSlot.R)
                    + (float)GameObjects.Player.GetSpellDamage(t, SpellSlot.Q) * 2 &&
                    Vars.Menu["spells"]["r"]["whitelist"][t.ChampionName.ToLower()].GetValue <MenuBool>().Value) &&
                Vars.Menu["spells"]["r"]["combo"].GetValue <MenuBool>().Value)
            {
                Vars.R.Cast();
            }

            if (Bools.HasSheenBuff() && Targets.Target.IsValidTarget(Vars.AaRange) || !Targets.Target.IsValidTarget() ||
                Invulnerable.Check(Targets.Target, DamageType.Magical))
            {
                return;
            }

            /// <summary>
            ///     The Combo Q Logic.
            /// </summary>
            if (Vars.Q.IsReady() && Targets.Target.IsValidTarget(Vars.Q.Range) &&
                Vars.Menu["spells"]["q"]["combo"].GetValue <MenuBool>().Value)
            {
                if (Vars.E.IsReady() &&
                    Vars.Menu["spells"]["e"]["logical"].GetValue <MenuBool>().Value &&
                    ((Vector2)Orianna.BallPosition).Distance((Vector2)GameObjects.Player.ServerPosition)
                    > Vars.AaRange &&
                    ((Vector2)Orianna.BallPosition).Distance((Vector2)Targets.Target.ServerPosition)
                    > ((Vector2)Orianna.BallPosition).Distance((Vector2)GameObjects.Player.ServerPosition))
                {
                    Vars.E.Cast(GameObjects.Player);
                }
                Vars.Q.Cast(Vars.Q.GetPrediction(Targets.Target).CastPosition);
            }
        }
Esempio n. 21
0
        /// <summary>
        ///     Called when the game updates itself.
        /// </summary>
        /// <param name="args">The <see cref="EventArgs" /> instance containing the event data.</param>
        public static void Automatic(EventArgs args)
        {
            /// <summary>
            ///     The R Manager.
            /// </summary>
            Orbwalker.DisableAttacking = Vars.R.Instance.Name.Equals("JhinRShot");
            Orbwalker.DisableMovement  = Vars.R.Instance.Name.Equals("JhinRShot");

            if (GameObjects.Player.LSIsRecalling())
            {
                return;
            }

            /*
             * /// <summary>
             * ///     The Automatic R Logic.
             * /// </summary>
             * if (!Targets.Target.LSIsValidTarget() &&
             *  Vars.R.Instance.Name.Equals("JhinRShot"))
             * {
             *  GameObjects.Player.IssueOrder(GameObjectOrder.MoveTo, GameObjects.Player.ServerPosition);
             * }
             */

            if (Vars.R.Instance.Name.Equals("JhinRShot"))
            {
                return;
            }

            /// <summary>
            ///     The Automatic Q LastHit Logic.
            /// </summary>
            if (Vars.Q.IsReady() &&
                GameObjects.Player.HasBuff("JhinPassiveReload") &&
                !Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo) &&
                GameObjects.Player.ManaPercent >
                ManaManager.GetNeededMana(Vars.Q.Slot, Vars.getSliderItem(Vars.QMenu, "lasthit")) &&
                Vars.getSliderItem(Vars.QMenu, "lasthit") != 101)
            {
                foreach (var minion in Targets.Minions.Where(
                             m =>
                             m.LSIsValidTarget(Vars.Q.Range) &&
                             Vars.GetRealHealth(m) <
                             (float)GameObjects.Player.LSGetSpellDamage(m, SpellSlot.Q)))
                {
                    Vars.Q.CastOnUnit(minion);
                }
            }

            /// <summary>
            ///     The Automatic W Logic.
            /// </summary>
            if (Vars.W.IsReady() &&
                !GameObjects.Player.IsUnderEnemyTurret() &&
                Vars.getCheckBoxItem(Vars.WMenu, "logical"))
            {
                foreach (var target in GameObjects.EnemyHeroes.Where(
                             t =>
                             !Invulnerable.Check(t) &&
                             t.HasBuff("jhinespotteddebuff") &&
                             t.LSIsValidTarget(Vars.W.Range - 150f) &&
                             !t.LSIsValidTarget(Vars.AARange + 50f) &&
                             !Vars.W.GetPrediction(t).CollisionObjects.Any(
                                 c =>
                                 !c.HasBuff("jhinespotteddebuff") &&
                                 GameObjects.EnemyHeroes.Contains(c)) &&
                             Vars.getCheckBoxItem(Vars.WhiteListMenu, t.ChampionName.ToLower())))
                {
                    if (Bools.IsImmobile(target))
                    {
                        Vars.W.Cast(target.ServerPosition);
                        return;
                    }
                    else
                    {
                        if (!target.LSIsFacing(GameObjects.Player) &&
                            GameObjects.Player.LSIsFacing(target))
                        {
                            Vars.W.Cast(Vars.W.GetPrediction(target).UnitPosition);
                            return;
                        }

                        if (target.LSIsFacing(GameObjects.Player) &&
                            !GameObjects.Player.LSIsFacing(target) &&
                            !GameObjects.EnemyHeroes.Any(
                                t =>
                                t.LSIsValidTarget(Vars.Q.Range + 50f)))
                        {
                            Vars.W.Cast(Vars.W.GetPrediction(target).UnitPosition);
                        }
                    }
                }
            }

            /// <summary>
            ///     The Automatic E Logic.
            /// </summary>
            if (Vars.E.IsReady() &&
                Vars.getCheckBoxItem(Vars.EMenu, "logical"))
            {
                foreach (var target in GameObjects.EnemyHeroes.Where(
                             t =>
                             Bools.IsImmobile(t) &&
                             !Invulnerable.Check(t) &&
                             t.LSIsValidTarget(Vars.E.Range)))
                {
                    Vars.E.Cast(GameObjects.Player.ServerPosition.LSExtend(
                                    target.ServerPosition,
                                    GameObjects.Player.Distance(target) + target.BoundingRadius * 2));
                }
            }
        }
Esempio n. 22
0
        /// <summary>
        ///     Fired on an incoming gapcloser.
        /// </summary>
        /// <param name="sender">The sender.</param>
        /// <param name="args">The <see cref="Gapcloser.GapcloserArgs" /> instance containing the event data.</param>
        public void OnGapcloser(AIHeroClient sender, Gapcloser.GapcloserArgs args)
        {
            if (UtilityClass.Player.IsDead)
            {
                return;
            }

            if (sender == null || !sender.IsEnemy() || !sender.IsMelee)
            {
                return;
            }

            /// <summary>
            ///     The Anti-Gapcloser Q.
            /// </summary>
            if (SpellClass.Q.Ready &&
                MenuClass.Gapcloser["enabled"].Enabled &&
                MenuClass.SubGapcloser[$"{sender.CharName.ToLower()}.{args.SpellName.ToLower()}"].Enabled)
            {
                switch (args.Type)
                {
                case Gapcloser.Type.Targeted:
                    if (sender.IsMelee &&
                        args.Target.IsMe())
                    {
                        Vector3 targetPos =
                            UtilityClass.Player.Position.Extend(args.StartPosition, -SpellClass.Q.Range);
                        if (targetPos.IsUnderEnemyTurret())
                        {
                            return;
                        }

                        SpellClass.Q.Cast(targetPos);
                    }
                    break;

                default:
                    Vector3 targetPos2 = UtilityClass.Player.Position.Extend(args.EndPosition, -SpellClass.Q.Range);
                    if (targetPos2.IsUnderEnemyTurret())
                    {
                        return;
                    }

                    if (args.EndPosition.DistanceToPlayer() <= UtilityClass.Player.GetAutoAttackRange())
                    {
                        SpellClass.Q.Cast(targetPos2);
                    }
                    break;
                }
            }

            /// <summary>
            ///     The Anti-Gapcloser E.
            /// </summary>
            if (SpellClass.E.Ready &&
                MenuClass.Gapcloser2["enabled"].Enabled &&
                MenuClass.SubGapcloser2[$"{sender.CharName.ToLower()}.{args.SpellName.ToLower()}"].Enabled &&
                !Invulnerable.Check(sender, DamageType.Magical, false))
            {
                switch (args.Type)
                {
                case Gapcloser.Type.Targeted:
                    if (args.Target.IsMe())
                    {
                        SpellClass.E.CastOnUnit(sender);
                    }
                    break;

                default:
                    if (args.EndPosition.DistanceToPlayer() <= UtilityClass.Player.GetAutoAttackRange())
                    {
                        SpellClass.E.CastOnUnit(sender);
                    }
                    break;
                }
            }
        }
Esempio n. 23
0
        /// <summary>
        ///     Called when the game updates itself.
        /// </summary>
        /// <param name="args">The <see cref="EventArgs" /> instance containing the event data.</param>
        public static void Combo(EventArgs args)
        {
            /// <summary>
            ///     The W Combo Logic.
            /// </summary>
            if (Vars.W.IsReady() &&
                GameObjects.EnemyHeroes.Any(
                    t => t.IsValidTarget() && t.Distance((Vector2)Orianna.GetBallPosition) < Vars.W.Range) &&
                Vars.Menu["spells"]["w"]["combo"].GetValue <MenuBool>().Value)
            {
                Vars.W.Cast();
            }

            /// <summary>
            ///     The E Combo Logic.
            /// </summary>
            if (Vars.E.IsReady() &&
                GameObjects.Player.Mana - Vars.E.Instance.SData.Mana
                > Vars.Q.Instance.SData.Mana + Vars.W.Instance.SData.Mana &&
                Vars.Menu["spells"]["e"]["combo"].GetValue <MenuBool>().Value)
            {
                foreach (var ally in
                         GameObjects.AllyHeroes.OrderBy(o => o.Health).Where(t => t.IsValidTarget(Vars.E.Range, false)))
                {
                    var polygon = new Geometry.Rectangle(
                        ally.ServerPosition,
                        ally.ServerPosition.Extend(
                            (Vector2)Orianna.GetBallPosition,
                            ally.Distance((Vector2)Orianna.GetBallPosition)),
                        Vars.E.Width);

                    if (
                        GameObjects.EnemyHeroes.Any(
                            t =>
                            t.IsValidTarget() && !Invulnerable.Check(t, DamageType.Magical, false) &&
                            !polygon.IsOutside((Vector2)t.ServerPosition)))
                    {
                        Vars.E.CastOnUnit(ally);
                    }
                }
            }

            if (Bools.HasSheenBuff() && Targets.Target.IsValidTarget(GameObjects.Player.GetRealAutoAttackRange()) ||
                !Targets.Target.IsValidTarget() || Invulnerable.Check(Targets.Target, DamageType.Magical, false))
            {
                return;
            }

            /// <summary>
            ///     The Combo Q Logic.
            /// </summary>
            if (Vars.Q.IsReady() && Targets.Target.IsValidTarget(Vars.Q.Range) &&
                Vars.Menu["spells"]["q"]["combo"].GetValue <MenuBool>().Value)
            {
                if ((Vector2)Orianna.GetBallPosition != (Vector2)GameObjects.Player.ServerPosition &&
                    ((Vector2)Orianna.GetBallPosition).Distance((Vector2)Targets.Target.ServerPosition)
                    > ((Vector2)Orianna.GetBallPosition).Distance((Vector2)GameObjects.Player.ServerPosition))
                {
                    if (Vars.E.IsReady() && Vars.Menu["spells"]["e"]["logical"].GetValue <MenuBool>().Value)
                    {
                        Vars.E.Cast(GameObjects.Player);
                    }
                }
                else
                {
                    Vars.Q.Cast(Vars.Q.GetPrediction(Targets.Target).CastPosition);
                }
            }
        }
Esempio n. 24
0
        /// <summary>
        ///     Called when the game updates itself.
        /// </summary>
        /// <param name="args">The <see cref="EventArgs" /> instance containing the event data.</param>
        public static void Killsteal(EventArgs args)
        {
            /// <summary>
            ///     The KillSteal Q Logic.
            /// </summary>
            if (Vars.Q.IsReady() &&
                Vars.getCheckBoxItem(Vars.QMenu, "killsteal"))
            {
                foreach (var target in GameObjects.EnemyHeroes.Where(
                             t =>
                             !Invulnerable.Check(t) &&
                             !t.LSIsValidTarget(Vars.AARange) &&
                             t.LSIsValidTarget(Vars.Q.Range - 100f) &&
                             Vars.GetRealHealth(t) <
                             (float)GameObjects.Player.LSGetSpellDamage(t, SpellSlot.Q)))
                {
                    if (!Vars.Q.GetPrediction(target).CollisionObjects.Any(c => Targets.Minions.Contains(c)))
                    {
                        Vars.Q.Cast(Vars.Q.GetPrediction(target).UnitPosition);
                        return;
                    }
                }
            }

            /// <summary>
            ///     The KillSteal E Logic.
            /// </summary>
            if (Vars.E.IsReady() &&
                Vars.getCheckBoxItem(Vars.EMenu, "killsteal"))
            {
                foreach (var target in GameObjects.EnemyHeroes.Where(
                             t =>
                             !Invulnerable.Check(t) &&
                             !t.LSIsValidTarget(Vars.AARange) &&
                             t.LSIsValidTarget(Vars.E.Range - 100f) &&
                             Vars.GetRealHealth(t) <
                             (float)GameObjects.Player.LSGetSpellDamage(t, SpellSlot.E)))
                {
                    Vars.E.Cast(Vars.E.GetPrediction(target).UnitPosition);
                    return;
                }
            }

            /// <summary>
            ///     The KillSteal R Logic.
            /// </summary>
            if (Vars.R.IsReady() &&
                Vars.getCheckBoxItem(Vars.RMenu, "killstealC") &&
                Vars.getSliderItem(Vars.RMenu, "killsteal") >
                GameObjects.Player.GetBuffCount("kogmawlivingartillerycost"))
            {
                foreach (var target in GameObjects.EnemyHeroes.Where(
                             t =>
                             !Invulnerable.Check(t) &&
                             t.LSIsValidTarget(Vars.R.Range) &&
                             !t.LSIsValidTarget(Vars.W.Range) &&
                             Vars.GetRealHealth(t) <
                             (float)GameObjects.Player.LSGetSpellDamage(t, SpellSlot.R)))
                {
                    Vars.R.Cast(Vars.R.GetPrediction(target).CastPosition);
                }
            }
        }
Esempio n. 25
0
        public static void UseFleeItems()
        {
            if (_menu == null || !_menu.Item(_menu.Name + ".enabled").GetValue <bool>())
            {
                return;
            }

            try
            {
                foreach (var item in
                         Items.Where(
                             i =>
                             i.Flags.HasFlag(ItemFlags.Flee) &&
                             _menu.Item(_menu.Name + "." + i.Name + ".flee").GetValue <bool>() && i.Item.IsOwned() &&
                             i.Item.IsReady() && i.Item.IsOwned() && i.Item.IsReady() &&
                             ObjectManager.Player.CountEnemiesInRange(i.Range) >=
                             _menu.Item(_menu.Name + "." + i.Name + ".min-enemies-range").GetValue <Slider>().Value&&
                             ObjectManager.Player.HealthPercent <=
                             _menu.Item(_menu.Name + "." + i.Name + ".player-health-below").GetValue <Slider>().Value&&
                             ObjectManager.Player.HealthPercent >=
                             _menu.Item(_menu.Name + "." + i.Name + ".player-health-above").GetValue <Slider>().Value))
                {
                    if (item.CastType != CastType.Self)
                    {
                        var lItem     = item;
                        var localItem = item;
                        foreach (var enemy in
                                 GameObjects.EnemyHeroes.Where(
                                     t =>
                                     t.IsValidTarget() && !Invulnerable.Check(t) &&
                                     t.HealthPercent <=
                                     _menu.Item(_menu.Name + "." + lItem.Name + ".target-health-below")
                                     .GetValue <Slider>()
                                     .Value&&
                                     t.HealthPercent >=
                                     _menu.Item(_menu.Name + "." + lItem.Name + ".target-health-above")
                                     .GetValue <Slider>()
                                     .Value)
                                 .OrderByDescending(
                                     t =>
                                     t.Position.Distance(ObjectManager.Player.Position, true) <
                                     Math.Pow(localItem.Range, 2)))
                        {
                            if (!Utils.IsImmobile(enemy) && !Utils.IsSlowed(enemy))
                            {
                                switch (localItem.CastType)
                                {
                                case CastType.Target:
                                    localItem.Item.Cast(enemy);
                                    break;

                                case CastType.Position:
                                    var prediction = Prediction.GetPrediction(
                                        enemy, localItem.Delay, localItem.Radius, localItem.Speed);
                                    if (prediction.Hitchance >= HitChance.Medium)
                                    {
                                        localItem.Item.Cast(prediction.CastPosition);
                                    }
                                    break;
                                }
                            }
                        }
                    }
                    else
                    {
                        if (ObjectManager.Player.CountEnemiesInRange(item.Range) >
                            _menu.Item(_menu.Name + "." + item.Name + ".min-enemies-range").GetValue <Slider>().Value)
                        {
                            item.Item.Cast();
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                Global.Logger.AddItem(new LogItem(ex));
            }
        }
Esempio n. 26
0
        /// <summary>
        ///     Called when the game updates itself.
        /// </summary>
        /// <param name="args">The <see cref="EventArgs" /> instance containing the event data.</param>
        public static void Automatic(EventArgs args)
        {
            if (GameObjects.Player.IsRecalling())
            {
                return;
            }

            /// <summary>
            ///     The R Stacking Manager.
            /// </summary>
            if (GameObjects.Player.InFountain() && Bools.HasTear(GameObjects.Player) &&
                GameObjects.Player.Spellbook.GetSpell(SpellSlot.R).ToggleState == 1 &&
                Vars.Menu["miscellaneous"]["tear"].GetValue <MenuBool>().Value)
            {
                Vars.R.Cast(Game.CursorPos);
            }

            /// <summary>
            ///     The Automatic Q Logic.
            /// </summary>
            if (Vars.Q.IsReady() && GameObjects.Player.Spellbook.GetSpell(SpellSlot.Q).ToggleState == 1 &&
                Vars.Menu["spells"]["q"]["logical"].GetValue <MenuBool>().Value)
            {
                foreach (var target in
                         GameObjects.EnemyHeroes.Where(
                             t => Bools.IsImmobile(t) && !Invulnerable.Check(t) && t.IsValidTarget(Vars.Q.Range)))
                {
                    Vars.Q.Cast(Vars.Q.GetPrediction(target).UnitPosition);
                }
            }

            /// <summary>
            ///     The Automatic W Logic.
            /// </summary>
            if (Vars.W.IsReady() && Vars.Menu["spells"]["w"]["logical"].GetValue <MenuBool>().Value)
            {
                foreach (var target in
                         GameObjects.EnemyHeroes.Where(
                             t => Bools.IsImmobile(t) && !Invulnerable.Check(t) && t.IsValidTarget(Vars.W.Range)))
                {
                    Vars.W.Cast(
                        GameObjects.Player.ServerPosition.Extend(
                            target.ServerPosition,
                            GameObjects.Player.Distance(target) + 20f));
                }
            }

            /// <summary>
            ///     The Q Missile Manager.
            /// </summary>
            if (Vars.Q.IsReady() && Anivia.QMissile != null &&
                GameObjects.Player.Spellbook.GetSpell(SpellSlot.Q).ToggleState != 1)
            {
                switch (Variables.Orbwalker.ActiveMode)
                {
                /// <summary>
                ///     The Clear Q Explosion Logic.
                /// </summary>
                case OrbwalkingMode.LaneClear:
                    if (Anivia.QMissile.Position.CountEnemyHeroesInRange(Vars.Q.Width * 2) > 0)
                    {
                        Vars.Q.Cast();
                    }
                    if (!Vars.Menu["spells"]["q"]["clear"].GetValue <MenuSliderButton>().BValue)
                    {
                        return;
                    }

                    if (Targets.QMinions.Any(m => Targets.JungleMinions.Contains(m)) ||
                        Targets.QMinions.Count(m => Targets.Minions.Contains(m)) >= 3)
                    {
                        Vars.Q.Cast();
                    }
                    break;

                /// <summary>
                ///     The Combo Q Explosion Logic.
                /// </summary>
                default:
                    if (!Vars.Menu["spells"]["q"]["combo"].GetValue <MenuBool>().Value)
                    {
                        return;
                    }

                    if (Anivia.QMissile.Position.CountEnemyHeroesInRange(Vars.Q.Width * 2) > 0)
                    {
                        Vars.Q.Cast();
                    }
                    break;
                }
            }

            /// <summary>
            ///     The R Missile Manager.
            /// </summary>
            if (Vars.R.IsReady() && Anivia.RMissile != null && !GameObjects.Player.InFountain() &&
                GameObjects.Player.Spellbook.GetSpell(SpellSlot.R).ToggleState != 1)
            {
                switch (Variables.Orbwalker.ActiveMode)
                {
                /// <summary>
                ///     The Clear R Disable Logic.
                /// </summary>
                case OrbwalkingMode.LaneClear:
                    if (!Vars.Menu["spells"]["r"]["clear"].GetValue <MenuSliderButton>().BValue)
                    {
                        return;
                    }

                    if (!Targets.RMinions.Any() ||
                        GameObjects.Player.ManaPercent
                        < ManaManager.GetNeededMana(Vars.R.Slot, Vars.Menu["spells"]["r"]["clear"]))
                    {
                        Vars.R.Cast();
                    }
                    break;

                /// <summary>
                ///     The Combo R Disable Logic.
                /// </summary>
                case OrbwalkingMode.Combo:
                    if (!Vars.Menu["spells"]["r"]["combo"].GetValue <MenuBool>().Value)
                    {
                        return;
                    }

                    if (Anivia.RMissile.Position.CountEnemyHeroesInRange(Vars.R.Width + 250f) < 1)
                    {
                        Vars.R.Cast();
                    }
                    break;
                }
            }
        }
Esempio n. 27
0
        /// <summary>
        ///     Initializes the menus.
        /// </summary>
        public void Drawings()
        {
            /// <summary>
            ///     Loads the Q drawing.
            /// </summary>
            if (SpellClass.Q.Ready &&
                MenuClass.Drawings["q"].As <MenuBool>().Enabled)
            {
                Render.Circle(UtilityClass.Player.Position, SpellClass.Q.Range, 30, Color.LightGreen);
            }

            /// <summary>
            ///     Loads the W drawing.
            /// </summary>
            if (SpellClass.W.Ready &&
                MenuClass.Drawings["w"].As <MenuBool>().Enabled)
            {
                Render.Circle(UtilityClass.Player.Position, SpellClass.W.Range, 30, Color.Yellow);
            }

            /// <summary>
            ///     Loads the E drawing.
            /// </summary>
            if (SpellClass.E.Ready &&
                MenuClass.Drawings["e"].As <MenuBool>().Enabled)
            {
                Render.Circle(UtilityClass.Player.Position, SpellClass.E.Range, 30, Color.Cyan);
            }

            /// <summary>
            ///     Loads the R drawing.
            /// </summary>
            if (SpellClass.R.Ready)
            {
                if (MenuClass.Drawings["r"].As <MenuBool>().Enabled)
                {
                    Render.Circle(UtilityClass.Player.Position, SpellClass.R.Range, 30, Color.Red);
                }

                /// <summary>
                ///     Loads the R damage to healthbar.
                /// </summary>
                if (MenuClass.Drawings["rdmg"].As <MenuBool>().Enabled)
                {
                    Extensions.GetEnemyHeroesTargetsInRange(SpellClass.R.Range)
                    .Where(h => h.IsValidTarget() && !Invulnerable.Check(h, DamageType.Magical, false))
                    .ToList()
                    .ForEach(
                        target =>
                    {
                        var width   = DrawingClass.SWidth;
                        var height  = DrawingClass.SHeight;
                        var xOffset = DrawingClass.SxOffset(target);
                        var yOffset = DrawingClass.SyOffset(target);

                        var barPos = target.FloatingHealthBarPosition;
                        barPos.X  += xOffset;
                        barPos.Y  += yOffset;

                        var drawEndXPos   = barPos.X + width * (target.HealthPercent() / 100);
                        var drawStartXPos = (float)(barPos.X + (target.GetRealHealth() > GetPerfectUnleashedPowerDamage(target)
                                                                                ? width * ((target.GetRealHealth() - GetPerfectUnleashedPowerDamage(target)) / target.MaxHealth * 100 / 100)
                                                                                : 0));

                        Render.Line(drawStartXPos, barPos.Y, drawEndXPos, barPos.Y, height, true, target.GetRealHealth() < GetPerfectUnleashedPowerDamage(target) ? Color.Blue : Color.Orange);
                        Render.Line(drawStartXPos, barPos.Y, drawStartXPos, barPos.Y + height + 1, 1, true, Color.Lime);
                    });
                }
            }

            if (DarkSpheres.Any())
            {
                foreach (var sphere in DarkSpheres)
                {
                    /// <summary>
                    ///     Loads the DarkSpheres drawing.
                    /// </summary>
                    if (MenuClass.Drawings["spheres"].As <MenuBool>().Enabled)
                    {
                        Render.Circle(sphere.Value, SpellClass.Q.Width, 30, Color.Blue);
                    }

                    /// <summary>
                    ///     Loads the Sphere scatter drawing.
                    /// </summary>
                    if (UtilityClass.Player.Distance(sphere.Value) < SpellClass.E.Range &&
                        MenuClass.Drawings["scatter"].As <MenuBool>().Enabled&&
                        !UtilityClass.Player.SpellBook.GetSpell(SpellSlot.E).State.HasFlag(SpellState.Cooldown))
                    {
                        var hitbox = DarkSphereScatterRectangle(sphere);
                        hitbox.Draw(
                            GameObjects.EnemyHeroes.Any(h => h.IsValidTarget() && hitbox.IsInside((Vector2)h.ServerPosition))
                                ? Color.Blue
                                : Color.OrangeRed);
                    }
                }
            }
        }
Esempio n. 28
0
        /// <summary>
        ///     Called when the game updates itself.
        /// </summary>
        /// <param name="args">The <see cref="EventArgs" /> instance containing the event data.</param>
        public static void Harass(EventArgs args)
        {
            /// <summary>
            ///     The Extended Q Mixed Harass Logic.
            /// </summary>
            if (Vars.Q.IsReady() &&
                GameObjects.Player.ManaPercent
                > ManaManager.GetNeededMana(Vars.Q.Slot, Vars.Menu["spells"]["q"]["extended"]["mixed"]) &&
                Vars.Menu["spells"]["q"]["extended"]["mixed"].GetValue <MenuSliderButton>().BValue)
            {
                var passiveMultiplier = GameObjects.Player.Level < 4
                                            ? 0.25
                                            : GameObjects.Player.Level < 7
                                                  ? 0.3
                                                  : GameObjects.Player.Level < 9
                                                        ? 0.35
                                                        : GameObjects.Player.Level < 11
                                                              ? 0.4
                                                              : GameObjects.Player.Level < 13 ? 0.45 : 0.5;

                /// <summary>
                ///     Through enemy minions.
                /// </summary>
                foreach (var minion
                         in
                         from minion in
                         Targets.Minions.Where(
                             m =>
                             m.IsValidTarget(Vars.Q.Range) &&
                             (!Vars.Menu["spells"]["q"]["extended"]["mixedkill"].GetValue <MenuBool>().Value ||
                              Vars.GetRealHealth(m)
                              < (float)GameObjects.Player.GetSpellDamage(m, SpellSlot.Q)
                              + (MissFortune.PassiveTarget == null ||
                                 m.NetworkId != MissFortune.PassiveTarget?.NetworkId
                                       ? GameObjects.Player.TotalAttackDamage * passiveMultiplier
                                       : 0)))
                         let polygon =
                             new Geometry.Sector(
                                 (Vector2)minion.ServerPosition,
                                 (Vector2)
                                 minion.ServerPosition.Extend(GameObjects.Player.ServerPosition, -(Vars.Q2.Range - Vars.Q.Range)),
                                 40f * (float)Math.PI / 180f,
                                 Vars.Q2.Range - Vars.Q.Range - 50f)
                             let target =
                                 GameObjects.EnemyHeroes.FirstOrDefault(
                                     t =>
                                     !Invulnerable.Check(t) && t.IsValidTarget(Vars.Q2.Range) &&
                                     (t.NetworkId == MissFortune.PassiveTarget?.NetworkId ||
                                      Targets.Minions.All(m => polygon.IsOutside((Vector2)m.ServerPosition))) &&
                                     Vars.Menu["spells"]["q"]["whitelist"][t.ChampionName.ToLower()].GetValue <MenuBool>()
                                     .Value)
                                 where target != null
                                 where
                                 !polygon.IsOutside((Vector2)target.ServerPosition) &&
                                 !polygon.IsOutside((Vector2)Vars.Q.GetPrediction(target).UnitPosition)
                                 select minion)
                {
                    Vars.Q.CastOnUnit(minion);
                }
            }
        }
Esempio n. 29
0
        /// <summary>
        ///     Fired when the game is updated.
        /// </summary>
        public void Automatic(EntropyEventArgs args)
        {
            SpellClass.Q2.Range = SpellClass.Q.Range + 50f + 25f * SpellClass.Q.Level;

            if (UtilityClass.Player.IsRecalling())
            {
                return;
            }

            Logging.Log($"Q Range: {SpellClass.Q.Range}, Distance: {Orbwalker.GetOrbwalkingTarget()?.DistanceToPlayer()}");

            /// <summary>
            ///     The Force Pow Pow Logic.
            /// </summary>
            if (SpellClass.Q.Ready &&
                IsUsingFishBones() &&
                Orbwalker.Mode == OrbwalkingMode.None &&
                MenuClass.Miscellaneous["forcepowpow"].As <MenuBool>().Enabled)
            {
                SpellClass.Q.Cast();
            }

            /// <summary>
            ///     The Automatic E Logic.
            /// </summary>
            if (SpellClass.E.Ready &&
                MenuClass.Spells["e"]["logical"].As <MenuBool>().Enabled)
            {
                foreach (var target in GameObjects.EnemyHeroes.Where(t =>
                                                                     t.IsImmobile(SpellClass.E.Delay) &&
                                                                     t.DistanceToPlayer() <= SpellClass.E.Range))
                {
                    SpellClass.E.Cast(target.Position);
                }
            }

            /// <summary>
            ///     The Automatic E on Teleport Logic.
            /// </summary>
            if (SpellClass.E.Ready &&
                MenuClass.Spells["e"]["teleport"].As <MenuBool>().Enabled)
            {
                foreach (var minion in ObjectManager.Get <AIMinionClient>().Where(m =>
                                                                                  m.IsEnemy() &&
                                                                                  m.DistanceToPlayer() <= SpellClass.E.Range &&
                                                                                  m.GetActiveBuffs().Any(b => b.Name.Equals("teleport_target"))))
                {
                    SpellClass.E.Cast(minion.Position);
                }
            }

            /// <summary>
            ///     The Semi-Automatic R Management.
            /// </summary>
            if (SpellClass.R.Ready &&
                MenuClass.Spells["r"]["bool"].As <MenuBool>().Enabled&&
                MenuClass.Spells["r"]["key"].As <MenuKeyBind>().Enabled)
            {
                var bestTarget = GameObjects.EnemyHeroes
                                 .Where(t =>
                                        !Invulnerable.Check(t) &&
                                        t.IsValidTarget(SpellClass.R.Range) &&
                                        MenuClass.Spells["r"]["whitelist"][t.CharName.ToLower()].As <MenuBool>().Enabled)
                                 .MinBy(o => o.GetRealHealth());
                if (bestTarget != null)
                {
                    SpellClass.R.Cast(bestTarget);
                }
            }
        }
Esempio n. 30
0
        /// <summary>
        ///     Called when the game updates itself.
        /// </summary>
        /// <param name="args">The <see cref="EventArgs" /> instance containing the event data.</param>
        public static void Automatic(EventArgs args)
        {
            /// <summary>
            ///     The Soulbound declaration.
            /// </summary>
            if (Vars.SoulBound == null)
            {
                Vars.SoulBound = GameObjects.AllyHeroes.Find(t => t.HasBuff("kalistacoopstrikeally"));
            }
            else
            {
                /// <summary>
                ///     The Automatic R Logic.
                /// </summary>
                if (Vars.R.IsReady() &&
                    Vars.SoulBound.CountEnemyHeroesInRange(800f) > 0 &&
                    Vars.SoulBound.LSIsValidTarget(Vars.R.Range, false) &&
                    Health.GetPrediction(Vars.SoulBound, (int)(1000 + Game.Ping / 2f)) <= 0 &&
                    Vars.getCheckBoxItem(Vars.RMenu, "lifesaver"))
                {
                    Vars.R.Cast();
                }
            }

            /// <summary>
            ///     The Automatic W Logic.
            /// </summary>
            if (Vars.W.IsReady() &&
                !GameObjects.Player.LSIsRecalling() &&
                !GameObjects.Player.IsUnderEnemyTurret() &&
                Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.None) &&
                GameObjects.Player.CountEnemyHeroesInRange(1500f) == 0 &&
                GameObjects.Player.ManaPercent >
                ManaManager.GetNeededMana(Vars.W.Slot, Vars.getSliderItem(Vars.WMenu, "logical")) &&
                Vars.getSliderItem(Vars.WMenu, "logical") != 101)
            {
                foreach (var loc in Vars.Locations.Where(
                             l =>
                             GameObjects.Player.Distance(l) < Vars.W.Range &&
                             !ObjectManager.Get <Obj_AI_Minion>().Any(
                                 m =>
                                 m.Distance(l) < 1000f &&
                                 m.CharData.BaseSkinName.Equals("kalistaspawn"))))
                {
                    Vars.W.Cast(loc);
                }
            }

            /// <summary>
            ///     The Automatic E Logics.
            /// </summary>
            if (Vars.E.IsReady())
            {
                /// <summary>
                ///     The E Before death Logic.
                /// </summary>
                if (Health.GetPrediction(GameObjects.Player, (int)(1000 + Game.Ping / 2f)) <= 0 &&
                    Vars.getCheckBoxItem(Vars.EMenu, "ondeath"))
                {
                    Vars.E.Cast();
                }

                /// <summary>
                ///     The E Minion Harass Logic.
                /// </summary>
                if (GameObjects.EnemyHeroes.Any(t => Bools.IsPerfectRendTarget(t)) &&
                    Vars.getSliderItem(Vars.EMenu, "harass") != 101 &&
                    Targets.Minions.Any(
                        m =>
                        Bools.IsPerfectRendTarget(m) &&
                        Vars.GetRealHealth(m) < EDamage(m)))
                {
                    /// <summary>
                    ///     Check for Mana Manager if not in combo mode and the killable minion is only one, else do not use it.
                    /// </summary>
                    if (!Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo) &&
                        Targets.Minions.Count(
                            m =>
                            Bools.IsPerfectRendTarget(m) &&
                            Vars.GetRealHealth(m) <
                            EDamage(m)) == 1)
                    {
                        if (GameObjects.Player.ManaPercent <
                            ManaManager.GetNeededMana(Vars.E.Slot, Vars.getSliderItem(Vars.EMenu, "harass")))
                        {
                            return;
                        }
                    }

                    /// <summary>
                    ///     Check for E Whitelist if the harassable target is only one and there is only one killable minion, else do not use the whitelist.
                    /// </summary>
                    if (GameObjects.EnemyHeroes.Count(t => Bools.IsPerfectRendTarget(t)) == 1 && Targets.Minions.Count(m => Bools.IsPerfectRendTarget(m) && Vars.GetRealHealth(m) < EDamage(m)) == 1)
                    {
                        if (!Vars.getCheckBoxItem(Vars.WhiteListMenu, GameObjects.EnemyHeroes.FirstOrDefault(t => Bools.IsPerfectRendTarget(t)).ChampionName.ToLower()))
                        {
                            return;
                        }
                    }

                    /// <summary>
                    ///     Check for invulnerability through all the harassable targets.
                    /// </summary>
                    foreach (var target in GameObjects.EnemyHeroes.Where(t => Bools.IsPerfectRendTarget(t)))
                    {
                        if (Invulnerable.Check(target, DamageType.True, false))
                        {
                            return;
                        }
                    }

                    Vars.E.Cast();
                }

                /// <summary>
                ///     The E JungleClear Logic.
                /// </summary>
                if (Vars.getCheckBoxItem(Vars.EMenu, "junglesteal"))
                {
                    foreach (var minion in Targets.JungleMinions.Where(
                                 m =>
                                 Bools.IsPerfectRendTarget(m) &&
                                 m.Health < EDamage(m)))
                    {
                        Vars.E.Cast();
                    }
                }
            }
        }