Exemplo n.º 1
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 Spells(EventArgs args)
        {
            if (!Vars.getCheckBoxItem(Vars.TypesMenu, "spells"))
            {
                return;
            }

            /// <summary>
            ///     The Remove Scurvy Logic.
            /// </summary>
            if (GameObjects.Player.ChampionName.Equals("Gangplank"))
            {
                if (Vars.W.IsReady() &&
                    Bools.ShouldCleanse(GameObjects.Player))
                {
                    DelayAction.Add(Vars.Delay, () =>
                    {
                        Vars.W.Cast();
                    });
                }
            }

            /// <summary>
            ///     The Cleanse Logic.
            /// </summary>
            if (SpellSlots.Cleanse.IsReady())
            {
                if (Bools.ShouldCleanse(GameObjects.Player))
                {
                    DelayAction.Add(Vars.Delay, () =>
                    {
                        GameObjects.Player.Spellbook.CastSpell(SpellSlots.Cleanse);
                    });
                }
            }

            /// <summary>
            ///     The Clarity Logic.
            /// </summary>
            if (SpellSlots.Clarity.IsReady())
            {
                if (GameObjects.AllyHeroes.Count(a => a.ManaPercent <= 60) >= 3)
                {
                    GameObjects.Player.Spellbook.CastSpell(SpellSlots.Clarity);
                }
            }

            /// <summary>
            ///     The Ignite Logic.
            /// </summary>
            if (SpellSlots.Ignite.IsReady())
            {
                foreach (var target in GameObjects.EnemyHeroes.Where(t => t.LSIsValidTarget(600f)))
                {
                    if (Vars.GetIgniteDamage > target.Health ||
                        Health.GetPrediction(target, (int)(1000 + Game.Ping / 2f)) <= 0)
                    {
                        GameObjects.Player.Spellbook.CastSpell(SpellSlots.Ignite, target);
                    }
                }
            }

            /// <summary>
            ///     The Barrier Logic.
            /// </summary>
            if (SpellSlots.Barrier.IsReady())
            {
                if (GameObjects.Player.CountEnemyHeroesInRange(700f) > 0 &&
                    Health.GetPrediction(GameObjects.Player, (int)(1000 + Game.Ping / 2f)) <= GameObjects.Player.MaxHealth / 6)
                {
                    GameObjects.Player.Spellbook.CastSpell(SpellSlots.Barrier);
                    return;
                }
            }

            /// <summary>
            ///     The Heal Logic.
            /// </summary>
            if (SpellSlots.Heal.IsReady())
            {
                if (GameObjects.Player.CountEnemyHeroesInRange(850f) > 0 &&
                    Health.GetPrediction(GameObjects.Player, (int)(1000 + Game.Ping / 2f)) <= GameObjects.Player.MaxHealth / 6)
                {
                    GameObjects.Player.Spellbook.CastSpell(SpellSlots.Heal);
                }
            }
            else
            {
                foreach (var ally in GameObjects.AllyHeroes.Where(
                             a =>
                             a.LSIsValidTarget(850f, false) &&
                             a.CountEnemyHeroesInRange(850f) > 0 &&
                             Health.GetPrediction(a, (int)(1000 + Game.Ping / 2f)) <= a.MaxHealth / 6))
                {
                    GameObjects.Player.Spellbook.CastSpell(SpellSlots.Heal, ally);
                }
            }


            /// <summary>
            ///     The Smite Logics.
            /// </summary>
            if (Vars.Smite.IsReady() &&
                Vars.Smite.Slot != SpellSlot.Unknown)
            {
                if (!Vars.getKeyBindItem(Vars.KeysMenu, "smite"))
                {
                    return;
                }

                /// <summary>
                ///     The Combo Smite Logic.
                /// </summary>
                if (Vars.getCheckBoxItem(Vars.SmiteMiscMenu, "combo"))
                {
                    if (Orbwalker.LastTarget as AIHeroClient != null)
                    {
                        Vars.Smite.CastOnUnit(Orbwalker.LastTarget as AIHeroClient);
                    }
                }

                /// <summary>
                ///     The Killsteal Smite Logic.
                /// </summary>
                if (Vars.getCheckBoxItem(Vars.SmiteMiscMenu, "killsteal"))
                {
                    if (GameObjects.Player.HasBuff("smitedamagetrackerstalker") ||
                        GameObjects.Player.HasBuff("smitedamagetrackerskirmisher"))
                    {
                        if (Vars.getCheckBoxItem(Vars.SmiteMiscMenu, "stacks"))
                        {
                            if (GameObjects.Player.Spellbook.GetSpell(Vars.Smite.Slot).Ammo == 1)
                            {
                                return;
                            }
                        }

                        foreach (var target in GameObjects.EnemyHeroes.Where(t => t.LSIsValidTarget(Vars.Smite.Range)))
                        {
                            if (Vars.GetChallengingSmiteDamage > target.Health &&
                                GameObjects.Player.HasBuff("smitedamagetrackerstalker"))
                            {
                                Vars.Smite.CastOnUnit(target);
                            }
                            else if (Vars.GetChallengingSmiteDamage > target.Health &&
                                     GameObjects.Player.HasBuff("smitedamagetrackerskirmisher"))
                            {
                                Vars.Smite.CastOnUnit(target);
                            }
                        }
                    }
                }

                /// <summary>
                ///     The Jungle Smite Logic.
                /// </summary>
                foreach (var minion in Targets.JungleMinions.Where(
                             m =>
                             m.LSIsValidTarget(Vars.Smite.Range)))
                //Vars.Menu["smite"]["whitelist"][m.CharData.BaseSkinName.ToLower()].GetValue<MenuBool>().Value))
                {
                    if (minion.Health > GameObjects.Player.GetBuffCount(GameObjects.Player.Buffs.FirstOrDefault(
                                                                            b =>
                                                                            b.Name.ToLower().Contains("smitedamagetracker")).Name))
                    {
                        return;
                    }

                    if (Vars.getCheckBoxItem(Vars.SmiteMiscMenu, "limit"))
                    {
                        if (!minion.CharData.BaseSkinName.Equals("SRU_Baron") &&
                            !minion.CharData.BaseSkinName.Equals("SRU_RiftHerald") &&
                            !minion.CharData.BaseSkinName.Contains("SRU_Dragon"))

                        {
                            return;
                        }
                    }

                    if (Vars.getCheckBoxItem(Vars.SmiteMiscMenu, "stacks"))
                    {
                        if (GameObjects.Player.Spellbook.GetSpell(Vars.Smite.Slot).Ammo == 1)
                        {
                            if (!minion.CharData.BaseSkinName.Equals("SRU_Baron") &&
                                !minion.CharData.BaseSkinName.Equals("SRU_RiftHerald") &&
                                !minion.CharData.BaseSkinName.Contains("SRU_Dragon"))
                            {
                                return;
                            }
                        }
                    }

                    Vars.Smite.CastOnUnit(minion);
                }
            }

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

            /// <summary>
            ///     The Exhaust Logic.
            /// </summary>
            if (SpellSlots.Exhaust.IsReady())
            {
                foreach (var ally in GameObjects.AllyHeroes.Where(
                             a =>
                             a.Distance(Targets.Target) <= 650f &&
                             Health.GetPrediction(a, (int)(1000 + Game.Ping / 2f)) <= a.MaxHealth / 6))
                {
                    GameObjects.Player.Spellbook.CastSpell(SpellSlots.Exhaust, Targets.Target);
                }
            }
        }
Exemplo 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 Defensives(EventArgs args)
        {
            if (!Vars.getCheckBoxItem(Vars.TypesMenu, "defensives"))
            {
                return;
            }

            /// <summary>
            ///     The Zeke's Herald Logic.
            /// </summary>
            if (Items.CanUseItem(3153))
            {
                if (GameObjects.AllyHeroes.Any(
                        a =>
                        a.HasBuff("itemstarksbindingbufferproc") ||
                        (!a.IsDead && a.HasBuff("rallyingbanneraurafriend"))))
                {
                    return;
                }

                if (GameObjects.AllyHeroes.OrderBy(t => t.FlatCritChanceMod).First().LSIsValidTarget(800f, false))
                {
                    Items.UseItem(3153, GameObjects.AllyHeroes.OrderBy(t => t.FlatCritChanceMod).First());
                }
            }

            /// <summary>
            ///     The Banner of Command Logic.
            /// </summary>
            if (Items.CanUseItem(3060))
            {
                if (GameObjects.AllyMinions.Any(m => m.GetMinionType() == MinionTypes.Super))
                {
                    foreach (var super in GameObjects.AllyMinions.Where(
                                 m =>
                                 m.LSIsValidTarget(1200f, false) &&
                                 m.GetMinionType() == MinionTypes.Super))
                    {
                        Items.UseItem(3060, super);
                    }
                }
                else if (GameObjects.AllyMinions.Any(m => m.GetMinionType() == MinionTypes.Siege))
                {
                    foreach (var siege in GameObjects.AllyMinions.Where(
                                 m =>
                                 m.LSIsValidTarget(1200f, false) &&
                                 m.GetMinionType() == MinionTypes.Siege))
                    {
                        Items.UseItem(3060, siege);
                    }
                }
            }

            /// <summary>
            ///     The Face of the Mountain Logic.
            /// </summary>
            if (Items.CanUseItem(3401))
            {
                foreach (var ally in GameObjects.AllyHeroes.Where(
                             a =>
                             a.LSIsValidTarget(500f, false) &&
                             Health.GetPrediction(a, (int)(250 + Game.Ping / 2f)) <= a.MaxHealth / 4))
                {
                    Items.UseItem(3401, ally);
                    return;
                }
            }

            /// <summary>
            ///     The Locket of the Iron Solari Logic.
            /// </summary>
            if (Items.CanUseItem(3190) &&
                !Items.CanUseItem(3401))
            {
                if (GameObjects.AllyHeroes.Count(
                        a =>
                        a.LSIsValidTarget(600f, false) &&
                        Health.GetPrediction(a, (int)(250 + Game.Ping / 2f)) <= a.MaxHealth / 1.5) >= 3)
                {
                    Items.UseItem(3190);
                    return;
                }
            }

            /// <summary>
            ///     The Zhonya's Hourglass Logic.
            /// </summary>
            if (Items.CanUseItem(3157))
            {
                if (Health.GetPrediction(ObjectManager.Player, (int)(250 + Game.Ping / 2f)) <= ObjectManager.Player.MaxHealth / 4)
                {
                    Items.UseItem(3157);
                    return;
                }
            }

            /// <summary>
            ///     The Wooglet's Witchcap Logic.
            /// </summary>
            if (Items.CanUseItem(3090))
            {
                if (Health.GetPrediction(ObjectManager.Player, (int)(250 + Game.Ping / 2f)) <= ObjectManager.Player.MaxHealth / 4)
                {
                    Items.UseItem(3090);
                    return;
                }
            }

            /// <summary>
            ///     The Seraph's Embrace Logic.
            /// </summary>
            if (Items.CanUseItem(3040))
            {
                if (Health.GetPrediction(ObjectManager.Player, (int)(250 + Game.Ping / 2f)) <= ObjectManager.Player.MaxHealth / 4)
                {
                    Items.UseItem(3040);
                    return;
                }
            }

            /// <summary>
            ///     The Guardian's Horn Logic.
            /// </summary>
            if (Items.CanUseItem(2051))
            {
                if (GameObjects.EnemyHeroes.Count(t => t.LSIsValidTarget(1000f)) >= 3)
                {
                    Items.UseItem(2051);
                    return;
                }
            }

            /// <summary>
            ///     The Talisman of Ascension Logic.
            /// </summary>
            if (Items.CanUseItem(3059))
            {
                if (GameObjects.EnemyHeroes.Count(
                        t =>
                        t.LSIsValidTarget(2000f) &&
                        t.CountEnemyHeroesInRange(1500f) <=
                        ObjectManager.Player.CountAllyHeroesInRange(1500f) + t.CountAllyHeroesInRange(1500f) - 1) > 1)
                {
                    Items.UseItem(3059);
                    return;
                }
            }

            /// <summary>
            ///     The Righteous Glory Logic.
            /// </summary>
            if (Items.CanUseItem(3800))
            {
                if (!ObjectManager.Player.HasBuff("ItemRighteousGlory"))
                {
                    if (GameObjects.EnemyHeroes.Count(
                            t =>
                            t.LSIsValidTarget(2000f) &&
                            t.CountEnemyHeroesInRange(1500f) <=
                            ObjectManager.Player.CountAllyHeroesInRange(1500f) + t.CountAllyHeroesInRange(1500f) - 1) > 1)
                    {
                        Items.UseItem(3800);
                        return;
                    }
                }
                else
                {
                    if (ObjectManager.Player.CountEnemyHeroesInRange(450f) >= 2)
                    {
                        Items.UseItem(3800);
                    }
                }
                return;
            }

            /// <summary>
            ///     The Randuin's Omen Logic.
            /// </summary>
            if (Items.CanUseItem(3143))
            {
                if (ObjectManager.Player.CountEnemyHeroesInRange(500f) >= 2)
                {
                    Items.UseItem(3143);
                }
            }
        }
Exemplo 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 Offensives(EventArgs args)
        {
            if (!Targets.Target.LSIsValidTarget() ||
                !Vars.getCheckBoxItem(Vars.TypesMenu, "offensives") ||
                !Vars.getKeyBindItem(Vars.KeysMenu, "combo"))
            {
                return;
            }

            /// <summary>
            ///     The Bilgewater Cutlass Logic.
            /// </summary>
            if (Items.CanUseItem(3144) &&
                Targets.Target.LSIsValidTarget(550f))
            {
                Items.UseItem(3144, Targets.Target);
            }

            /// <summary>
            ///     The Blade of the Ruined King Logic.
            /// </summary>
            if (Items.CanUseItem(3153) &&
                Targets.Target.LSIsValidTarget(550f) &&
                GameObjects.Player.HealthPercent <= 90)
            {
                Items.UseItem(3153, Targets.Target);
            }

            /// <summary>
            ///     The Entropy Logic.
            /// </summary>
            if (Items.CanUseItem(3184) &&
                GameObjects.Player.Spellbook.IsAutoAttacking)
            {
                Items.UseItem(3184);
            }

            /// <summary>
            ///     The Frost Queen's Claim Logic.
            /// </summary>
            if (Items.CanUseItem(3092))
            {
                if (GameObjects.EnemyHeroes.Count(
                        t =>
                        t.LSIsValidTarget(4000f) &&
                        t.CountEnemyHeroesInRange(1500f) <=
                        GameObjects.Player.CountAllyHeroesInRange(1500f) + t.CountAllyHeroesInRange(1500f) - 1) >= 1)
                {
                    Items.UseItem(3092);
                }
            }

            /// <summary>
            ///     The Hextech Gunblade Logic.
            /// </summary>
            if (Items.CanUseItem(3146) &&
                Targets.Target.LSIsValidTarget(700f))
            {
                Items.UseItem(3146, Targets.Target);
            }

            /// <summary>
            ///     The Youmuu's Ghostblade Logic.
            /// </summary>
            if (Items.CanUseItem(3142))
            {
                if (GameObjects.Player.Spellbook.IsAutoAttacking ||
                    GameObjects.Player.IsCastingInterruptableSpell())
                {
                    Items.UseItem(3142);
                }
            }

            /// <summary>
            ///     The Hextech GLP-800 Logic.
            /// </summary>
            if (Items.CanUseItem(3030) &&
                Targets.Target.LSIsValidTarget(800f))
            {
                Items.UseItem(3030, Movement.GetPrediction(Targets.Target, 0.5f).UnitPosition);
            }

            /// <summary>
            ///     The Hextech Protobelt Logic.
            /// </summary>
            if (Items.CanUseItem(3152) &&
                Targets.Target.LSIsValidTarget(
                    GameObjects.Player.Distance(GameObjects.Player.ServerPosition.LSExtend(Game.CursorPos, 850f))))
            {
                Items.UseItem(3152, GameObjects.Player.ServerPosition.LSExtend(Game.CursorPos, 850f));
            }
        }
Exemplo 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 Consumables(EventArgs args)
        {
            if (ObjectManager.Player.InFountain() ||
                ObjectManager.Player.LSIsRecalling())
            {
                return;
            }

            if (!Vars.getCheckBoxItem(Vars.TypesMenu, "potions"))
            {
                return;
            }

            if (!Bools.IsHealthPotRunning())
            {
                /// <summary>
                ///     The Refillable Potion Logic.
                /// </summary>
                if (Items.CanUseItem(2031) &&
                    ObjectManager.Player.HealthPercent < Managers.MinHealthPercent)
                {
                    Items.UseItem(2031);
                    return;
                }

                /// <summary>
                ///     The Total Biscuit of Rejuvenation Logic.
                /// </summary>
                if (Items.CanUseItem(2010) &&
                    ObjectManager.Player.HealthPercent < Managers.MinHealthPercent)
                {
                    Items.UseItem(2010);
                    return;
                }

                /// <summary>
                ///     The Health Potion Logic.
                /// </summary>
                if (Items.CanUseItem(2003) &&
                    ObjectManager.Player.HealthPercent < Managers.MinHealthPercent)
                {
                    Items.UseItem(2003);
                }
            }

            if (ObjectManager.Player.MaxMana < 200)
            {
                return;
            }

            /// <summary>
            ///     The Hunter's Potion Logic.
            /// </summary>
            if (Items.CanUseItem(2032))
            {
                if (!Bools.IsHealthPotRunning() &&
                    ObjectManager.Player.HealthPercent < Managers.MinHealthPercent)
                {
                    Items.UseItem(2032);
                }
                else if (!Bools.IsManaPotRunning() &&
                         ObjectManager.Player.ManaPercent < Managers.MinManaPercent)
                {
                    Items.UseItem(2032);
                }
            }

            /// <summary>
            ///     The Corrupting Potion Logic.
            /// </summary>
            if (Items.CanUseItem(2033))
            {
                if (!Bools.IsHealthPotRunning() &&
                    ObjectManager.Player.HealthPercent < Managers.MinHealthPercent)
                {
                    Items.UseItem(2033);
                }
                else if (!Bools.IsManaPotRunning() &&
                         ObjectManager.Player.ManaPercent < Managers.MinManaPercent)
                {
                    Items.UseItem(2033);
                }
            }
        }
Exemplo n.º 5
0
        /// <summary>
        ///     Called when the game updates itself.
        /// </summary>
        /// <param name="args">The <see cref="EventArgs" /> instance containing the event data.</param>
        public static void Cleansers(EventArgs args)
        {
            if (!Vars.getCheckBoxItem(Vars.TypesMenu, "cleansers"))
            {
                return;
            }

            /// <summary>
            ///     The Mikaels Crucible Logic.
            /// </summary>
            if (Items.CanUseItem(3222))
            {
                foreach (var ally in GameObjects.AllyHeroes.Where(
                             a =>
                             Bools.ShouldCleanse(a) &&
                             a.LSIsValidTarget(750f, false)))
                {
                    DelayAction.Add(Vars.Delay, () =>
                    {
                        Items.UseItem(3222, ally);
                    });
                }
            }

            if (Bools.ShouldUseCleanser() ||
                (!SpellSlots.Cleanse.IsReady() &&
                 Bools.ShouldCleanse(GameObjects.Player)))
            {
                /// <summary>
                ///     The Quicksilver Sash Logic.
                /// </summary>
                if (Items.CanUseItem(3140))
                {
                    DelayAction.Add(Vars.Delay, () =>
                    {
                        Items.UseItem(3140);
                        return;
                    });
                }

                /// <summary>
                ///     The Dervish Blade Logic.
                /// </summary>
                if (Items.CanUseItem(3137))
                {
                    DelayAction.Add(Vars.Delay, () =>
                    {
                        Items.UseItem(3137);
                        return;
                    });
                }

                /// <summary>
                ///     The Mercurial Scimitar Logic.
                /// </summary>
                if (Items.CanUseItem(3139))
                {
                    DelayAction.Add(Vars.Delay, () =>
                    {
                        Items.UseItem(3139);
                    });
                }
            }

            if (GameObjects.Player.HealthPercent < 10)
            {
                /// <summary>
                ///     The Dervish Blade Logic.
                /// </summary>
                if (Items.CanUseItem(3137))
                {
                    DelayAction.Add(Vars.Delay, () =>
                    {
                        Items.UseItem(3137);
                        return;
                    });
                }

                /// <summary>
                ///     The Mercurial Scimitar Logic.
                /// </summary>
                if (Items.CanUseItem(3139))
                {
                    DelayAction.Add(Vars.Delay, () =>
                    {
                        Items.UseItem(3139);
                    });
                }
            }
        }