Beispiel #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 Execute(EventArgs args)
        {
            if (ObjectManager.Player.IsRecalling() ||
                ObjectManager.Player.InFountain())
            {
                return;
            }

            /// <summary>
            /// The Health Potions Logic.
            /// </summary>
            if (!Bools.IsHealthPotRunning())
            {
                if (ObjectManager.Player.HealthPercent <= Managers.MinHealthPercent)
                {
                    /// <summary>
                    /// The Refillable Potion.
                    /// </summary>
                    if (ItemData.Refillable_Potion.GetItem().IsReady())
                    {
                        ItemData.Refillable_Potion.GetItem().Cast();
                        return;
                    }

                    /// <summary>
                    // The Health Potion.
                    /// </summary>
                    if (ItemData.Health_Potion.GetItem().IsReady())
                    {
                        ItemData.Health_Potion.GetItem().Cast();
                        return;
                    }

                    /// <summary>
                    ///  The Total Biscuit of Rejuvenation.
                    /// </summary>
                    if (ItemData.Total_Biscuit_of_Rejuvenation2.GetItem().IsReady())
                    {
                        ItemData.Total_Biscuit_of_Rejuvenation2.GetItem().Cast();
                        return;
                    }

                    /// <summary>
                    /// The Corrupting Potion.
                    /// </summary>
                    if (ItemData.Corrupting_Potion.GetItem().IsReady())
                    {
                        ItemData.Corrupting_Potion.GetItem().Cast();
                        return;
                    }

                    /// <summary>
                    /// The Hunter's Potion.
                    /// </summary>
                    if (ItemData.Hunters_Potion.GetItem().IsReady())
                    {
                        ItemData.Hunters_Potion.GetItem().Cast();
                        return;
                    }
                }
            }

            /// <summary>
            /// The Mana Potions Logic.
            /// </summary>
            if (!Bools.IsManaPotRunning())
            {
                if (ObjectManager.Player.ManaPercent <= Managers.MinManaPercent &&
                    !Variables.NoManaChampions.Contains(ObjectManager.Player.ChampionName))
                {
                    /// <summary>
                    /// The Corrupting Potion.
                    /// </summary>
                    if (ItemData.Corrupting_Potion.GetItem().IsReady())
                    {
                        ItemData.Corrupting_Potion.GetItem().Cast();
                        return;
                    }

                    /// <summary>
                    /// The Hunter's Potion.
                    /// </summary>
                    if (ItemData.Hunters_Potion.GetItem().IsReady())
                    {
                        ItemData.Hunters_Potion.GetItem().Cast();
                        return;
                    }
                }
            }
        }
Beispiel #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 Consumables(EventArgs args)
        {
            if (ObjectManager.Player.InFountain() || ObjectManager.Player.IsRecalling())
            {
                return;
            }
            if (!Vars.Menu["potions"].GetValue <MenuBool>().Value)
            {
                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);
                }
            }
        }