コード例 #1
0
        /// <summary>
        ///     Fired when the game is updated.
        /// </summary>
        public void Killsteal()
        {
            /// <summary>
            ///     The KillSteal R Logic.
            /// </summary>
            if (SpellClass.R.Ready &&
                MenuClass.Spells["r"]["killsteal"].As <MenuBool>().Enabled)
            {
                foreach (var target in Extensions.GetBestSortedTargetsInRange(SpellClass.R.Range).Where(t =>
                                                                                                        GetTotalNoxianGuillotineDamage(t) >= t.GetRealHealth()))
                {
                    UtilityClass.CastOnUnit(SpellClass.R, target);
                    break;
                }
            }

            /// <summary>
            ///     The KillSteal Q Logic.
            /// </summary>
            if (SpellClass.Q.Ready &&
                MenuClass.Spells["q"]["killsteal"].As <MenuBool>().Enabled)
            {
                if (Extensions.GetBestSortedTargetsInRange(SpellClass.Q.Range).Any(t =>
                                                                                   UtilityClass.Player.GetSpellDamage(t, SpellSlot.Q, IsValidBladeTarget(t) ? DamageStage.Empowered : DamageStage.Default) >= t.GetRealHealth()))
                {
                    SpellClass.Q.Cast();
                }
            }
        }
コード例 #2
0
        /// <summary>
        ///     Called on post attack.
        /// </summary>
        /// <param name="sender">The sender.</param>
        /// <param name="args">The <see cref="PreAttackEventArgs" /> instance containing the event data.</param>
        public void Harass(object sender, PreAttackEventArgs args)
        {
            var heroTarget = args.Target as Obj_AI_Hero;

            if (heroTarget == null)
            {
                return;
            }

            /// <summary>
            ///     The Q Harass Logic.
            /// </summary>
            if (SpellClass.Q.Ready &&
                MenuClass.Spells["q"]["harass"].As <MenuBool>().Enabled)
            {
                SpellClass.Q.Cast();
            }

            /// <summary>
            ///     The E Harass Logic.
            /// </summary>
            if (SpellClass.E.Ready &&
                UtilityClass.Player.ManaPercent()
                > ManaManager.GetNeededMana(SpellClass.E.Slot, MenuClass.Spells["e"]["harass"]) &&
                MenuClass.Spells["e"]["harass"].As <MenuSliderBool>().Enabled&&
                MenuClass.Spells["e"]["whitelist"][heroTarget.ChampionName.ToLower()].As <MenuBool>().Enabled)
            {
                UtilityClass.CastOnUnit(SpellClass.E, heroTarget);
            }
        }
コード例 #3
0
        /// <summary>
        ///     Called on post attack.
        /// </summary>
        /// <param name="sender">The sender.</param>
        /// <param name="args">The <see cref="PostAttackEventArgs" /> instance containing the event data.</param>
        public void Jungleclear(object sender, PostAttackEventArgs args)
        {
            var jungleTarget = args.Target as Obj_AI_Minion;

            if (jungleTarget == null ||
                !Extensions.GetGenericJungleMinionsTargets().Contains(jungleTarget) ||
                jungleTarget.GetRealHealth() < UtilityClass.Player.GetAutoAttackDamage(jungleTarget) * 2)
            {
                return;
            }

            /// <summary>
            ///     The E Jungleclear Logic.
            /// </summary>
            if (SpellClass.E.Ready &&
                UtilityClass.Player.ManaPercent()
                > ManaManager.GetNeededMana(SpellClass.E.Slot, MenuClass.Spells["e"]["jungleclear"]) &&
                MenuClass.Spells["e"]["laneclear"].As <MenuSliderBool>().Enabled)
            {
                UtilityClass.CastOnUnit(SpellClass.E, jungleTarget);
                return;
            }

            /// <summary>
            ///     The Q Jungleclear Logic.
            /// </summary>
            if (SpellClass.Q.Ready &&
                UtilityClass.Player.ManaPercent()
                > ManaManager.GetNeededMana(SpellClass.Q.Slot, MenuClass.Spells["q"]["jungleclear"]) &&
                MenuClass.Spells["q"]["laneclear"].As <MenuSliderBool>().Enabled)
            {
                SpellClass.Q.Cast(jungleTarget);
            }
        }
コード例 #4
0
 /// <summary>
 ///     Fired when the game is updated.
 /// </summary>
 public void Harass()
 {
     /// <summary>
     ///     The Extended Q Mixed Harass Logic.
     /// </summary>
     if (SpellClass.Q.Ready &&
         UtilityClass.Player.ManaPercent()
         > ManaManager.GetNeededMana(SpellClass.Q.Slot, MenuClass.Spells["q2"]["mixed"]) &&
         MenuClass.Spells["q2"]["mixed"].As <MenuSliderBool>().Enabled)
     {
         foreach (var target in Extensions.GetBestSortedTargetsInRange(SpellClass.Q2.Range).Where(t =>
                                                                                                  !t.IsValidTarget(SpellClass.Q.Range) &&
                                                                                                  MenuClass.Spells["q2"]["whitelist"][t.ChampionName.ToLower()].Enabled))
         {
             foreach (var minion in Extensions.GetAllGenericUnitTargetsInRange(SpellClass.Q.Range))
             {
                 if (minion.NetworkId != target.NetworkId &&
                     QRectangle(minion).IsInside((Vector2)target.ServerPosition))
                 {
                     UtilityClass.CastOnUnit(SpellClass.Q, minion);
                     break;
                 }
             }
         }
     }
 }
コード例 #5
0
        /// <summary>
        ///     Fired when the game is updated.
        /// </summary>
        public void Killsteal()
        {
            /// <summary>
            ///     The E KillSteal Logic.
            /// </summary>
            if (SpellClass.E.Ready &&
                MenuClass.Spells["e"]["killsteal"].As <MenuBool>().Enabled)
            {
                foreach (var target in Extensions.GetBestSortedTargetsInRange(SpellClass.E.Range).Where(t =>
                                                                                                        UtilityClass.Player.GetSpellDamage(t, SpellSlot.E, IsWhiplashEmpowered() ? DamageStage.Empowered : DamageStage.Default) >= t.GetRealHealth()))
                {
                    UtilityClass.CastOnUnit(SpellClass.E, target);
                    break;
                }
            }

            /// <summary>
            ///     The R KillSteal Logic.
            /// </summary>
            if (SpellClass.R.Ready &&
                MenuClass.Spells["r"]["killsteal"].As <MenuBool>().Enabled)
            {
                foreach (var target in Extensions.GetBestSortedTargetsInRange(SpellClass.R.Range).Where(t =>
                                                                                                        UtilityClass.Player.GetSpellDamage(t, SpellSlot.R, t.HealthPercent() < 30 ? DamageStage.Empowered : DamageStage.Default) >= t.GetRealHealth()))
                {
                    SpellClass.R.Cast(target.ServerPosition);
                    break;
                }
            }
        }
コード例 #6
0
        /// <summary>
        ///     Called on non killable minion.
        /// </summary>
        /// <param name="sender">The sender.</param>
        /// <param name="args">The <see cref="NonKillableMinionEventArgs" /> instance containing the event data.</param>
        public void OnNonKillableMinion(object sender, NonKillableMinionEventArgs args)
        {
            var minion = (Obj_AI_Minion)args.Target;

            if (minion == null)
            {
                return;
            }

            /// <summary>
            ///     Initializes the orbwalkingmodes.
            /// </summary>
            switch (ImplementationClass.IOrbwalker.Mode)
            {
            case OrbwalkingMode.Laneclear:
            case OrbwalkingMode.Lasthit:
            case OrbwalkingMode.Mixed:
                if (SpellClass.E.Ready &&
                    minion.IsValidTarget(SpellClass.E.Range) &&
                    UtilityClass.Player.ManaPercent()
                    > ManaManager.GetNeededMana(SpellClass.E.Slot, MenuClass.Spells["e"]["lasthitunk"]) &&
                    MenuClass.Spells["e"]["lasthitunk"].As <MenuSliderBool>().Enabled)
                {
                    if (minion.GetRealHealth() <= GetFrostBiteDamage(minion))
                    {
                        UtilityClass.CastOnUnit(SpellClass.E, minion);
                    }
                }
                break;
            }
        }
コード例 #7
0
        /// <summary>
        ///     Fired when the game is updated.
        /// </summary>
        public void Lasthit()
        {
            /// <summary>
            ///     The LastHit Q Logics.
            /// </summary>
            if (SpellClass.Q.Ready &&
                UtilityClass.Player.ManaPercent()
                > ManaManager.GetNeededMana(SpellClass.Q.Slot, MenuClass.Spells["q"]["lasthit"]) &&
                MenuClass.Spells["q"]["lasthit"].As <MenuSliderBool>().Enabled)
            {
                if (!IsReloading() &&
                    MenuClass.Spells["q"]["customization"]["lasthitonreload"].As <MenuBool>().Enabled)
                {
                    return;
                }

                foreach (var minion in Extensions.GetEnemyLaneMinionsTargetsInRange(SpellClass.Q.Range))
                {
                    if (minion.GetRealHealth() <= UtilityClass.Player.GetSpellDamage(minion, SpellSlot.Q))
                    {
                        UtilityClass.CastOnUnit(SpellClass.Q, minion);
                    }
                }
            }
        }
コード例 #8
0
        /// <summary>
        ///     Fired when the game is updated.
        /// </summary>
        public void Killsteal()
        {
            /// <summary>
            ///     The Q KillSteal Logic.
            /// </summary>
            if (SpellClass.Q.Ready &&
                MenuClass.Spells["q"]["killsteal"].As <MenuBool>().Enabled)
            {
                foreach (var target in Extensions.GetBestSortedTargetsInRange(SpellClass.Q.Range).Where(t =>
                                                                                                        UtilityClass.Player.GetSpellDamage(t, SpellSlot.Q) >= t.GetRealHealth()))
                {
                    SpellClass.Q.Cast(target);
                    break;
                }
            }

            /// <summary>
            ///     The E KillSteal Logic.
            /// </summary>
            if (SpellClass.E.Ready &&
                MenuClass.Spells["e"]["killsteal"].As <MenuBool>().Enabled)
            {
                foreach (var target in Extensions.GetBestSortedTargetsInRange(SpellClass.E.Range).Where(t =>
                                                                                                        UtilityClass.Player.GetSpellDamage(t, SpellSlot.E) >= t.GetRealHealth()))
                {
                    UtilityClass.CastOnUnit(SpellClass.E, target);
                    break;
                }
            }
        }
コード例 #9
0
        /// <summary>
        ///     Called on do-cast.
        /// </summary>
        /// <param name="sender">The sender.</param>
        /// <param name="args">The <see cref="PreAttackEventArgs" /> instance containing the event data.</param>
        public void Buildingclear(object sender, PreAttackEventArgs args)
        {
            var target = args.Target;

            if (!target.IsBuilding())
            {
                return;
            }

            /// <summary>
            ///     The Q BuildingClear Logic.
            /// </summary>
            if (SpellClass.Q.Ready &&
                MenuClass.Spells["q"]["buildings"].As <MenuBool>().Enabled)
            {
                SpellClass.Q.Cast();
            }

            /// <summary>
            ///     The E BuildingClear Logic.
            /// </summary>
            if (SpellClass.E.Ready &&
                UtilityClass.Player.ManaPercent()
                > ManaManager.GetNeededMana(SpellClass.E.Slot, MenuClass.Spells["e"]["buildings"]) &&
                MenuClass.Spells["e"]["buildings"].As <MenuSliderBool>().Enabled)
            {
                var turretTarget = target as Obj_AI_Turret;
                if (turretTarget != null)
                {
                    UtilityClass.CastOnUnit(SpellClass.E, turretTarget);
                }
            }
        }
コード例 #10
0
        /// <summary>
        ///     Called on post attack.
        /// </summary>
        /// <param name="sender">The sender.</param>
        /// <param name="args">The <see cref="PreAttackEventArgs" /> instance containing the event data.</param>
        public void Weaving(object sender, PreAttackEventArgs args)
        {
            var heroTarget = args.Target as Obj_AI_Hero;

            if (heroTarget == null)
            {
                return;
            }

            /// <summary>
            ///     The E Weaving Logic.
            /// </summary>
            if (SpellClass.E.Ready &&
                MenuClass.Spells["e"]["combo"].As <MenuSliderBool>().Enabled)
            {
                if (UtilityClass.Player.HealthPercent()
                    >= MenuClass.Spells["e"]["combo"].As <MenuSliderBool>().Value ||
                    UtilityClass.Player.GetSpellDamage(heroTarget, SpellSlot.E) >= heroTarget.GetRealHealth())
                {
                    UtilityClass.CastOnUnit(SpellClass.E, heroTarget);
                }
            }

            /// <summary>
            ///     The W Weaving Logic.
            /// </summary>
            if (SpellClass.W.Ready &&
                MenuClass.Spells["w"]["combo"].As <MenuBool>().Enabled)
            {
                SpellClass.W.Cast();
            }
        }
コード例 #11
0
        /// <summary>
        ///     Called on do-cast.
        /// </summary>
        /// <param name="sender">The sender.</param>
        /// <param name="args">The <see cref="PostAttackEventArgs" /> instance containing the event data.</param>
        public void Weaving(object sender, PostAttackEventArgs args)
        {
            var heroTarget = args.Target as Obj_AI_Hero;

            if (heroTarget == null)
            {
                return;
            }

            /// <summary>
            ///     The Q Weaving Logic.
            /// </summary>
            if (SpellClass.Q.Ready &&
                MenuClass.Spells["q"]["combo"].As <MenuBool>().Enabled)
            {
                UtilityClass.CastOnUnit(SpellClass.Q, heroTarget);
            }

            /// <summary>
            ///     The W Weaving Logic.
            /// </summary>
            if (SpellClass.W.Ready &&
                MenuClass.Spells["w"]["combo"].As <MenuBool>().Enabled)
            {
                SpellClass.W.Cast();
            }
        }
コード例 #12
0
        /// <summary>
        ///     Fired when the game is updated.
        /// </summary>
        public void Killsteal()
        {
            /// <summary>
            ///     The KillSteal Q Logic.
            /// </summary>
            if (SpellClass.Q.Ready &&
                !IsUsingBehindEnemyLines() &&
                MenuClass.Spells["q"]["killsteal"].As <MenuBool>().Enabled)
            {
                foreach (var target in Extensions.GetBestSortedTargetsInRange(SpellClass.Q.Range).Where(t =>
                                                                                                        !t.IsValidTarget(UtilityClass.Player.GetFullAttackRange(t)) &&
                                                                                                        UtilityClass.Player.GetSpellDamage(t, SpellSlot.Q) + UtilityClass.Player.GetAutoAttackDamage(t) >= t.GetRealHealth()))
                {
                    SpellClass.Q.Cast(target);
                    break;
                }
            }

            /// <summary>
            ///     The KillSteal E Logic.
            /// </summary>
            if (SpellClass.E.Ready &&
                MenuClass.Spells["e"]["killsteal"].As <MenuBool>().Enabled)
            {
                foreach (var target in Extensions.GetBestSortedTargetsInRange(SpellClass.E.Range).Where(t =>
                                                                                                        !t.IsValidTarget(UtilityClass.Player.GetFullAttackRange(t)) &&
                                                                                                        UtilityClass.Player.GetSpellDamage(t, SpellSlot.E) + UtilityClass.Player.GetAutoAttackDamage(t) >= t.GetRealHealth()))
                {
                    UtilityClass.CastOnUnit(SpellClass.E, target);
                    break;
                }
            }
        }
コード例 #13
0
        /// <summary>
        ///     Called on post attack.
        /// </summary>
        /// <param name="sender">The sender.</param>
        /// <param name="args">The <see cref="PreAttackEventArgs" /> instance containing the event data.</param>
        public void Combo(object sender, PreAttackEventArgs args)
        {
            var heroTarget = args.Target as Obj_AI_Hero;

            if (heroTarget == null)
            {
                return;
            }

            /// <summary>
            ///     The Q Combo Logic.
            /// </summary>
            if (SpellClass.Q.Ready &&
                MenuClass.Spells["q"]["combo"].As <MenuBool>().Enabled)
            {
                SpellClass.Q.Cast();
            }

            /// <summary>
            ///     The E Combo Logic.
            /// </summary>
            if (SpellClass.E.Ready &&
                MenuClass.Spells["e"]["combo"].As <MenuBool>().Enabled&&
                MenuClass.Spells["e"]["whitelist"][heroTarget.ChampionName.ToLower()].As <MenuBool>().Enabled)
            {
                UtilityClass.CastOnUnit(SpellClass.E, heroTarget);
            }
        }
コード例 #14
0
        /// <summary>
        ///     Called on post attack.
        /// </summary>
        /// <param name="sender">The sender.</param>
        /// <param name="args">The <see cref="PostAttackEventArgs" /> instance containing the event data.</param>
        public void Jungleclear(object sender, PostAttackEventArgs args)
        {
            var jungleTarget = args.Target as Obj_AI_Minion;

            if (jungleTarget == null ||
                !Extensions.GetGenericJungleMinionsTargets().Contains(jungleTarget) ||
                jungleTarget.GetRealHealth() < UtilityClass.Player.GetAutoAttackDamage(jungleTarget) * 2)
            {
                return;
            }

            /// <summary>
            ///     The E Jungleclear Logic.
            /// </summary>
            if (SpellClass.E.Ready &&
                UtilityClass.Player.ManaPercent()
                > ManaManager.GetNeededMana(SpellClass.E.Slot, MenuClass.Spells["e"]["jungleclear"]) &&
                MenuClass.Spells["e"]["jungleclear"].As <MenuSliderBool>().Enabled)
            {
                const int condemnPushDistance = 410;
                var       playerPos           = UtilityClass.Player.ServerPosition;

                var targetPos    = jungleTarget.ServerPosition;
                var predPosition = SpellClass.E.GetPrediction(jungleTarget).CastPosition;

                for (var i = 60; i < condemnPushDistance; i += 10)
                {
                    if (!targetPos.Extend(playerPos, -i).IsWall(true) ||
                        !targetPos.Extend(playerPos, -i - 60).IsWall(true))
                    {
                        continue;
                    }

                    if (MenuClass.Spells["e"]["emode"].As <MenuList>().Value == 0)
                    {
                        if (!predPosition.Extend(playerPos, -i).IsWall(true) ||
                            !predPosition.Extend(playerPos, -i - 60).IsWall(true))
                        {
                            continue;
                        }
                    }

                    UtilityClass.CastOnUnit(SpellClass.E, jungleTarget);
                }
            }

            /// <summary>
            ///     The Q Jungleclear Logic.
            /// </summary>
            if (SpellClass.Q.Ready &&
                UtilityClass.Player.ManaPercent()
                > ManaManager.GetNeededMana(SpellClass.Q.Slot, MenuClass.Spells["q"]["jungleclear"]) &&
                MenuClass.Spells["q"]["jungleclear"].As <MenuSliderBool>().Enabled)
            {
                SpellClass.Q.Cast(Game.CursorPos);
            }
        }
コード例 #15
0
        /// <summary>
        ///     Fired when the game is updated.
        /// </summary>
        public void Killsteal()
        {
            /// <summary>
            ///     The Q Killsteal Logics.
            /// </summary>
            if (SpellClass.Q.Ready)
            {
                /// <summary>
                ///     Normal.
                /// </summary>
                if (MenuClass.Spells["q"]["killsteal"].As <MenuBool>().Enabled)
                {
                    foreach (var target in Extensions.GetBestSortedTargetsInRange(SpellClass.Q.Range).Where(t =>
                                                                                                            UtilityClass.Player.GetSpellDamage(t, SpellSlot.Q) >= t.GetRealHealth()))
                    {
                        UtilityClass.CastOnUnit(SpellClass.Q, target);
                        break;
                    }
                }

                /// <summary>
                ///     Extended.
                /// </summary>
                if (MenuClass.Spells["q2"]["killsteal"].As <MenuBool>().Enabled)
                {
                    foreach (var target in Extensions.GetBestSortedTargetsInRange(SpellClass.Q2.Range).Where(t =>
                                                                                                             !t.IsValidTarget(SpellClass.Q.Range) &&
                                                                                                             UtilityClass.Player.GetSpellDamage(t, SpellSlot.Q) >= t.GetRealHealth()))
                    {
                        foreach (var minion in Extensions.GetAllGenericUnitTargetsInRange(SpellClass.Q.Range))
                        {
                            if (minion.NetworkId != target.NetworkId &&
                                QRectangle(minion).IsInside((Vector2)target.ServerPosition))
                            {
                                UtilityClass.CastOnUnit(SpellClass.Q, minion);
                                break;
                            }
                        }
                    }
                }
            }

            /// <summary>
            ///     The KillSteal W Logic.
            /// </summary>
            if (SpellClass.W.Ready &&
                MenuClass.Spells["w"]["killsteal"].As <MenuBool>().Enabled)
            {
                foreach (var target in Extensions.GetBestSortedTargetsInRange(SpellClass.W.Range).Where(t =>
                                                                                                        UtilityClass.Player.GetSpellDamage(t, SpellSlot.W) >= t.GetRealHealth()))
                {
                    SpellClass.W.Cast(target);
                    break;
                }
            }
        }
コード例 #16
0
        /// <summary>
        ///     Fired when the game is updated.
        /// </summary>
        public void Laneclear()
        {
            /// <summary>
            ///     The Q Laneclear Logic.
            /// </summary>
            if (SpellClass.Q.Ready &&
                UtilityClass.Player.ManaPercent()
                > ManaManager.GetNeededMana(SpellClass.Q.Slot, MenuClass.Spells["q"]["laneclear"]) &&
                MenuClass.Spells["q"]["laneclear"].As <MenuSliderBool>().Enabled)
            {
                var bestMinion = Extensions.GetEnemyLaneMinionsTargetsInRange(SpellClass.Q.Range)
                                 .Where(m => m.Health < UtilityClass.Player.GetSpellDamage(m, SpellSlot.Q))
                                 .FirstOrDefault(m => Extensions.GetEnemyLaneMinionsTargetsInRange(SpellClass.Q2.Range)
                                                 .Any(m2 =>
                                                      m2.NetworkId != m.NetworkId &&
                                                      QCone(m).IsInside((Vector2)m2.ServerPosition) &&
                                                      m2.Health < UtilityClass.Player.GetSpellDamage(m2, SpellSlot.Q, DamageStage.Empowered) + GetMinionLoveTapDamageMultiplier()));
                if (bestMinion != null)
                {
                    UtilityClass.CastOnUnit(SpellClass.Q, bestMinion);
                }
            }

            /// <summary>
            ///     The Laneclear W Logic.
            /// </summary>
            if (SpellClass.W.Ready &&
                UtilityClass.Player.ManaPercent()
                > ManaManager.GetNeededMana(SpellClass.W.Slot, MenuClass.Spells["w"]["laneclear"]) &&
                MenuClass.Spells["w"]["laneclear"].As <MenuSliderBool>().Enabled)
            {
                if (Extensions.GetEnemyLaneMinionsTargetsInRange(UtilityClass.Player.AttackRange).Any())
                {
                    SpellClass.W.Cast();
                }
            }

            /// <summary>
            ///     The Laneclear E Logic.
            /// </summary>
            if (SpellClass.E.Ready &&
                UtilityClass.Player.ManaPercent()
                > ManaManager.GetNeededMana(SpellClass.E.Slot, MenuClass.Spells["e"]["laneclear"]) &&
                MenuClass.Spells["e"]["laneclear"].As <MenuSliderBool>().Enabled)
            {
                /*
                 * var farmLocation = SpellClass.E.GetCircularFarmLocation(Extensions.GetEnemyLaneMinionsTargets(), SpellClass.E.Width);
                 * if (farmLocation.MinionsHit >= MenuClass.Spells["e"]["customization"]["laneclear"].As<MenuSlider>().Value)
                 * {
                 *  SpellClass.E.Cast(farmLocation.Position);
                 * }
                 */
            }
        }
コード例 #17
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;
            }

            var enabledOption = MenuClass.Gapcloser["enabled"];

            if (enabledOption == null || !enabledOption.As <MenuBool>().Enabled)
            {
                return;
            }

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

            var spellOption = MenuClass.SubGapcloser[$"{sender.ChampionName.ToLower()}.{args.SpellName.ToLower()}"];

            if (spellOption == null || !spellOption.As <MenuBool>().Enabled)
            {
                return;
            }

            /// <summary>
            ///     The Anti-Gapcloser E.
            /// </summary>
            if (SpellClass.E.Ready)
            {
                switch (args.Type)
                {
                case Gapcloser.Type.Targeted:
                    if (args.Target.IsMe)
                    {
                        UtilityClass.CastOnUnit(SpellClass.E, sender);
                    }
                    break;

                default:
                    if (args.EndPosition.PointUnderEnemyTurret())
                    {
                        return;
                    }

                    SpellClass.E.Cast(sender);
                    break;
                }
            }
        }
コード例 #18
0
        /// <summary>
        ///     Fired as soon as possible.
        /// </summary>
        public void CondemnCombo()
        {
            /// <summary>
            ///     The E Stun Logic.
            /// </summary>
            if (SpellClass.E.Ready &&
                !UtilityClass.Player.IsDashing() &&
                MenuClass.Spells["e"]["emode"].As <MenuList>().Value != 2)
            {
                const int condemnPushDistance = 475;
                const int threshold           = 50;

                foreach (var target in
                         GameObjects.EnemyHeroes.Where(t =>
                                                       !t.IsDashing() &&
                                                       t.IsValidTarget(SpellClass.E.Range) &&
                                                       !Invulnerable.Check(t, DamageType.Magical, false) &&
                                                       MenuClass.Spells["e"]["whitelist"][t.ChampionName.ToLower()].Enabled))
                {
                    for (var i = UtilityClass.Player.BoundingRadius; i < condemnPushDistance - threshold; i += 10)
                    {
                        switch (MenuClass.Spells["e"]["emode"].As <MenuList>().Value)
                        {
                        case 0:
                            if (IsPerfectWallPosition(target.ServerPosition, target, UtilityClass.Player.ServerPosition, i))
                            {
                                if (target.IsImmobile(SpellClass.E.Delay))
                                {
                                    UtilityClass.CastOnUnit(SpellClass.E, target);
                                    break;
                                }

                                var estimatedPosition = EstimatedPosition(target, SpellClass.E.Delay);
                                if (IsPerfectWallPosition(estimatedPosition, target, UtilityClass.Player.ServerPosition, i))
                                {
                                    UtilityClass.CastOnUnit(SpellClass.E, target);
                                }
                            }
                            break;

                        default:
                            if (IsPerfectWallPosition(target.ServerPosition, target, UtilityClass.Player.ServerPosition, i))
                            {
                                UtilityClass.CastOnUnit(SpellClass.E, target);
                            }
                            break;
                        }
                    }
                }
            }
        }
コード例 #19
0
        /// <summary>
        ///     Fired when the game is updated.
        /// </summary>
        public void Harass()
        {
            /// <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 + 200f);
                if (bestTarget != null &&
                    !Invulnerable.Check(bestTarget, DamageType.Magical) &&
                    MenuClass.Spells["w"]["whitelist"][bestTarget.ChampionName.ToLower()].As <MenuBool>().Enabled)
                {
                    if (!IsHoldingForceOfWillObject())
                    {
                        var obj = GetForceOfWillObject();
                        if (obj != null &&
                            obj.IsValid &&
                            obj.Distance(UtilityClass.Player) < SpellClass.W.Range)
                        {
                            UtilityClass.CastOnUnit(SpellClass.W, obj);
                            return;
                        }
                    }
                    else
                    {
                        SpellClass.W.Cast(bestTarget.ServerPosition);
                    }
                }
            }

            /// <summary>
            ///     The Q Harass Logic.
            /// </summary>
            if (SpellClass.Q.Ready &&
                UtilityClass.Player.ManaPercent()
                > ManaManager.GetNeededMana(SpellClass.Q.Slot, MenuClass.Spells["q"]["harass"]) &&
                MenuClass.Spells["q"]["harass"].As <MenuSliderBool>().Enabled)
            {
                var bestTarget = Extensions.GetBestEnemyHeroesTargetsInRange(SpellClass.Q.Range)
                                 .FirstOrDefault(c => MenuClass.Spells["q"]["whitelist"][c.ChampionName.ToLower()].As <MenuBool>().Enabled);
                if (bestTarget != null)
                {
                    SpellClass.Q.Cast(SpellClass.Q.GetPrediction(bestTarget).CastPosition);
                }
            }
        }
コード例 #20
0
        /// <summary>
        ///     Called on post attack.
        /// </summary>
        /// <param name="sender">The sender.</param>
        /// <param name="args">The <see cref="PreAttackEventArgs" /> instance containing the event data.</param>
        public void Laneclear(object sender, PreAttackEventArgs args)
        {
            /// <summary>
            ///     The Laneclear Q Logic.
            /// </summary>
            if (SpellClass.Q.Ready &&
                UtilityClass.Player.ManaPercent()
                > ManaManager.GetNeededMana(SpellClass.Q.Slot, MenuClass.Spells["q"]["laneclear"]) &&
                MenuClass.Spells["q"]["laneclear"].As <MenuSliderBool>().Enabled)
            {
                /*
                 * var farmLocation = SpellClass.Q.GetLinearFarmLocation(minions, SpellClass.Q.Width);
                 * if (farmLocation.MinionsHit >= MenuClass.Spells["q"]["customization"]["laneclear"].As<MenuSlider>().Value)
                 * {
                 *  SpellClass.Q.Cast(farmLocation.Position);
                 * }
                 */
            }

            /// <summary>
            ///     The E Big Minions Lasthit Logic.
            /// </summary>
            if (SpellClass.E.Ready &&
                MenuClass.Spells["e"]["lasthit"].As <MenuBool>().Enabled)
            {
                foreach (var minion in Extensions.GetEnemyLaneMinionsTargetsInRange(SpellClass.E.Range).Where(m =>
                                                                                                              (m.UnitSkinName.Contains("Siege") || m.UnitSkinName.Contains("Super")) &&
                                                                                                              m.GetRealHealth() < UtilityClass.Player.GetSpellDamage(m, SpellSlot.E)))
                {
                    UtilityClass.CastOnUnit(SpellClass.E, minion);
                }
            }

            /// <summary>
            ///     The Laneclear W Logic.
            /// </summary>
            if (SpellClass.W.Ready &&
                UtilityClass.Player.ManaPercent()
                > ManaManager.GetNeededMana(SpellClass.Q.Slot, MenuClass.Spells["w"]["laneclear"]) &&
                MenuClass.Spells["w"]["laneclear"].As <MenuSliderBool>().Enabled)
            {
                var mainMinion = ImplementationClass.IOrbwalker.GetOrbwalkingTarget() as Obj_AI_Minion;
                if (mainMinion != null)
                {
                    SpellClass.W.Cast();
                }
            }
        }
コード例 #21
0
 /// <summary>
 ///     Called on tick update.
 /// </summary>
 public void Killsteal()
 {
     /// <summary>
     ///     The R KillSteal Logic.
     /// </summary>
     if (SpellClass.R.Ready &&
         MenuClass.Spells["r"]["killsteal"].As <MenuBool>().Enabled)
     {
         foreach (var target in Extensions.GetBestSortedTargetsInRange(SpellClass.R.Range).Where(t =>
                                                                                                 UtilityClass.Player.GetSpellDamage(t, SpellSlot.R) + (IsCharged(t) ? GetTotalExplosionDamage(t) : 0) >= t.GetRealHealth()))
         {
             UtilityClass.CastOnUnit(SpellClass.R, target);
             break;
         }
     }
 }
コード例 #22
0
 /// <summary>
 ///     Fired when the game is updated.
 /// </summary>
 public void Lasthit()
 {
     /// <summary>
     ///     The E Big Minions Lasthit Logic.
     /// </summary>
     if (SpellClass.E.Ready &&
         MenuClass.Spells["e"]["lasthit"].As <MenuBool>().Enabled)
     {
         foreach (var minion in Extensions.GetEnemyLaneMinionsTargetsInRange(SpellClass.E.Range).Where(m =>
                                                                                                       (m.UnitSkinName.Contains("Siege") || m.UnitSkinName.Contains("Super")) &&
                                                                                                       m.GetRealHealth() < UtilityClass.Player.GetSpellDamage(m, SpellSlot.E)))
         {
             UtilityClass.CastOnUnit(SpellClass.E, minion);
         }
     }
 }
コード例 #23
0
        /// <summary>
        ///     Called on do-cast.
        /// </summary>
        /// <param name="sender">The sender.</param>
        /// <param name="args">The <see cref="PreAttackEventArgs" /> instance containing the event data.</param>
        public void Jungleclear(object sender, PreAttackEventArgs args)
        {
            var jungleTarget = args.Target as Obj_AI_Minion;

            if (jungleTarget == null ||
                !Extensions.GetGenericJungleMinionsTargets().Contains(jungleTarget) ||
                jungleTarget.GetRealHealth() < UtilityClass.Player.GetAutoAttackDamage(jungleTarget) * 2)
            {
                return;
            }

            /// <summary>
            ///     The Jungleclear Q Logic.
            /// </summary>
            if (SpellClass.Q.Ready &&
                UtilityClass.Player.ManaPercent()
                > ManaManager.GetNeededMana(SpellClass.Q.Slot, MenuClass.Spells["q"]["jungleclear"]) &&
                MenuClass.Spells["q"]["jungleclear"].As <MenuSliderBool>().Enabled)
            {
                SpellClass.Q.Cast(SpellClass.Q.GetPrediction(jungleTarget).CastPosition.Extend(UtilityClass.Player.ServerPosition, -50f - jungleTarget.BoundingRadius));
            }

            /// <summary>
            ///     The Jungleclear E Logic.
            /// </summary>
            if (SpellClass.E.Ready &&
                MenuClass.Spells["e"]["jungleclear"].As <MenuSliderBool>().Enabled)
            {
                if (UtilityClass.Player.HealthPercent()
                    >= MenuClass.Spells["e"]["jungleclear"].As <MenuSliderBool>().Value ||
                    UtilityClass.Player.GetSpellDamage(jungleTarget, SpellSlot.E) >= jungleTarget.GetRealHealth())
                {
                    UtilityClass.CastOnUnit(SpellClass.E, jungleTarget);
                }
            }

            /// <summary>
            ///     The Jungleclear W Logic.
            /// </summary>
            if (SpellClass.W.Ready &&
                UtilityClass.Player.ManaPercent()
                > ManaManager.GetNeededMana(SpellClass.W.Slot, MenuClass.Spells["w"]["jungleclear"]) &&
                MenuClass.Spells["w"]["jungleclear"].As <MenuSliderBool>().Enabled)
            {
                SpellClass.W.Cast();
            }
        }
コード例 #24
0
        /// <summary>
        ///     Fired when the game is updated.
        /// </summary>
        public void Harass()
        {
            /// <summary>
            ///     The Q Mixed Harass Logic.
            /// </summary>
            if (SpellClass.Q.Ready &&
                UtilityClass.Player.ManaPercent()
                > ManaManager.GetNeededMana(SpellClass.Q.Slot, MenuClass.Spells["q2"]["harass"]) &&
                MenuClass.Spells["q2"]["harass"].As <MenuSliderBool>().Enabled)
            {
                foreach (var target in Extensions.GetBestSortedTargetsInRange(SpellClass.Q2.Range).Where(t => MenuClass.Spells["q2"]["whitelist"][t.ChampionName.ToLower()].Enabled))
                {
                    var unitsToIterate = Extensions.GetAllGenericUnitTargetsInRange(SpellClass.Q.Range)
                                         .Where(m => !m.IsMoving && QCone(m).IsInside((Vector2)target.ServerPosition))
                                         .OrderBy(m => m.Health)
                                         .ToList();

                    var killableUnitsToIterate = unitsToIterate
                                                 .Where(m => m.GetRealHealth() < GetRealMissFortuneDamage(UtilityClass.Player.GetSpellDamage(m, SpellSlot.Q), m))
                                                 .ToList();

                    var realUnitsToIterate = killableUnitsToIterate.Any() && MenuClass.Spells["q2"]["customization"]["harass"].As <MenuBool>().Enabled ? killableUnitsToIterate : unitsToIterate;
                    foreach (var minion in realUnitsToIterate)
                    {
                        UtilityClass.CastOnUnit(SpellClass.Q, minion);
                        break;
                    }
                }
            }

            /// <summary>
            ///     The Harass E Logic.
            /// </summary>
            if (SpellClass.E.Ready &&
                UtilityClass.Player.ManaPercent()
                > ManaManager.GetNeededMana(SpellClass.E.Slot, MenuClass.Spells["e"]["harass"]) &&
                MenuClass.Spells["e"]["harass"].As <MenuSliderBool>().Enabled)
            {
                var bestTarget = Extensions.GetBestEnemyHeroTargetInRange(SpellClass.E.Range);
                if (bestTarget != null &&
                    !Invulnerable.Check(bestTarget, DamageType.Magical, false) &&
                    MenuClass.Spells["e"]["whitelist"][bestTarget.ChampionName.ToLower()].As <MenuBool>().Enabled)
                {
                    SpellClass.E.Cast(bestTarget);
                }
            }
        }
コード例 #25
0
        /// <summary>
        ///     Fired when the game is updated.
        /// </summary>
        public void Killsteal()
        {
            /// <summary>
            ///     The KillSteal R Logic.
            /// </summary>
            if (SpellClass.R.Ready &&
                IsUltimateShooting() &&
                MenuClass.Spells["r"]["killsteal"].As <MenuBool>().Value)
            {
                foreach (var target in Extensions.GetBestSortedTargetsInRange(SpellClass.R.Range).Where(t =>
                                                                                                        UltimateCone().IsInside((Vector2)t.ServerPosition) &&
                                                                                                        UtilityClass.Player.GetSpellDamage(t, SpellSlot.R, HasUltimateFourthShot() ? DamageStage.Empowered : DamageStage.Default) >= t.GetRealHealth()))
                {
                    SpellClass.R.Cast(target);
                    break;
                }
            }

            /// <summary>
            ///     The KillSteal Q Logic.
            /// </summary>
            if (SpellClass.Q.Ready &&
                MenuClass.Spells["q"]["killsteal"].As <MenuBool>().Value)
            {
                foreach (var target in Extensions.GetBestSortedTargetsInRange(SpellClass.Q.Range).Where(t =>
                                                                                                        UtilityClass.Player.GetSpellDamage(t, SpellSlot.Q) >= t.GetRealHealth()))
                {
                    UtilityClass.CastOnUnit(SpellClass.Q, target);
                    break;
                }
            }

            /// <summary>
            ///     The KillSteal W Logic.
            /// </summary>
            if (SpellClass.W.Ready &&
                MenuClass.Spells["w"]["killsteal"].As <MenuBool>().Value)
            {
                foreach (var target in Extensions.GetBestSortedTargetsInRange(SpellClass.W.Range).Where(t =>
                                                                                                        UtilityClass.Player.GetSpellDamage(t, SpellSlot.W) >= t.GetRealHealth()))
                {
                    SpellClass.W.Cast(target);
                    break;
                }
            }
        }
コード例 #26
0
        /// <summary>
        ///     Fired when the game is updated.
        /// </summary>
        public void Killsteal()
        {
            /// <summary>
            ///     The Q KillSteal Logic.
            /// </summary>
            if (SpellClass.Q.Ready &&
                MenuClass.Spells["q"]["killsteal"].As <MenuBool>().Enabled)
            {
                foreach (var target in Extensions.GetBestSortedTargetsInRange(SpellClass.Q.Range).Where(t =>
                                                                                                        UtilityClass.Player.GetSpellDamage(t, SpellSlot.Q) >= t.GetRealHealth()))
                {
                    SpellClass.Q.Cast(SpellClass.Q.GetPrediction(target).CastPosition);
                    break;
                }
            }

            /// <summary>
            ///     The W KillSteal Logic.
            /// </summary>
            if (SpellClass.W.Ready &&
                MenuClass.Spells["w"]["killsteal"].As <MenuBool>().Enabled)
            {
                foreach (var target in Extensions.GetBestSortedTargetsInRange(SpellClass.W.Range).Where(t =>
                                                                                                        UtilityClass.Player.GetSpellDamage(t, SpellSlot.W) >= t.GetRealHealth()))
                {
                    if (IsHoldingForceOfWillObject())
                    {
                        SpellClass.W.Cast(UtilityClass.Player.ServerPosition.Extend(SpellClass.W.GetPrediction(target).CastPosition, target.BoundingRadius));
                    }
                }
            }

            /// <summary>
            ///     The R KillSteal Logic.
            /// </summary>
            if (SpellClass.R.Ready &&
                MenuClass.Spells["r"]["killsteal"].As <MenuBool>().Enabled)
            {
                foreach (var target in Extensions.GetBestSortedTargetsInRange(SpellClass.R.Range).Where(t =>
                                                                                                        GetTotalUnleashedPowerDamage(t) >= t.GetRealHealth()))
                {
                    UtilityClass.CastOnUnit(SpellClass.R, target);
                    break;
                }
            }
        }
コード例 #27
0
        /// <summary>
        ///     Fired when the game is updated.
        /// </summary>
        public void Killsteal()
        {
            /// <summary>
            ///     The Q Killsteal Logics.
            /// </summary>
            if (SpellClass.Q.Ready)
            {
                if (MenuClass.Spells["q"]["killsteal"].As <MenuBool>().Enabled)
                {
                    foreach (var target in Extensions.GetBestSortedTargetsInRange(SpellClass.Q.Range)
                             .Where(t => GetRealMissFortuneDamage(UtilityClass.Player.GetSpellDamage(t, SpellSlot.Q), t) >= t.GetRealHealth()))
                    {
                        UtilityClass.CastOnUnit(SpellClass.Q, target);
                        break;
                    }
                }

                if (MenuClass.Spells["q2"]["killsteal"].As <MenuBool>().Enabled)
                {
                    foreach (var target in Extensions.GetBestSortedTargetsInRange(SpellClass.Q2.Range))
                    {
                        var unitsToIterate = Extensions.GetAllGenericUnitTargetsInRange(SpellClass.Q.Range)
                                             .Where(m => !m.IsMoving && QCone(m).IsInside((Vector2)target.ServerPosition))
                                             .OrderBy(m => m.Health)
                                             .ToList();

                        var killableUnitsToIterate = unitsToIterate
                                                     .Where(m => m.GetRealHealth() < GetRealMissFortuneDamage(UtilityClass.Player.GetSpellDamage(m, SpellSlot.Q), m))
                                                     .ToList();

                        var realUnitsToIterate = killableUnitsToIterate.Any() ? killableUnitsToIterate : unitsToIterate;
                        foreach (var minion in realUnitsToIterate)
                        {
                            var damageToMinion = GetRealMissFortuneDamage(UtilityClass.Player.GetSpellDamage(minion, SpellSlot.Q), minion);
                            if (target.GetRealHealth() < GetRealMissFortuneDamage(UtilityClass.Player.GetSpellDamage(target, SpellSlot.Q, damageToMinion >= minion.GetRealHealth() ? DamageStage.Empowered : DamageStage.Default), target))
                            {
                                UtilityClass.CastOnUnit(SpellClass.Q, minion);
                                break;
                            }
                        }
                    }
                }
            }
        }
コード例 #28
0
        /// <summary>
        ///     Fired when the game is updated.
        /// </summary>
        public void Killsteal()
        {
            /// <summary>
            ///     The KillSteal R Logic.
            /// </summary>
            if (SpellClass.R.Ready &&
                MenuClass.Spells["r"]["killsteal"].As <MenuBool>().Enabled)
            {
                foreach (var target in Extensions.GetBestSortedTargetsInRange(SpellClass.R.Range).Where(t =>
                                                                                                        !t.IsValidTarget(UtilityClass.Player.GetFullAttackRange(t)) &&
                                                                                                        UtilityClass.Player.GetSpellDamage(t, SpellSlot.R) * 2 >= t.GetRealHealth()))
                {
                    UtilityClass.CastOnUnit(SpellClass.R, target);
                    break;
                }
            }

            /// <summary>
            ///     The KillSteal E Logic.
            /// </summary>
            if (SpellClass.E.Ready &&
                MenuClass.Spells["e"]["killsteal"].As <MenuBool>().Enabled)
            {
                if (Extensions.GetBestSortedTargetsInRange(SpellClass.E.Range).Any(t => UtilityClass.Player.GetSpellDamage(t, SpellSlot.E) >= t.GetRealHealth()))
                {
                    SpellClass.E.Cast();
                }
            }

            /// <summary>
            ///     The KillSteal Q Logic.
            /// </summary>
            if (SpellClass.Q.Ready &&
                MenuClass.Spells["q"]["killsteal"].As <MenuBool>().Enabled)
            {
                foreach (var target in Extensions.GetBestSortedTargetsInRange(SpellClass.Q.Range).Where(t =>
                                                                                                        !t.IsValidTarget(UtilityClass.Player.GetFullAttackRange(t)) &&
                                                                                                        UtilityClass.Player.GetSpellDamage(t, SpellSlot.Q) >= t.GetRealHealth()))
                {
                    UtilityClass.CastOnUnit(SpellClass.Q, target);
                    break;
                }
            }
        }
コード例 #29
0
 /// <summary>
 ///     Fired when the game is updated.
 /// </summary>
 public void Automatic()
 {
     /// <summary>
     ///     The Semi-Automatic E Management.
     /// </summary>
     if (SpellClass.E.Ready &&
         MenuClass.Spells["e"]["bool"].As <MenuBool>().Enabled&&
         MenuClass.Spells["e"]["key"].As <MenuKeyBind>().Enabled)
     {
         var bestTarget = GameObjects.EnemyHeroes.Where(t =>
                                                        t.IsValidTarget(SpellClass.E.Range) &&
                                                        !Invulnerable.Check(t, DamageType.Magical, false))
                          .MinBy(o => o.Distance(UtilityClass.Player));
         if (bestTarget != null)
         {
             UtilityClass.CastOnUnit(SpellClass.E, bestTarget);
         }
     }
 }
コード例 #30
0
        /*
         * /// <summary>
         * ///     Called on interruptable spell.
         * /// </summary>
         * /// <param name="sender">The sender.</param>
         * /// <param name="args">The <see cref="Events.InterruptableTargetEventArgs" /> instance containing the event data.</param>
         * public void OnInterruptableTarget(object sender, Events.InterruptableTargetEventArgs args)
         * {
         *  if (UtilityClass.Player.IsDead || Invulnerable.Check(args.Sender, DamageType.Magical, false))
         *  {
         *      return;
         *  }
         *
         *  if (SpellClass.R.State == SpellState.Ready && ((Vector2)GetBallPosition).Distance(args.Sender.ServerPosition) < SpellClass.R.SpellData.Range
         *      && MenuClass.Spells["r"]["interrupter"].As<MenuBool>().Enabled)
         *  {
         *      UtilityClass.Player.SpellBook.CastSpell(SpellSlot.R);
         *  }
         * }
         */

        /// <summary>
        ///     Called on process spell cast;
        /// </summary>
        /// <param name="sender">The sender.</param>
        /// <param name="args">The <see cref="Obj_AI_BaseMissileClientDataEventArgs" /> instance containing the event data.</param>
        public void OnProcessSpellCast(Obj_AI_Base sender, Obj_AI_BaseMissileClientDataEventArgs args)
        {
            var target = args.Target as Obj_AI_Hero;

            if (target == null ||
                !Extensions.GetAllyHeroesTargetsInRange(SpellClass.E.Range).Contains(target))
            {
                return;
            }

            if (SpellClass.E.Ready &&
                Bools.ShouldShieldAgainstSender(sender) &&
                MenuClass.Spells["e"]["protect"].As <MenuBool>().Enabled&&
                MenuClass.Spells["e"]["protectwhitelist"][target.ChampionName.ToLower()].As <MenuSliderBool>().Enabled&&
                target.HealthPercent() <= MenuClass.Spells["e"]["protectwhitelist"][target.ChampionName.ToLower()].As <MenuSliderBool>().Value)
            {
                UtilityClass.CastOnUnit(SpellClass.E, target);
            }
        }