Ejemplo n.º 1
0
        /// <summary>
        ///     Called on do-cast.
        /// </summary>
        /// <param name="sender">The sender.</param>
        /// <param name="args">The args.</param>
        public static void Resetters(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
        {
            if (!Vars.getCheckBoxItem(Vars.TypesMenu, "resetters"))
            {
                return;
            }

            if (!Vars.getKeyBindItem(Vars.KeysMenu, "combo") &&
                !Vars.getKeyBindItem(Vars.KeysMenu, "laneclear"))
            {
                return;
            }

            /// <summary>
            ///     If the player has no AA-Resets, triggers after normal AA, else after AA-Reset.
            /// </summary>
            if (sender.IsMe)
            {
                if ((!Vars.HasAnyReset && AutoAttack.IsAutoAttack(args.SData.Name)) ||
                    ObjectManager.Player.Buffs.Any(b => AutoAttack.IsAutoAttackReset(b.Name)))
                {
                    /// <summary>
                    ///     The Tiamat Melee Only logic.
                    /// </summary>
                    if (Items.CanUseItem(3077))
                    {
                        Items.UseItem(3077);
                    }

                    /// <summary>
                    ///     The Ravenous Hydra Melee Only logic.
                    /// </summary>
                    if (Items.CanUseItem(3074))
                    {
                        Items.UseItem(3074);
                    }

                    /// <summary>
                    ///     The Titanic Hydra Melee Only logic.
                    /// </summary>
                    if (Items.CanUseItem(3748))
                    {
                        Items.UseItem(3748);
                    }
                }
            }
        }
Ejemplo n.º 2
0
 /// <summary>
 ///     Loads the drawings.
 /// </summary>
 public static void Initialize()
 {
     Drawing.OnDraw += delegate
     {
         /// <summary>
         ///     Loads the Smite drawing.
         /// </summary>
         if (Vars.Smite.IsReady() &&
             Vars.Smite.Slot != SpellSlot.Unknown &&
             Vars.getKeyBindItem(Vars.KeysMenu, "smite"))
         {
             if (Vars.getCheckBoxItem(Vars.DrawingsMenu, "range"))
             {
                 Render.Circle.DrawCircle(GameObjects.Player.Position, Vars.Smite.Range, Color.Orange, 1);
             }
         }
     };
 }
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 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);
                }
            }
        }
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 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));
            }
        }