Ejemplo n.º 1
0
        /// <summary>
        ///     Called on tick update.
        /// </summary>
        public void Combo()
        {
            /// <summary>
            ///     The Rylai Q Combo Logic.
            /// </summary>
            if (SpellClass.Q.Ready &&
                UtilityClass.Player.HasItem(ItemId.RylaisCrystalScepter))
            {
                var bestTarget = Extensions.GetBestEnemyHeroTargetInRange(SpellClass.Q.Range - 50f);
                if (bestTarget != null &&
                    !Invulnerable.Check(bestTarget, DamageType.Magical))
                {
                    switch (MenuClass.Spells["q"]["modes"]["combo"].As <MenuList>().Value)
                    {
                    case 0:
                        if (!IsNearWorkedGround())
                        {
                            SpellClass.Q.Cast(bestTarget);
                        }
                        break;

                    case 1:
                        SpellClass.Q.Cast(bestTarget);
                        break;
                    }
                }
            }

            /// <summary>
            ///     The W->Boulders Combo Logic.
            /// </summary>
            if (SpellClass.W.Ready &&
                MenuClass.Spells["w"]["boulders"].As <MenuBool>().Enabled)
            {
                var bestTargets = ImplementationClass.ITargetSelector.GetOrderedTargets(SpellClass.W.Range - 100f)
                                  .Where(t => MenuClass.Spells["w"]["selection"][t.ChampionName.ToLower()].As <MenuList>().Value < 4);

                var objAiHeroes = bestTargets as Obj_AI_Hero[] ?? bestTargets.ToArray();
                foreach (var target in objAiHeroes)
                {
                    var bestBoulderHitPos            = GetBestBouldersHitPosition(target);
                    var bestBoulderHitPosHitBoulders = GetBestBouldersHitPositionHitBoulders(target);
                    if (bestBoulderHitPos != Vector3.Zero && bestBoulderHitPosHitBoulders > 0)
                    {
                        SpellClass.W.Cast(bestBoulderHitPos, SpellClass.W.GetPrediction(target).CastPosition);
                    }
                }
            }

            /// <summary>
            ///     The W-> E Combo Logic.
            /// </summary>
            if (SpellClass.W.Ready &&
                (SpellClass.E.Ready || !MenuClass.Spells["w"]["customization"]["onlyeready"].As <MenuBool>().Enabled) &&
                MenuClass.Spells["w"]["combo"].As <MenuBool>().Enabled)
            {
                var bestTarget = Extensions.GetBestEnemyHeroTargetInRange(SpellClass.W.Range - 100f);
                if (bestTarget != null &&
                    !Invulnerable.Check(bestTarget, DamageType.Magical))
                {
                    switch (MenuClass.Spells["pattern"].As <MenuList>().Value)
                    {
                    case 0:
                        var targetPred = SpellClass.W.GetPrediction(bestTarget).CastPosition;
                        SpellClass.W.Cast(GetTargetPositionAfterW(bestTarget), targetPred);
                        break;
                    }
                }
            }

            /// <summary>
            ///     The E Combo Logic.
            /// </summary>
            if (SpellClass.E.Ready &&
                (!SpellClass.W.Ready || !MenuClass.Spells["w"]["combo"].As <MenuBool>().Enabled || MenuClass.Spells["pattern"].As <MenuList>().Value == 1) &&
                (SpellClass.W.Ready || !MenuClass.Spells["e"]["customization"]["onlywready"].As <MenuBool>().Enabled) &&
                MenuClass.Spells["e"]["combo"].As <MenuBool>().Enabled)
            {
                var bestETarget = Extensions.GetBestEnemyHeroTargetInRange(SpellClass.E.Range - 100f);
                if (bestETarget != null &&
                    !Invulnerable.Check(bestETarget, DamageType.Magical))
                {
                    SpellClass.E.Cast(bestETarget.ServerPosition);
                }
            }

            /// <summary>
            ///     The Q Combo Logic.
            /// </summary>
            if (SpellClass.Q.Ready &&
                MenuClass.Spells["q"]["combo"].As <MenuBool>().Enabled)
            {
                var bestTarget = Extensions.GetBestEnemyHeroTargetInRange(SpellClass.Q.Range - 150f);
                if (bestTarget != null &&
                    !Invulnerable.Check(bestTarget, DamageType.Magical))
                {
                    switch (MenuClass.Spells["q"]["modes"]["combo"].As <MenuList>().Value)
                    {
                    case 0:
                        if (!IsNearWorkedGround())
                        {
                            SpellClass.Q.Cast(SpellClass.Q.GetPrediction(bestTarget).CastPosition);
                        }
                        break;

                    case 1:
                        SpellClass.Q.Cast(SpellClass.Q.GetPrediction(bestTarget).CastPosition);
                        break;
                    }
                }
            }
        }
Ejemplo n.º 2
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 (Bools.HasSheenBuff() ||
                !Targets.Target.LSIsValidTarget() ||
                Invulnerable.Check(Targets.Target))
            {
                return;
            }

            /// <summary>
            ///     The Q Combo Logic.
            /// </summary>
            if (Vars.Q.IsReady() &&
                Targets.Target.LSIsValidTarget(Vars.Q.Range) &&
                !Targets.Target.LSIsValidTarget(Vars.AARange) &&
                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 (Targets.Target.LSIsValidTarget(Vars.AARange) &&
                    GameObjects.Player.CountAllyHeroesInRange(Vars.W.Range) < 2)
                {
                    Vars.W.Cast(Vars.W.GetPrediction(Targets.Target).UnitPosition);
                }
                else if (GameObjects.Player.TotalMagicalDamage > GameObjects.Player.TotalAttackDamage)
                {
                    Vars.W.Cast(Vars.W.GetPrediction(Targets.Target).UnitPosition);
                }
                return;
            }
        }
Ejemplo n.º 3
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.IsVisible &&
                             t.IsHPBarRendered &&
                             !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);
                }
            }
        }
Ejemplo 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 Killsteal(EventArgs args)
        {
            /// <summary>
            ///     The Q Killsteal Logic.
            /// </summary>
            if (Vars.Q.IsReady())
            {
                /// <summary>
                ///     Normal Q KilLSteal Logic.
                /// </summary>
                if (Vars.getCheckBoxItem(Vars.QMenu, "killsteal"))
                {
                    foreach (var target in GameObjects.EnemyHeroes.Where(
                                 t =>
                                 !Invulnerable.Check(t) &&
                                 t.LSIsValidTarget(Vars.Q.Range) &&
                                 Vars.GetRealHealth(t) <
                                 (float)GameObjects.Player.LSGetSpellDamage(t, SpellSlot.Q)))
                    {
                        Vars.Q.CastOnUnit(target);
                    }
                }

                if (!GameObjects.EnemyHeroes.Any(
                        t =>
                        !Invulnerable.Check(t) &&
                        !t.LSIsValidTarget(Vars.Q.Range) &&
                        t.LSIsValidTarget(Vars.Q2.Range - 50f) &&
                        Vars.GetRealHealth(t) <
                        (float)GameObjects.Player.LSGetSpellDamage(t, SpellSlot.Q)))
                {
                    return;
                }

                /// <summary>
                ///     Extended Q KilLSteal Logic.
                /// </summary>
                if (Vars.getCheckBoxItem(Vars.Q2Menu, "exkillsteal"))
                {
                    /// <summary>
                    ///     Through enemy minions.
                    /// </summary>
                    foreach (var minion
                             in from minion
                             in Targets.Minions.Where(m => m.LSIsValidTarget(Vars.Q.Range))

                             let polygon = new Geometry.Rectangle(
                                 GameObjects.Player.ServerPosition,
                                 GameObjects.Player.ServerPosition.LSExtend(minion.ServerPosition, Vars.Q2.Range - 50f),
                                 Vars.Q2.Width)

                                           where !polygon.IsOutside(
                                 (Vector2)Vars.Q2.GetPrediction(GameObjects.EnemyHeroes.FirstOrDefault(
                                                                    t =>
                                                                    !Invulnerable.Check(t) &&
                                                                    !t.LSIsValidTarget(Vars.Q.Range) &&
                                                                    t.LSIsValidTarget(Vars.Q2.Range - 50f) &&
                                                                    Vars.GetRealHealth(t) <
                                                                    (float)GameObjects.Player.LSGetSpellDamage(t, SpellSlot.Q))).UnitPosition)

                                           select minion)
                    {
                        Vars.Q.CastOnUnit(minion);
                    }

                    /// <summary>
                    ///     Through enemy heroes.
                    /// </summary>
                    foreach (var target
                             in from target
                             in GameObjects.EnemyHeroes.Where(t => t.LSIsValidTarget(Vars.Q.Range))

                             let polygon = new Geometry.Rectangle(
                                 GameObjects.Player.ServerPosition,
                                 GameObjects.Player.ServerPosition.LSExtend(target.ServerPosition, Vars.Q2.Range - 50f),
                                 Vars.Q2.Width)

                                           where !polygon.IsOutside(
                                 (Vector2)Vars.Q2.GetPrediction(GameObjects.EnemyHeroes.FirstOrDefault(
                                                                    t =>
                                                                    !Invulnerable.Check(t) &&
                                                                    !t.LSIsValidTarget(Vars.Q.Range) &&
                                                                    t.LSIsValidTarget(Vars.Q2.Range - 50f) &&
                                                                    Vars.GetRealHealth(t) <
                                                                    (float)GameObjects.Player.LSGetSpellDamage(t, SpellSlot.Q))).UnitPosition)

                                           select target)
                    {
                        Vars.Q.CastOnUnit(target);
                    }
                }
            }

            /// <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.Q.Range) &&
                             Vars.GetRealHealth(t) <
                             (float)GameObjects.Player.LSGetSpellDamage(t, SpellSlot.W)))
                {
                    if (!Vars.W.GetPrediction(target).CollisionObjects.Any())
                    {
                        Vars.W.Cast(Vars.W.GetPrediction(target).UnitPosition);
                    }
                }
            }
        }
Ejemplo n.º 5
0
        /// <summary>
        ///     Called while processing Spellcasting operations.
        /// </summary>
        /// <param name="sender">The sender.</param>
        /// <param name="args">The <see cref="Obj_AI_BaseMissileClientDataEventArgs" /> instance containing the event data.</param>
        public void Shield(Obj_AI_Base sender, Obj_AI_BaseMissileClientDataEventArgs args)
        {
            if (sender == null || !sender.IsEnemy)
            {
                return;
            }

            switch (sender.Type)
            {
            case GameObjectType.obj_AI_Hero:
                if (Invulnerable.Check(ObjectManager.GetLocalPlayer(), DamageType.Magical, false))
                {
                    return;
                }

                var hero = sender as Obj_AI_Hero;
                if (hero != null)
                {
                    /// <summary>
                    ///     Block Gangplank's Barrels.
                    /// </summary>
                    if (hero.ChampionName.Equals("Gangplank"))
                    {
                        if (!(args.Target is Obj_AI_Minion))
                        {
                            return;
                        }

                        if (Bools.IsAutoAttack(args.SpellData.Name) || args.SpellData.Name.Equals("GangplankQProceed"))
                        {
                            var target = (Obj_AI_Minion)args.Target;
                            if ((int)target.GetRealHealth() == 1 &&
                                target.Distance(UtilityClass.Player) < 450 &&
                                target.UnitSkinName.Equals("gangplankbarrel"))
                            {
                                SpellClass.E.Cast();
                                return;
                            }
                        }
                    }

                    var spellMenu = MenuClass.Spells["e"]["whitelist"][$"{hero.ChampionName.ToLower()}.{args.SpellData.Name.ToLower()}"];
                    if (args.Target != null &&
                        args.Target.IsMe)
                    {
                        /// <summary>
                        ///     Check for Special On-Hit CC AutoAttacks.
                        /// </summary>
                        if (Bools.IsAutoAttack(args.SpellData.Name))
                        {
                            switch (args.SpellData.Name)
                            {
                            case "UdyrBearAttack":
                            case "GoldCardPreAttack":
                            case "RedCardPreAttack":
                            case "BlueCardPreAttack":
                            case "NautilusRavageStrikeAttack":
                                if (spellMenu != null &&
                                    spellMenu.As <MenuBool>().Value&&
                                    (!hero.ChampionName.Equals("Udyr") || !UtilityClass.Player.HasBuff("udyrbearstuncheck")))
                                {
                                    SpellClass.E.Cast();
                                }
                                break;
                            }

                            /// <summary>
                            ///     Check for Melee AutoAttack Resets.
                            /// </summary>
                            var getReset  = hero.ValidActiveBuffs().FirstOrDefault(b => ImplementationClass.IOrbwalker.IsReset(b.Name));
                            var resetMenu = getReset != null
                                                    ? MenuClass.Spells["e"]["whitelist"][$"{hero.ChampionName.ToLower()}.{getReset.Name.ToLower()}"]
                                                    : null;
                            if (resetMenu != null &&
                                resetMenu.As <MenuBool>().Value)
                            {
                                SpellClass.E.Cast();
                                return;
                            }

                            /// <summary>
                            ///     Check for Braum Passive.
                            /// </summary>
                            var braumMenu = MenuClass.Spells["e"]["whitelist"]["braum.passive"];
                            if (braumMenu != null &&
                                braumMenu.As <MenuBool>().Value&&
                                UtilityClass.Player.GetBuffCount("BraumMark") == 3)
                            {
                                SpellClass.E.Cast();
                                return;
                            }
                        }
                    }

                    /// <summary>
                    ///     Shield all the Targetted Spells.
                    /// </summary>
                    var getSpellName = SpellDatabase.GetByName(args.SpellData.Name);
                    if (spellMenu != null &&
                        getSpellName != null &&
                        spellMenu.As <MenuBool>().Value)
                    {
                        switch (getSpellName.SpellType)
                        {
                        /// <summary>
                        ///     Check for Targetted Spells.
                        /// </summary>
                        case SpellType.Targeted:
                        case SpellType.TargetedMissile:
                            if (args.Target != null && args.Target.IsMe)
                            {
                                var delay = MenuClass.Spells["e"]["logical"].As <MenuSliderBool>().Value;
                                switch (hero.ChampionName)
                                {
                                case "Caitlyn":
                                    delay = 1050;
                                    break;

                                case "Nocturne":
                                    delay = 350;
                                    break;

                                case "Zed":
                                    delay = 200;
                                    break;

                                case "Nautilus":
                                    delay = (int)UtilityClass.Player.Distance(hero);
                                    break;
                                }

                                DelayAction.Queue(delay, () =>
                                {
                                    SpellClass.E.Cast();
                                });
                            }
                            break;

                        /// <summary>
                        ///     Check for AoE Spells.
                        /// </summary>
                        case SpellType.SkillshotCircle:
                            switch (hero.ChampionName)
                            {
                            case "Alistar":
                                if (hero.Distance(UtilityClass.Player) <= 300 + UtilityClass.Player.BoundingRadius)
                                {
                                    SpellClass.E.Cast();
                                }
                                break;
                            }
                            break;
                        }
                    }
                }
                break;

            case GameObjectType.obj_AI_Minion:
                /// <summary>
                ///     Block Dragon/Baron/RiftHerald's AutoAttacks.
                /// </summary>
                if (args.Target != null &&
                    args.Target.IsMe &&
                    sender.UnitSkinName.Contains("SRU_Dragon") &&
                    MenuClass.Spells["e"]["whitelist"]["minions"].As <MenuBool>().Value)
                {
                    SpellClass.E.Cast();
                }
                break;
            }
        }
        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));
            }
        }
Ejemplo 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 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, false) &&
                             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);
                }
            }
        }
Ejemplo 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 Killsteal(EventArgs args)
        {
            /// <summary>
            ///     The KillSteal R Logic.
            /// </summary>
            ///
            var target = TargetSelector.GetTarget(Vars.R.Range, DamageType.True);

            if (target == null || !target.IsValid)
            {
                return;
            }
            if (Vars.getCheckBoxItem(Vars.RMenu, "killsteal") && Vars.R.IsReady() && target.IsValidTarget(Vars.R.Range))
            {
                foreach (var hero in
                         ObjectManager.Get <AIHeroClient>().Where(hero => hero.LSIsValidTarget(Vars.R.Range) && !Invulnerable.Check(hero) && !hero.HasBuffOfType(BuffType.SpellShield) && !hero.HasBuff("kindredrnodeathbuff")))
                {
                    var R    = new LeagueSharp.Common.Spell(SpellSlot.R, 460);
                    var dmgR = SebbyLib.OktwCommon.GetKsDamage(target, R);
                    if (target.HasBuff("dariushemo"))
                    {
                        dmgR += R.GetDamage(target) * target.GetBuff("dariushemo").Count * 0.2f;
                    }
                    if (dmgR > hero.Health + target.HPRegenRate)
                    {
                        Vars.R.CastOnUnit(target);
                    }

                    if (dmgR < hero.Health + target.HPRegenRate && hero.CountEnemiesInRange(1200) <= 1)
                    {
                        foreach (var buff in hero.Buffs.Where(buff => buff.Name == "dariushemo"))
                        {
                            if (ObjectManager.Player.LSGetSpellDamage(target, SpellSlot.R, 1) * (1 + buff.Count / 5) - 1
                                > target.Health + target.HPRegenRate)
                            {
                                Vars.R.CastOnUnit(target);
                            }
                        }
                    }
                    if (hero.CountEnemiesInRange(1200) <= 1)
                    {
                        if (RDmg(hero, PassiveCount(hero)) +
                            Hemorrhage(hero, PassiveCount(hero) - 1) >= hero.Health + target.HPRegenRate && 1 <= target.GetBuff("dariushemo").Count)
                        {
                            if (!hero.HasBuff("kindredrnodeathbuff"))
                            {
                                Spellbook["R"].CastOnUnit(hero);
                            }
                        }
                    }
                    if (RDmg(hero, PassiveCount(hero)) >= hero.Health +
                        Hemorrhage(hero, 1))
                    {
                        if (!hero.HasBuff("kindredrnodeathbuff"))
                        {
                            Spellbook["R"].CastOnUnit(hero);
                        }
                    }
                }
            }
        }
Ejemplo 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 Clear(EventArgs args)
        {
            if ((Bools.HasSheenBuff() && Targets.Target.IsValidTarget(GameObjects.Player.GetRealAutoAttackRange())) ||
                !(Variables.Orbwalker.GetTarget() as Obj_AI_Minion).IsValidTarget())
            {
                return;
            }

            /// <summary>
            ///     The Clear Q Logics.
            /// </summary>
            var objAiBase = Variables.Orbwalker.GetTarget() as Obj_AI_Minion;

            if (Vars.Q.IsReady() && objAiBase != null)
            {
                /// <summary>
                ///     The LaneClear & JungleClear Q Logics.
                /// </summary>
                if (Targets.Minions.Contains(objAiBase) &&
                    Vars.Menu["spells"]["q"]["laneclear"].GetValue <MenuBool>().Value ||
                    Targets.JungleMinions.Contains(objAiBase) &&
                    Vars.Menu["spells"]["q"]["jungleclear"].GetValue <MenuBool>().Value)
                {
                    Vars.Q.Cast();
                }
            }

            /// <summary>
            ///     The Clear E Logics.
            /// </summary>
            if (Vars.E.IsReady())
            {
                /// <summary>
                ///     The JungleClear E Logic.
                /// </summary>
                if (Targets.JungleMinions.Any() &&
                    GameObjects.Player.ManaPercent
                    > ManaManager.GetNeededMana(Vars.E.Slot, Vars.Menu["spells"]["e"]["jungleclear"]) &&
                    Vars.Menu["spells"]["e"]["jungleclear"].GetValue <MenuSliderButton>().BValue)
                {
                    Vars.E.CastOnUnit(Variables.Orbwalker.GetTarget() as Obj_AI_Minion);
                }

                /// <summary>
                ///     The LaneClear E Logics.
                /// </summary>
                else
                {
                    /// <summary>
                    ///     The Aggressive LaneClear E Logic.
                    /// </summary>
                    if (GameObjects.EnemyHeroes.Any(t => !Invulnerable.Check(t) && t.IsValidTarget(Vars.W.Range)) &&
                        GameObjects.Player.ManaPercent
                        > ManaManager.GetNeededMana(Vars.E.Slot, Vars.Menu["spells"]["e"]["harass"]) &&
                        Vars.Menu["spells"]["e"]["harass"].GetValue <MenuSliderButton>().BValue)
                    {
                        foreach (var minion in
                                 Targets.Minions.Where(
                                     m =>
                                     m.CountEnemyHeroesInRange(150f) > 0 &&
                                     Vars.GetRealHealth(m) < GameObjects.Player.GetAutoAttackDamage(m)))
                        {
                            Vars.E.CastOnUnit(minion);
                        }
                    }
                    else
                    {
                        /// <summary>
                        ///     The Normal LaneClear E Logic.
                        /// </summary>
                        if (Targets.Minions.Any() &&
                            GameObjects.Player.ManaPercent
                            > ManaManager.GetNeededMana(Vars.E.Slot, Vars.Menu["spells"]["e"]["laneclear"]) &&
                            Vars.Menu["spells"]["e"]["laneclear"].GetValue <MenuSliderButton>().BValue)
                        {
                            if (
                                Targets.Minions.Count(
                                    m => m.Distance(Variables.Orbwalker.GetTarget() as Obj_AI_Minion) < 150f) >= 3)
                            {
                                Vars.E.CastOnUnit(Variables.Orbwalker.GetTarget() as Obj_AI_Minion);
                            }
                        }
                    }
                }
            }
        }
Ejemplo 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 Combo(EventArgs args)
        {
            var target = Variables.Orbwalker.GetTarget() as Obj_AI_Hero ?? Targets.Target;

            /// <summary>
            ///     The Q Logic.
            /// </summary>
            if (Vars.Q.IsReady() && target != null &&
                Vars.Menu["spells"]["q"]["combo"].GetValue <MenuSliderButton>().BValue)
            {
                const float SplashRange           = 160f;
                var         isUsingFishBones      = GameObjects.Player.HasBuff("JinxQ");
                var         minSplashRangeEnemies = Vars.Menu["spells"]["q"]["combo"].GetValue <MenuSliderButton>().SValue;

                //CountEnemiesInRange takes into account the main target too,
                //so if there is another enemy champion near the main target, xd.CountEnemiesInRange(near_pos) will return 2 (xd + the other enemy) and not 1 (the other enemy only).
                if (!isUsingFishBones)
                {
                    if (GameObjects.Player.Distance(target) > Vars.PowPow.Range ||
                        target.CountEnemyHeroesInRange(SplashRange) >= minSplashRangeEnemies)
                    {
                        Vars.Q.Cast();
                    }
                }
                else
                {
                    if (GameObjects.Player.Distance(target) < Vars.PowPow.Range &&
                        target.CountEnemyHeroesInRange(SplashRange) < minSplashRangeEnemies)
                    {
                        Vars.Q.Cast();
                    }
                }
            }

            if (Bools.HasSheenBuff() && Targets.Target.IsValidTarget(GameObjects.Player.GetRealAutoAttackRange()) ||
                !Targets.Target.IsValidTarget())
            {
                return;
            }

            /// <summary>
            ///     The E AoE Logic.
            /// </summary>
            if (Vars.E.IsReady() && Targets.Target.IsValidTarget(Vars.E.Range) &&
                !Invulnerable.Check(Targets.Target, DamageType.Magical, false) &&
                Targets.Target.CountEnemyHeroesInRange(Vars.E.Width)
                >= Vars.Menu["spells"]["e"]["aoe"].GetValue <MenuSliderButton>().SValue &&
                Vars.Menu["spells"]["e"]["aoe"].GetValue <MenuSliderButton>().BValue)
            {
                Vars.E.Cast(
                    GameObjects.Player.ServerPosition.Extend(
                        Targets.Target.ServerPosition,
                        GameObjects.Player.Distance(Targets.Target) + Targets.Target.BoundingRadius * 2));
            }

            /// <summary>
            ///     The W Combo Logic.
            /// </summary>
            if (Vars.W.IsReady() && !GameObjects.Player.IsUnderEnemyTurret() &&
                Targets.Target.IsValidTarget(Vars.W.Range - 100f) &&
                GameObjects.Player.CountEnemyHeroesInRange(Vars.Q.Range) < 3 &&
                Vars.Menu["spells"]["w"]["combo"].GetValue <MenuBool>().Value)
            {
                if (!Vars.W.GetPrediction(Targets.Target).CollisionObjects.Any())
                {
                    Vars.W.Cast(Vars.W.GetPrediction(Targets.Target).UnitPosition);
                }
            }
        }
Ejemplo 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 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 minionPassiveMultiplier = 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;
                var heroPassiveMultiplier = minionPassiveMultiplier * 2;

                /// <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) &&
                                         Vars.GetRealHealth(t)
                                         < (float)GameObjects.Player.GetSpellDamage(t, SpellSlot.Q, DamageStage.SecondForm)
                                         + GameObjects.Player.TotalAttackDamage * minionPassiveMultiplier
                                         + (Vars.GetRealHealth(minion)
                                            < (float)GameObjects.Player.GetSpellDamage(minion, SpellSlot.Q)
                                            + (MissFortune.PassiveTarget == null ||
                                               minion.NetworkId != MissFortune.PassiveTarget?.NetworkId
                                             ? GameObjects.Player.TotalAttackDamage * minionPassiveMultiplier
                                             : 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)Vars.Q.GetPrediction(target).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) &&
                                         Vars.GetRealHealth(t)
                                         < (float)GameObjects.Player.GetSpellDamage(t, SpellSlot.Q, DamageStage.SecondForm)
                                         + GameObjects.Player.TotalAttackDamage * heroPassiveMultiplier &&
                                         (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)Vars.Q.GetPrediction(target).UnitPosition)
                                     select target)
                    {
                        Vars.Q.CastOnUnit(target);
                    }
                }
            }
        }
Ejemplo n.º 12
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 Switching Logics.
            /// </summary>
            if (Vars.Q.IsReady())
            {
                /// <summary>
                ///     PowPow.Range -> FishBones Logics.
                /// </summary>
                if (!GameObjects.Player.HasBuff("JinxQ"))
                {
                    switch (Variables.Orbwalker.ActiveMode)
                    {
                    /// <summary>
                    ///     The Q Combo Enable Logics,
                    ///     The Q Harass Enable Logics.
                    /// </summary>
                    case OrbwalkingMode.Combo:
                    case OrbwalkingMode.Hybrid:

                        /// <summary>
                        ///     Enable if:
                        ///     If you are in combo mode, the combo option is enabled. (Option check).
                        /// </summary>
                        if (Variables.Orbwalker.ActiveMode == OrbwalkingMode.Combo)
                        {
                            if (!Vars.Menu["spells"]["q"]["combo"].GetValue <MenuBool>().Value)
                            {
                                //Console.WriteLine("ExorAIO: Jinx - Combo - Option Block.");
                                return;
                            }
                        }

                        /// <summary>
                        ///     Enable if:
                        ///     If you are in mixed mode, the mixed option is enabled.. (Option check).
                        ///     and respects the ManaManager check. (Mana check).
                        /// </summary>
                        else if (Variables.Orbwalker.ActiveMode == OrbwalkingMode.Hybrid)
                        {
                            if (GameObjects.Player.ManaPercent
                                < ManaManager.GetNeededMana(Vars.W.Slot, Vars.Menu["spells"]["q"]["harass"]) ||
                                !Vars.Menu["spells"]["q"]["harass"].GetValue <MenuSliderButton>().BValue)
                            {
                                //Console.WriteLine("ExorAIO: Jinx - Hybrid - ManaManager or Option Block.");
                                return;
                            }
                        }

                        /// <summary>
                        ///     Enable if:
                        ///     No hero in PowPow Range but 1 or more heroes in FishBones range. (Range Logic).
                        /// </summary>
                        if (!GameObjects.EnemyHeroes.Any(t => t.IsValidTarget(Vars.PowPow.Range)) &&
                            GameObjects.EnemyHeroes.Any(
                                t2 =>
                                t2.IsValidTarget(
                                    Variables.Orbwalker.ActiveMode == OrbwalkingMode.Hybrid
                                            ? Vars.Q.Range
                                            : Vars.W.Range)))
                        {
                            //Console.WriteLine("ExorAIO: Jinx - Combo/Hybrid - Enabled for Range Check.");
                            Vars.Q.Cast();
                            return;
                        }

                        break;

                    /// <summary>
                    ///     The Q Clear Enable Logics.
                    /// </summary>
                    case OrbwalkingMode.LaneClear:

                        /// <summary>
                        ///     Start if:
                        ///     It respects the ManaManager Check, (Mana check),
                        ///     The Clear Option is enabled. (Option check).
                        /// </summary>
                        if (GameObjects.Player.ManaPercent
                            < ManaManager.GetNeededMana(Vars.W.Slot, Vars.Menu["spells"]["q"]["clear"]) ||
                            !Vars.Menu["spells"]["q"]["clear"].GetValue <MenuSliderButton>().BValue)
                        {
                            //Console.WriteLine("ExorAIO: Jinx - Clear - ManaManager or Option Block.");
                            return;
                        }

                        /// <summary>
                        ///     The LaneClear Logics.
                        /// </summary>
                        if (
                            Targets.Minions.Any(
                                m => Vars.GetRealHealth(m) < GameObjects.Player.GetAutoAttackDamage(m) * 1.1))
                        {
                            /// <summary>
                            ///     Disable if:
                            ///     The player has Runaan's Hurricane and there are more than 1 hittable Minions..
                            ///     And there more than 2 killable minions in Q explosion range (Lane AoE Logic).
                            /// </summary>
                            if (Items.HasItem(3085) && Targets.Minions.Count > 1 ||
                                Targets.Minions.Where(
                                    m => Vars.GetRealHealth(m) < GameObjects.Player.GetAutoAttackDamage(m) * 1.1)
                                .Count(
                                    m2 =>
                                    m2.Distance(
                                        Targets.Minions.First(
                                            m =>
                                            Vars.GetRealHealth(m)
                                            < GameObjects.Player.GetAutoAttackDamage(m) * 1.1)) < 250f) >= 3)
                            {
                                Vars.Q.Cast();

                                //Console.WriteLine("ExorAIO: Jinx - LaneClear - Enabled for AoE Check.");
                                return;
                            }
                        }

                        /// <summary>
                        ///     The JungleClear Logics.
                        /// </summary>
                        else if (Targets.JungleMinions.Any())
                        {
                            /// <summary>
                            ///     Enable if:
                            ///     No monster in PowPow Range and at least 1 monster in Fishbones Range.. (Jungle Range Logic).
                            /// </summary>
                            if (!Targets.JungleMinions.Any(m => m.IsValidTarget(Vars.PowPow.Range)))
                            {
                                Vars.Q.Cast();

                                //Console.WriteLine("ExorAIO: Jinx - JungleClear - Enabled for Range Check.");
                                return;
                            }

                            /// <summary>
                            ///     Enable if:
                            ///     More or equal than 1 monster in explosion range from the target monster. (Lane AoE Logic).
                            /// </summary>
                            if (Targets.JungleMinions.Count(m2 => m2.Distance(Targets.JungleMinions[0]) < 250f) >= 2)
                            {
                                Vars.Q.Cast();

                                //Console.WriteLine("ExorAIO: Jinx - JungleClear - Enabled for AoE Check.");
                                return;
                            }
                        }

                        break;

                    /// <summary>
                    ///     The Q LastHit Disable Logic.
                    /// </summary>
                    case OrbwalkingMode.LastHit:

                        /// <summary>
                        ///     Start if:
                        ///     It respects the ManaManager Check, (Mana check).
                        ///     The LastHit Option is enabled. (Option check).
                        /// </summary>
                        if (GameObjects.Player.ManaPercent
                            < ManaManager.GetNeededMana(Vars.W.Slot, Vars.Menu["spells"]["q"]["lasthit"]) ||
                            !Vars.Menu["spells"]["q"]["lasthit"].GetValue <MenuSliderButton>().BValue)
                        {
                            //Console.WriteLine("ExorAIO: Jinx - LastHit - ManaManager or Option Block.");
                            return;
                        }

                        /// <summary>
                        ///     Enable if:
                        ///     Any killable minion in FishBones Range and no killable minions in PowPow Range. (LastHit Range Logic).
                        /// </summary>
                        if (
                            Targets.Minions.Any(
                                m =>
                                !m.IsValidTarget(Vars.PowPow.Range) &&
                                m.Health < GameObjects.Player.GetAutoAttackDamage(m) * 1.1))
                        {
                            if (
                                !Targets.Minions.Any(
                                    m =>
                                    m.IsValidTarget(Vars.PowPow.Range) &&
                                    m.Health < GameObjects.Player.GetAutoAttackDamage(m)))
                            {
                                Vars.Q.Cast();

                                //Console.WriteLine("ExorAIO: Jinx - LastHit - Enabled.");
                                return;
                            }
                        }

                        break;
                    }
                }

                /// <summary>
                ///     FishBones -> PowPow.Range Logics.
                /// </summary>
                else
                {
                    switch (Variables.Orbwalker.ActiveMode)
                    {
                    /// <summary>
                    ///     The Q Combo Enable Logics,
                    ///     The Q Harass Enable Logics.
                    /// </summary>
                    case OrbwalkingMode.Combo:
                    case OrbwalkingMode.Hybrid:

                        /// <summary>
                        ///     Disable if:
                        ///     If you are in combo mode, the combo option is disabled. (Option check).
                        /// </summary>
                        if (Variables.Orbwalker.ActiveMode == OrbwalkingMode.Combo)
                        {
                            if (!Vars.Menu["spells"]["q"]["combo"].GetValue <MenuBool>().Value)
                            {
                                Vars.Q.Cast();

                                //Console.WriteLine("ExorAIO: Jinx - Combo - Option Disable.");
                                return;
                            }
                        }

                        /// <summary>
                        ///     Disable if:
                        ///     If you are in mixed mode, the mixed option is disabled.. (Option check).
                        ///     or it doesn't respect the ManaManager check. (Mana check).
                        /// </summary>
                        else if (Variables.Orbwalker.ActiveMode == OrbwalkingMode.Hybrid)
                        {
                            if (GameObjects.Player.ManaPercent
                                < ManaManager.GetNeededMana(Vars.W.Slot, Vars.Menu["spells"]["q"]["harass"]) ||
                                !Vars.Menu["spells"]["q"]["harass"].GetValue <MenuSliderButton>().BValue)
                            {
                                Vars.Q.Cast();

                                //Console.WriteLine("ExorAIO: Jinx - Mixed - ManaManager or Option Disable.");
                                return;
                            }
                        }

                        /// <summary>
                        ///     Disable if:
                        ///     The target is not a hero. (Target check),
                        /// </summary>
                        if (Variables.Orbwalker.GetTarget() is Obj_AI_Hero &&
                            (Variables.Orbwalker.GetTarget() as Obj_AI_Hero).IsValidTarget())
                        {
                            /// <summary>
                            ///     Disable if:
                            ///     No enemies in explosion range from the target. (AOE Logic),
                            ///     Any hero in PowPow Range. (Range Logic).
                            /// </summary>
                            if (GameObjects.EnemyHeroes.Any(t => t.IsValidTarget(Vars.PowPow.Range)) &&
                                (Variables.Orbwalker.GetTarget() as Obj_AI_Hero).CountEnemyHeroesInRange(200f)
                                < 2)
                            {
                                Vars.Q.Cast();

                                //Console.WriteLine("ExorAIO: Jinx - Combo/Hybrid - Disabled.");
                                return;
                            }
                        }

                        break;

                    /// <summary>
                    ///     The Q Clear Disable Logics.
                    /// </summary>
                    case OrbwalkingMode.LaneClear:

                        /// <summary>
                        ///     Disable if:
                        ///     Doesn't respect the ManaManager Check, (Mana check).
                        ///     The Clear Option is disabled. (Option check).
                        /// </summary>
                        if (GameObjects.Player.ManaPercent
                            < ManaManager.GetNeededMana(Vars.W.Slot, Vars.Menu["spells"]["q"]["clear"]))
                        {
                            Vars.Q.Cast();

                            //Console.WriteLine("ExorAIO: Jinx - Clear - ManaManager or Option Disable.");
                            return;
                        }

                        if (!Vars.Menu["spells"]["q"]["clear"].GetValue <MenuSliderButton>().BValue)
                        {
                            return;
                        }

                        /// <summary>
                        ///     Disable if:
                        ///     The player has no Runaan's Hurricane or there is only 1 hittable Minion..
                        ///     And there are no killable minions in Q explosion range or the number of killable minions is less than 3 (Lane AoE Logic).
                        /// </summary>
                        if ((!Items.HasItem(3085) || Targets.Minions.Count < 2) &&
                            (!Targets.Minions.Any(
                                 m => Vars.GetRealHealth(m) < GameObjects.Player.GetAutoAttackDamage(m) * 1.1) ||
                             Targets.Minions.Count(
                                 m2 =>
                                 m2.Distance(
                                     Targets.Minions.First(
                                         m =>
                                         Vars.GetRealHealth(m) < GameObjects.Player.GetAutoAttackDamage(m) * 1.1))
                                 < 250f) < 3))
                        {
                            Vars.Q.Cast();

                            //Console.WriteLine("ExorAIO: Jinx - LaneClear - Disabled.");
                            return;
                        }

                        /// <summary>
                        ///     Disable if:
                        ///     There is at least 1 monster in PowPow Range.. (Jungle Range Logic).
                        ///     .. And less than 1 monster in explosion range from the monster target (Jungle AoE Logic).
                        /// </summary>
                        if (Targets.JungleMinions.Any(m => m.IsValidTarget(Vars.PowPow.Range)) &&
                            Targets.JungleMinions.Count(m2 => m2.Distance(Targets.JungleMinions[0]) < 250f) < 2)
                        {
                            Vars.Q.Cast();

                            //Console.WriteLine("ExorAIO: Jinx - JungleClear - Disabled.");
                            return;
                        }

                        break;

                    /// <summary>
                    ///     The Q LastHit Disable Logic.
                    /// </summary>
                    case OrbwalkingMode.LastHit:

                        /// <summary>
                        ///     Disable if:
                        ///     Doesn't respect the ManaManager Check, (Mana check).
                        ///     The LastHit Option is disabled. (Option check).
                        /// </summary>
                        if (GameObjects.Player.ManaPercent
                            < ManaManager.GetNeededMana(Vars.W.Slot, Vars.Menu["spells"]["q"]["lasthit"]))
                        {
                            Vars.Q.Cast();

                            //Console.WriteLine("ExorAIO: Jinx - LastHit - ManaManager or Option Disable.");
                            return;
                        }

                        if (!Vars.Menu["spells"]["q"]["lasthit"].GetValue <MenuSliderButton>().BValue)
                        {
                            return;
                        }

                        /// <summary>
                        ///     Disable if:
                        ///     No killable minion in FishBones Range. (LastHit Range Logic).
                        /// </summary>
                        if (
                            !Targets.Minions.Any(
                                m =>
                                !m.IsValidTarget(Vars.PowPow.Range) &&
                                m.Health < GameObjects.Player.GetAutoAttackDamage(m) * 1.1))
                        {
                            Vars.Q.Cast();

                            //Console.WriteLine("ExorAIO: Jinx - LastHit - Range Killable Disable.");
                            return;
                        }

                        if (
                            Targets.Minions.Any(
                                m =>
                                m.IsValidTarget(Vars.PowPow.Range) &&
                                m.Health < GameObjects.Player.GetAutoAttackDamage(m)))
                        {
                            Vars.Q.Cast();

                            //Console.WriteLine("ExorAIO: Jinx - LastHit - Normally Killable Disable.");
                            return;
                        }

                        break;

                    /// <summary>
                    ///     The General Q Disable Logic.
                    /// </summary>
                    default:
                        Vars.Q.Cast();

                        //Console.WriteLine("ExorAIO: Jinx - General - Disabled.");
                        break;
                    }
                }
            }

            /// <summary>
            ///     The Automatic E Logic.
            /// </summary>
            if (Vars.E.IsReady() && Vars.Menu["spells"]["e"]["logical"].GetValue <MenuBool>().Value)
            {
                foreach (var target in
                         GameObjects.EnemyHeroes.Where(
                             t =>
                             Bools.IsImmobile(t) && t.IsValidTarget(Vars.E.Range) &&
                             !Invulnerable.Check(t, DamageType.Magical, false)))
                {
                    Vars.E.Cast(target.ServerPosition);
                }
            }

            /// <summary>
            ///     The Automatic W Logic.
            /// </summary>
            if (Vars.W.IsReady() && !GameObjects.Player.IsUnderEnemyTurret() &&
                GameObjects.Player.CountEnemyHeroesInRange(Vars.Q.Range) < 3 &&
                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)))
                {
                    if (!Vars.W.GetPrediction(target).CollisionObjects.Any())
                    {
                        Vars.W.Cast(target.ServerPosition);
                    }
                }
            }

            /// <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) && t.IsValidTarget(Vars.R.Range) &&
                        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);
                }
            }
        }
Ejemplo 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 Automatic(EventArgs args)
        {
            if (GameObjects.Player.IsRecalling())
            {
                return;
            }

            /// <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)))
                {
                    if (!Vars.W.GetPrediction(target).CollisionObjects.Any())
                    {
                        Vars.W.Cast(Vars.W.GetPrediction(target).UnitPosition);
                    }
                }
            }

            /// <summary>
            ///     The Automatic E Logic.
            /// </summary>
            if (Vars.E.IsReady() &&
                GameObjects.Player.Spellbook.GetSpell(SpellSlot.E).Ammo
                >= (Vars.Menu["spells"]["e"]["logical"].GetValue <MenuBool>().Value ? 2 : 1) &&
                Vars.Menu["spells"]["e"]["vision"].GetValue <MenuBool>().Value)
            {
                foreach (var target in
                         GameObjects.EnemyHeroes.Where(
                             t =>
                             t.Distance(t.GetWaypoints().LastOrDefault()) < 1500 &&
                             NavMesh.IsWallOfGrass((Vector3)t.GetWaypoints().LastOrDefault(), 1)))
                {
                    Vars.E.Cast(target.GetWaypoints().LastOrDefault());
                }
            }

            /// <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(Vars.R.Range) &&
                    Vars.Menu["spells"]["r"]["whitelist"][t.ChampionName.ToLower()]
                    .GetValue <MenuBool>().Value).OrderBy(o => o.Health).FirstOrDefault();
                if (target != null)
                {
                    /// <summary>
                    ///     The E->R Logic.
                    /// </summary>
                    if (Vars.E.IsReady() && Vars.Menu["spells"]["e"]["logical"].GetValue <MenuBool>().Value)
                    {
                        Vars.E.Cast(Vars.E.GetPrediction(target).UnitPosition);
                    }

                    Vars.R.Cast(Vars.R.GetPrediction(target).UnitPosition);
                }
            }
        }
Ejemplo n.º 14
0
        /// <summary>
        ///     Fired when the game is updated.
        /// </summary>
        public void Automatic()
        {
            SpellClass.Q2.Range = SpellClass.Q.Range + 50f + 25f * SpellClass.Q.Level;

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

            Console.WriteLine($"Q Range: {SpellClass.Q.Range}, Distance: {ImplementationClass.IOrbwalker.GetOrbwalkingTarget()?.Distance(UtilityClass.Player)}");

            /// <summary>
            ///     The Force Pow Pow Logic.
            /// </summary>
            if (SpellClass.Q.Ready &&
                IsUsingFishBones() &&
                ImplementationClass.IOrbwalker.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.Distance(UtilityClass.Player) <= SpellClass.E.Range))
                {
                    SpellClass.E.Cast(target.ServerPosition);
                }
            }

            /// <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 <Obj_AI_Minion>().Where(m =>
                                                                                 m.IsEnemy &&
                                                                                 m.Distance(UtilityClass.Player) <= SpellClass.E.Range &&
                                                                                 m.ValidActiveBuffs().Any(b => b.Name.Equals("teleport_target"))))
                {
                    SpellClass.E.Cast(minion.ServerPosition);
                }
            }

            /// <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.ChampionName.ToLower()].As <MenuBool>().Enabled)
                                 .MinBy(o => o.GetRealHealth());
                if (bestTarget != null)
                {
                    SpellClass.R.Cast(bestTarget);
                }
            }
        }
Ejemplo n.º 15
0
        /// <summary>
        ///     Loads the range drawings.
        /// </summary>
        public static void Initialize()
        {
            if (GameObjects.Player.IsDead)
            {
                return;
            }

            Drawing.OnDraw += delegate
            {
                /// <summary>
                ///     Loads the Passive Target drawing.
                /// </summary>
                if (MissFortune.PassiveTarget.IsValidTarget() &&
                    Vars.Menu["drawings"]["p"].GetValue <MenuBool>().Value)
                {
                    Render.Circle.DrawCircle(
                        MissFortune.PassiveTarget.Position,
                        MissFortune.PassiveTarget.BoundingRadius,
                        Color.LightGreen,
                        1);
                }

                /// <summary>
                ///     Loads the Q Cone drawings.
                /// </summary>
                if (Vars.Q.IsReady() && Vars.Menu["drawings"]["qc"].GetValue <MenuBool>().Value)
                {
                    foreach (var obj in
                             ObjectManager.Get <Obj_AI_Base>()
                             .Where(m => !(m is Obj_AI_Turret) && m.IsValidTarget(Vars.Q.Range)))
                    {
                        var polygon = new Geometry.Sector(
                            (Vector2)obj.ServerPosition,
                            (Vector2)
                            obj.ServerPosition.Extend(
                                GameObjects.Player.ServerPosition,
                                -(Vars.Q2.Range - Vars.Q.Range)),
                            40f * (float)Math.PI / 180f,
                            Vars.Q2.Range - Vars.Q.Range - 50f);
                        var 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))));
                        if (target != null)
                        {
                            polygon.Draw(
                                !polygon.IsOutside((Vector2)target.ServerPosition) &&
                                !polygon.IsOutside(
                                    (Vector2)
                                    Movement.GetPrediction(
                                        target,
                                        GameObjects.Player.Distance(target) / Vars.Q.Speed + Vars.Q.Delay)
                                    .UnitPosition)
                                        ? Color.Green
                                        : Color.Red);
                        }
                    }
                }
            };
        }
Ejemplo 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 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)))
                {
                    if (!Vars.W.GetPrediction(target).CollisionObjects.Any())
                    {
                        Vars.W.Cast(Vars.W.GetPrediction(target).UnitPosition);
                    }
                }
            }

            /// <summary>
            ///     The Automatic E Logic.
            /// </summary>
            if (Vars.E.IsReady() &&
                Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.None) &&
                GameObjects.Player.CountEnemyHeroesInRange(1000f) == 0 &&
                GameObjects.Player.ManaPercent >
                ManaManager.GetNeededMana(Vars.E.Slot, Vars.getSliderItem(Vars.EMenu, "vision")) &&
                Vars.getSliderItem(Vars.EMenu, "vision") != 101)
            {
                if (GameObjects.EnemyHeroes.Any(
                        x =>
                        !x.IsDead &&
                        !x.IsVisible))
                {
                    if (GameObjects.Player.Spellbook.GetSpell(SpellSlot.E).Ammo >=
                        (Vars.getCheckBoxItem(Vars.EMenu, "logical") ? 2 : 1))
                    {
                        Vars.E.Cast(Vars.Locations
                                    .Where(d => GameObjects.Player.Distance(d) > 1500f)
                                    .OrderBy(d2 => GameObjects.Player.Distance(d2))
                                    .FirstOrDefault());
                    }
                }
            }

            /// <summary>
            ///     The E -> R Combo Logics.
            /// </summary>
            if (Vars.R.IsReady() &&
                Vars.getCheckBoxItem(Vars.RMenu, "bool") &&
                Vars.getKeyBindItem(Vars.RMenu, "key") &&
                !Invulnerable.Check(Targets.Target, DamageType.Magical, false) &&
                Vars.getCheckBoxItem(Vars.WhiteListMenu, Targets.Target.ChampionName.ToLower()))
            {
                if (!Vars.R.GetPrediction(Targets.Target).CollisionObjects.Any())
                {
                    if (Vars.E.IsReady() &&
                        Vars.getCheckBoxItem(Vars.EMenu, "logical"))
                    {
                        Vars.E.Cast(Vars.E.GetPrediction(Targets.Target).UnitPosition);
                    }

                    Vars.R.Cast(Vars.R.GetPrediction(Targets.Target).UnitPosition);
                }
            }
        }
Ejemplo n.º 17
0
        /// <summary>
        ///     Called on tick update.
        /// </summary>
        public void Combo()
        {
            if (BallPosition == null)
            {
                return;
            }

            /// <summary>
            ///     The W Combo Logic.
            /// </summary>
            if (SpellClass.W.Ready &&
                MenuClass.Spells["w"]["combo"].As <MenuBool>().Enabled)
            {
                if (GameObjects.EnemyHeroes.Any(t =>
                                                !Invulnerable.Check(t, DamageType.Magical, false) &&
                                                t.IsValidTarget(SpellClass.W.Width - t.BoundingRadius - SpellClass.W.Delay * t.BoundingRadius, false, false, (Vector3)BallPosition)))
                {
                    SpellClass.W.Cast();
                }
            }

            /// <summary>
            ///     The E Logics.
            /// </summary>
            if (SpellClass.E.Ready)
            {
                /// <summary>
                ///     The E Engager Logic.
                /// </summary>
                if (MenuClass.Spells["r"]["aoe"] != null &&
                    MenuClass.Spells["r"]["aoe"].As <MenuSliderBool>().Enabled&&
                    MenuClass.Spells["e"]["engager"].As <MenuBool>().Enabled)
                {
                    var bestAllies = GameObjects.AllyHeroes
                                     .Where(a =>
                                            !a.IsMe &&
                                            a.IsValidTarget(SpellClass.E.Range, true) &&
                                            MenuClass.Spells["e"]["engagerswhitelist"][a.ChampionName.ToLower()].As <MenuBool>().Enabled);

                    var bestAlly = bestAllies
                                   .FirstOrDefault(a =>
                                                   GameObjects.EnemyHeroes.Count(t =>
                                                                                 !Invulnerable.Check(t, DamageType.Magical, false) &&
                                                                                 t.IsValidTarget(SpellClass.R.Width - t.BoundingRadius - SpellClass.R.Delay * t.BoundingRadius, false, false, a.ServerPosition)) >= MenuClass.Spells["r"]["aoe"].As <MenuSliderBool>().Value);

                    if (bestAlly != null)
                    {
                        UtilityClass.CastOnUnit(SpellClass.E, bestAlly);
                    }
                }

                /// <summary>
                ///     The E Combo Logic.
                /// </summary>
                if (MenuClass.Spells["e"]["combo"].As <MenuBool>().Enabled)
                {
                    var bestAllies = GameObjects.AllyHeroes
                                     .Where(a =>
                                            a.IsValidTarget(SpellClass.E.Range, true) &&
                                            MenuClass.Spells["e"]["combowhitelist"][a.ChampionName.ToLower()].As <MenuBool>().Enabled)
                                     .OrderBy(o => o.GetRealHealth());

                    foreach (var ally in bestAllies)
                    {
                        var allyToBallRectangle = new Vector2Geometry.Rectangle(
                            (Vector2)ally.ServerPosition,
                            (Vector2)ally.ServerPosition.Extend((Vector3)BallPosition, ally.Distance((Vector3)BallPosition) + 30f),
                            SpellClass.E.Width);

                        if (GameObjects.EnemyHeroes.Any(t =>
                                                        t.IsValidTarget() &&
                                                        !Invulnerable.Check(t, DamageType.Magical) &&
                                                        allyToBallRectangle.IsInside((Vector2)t.ServerPosition)))
                        {
                            UtilityClass.CastOnUnit(SpellClass.E, ally);
                            return;
                        }
                    }
                }
            }

            /// <summary>
            ///     The Combo Q Logic.
            /// </summary>
            if (SpellClass.Q.Ready &&
                MenuClass.Spells["q"]["combo"].As <MenuBool>().Enabled)
            {
                var bestTarget = Extensions.GetBestEnemyHeroTargetInRange(SpellClass.Q.Range);
                if (bestTarget != null)
                {
                    if (SpellClass.E.Ready &&
                        !UtilityClass.Player.HasBuff("orianaghostself") &&
                        bestTarget.Distance((Vector3)BallPosition) >= bestTarget.Distance(UtilityClass.Player) &&
                        MenuClass.E2["gaine"].As <MenuBool>().Enabled)
                    {
                        UtilityClass.CastOnUnit(SpellClass.E, UtilityClass.Player);
                        return;
                    }

                    SpellClass.Q.GetPredictionInput(bestTarget).From = (Vector3)BallPosition;
                    SpellClass.Q.Cast(SpellClass.Q.GetPrediction(bestTarget).CastPosition);
                }
            }
        }
Ejemplo n.º 18
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.Menu["spells"]["q"]["killsteal"].GetValue <MenuBool>().Value)
            {
                foreach (var target in
                         GameObjects.EnemyHeroes.Where(
                             t =>
                             t.IsValidTarget(Vars.Q.Range - 100f) && !Invulnerable.Check(t, DamageType.Magical, false) &&
                             Vars.GetRealHealth(t) < (float)GameObjects.Player.GetSpellDamage(t, SpellSlot.Q)))
                {
                    if (!Vars.Q.GetPrediction(target).CollisionObjects.Any())
                    {
                        Vars.Q.Cast(Vars.Q.GetPrediction(target).UnitPosition);
                    }
                    else if (
                        Vars.Q.GetPrediction(target)
                        .CollisionObjects.Count(
                            c =>
                            Targets.Minions.Contains(c) &&
                            c.Health < (float)GameObjects.Player.GetSpellDamage(c, SpellSlot.Q))
                        == Vars.Q.GetPrediction(target).CollisionObjects.Count(c => Targets.Minions.Contains(c)))
                    {
                        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 - 150f) && !Invulnerable.Check(t, DamageType.Magical, false) &&
                             Vars.GetRealHealth(t) < (float)GameObjects.Player.GetSpellDamage(t, SpellSlot.W)))
                {
                    Vars.W.Cast(Vars.W.GetPrediction(target).CastPosition);
                }
            }

            /// <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 =>
                             t.IsValidTarget(Vars.R.Range) && !Invulnerable.Check(t, DamageType.Magical, false) &&
                             Vars.GetRealHealth(t) > (float)GameObjects.Player.GetSpellDamage(t, SpellSlot.Q) &&
                             Vars.GetRealHealth(t) < (float)GameObjects.Player.GetSpellDamage(t, SpellSlot.R)))
                {
                    Vars.R.CastOnUnit(target);
                }
            }
        }
Ejemplo n.º 19
0
        private static void KillSteal()
        {
            if (getCheckBoxItem(ksMenu, "Q") && Q.IsReady())
            {
                if (IsDashing)
                {
                    if (CanCastQCir)
                    {
                        var targets = GetQCirTarget.Where(i => i.Health + i.AttackShield <= GetQDmg(i)).ToList();
                        if (CastQCir(targets))
                        {
                            return;
                        }
                    }
                }
                else
                {
                    var target = !haveQ3?Q.GetTarget(Q.Width / 2) : Q2.GetTarget(Q2.Width / 2);

                    if (target != null && target.Health + target.AttackShield <= GetQDmg(target))
                    {
                        if (!haveQ3)
                        {
                            if (Q.Casting(target).IsCasted())
                            {
                                return;
                            }
                        }
                        else if (Q2.Casting(target, false, LeagueSharp.SDK.CollisionableObjects.YasuoWall).IsCasted())
                        {
                            return;
                        }
                    }
                }
            }
            if (getCheckBoxItem(ksMenu, "E") && E.IsReady())
            {
                var targets = EntityManager.Heroes.Enemies.Where(i => !HaveE(i) && E.IsInRange(i)).ToList();
                if (targets.Count > 0)
                {
                    var target = targets.FirstOrDefault(i => i.Health + i.MagicShield <= GetEDmg(i));
                    if (target != null)
                    {
                        if (E.CastOnUnit(target))
                        {
                            lastE = Variables.TickCount;
                            return;
                        }
                    }
                    else if (getCheckBoxItem(ksMenu, "Q") && Q.IsReady(50))
                    {
                        target = targets.Where(i => i.Distance(GetPosAfterDash(i)) < Q3.Range).FirstOrDefault(
                            i =>
                        {
                            var dmgE = GetEDmg(i) - i.MagicShield;
                            return(i.Health - (dmgE > 0 ? dmgE : 0) + i.AttackShield <= GetQDmg(i));
                        });
                        if (target != null && E.CastOnUnit(target))
                        {
                            lastE = Variables.TickCount;
                            return;
                        }
                    }
                }
            }
            if (getCheckBoxItem(ksMenu, "R") && R.IsReady())
            {
                var targets = GetRTarget;
                if (targets.Count > 0)
                {
                    var target =
                        targets.Where(
                            i =>
                            getCheckBoxItem(ksMenu, "RCast" + i.NetworkId) &&
                            (i.Health + i.AttackShield <= R.GetDamage(i) ||
                             (Q.IsReady(1000) && i.Health + i.AttackShield <= R.GetDamage(i) + GetQDmg(i))) &&
                            !Invulnerable.Check(i, R.DamageType))
                        .MaxOrDefault(i => new Priority().GetDefaultPriority(i));
                    if (target != null)
                    {
                        R.CastOnUnit(target);
                    }
                }
            }
        }
Ejemplo n.º 20
0
 /// <summary>
 ///     Called on do-cast.
 /// </summary>
 /// <param name="sender">The sender.</param>
 /// <param name="args">The args.</param>
 public static void Weaving(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
 {
     if (!(args.Target is Obj_AI_Hero) || Invulnerable.Check((Obj_AI_Hero)args.Target))
     {
     }
 }
        public static bool IsInvulnerable(Obj_AI_Base target, DamageType damageType, bool ignoreShields = true)
        {
            var hero = target as Obj_AI_Hero;

            return(hero != null && Invulnerable.Check(hero, damageType, ignoreShields));
        }
Ejemplo 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(Obj_AI_Hero 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)
            {
                var enabledOption = MenuClass.Gapcloser["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;
                }

                switch (args.Type)
                {
                case Gapcloser.Type.Targeted:
                    if (args.Target.IsMe)
                    {
                        var targetPos = UtilityClass.Player.ServerPosition.Extend(args.StartPosition, -SpellClass.Q.Range + UtilityClass.Player.AttackRange);
                        if (targetPos.PointUnderEnemyTurret())
                        {
                            return;
                        }

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

                default:
                    var targetPos2 = UtilityClass.Player.ServerPosition.Extend(args.EndPosition, -SpellClass.Q.Range + UtilityClass.Player.AttackRange);
                    if (targetPos2.PointUnderEnemyTurret())
                    {
                        return;
                    }

                    if (args.EndPosition.Distance(UtilityClass.Player.ServerPosition) <= UtilityClass.Player.AttackRange)
                    {
                        SpellClass.Q.Cast(targetPos2);
                    }
                    break;
                }
            }

            /// <summary>
            ///     The Anti-Gapcloser E.
            /// </summary>
            if (SpellClass.E.Ready &&
                !Invulnerable.Check(sender, DamageType.Magical, false))
            {
                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 (args.Target.IsMe)
                    {
                        UtilityClass.CastOnUnit(SpellClass.E, sender);
                    }
                    break;

                default:
                    if (args.EndPosition.Distance(UtilityClass.Player.ServerPosition) <= UtilityClass.Player.AttackRange)
                    {
                        UtilityClass.CastOnUnit(SpellClass.E, sender);
                    }
                    break;
                }
            }
        }
Ejemplo n.º 23
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 R Clear Logic.
            /// </summary>
            if (Vars.R.IsReady() &&
                GameObjects.Player.Spellbook.GetSpell(SpellSlot.R).ToggleState == 1 &&
                GameObjects.Player.ManaPercent >
                ManaManager.GetNeededMana(Vars.R.Slot, Vars.getSliderItem(Vars.RMenu, "clear")) &&
                Vars.getSliderItem(Vars.RMenu, "clear") != 101)
            {
                /// <summary>
                ///     The R LaneClear Logic.
                /// </summary>
                if (Vars.R.GetCircularFarmLocation(Targets.Minions).MinionsHit >= 3)
                {
                    Vars.R.Cast(Vars.R.GetCircularFarmLocation(Targets.Minions).Position);
                }

                /// <summary>
                ///     The R JungleClear Logic.
                /// </summary>
                else if (Targets.JungleMinions.Any())
                {
                    Vars.R.Cast(Targets.JungleMinions[0].ServerPosition);
                }
                return;
            }

            /// <summary>
            ///     The Q Clear Logic.
            /// </summary>
            if (Vars.Q.IsReady() &&
                GameObjects.Player.Spellbook.GetSpell(SpellSlot.Q).ToggleState == 1 &&
                GameObjects.Player.ManaPercent >
                ManaManager.GetNeededMana(Vars.Q.Slot, Vars.getSliderItem(Vars.QMenu, "clear")) &&
                Vars.getSliderItem(Vars.QMenu, "clear") != 101)
            {
                /// <summary>
                ///     The Q JungleClear Logic.
                /// </summary>
                if (Targets.JungleMinions.Any())
                {
                    Vars.Q.Cast(Targets.JungleMinions[0].ServerPosition);
                }

                /// <summary>
                ///     The LaneClear Q Logics.
                /// </summary>
                else
                {
                    /// <summary>
                    ///     The Aggressive LaneClear Q Logic.
                    /// </summary>
                    if (GameObjects.EnemyHeroes.Any(
                            t =>
                            t.LSIsValidTarget(Vars.Q.Range) &&
                            !Invulnerable.Check(t, DamageType.Magical, false)))
                    {
                        if (Vars.Q.GetLineFarmLocation(Targets.Minions, Vars.Q.Width * 2 - 10f).MinionsHit >= 3 &&
                            !new Geometry.Rectangle(
                                GameObjects.Player.ServerPosition,
                                GameObjects.Player.ServerPosition.LSExtend(
                                    Targets.Minions[0].ServerPosition, Vars.Q.Range),
                                Vars.Q.Width * 2 - 10f).IsOutside((Vector2)Vars.Q.GetPrediction(
                                                                      GameObjects.EnemyHeroes.FirstOrDefault(
                                                                          t =>
                                                                          !Invulnerable.Check(t) &&
                                                                          t.LSIsValidTarget(Vars.Q.Range))).CastPosition))
                        {
                            Vars.Q.Cast(Vars.Q.GetLineFarmLocation(Targets.Minions, Vars.Q.Width * 2 - 10f).Position);
                        }
                    }

                    /// <summary>
                    ///     The LaneClear Q Logic.
                    /// </summary>
                    else if (!GameObjects.EnemyHeroes.Any(
                                 t =>
                                 !Invulnerable.Check(t) &&
                                 t.LSIsValidTarget(Vars.Q.Range + 100)))
                    {
                        if (Vars.Q.GetCircularFarmLocation(Targets.Minions, Vars.Q.Width * 2 - 10f).MinionsHit >= 3)
                        {
                            Vars.Q.Cast(Vars.Q.GetCircularFarmLocation(Targets.Minions, Vars.Q.Width * 2 - 10f).Position);
                        }
                    }
                }
            }
        }
Ejemplo 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 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.Count >= 2)
                    {
                        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;
                }
            }
        }
Ejemplo n.º 25
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(GameObjects.Player.GetRealAutoAttackRange()))
            {
                return;
            }

            /// <summary>
            ///     The W Combo Logic.
            /// </summary>
            if (Vars.W.IsReady() && GameObjects.EnemyHeroes.Any(t => t.IsValidTarget(Vars.W.Range)) &&
                Vars.Menu["spells"]["w"]["combo"].GetValue <MenuBool>().Value)
            {
                Vars.W.Cast();
            }
            if (!Targets.Target.IsValidTarget() ||
                Targets.Target.IsValidTarget(GameObjects.Player.GetRealAutoAttackRange()) ||
                Invulnerable.Check(Targets.Target, DamageType.Magical, false))
            {
                return;
            }

            /// <summary>
            ///     The Q Combo Logic.
            /// </summary>
            if (Vars.Q.IsReady() && Targets.Target.IsValidTarget(Vars.Q.Range))
            {
                Vars.Q.Cast(Vars.Q.GetPrediction(Targets.Target).CastPosition);
            }

            /// <summary>
            ///     The R Logics.
            /// </summary>
            if (Vars.R.IsReady())
            {
                /// <summary>
                ///     The R Combo Logics.
                /// </summary>
                if (Targets.Target.IsValidTarget(Vars.R.Range) &&
                    Vars.Menu["spells"]["r"]["combo"].GetValue <MenuBool>().Value)
                {
                    /// <summary>
                    ///     The R Normal Combo Logic.
                    /// </summary>
                    if (Targets.Target.HasBuff("dianamoonlight") &&
                        Vars.Menu["spells"]["r"]["whitelist"][Targets.Target.ChampionName.ToLower()]
                        .GetValue <MenuBool>().Value)
                    {
                        if (!Targets.Target.IsUnderEnemyTurret() ||
                            Vars.GetRealHealth(Targets.Target)
                            < (float)GameObjects.Player.GetSpellDamage(Targets.Target, SpellSlot.Q) * 2
                            + (float)GameObjects.Player.GetSpellDamage(Targets.Target, SpellSlot.R) * 2 ||
                            !Vars.Menu["miscellaneous"]["safe"].GetValue <MenuBool>().Value)
                        {
                            Vars.R.CastOnUnit(Targets.Target);
                            return;
                        }
                    }

                    /// <summary>
                    ///     The Second R Combo Logic.
                    /// </summary>
                    if (!Vars.Q.IsReady() && !Targets.Target.HasBuff("dianamoonlight") &&
                        Vars.Menu["miscellaneous"]["rcombo"].GetValue <MenuBool>().Value &&
                        Vars.Menu["spells"]["r"]["whitelist"][Targets.Target.ChampionName.ToLower()]
                        .GetValue <MenuBool>().Value)
                    {
                        DelayAction.Add(
                            1000,
                            () =>
                        {
                            if (!Vars.Q.IsReady() && !Targets.Target.HasBuff("dianamoonlight"))
                            {
                                Vars.R.CastOnUnit(Targets.Target);
                            }
                        });
                    }
                }

                /// <summary>
                ///     The R Gapclose Logic.
                /// </summary>
                else if (Targets.Target.IsValidTarget(Vars.Q.Range * 2) &&
                         !Targets.Target.IsValidTarget(Vars.Q.Range + 200) &&
                         Vars.Menu["miscellaneous"]["gapclose"].GetValue <MenuBool>().Value)
                {
                    if (
                        Targets.Minions.Any(
                            m =>
                            m.IsValidTarget(Vars.Q.Range) && m.Distance(Targets.Target) < Vars.Q.Range &&
                            Vars.GetRealHealth(m) > (float)GameObjects.Player.GetSpellDamage(m, SpellSlot.Q)))
                    {
                        Vars.Q.Cast(
                            Targets.Minions.Where(
                                m =>
                                m.IsValidTarget(Vars.Q.Range) && m.Distance(Targets.Target) < Vars.Q.Range &&
                                Vars.GetRealHealth(m) > (float)GameObjects.Player.GetSpellDamage(m, SpellSlot.Q))
                            .OrderBy(o => o.DistanceToPlayer())
                            .Last());
                    }
                    if (
                        Targets.Minions.Any(
                            m =>
                            m.HasBuff("dianamoonlight") && m.IsValidTarget(Vars.R.Range) &&
                            m.Distance(Targets.Target) < Vars.Q.Range))
                    {
                        Vars.R.CastOnUnit(
                            Targets.Minions.Where(
                                m =>
                                m.HasBuff("dianamoonlight") && m.IsValidTarget(Vars.R.Range) &&
                                m.Distance(Targets.Target) < Vars.Q.Range)
                            .OrderBy(o => o.DistanceToPlayer())
                            .Last());
                    }
                }
            }

            if (Vars.Q.IsReady() && Vars.R.IsReady())
            {
                return;
            }

            /// <summary>
            ///     The Automatic E Logic.
            /// </summary>
            if (Vars.E.IsReady() && !Targets.Target.IsValidTarget(GameObjects.Player.GetRealAutoAttackRange()) &&
                Targets.Target.IsValidTarget(Vars.E.Range - 25) &&
                Vars.Menu["spells"]["e"]["logical"].GetValue <MenuBool>().Value)
            {
                Vars.E.Cast();
            }
        }
Ejemplo n.º 26
0
        /// <summary>
        ///     Called on post attack.
        /// </summary>
        /// <param name="args">The <see cref="OnPostAttackEventArgs" /> instance containing the event data.</param>
        public void Weaving(OnPostAttackEventArgs args)
        {
            var heroTarget = args.Target as AIHeroClient;

            if (heroTarget == null)
            {
                return;
            }

            /// <summary>
            ///     The Q Weaving Logic.
            /// </summary>
            if (SpellClass.Q.Ready &&
                MenuClass.Q["combo"].Enabled)
            {
                if (heroTarget.GetBuffCount("vaynesilvereddebuff") != 1 &&
                    MenuClass.Q["customization"]["wstacks"].Enabled)
                {
                    return;
                }

                if (UtilityClass.Player.Distance(Hud.CursorPositionUnclipped) <=
                    UtilityClass.Player.GetAutoAttackRange() &&
                    MenuClass.Q["customization"]["onlyqifmouseoutaarange"].Enabled)
                {
                    return;
                }

                var posAfterQ   = UtilityClass.Player.Position.Extend(Hud.CursorPositionUnclipped, 300f);
                var qRangeCheck = MenuClass.Q["customization"]["qrangecheck"];
                if (qRangeCheck != null)
                {
                    if (qRangeCheck.Enabled &&
                        posAfterQ.EnemyHeroesCount(UtilityClass.Player.GetAutoAttackRange() +
                                                   UtilityClass.Player.BoundingRadius) >= qRangeCheck.Value)
                    {
                        return;
                    }
                }

                if (posAfterQ.Distance(heroTarget) >
                    UtilityClass.Player.GetAutoAttackRange(heroTarget) &&
                    MenuClass.Q["customization"]["noqoutaarange"].Enabled)
                {
                    return;
                }

                if (posAfterQ.IsUnderEnemyTurret() &&
                    MenuClass.Q["customization"]["noqturret"].Enabled)
                {
                    return;
                }

                SpellClass.Q.Cast(Hud.CursorPositionUnclipped);
            }

            if (heroTarget.IsZombie())
            {
                return;
            }

            /// <summary>
            ///     The E KillSteal Weaving Logic.
            /// </summary>
            if (SpellClass.E.Ready &&
                !Invulnerable.Check(heroTarget) &&
                heroTarget.IsValidTarget(SpellClass.E.Range + heroTarget.BoundingRadius) &&
                MenuClass.E["killsteal"].Enabled)
            {
                var shouldIncludeWDamage = heroTarget.GetBuffCount("vaynesilvereddebuff") == 1;
                if (UtilityClass.Player.GetAutoAttackDamage(heroTarget) + GetEDamage(heroTarget) +
                    (shouldIncludeWDamage ? GetWDamage(heroTarget) : 0) >=
                    heroTarget.GetRealHealth(DamageType.Physical))
                {
                    SpellClass.E.CastOnUnit(heroTarget);
                }
            }
        }
Ejemplo n.º 27
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 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)))
                {
                    if (!Vars.Q.GetPrediction(Targets.Target).CollisionObjects.Any(c => Targets.Minions.Contains(c)))
                    {
                        Vars.Q.Cast(target.ServerPosition);
                    }
                }
            }

            /// <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(target.ServerPosition);
                }
            }

            /// <summary>
            ///     The Automatic R Logic.
            /// </summary>
            if (Vars.R.IsReady() &&
                GameObjects.Player.ManaPercent >
                ManaManager.GetNeededMana(Vars.R.Slot, Vars.getSliderItem(Vars.RMenu, "logical")) &&
                Vars.getCheckBoxItem(Vars.RMenu, "logicalC") &&
                Vars.getSliderItem(Vars.RMenu, "logical") >
                GameObjects.Player.GetBuffCount("kogmawlivingartillerycost"))
            {
                foreach (var target in GameObjects.EnemyHeroes.Where(
                             t =>
                             Bools.IsImmobile(t) &&
                             t.HealthPercent < 50 &&
                             !Invulnerable.Check(t) &&
                             t.LSIsValidTarget(Vars.R.Range)))
                {
                    Vars.R.Cast(target.ServerPosition);
                }
            }
        }
Ejemplo n.º 28
0
        /// <summary>
        ///     Initializes the menus.
        /// </summary>
        public void Drawings()
        {
            /// <summary>
            ///     Loads the Q drawing.
            /// </summary>
            if (SpellClass.Q.Ready)
            {
                /// <summary>
                ///     Loads the Q drawing.
                /// </summary>
                if (MenuClass.Drawings["q"].As <MenuBool>().Enabled)
                {
                    Render.Circle(UtilityClass.Player.Position, SpellClass.Q.Range, 30, Color.LightGreen);
                }

                /// <summary>
                ///     Loads the Extended Q drawing.
                /// </summary>
                if (MenuClass.Drawings["qcone"].As <MenuBool>().Enabled)
                {
                    var unitsToIterate = Extensions.GetAllGenericUnitTargetsInRange(SpellClass.Q.Range);
                    foreach (var obj in unitsToIterate)
                    {
                        var polygon = this.QCone(obj);
                        foreach (var target in Extensions.GetBestEnemyHeroesTargetsInRange(SpellClass.Q2.Range).Where(t =>
                                                                                                                      !Invulnerable.Check(t) &&
                                                                                                                      t.IsValidTarget(SpellClass.Q2.Range)))
                        {
                            polygon.Draw(
                                polygon.IsInside((Vector2)target.ServerPosition) &&
                                (target.NetworkId == this.LoveTapTargetNetworkId || GameObjects.EnemyMinions.All(m => polygon.IsOutside((Vector2)m.ServerPosition))) &&
                                polygon.IsInside((Vector2)SpellClass.Q.GetPrediction(target).CastPosition)
                                    ? Color.Green
                                    : Color.Red);
                        }
                    }
                }
            }

            /// <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 &&
                MenuClass.Drawings["r"].As <MenuBool>().Enabled)
            {
                Render.Circle(UtilityClass.Player.Position, SpellClass.R.Range, 30, Color.Red);
            }

            /// <summary>
            ///     Loads the Passive drawing.
            /// </summary>
            if (MenuClass.Drawings["passivetarget"].As <MenuBool>().Enabled)
            {
                var target = ObjectManager.Get <Obj_AI_Base>().FirstOrDefault(u => u.NetworkId == this.LoveTapTargetNetworkId);
                if (target != null)
                {
                    Render.Circle(target.Position, target.BoundingRadius, 30, Color.Black);
                }
            }
        }
Ejemplo n.º 29
0
        /// <summary>
        ///     Called on do-cast.
        /// </summary>
        /// <param name="sender">The sender.</param>
        /// <param name="args">The <see cref="GameObjectProcessSpellCastEventArgs" /> instance containing the event data.</param>
        public static void Clear(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
        {
            if (Bools.HasSheenBuff())
            {
                return;
            }

            /// <summary>
            ///     The Clear W Logic.
            /// </summary>
            if (Vars.W.IsReady())
            {
                /// <summary>
                ///     The JungleClear W Logic.
                /// </summary>
                if (Targets.JungleMinions.Any() &&
                    GameObjects.Player.ManaPercent
                    > ManaManager.GetNeededMana(Vars.W.Slot, Vars.Menu["spells"]["w"]["jungleclear"]) &&
                    Vars.Menu["spells"]["w"]["jungleclear"].GetValue <MenuSliderButton>().BValue)
                {
                    Vars.W.Cast();
                }

                /// <summary>
                ///     The LaneClear W Logic.
                /// </summary>
                ///
                else if (Targets.Minions.Any() &&
                         GameObjects.Player.ManaPercent
                         > ManaManager.GetNeededMana(Vars.W.Slot, Vars.Menu["spells"]["w"]["laneclear"]) &&
                         Vars.Menu["spells"]["w"]["laneclear"].GetValue <MenuSliderButton>().BValue)
                {
                    if (Vars.Q.GetLineFarmLocation(Targets.Minions, Vars.Q.Width).MinionsHit >= 3)
                    {
                        Vars.W.Cast();
                    }
                }
                return;
            }

            /// <summary>
            ///     The Clear Q Logics.
            /// </summary>
            if (Vars.Q.IsReady())
            {
                /// <summary>
                ///     The JungleClear Q Logic.
                /// </summary>
                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);
                }

                /// <summary>
                ///     The LaneClear Q Logics.
                /// </summary>
                else 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);
                        }
                    }
                }
            }
        }
Ejemplo 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 Harass(EventArgs args)
        {
            if (!Targets.Target.LSIsValidTarget() ||
                Invulnerable.Check(Targets.Target, DamageType.Magical))
            {
                return;
            }

            /// <summary>
            ///     The Harass E Logic.
            /// </summary>
            if (!Targets.Target.HasBuff("RyzeE"))
            {
                if (Vars.E.IsReady() &&
                    GameObjects.Player.ManaPercent >
                    ManaManager.GetNeededMana(Vars.E.Slot, Vars.getSliderItem(Vars.EMenu, "harass")) &&
                    Vars.getSliderItem(Vars.EMenu, "harass") != 101)
                {
                    if (Targets.Target.LSIsValidTarget(Vars.E.Range))
                    {
                        Vars.E.CastOnUnit(Targets.Target);
                    }
                    else
                    {
                        foreach (var minion in Targets.Minions.Where(
                                     m =>
                                     !m.HasBuff("RyzeE") &&
                                     m.LSIsValidTarget(Vars.E.Range) &&
                                     (m.Distance(Targets.Target) < 200 ||
                                      Targets.Minions.Any(
                                          m2 =>
                                          m2.HasBuff("RyzeE") &&
                                          m2.Distance(m) < 200 &&
                                          m2.Distance(Targets.Target) < 200))))
                        {
                            Vars.E.CastOnUnit(minion);
                        }
                    }
                }
            }

            /// <summary>
            ///     The Harass Q Logic.
            /// </summary>
            else
            {
                if (Vars.Q.IsReady() &&
                    GameObjects.Player.ManaPercent >
                    ManaManager.GetNeededMana(Vars.Q.Slot, Vars.getSliderItem(Vars.QMenu, "harass")) &&
                    Vars.getSliderItem(Vars.QMenu, "harass") != 101)
                {
                    if (Targets.Target.LSIsValidTarget(Vars.Q.Range) &&
                        !Vars.Q.GetPrediction(Targets.Target).CollisionObjects.Any())
                    {
                        Vars.Q.Cast(Vars.Q.GetPrediction(Targets.Target).UnitPosition);
                    }
                    else
                    {
                        foreach (var minion in Targets.Minions.Where(
                                     m =>
                                     m.HasBuff("RyzeE") &&
                                     m.LSIsValidTarget(Vars.Q.Range) &&
                                     (m.Distance(Targets.Target) < 200 ||
                                      Targets.Minions.Any(
                                          m2 =>
                                          m2.HasBuff("RyzeE") &&
                                          m2.Distance(m) < 200 &&
                                          m2.Distance(Targets.Target) < 200))))
                        {
                            Vars.Q.Cast(minion.ServerPosition);
                        }
                    }
                }
            }
        }