Exemplo n.º 1
0
        public static void Execute()
        {
            if (LastRun > Environment.TickCount)
            {
                return;
            }

            if (!Player.Instance.IsInShopRange() &&
                Player.Instance.CountAlliesInRange(Misc.RangeEnemy) >= Misc.EnemyCount &&
                Activator.lastUsed > Environment.TickCount)
            {
                if (Settings.UseHPpot && HealthPotion.IsOwned())
                {
                    if (Player.Instance.HealthPercent < Settings.MinHPpot && !Player.Instance.HasBuff("RegenerationPotion"))
                    {
                        HealthPotion.Cast();
                    }
                }

                if (Settings.UseBiscuits && Biscuit.IsOwned())
                {
                    if (Player.Instance.ManaPercent <= Settings.MinBiscuitMp && Player.Instance.HealthPercent <= Settings.MinBiscuitHp && !Player.Instance.HasBuff("ItemMiniRegenPotion"))
                    {
                        Biscuit.Cast();
                    }
                }

                if (Settings.UseRefillPOT && RefilablePotion.IsOwned())
                {
                    if (Player.Instance.HealthPercent <= Settings.MinRefillHp && !Player.Instance.HasBuff("ItemCrystalFlask"))
                    {
                        RefilablePotion.Cast();
                    }
                }

                if (Settings.UseCorrupts && CorruptingPotion.IsOwned())
                {
                    if (Player.Instance.ManaPercent < Settings.MinCorruptMp && Player.Instance.HealthPercent < Settings.MinCorruptHp && !Player.Instance.HasBuff("ItemDarkCrystalFlask"))
                    {
                        CorruptingPotion.Cast();
                    }
                }

                if (Settings.UseHunters && HuntersPotion.IsOwned())
                {
                    if (Player.Instance.ManaPercent < Settings.MinHunterMp && Player.Instance.HealthPercent < Settings.MinHunterHp && !Player.Instance.HasBuff("ItemCrystalFlaskJungle"))
                    {
                        HuntersPotion.Cast();
                    }
                }

                LastRun = Environment.TickCount + 1000;
            }
        }
Exemplo n.º 2
0
            private static void Potions()
            {
                if (ObjectManager.GetLocalPlayer().IsDead || ObjectManager.GetLocalPlayer().IsInFountainRange() ||
                    ObjectManager.GetLocalPlayer().HasBuff("recall"))
                {
                    return;
                }

                if (!AutoPotionsMenu["SharpShooter.UtilityMenu.AutoPotionsMenu.Enabled"].Enabled ||
                    ObjectManager.GetLocalPlayer().HealthPercent() > AutoPotionsMenu["SharpShooter.UtilityMenu.AutoPotionsMenu.MyHp"].Value ||
                    ObjectManager.GetLocalPlayer().CountEnemyHeroesInRange(1200) <= 0)
                {
                    return;
                }

                if (ObjectManager.GetLocalPlayer().Buffs.Any(x => x != null && buffName.Contains(x.Name.ToLower()) && x.IsActive))
                {
                    return;
                }

                if (HealthPotion != null && HealthPotion.IsMine && HealthPotion.Ready)
                {
                    HealthPotion.Cast();
                }
                else if (TotalBiscuitofRejuvenation != null && TotalBiscuitofRejuvenation.IsMine && TotalBiscuitofRejuvenation.Ready)
                {
                    TotalBiscuitofRejuvenation.Cast();
                }
                else if (RefillablePotion != null && RefillablePotion.IsMine && RefillablePotion.Ready)
                {
                    RefillablePotion.Cast();
                }
                else if (HuntersPotion != null && HuntersPotion.IsMine && HuntersPotion.Ready)
                {
                    HuntersPotion.Cast();
                }
                else if (CorruptingPotion != null && CorruptingPotion.IsMine && CorruptingPotion.Ready)
                {
                    CorruptingPotion.Cast();
                }
            }
Exemplo n.º 3
0
        public static void Execute()
        {
            if (LastRun > Environment.TickCount)
            {
                return;
            }

            var target = EntityManager.Heroes.Enemies.FirstOrDefault(e => !e.IsDead && e.IsInRange(Player.Instance, 1000));

            if (Player.Instance.IsRecalling() || Player.Instance.IsInShopRange() || target == null)
            {
                return;
            }

            if (Settings.UseHPpot && HealthPotion.IsOwned())
            {
                if (Player.Instance.HealthPercent <= Settings.MinHPpot && !Player.Instance.HasBuff("RegenerationPotion"))
                {
                    HealthPotion.Cast();
                }
            }

            if (Settings.UseBiscuits && Biscuit.IsOwned())
            {
                if (Player.Instance.ManaPercent <= Settings.MinBiscuitMp && Player.Instance.HealthPercent <= Settings.MinBiscuitHp && !Player.Instance.HasBuff("ItemMiniRegenPotion"))
                {
                    Biscuit.Cast();
                }
            }

            if (Settings.UseRefillPOT && RefilablePotion.IsOwned())
            {
                if (Player.Instance.HealthPercent <= Settings.MinRefillHp && !Player.Instance.HasBuff("ItemCrystalFlask"))
                {
                    RefilablePotion.Cast();
                }
            }

            if (Settings.UseCorrupts && CorruptingPotion.IsOwned())
            {
                if (Player.Instance.ManaPercent <= Settings.MinCorruptMp && Player.Instance.HealthPercent <= Settings.MinCorruptHp && !Player.Instance.HasBuff("ItemDarkCrystalFlask"))
                {
                    CorruptingPotion.Cast();
                }
            }

            if (Settings.UseCorrupts && CorruptingPotion.IsOwned())
            {
                if (Player.Instance.ManaPercent <= Settings.MinCorruptMp && Player.Instance.HealthPercent <= Settings.MinCorruptHp && !Player.Instance.HasBuff("ItemDarkCrystalFlask"))
                {
                    CorruptingPotion.Cast();
                }
            }

            if (Settings.UseHunters && HuntersPotion.IsOwned())
            {
                if (Player.Instance.ManaPercent <= Settings.MinHunterMp && Player.Instance.HealthPercent <= Settings.MinHunterHp && !Player.Instance.HasBuff("ItemDarkCrystalFlask"))
                {
                    HuntersPotion.Cast();
                }

                if (Settings.UseHuntersMinionWillDie)
                {
                    var BigJGMinion =
                        EntityManager.MinionsAndMonsters.GetJungleMonsters()
                        .FirstOrDefault(
                            m =>
                            m.BaseSkinName == "SRU_Baron" || m.BaseSkinName == "SRU_Dragon" ||
                            m.BaseSkinName == "SRU_Blue" || m.BaseSkinName == "SRU_Red" ||
                            m.BaseSkinName == "Sru_Crab" || m.BaseSkinName == "SRU_Gromp" ||
                            m.BaseSkinName == "SRU_Murkwolf" || m.BaseSkinName == "SRU_Krug" ||
                            m.BaseSkinName == "SRU_Razorbeak" && m.IsValidTarget(500) && m.Health <= 150);

                    if (BigJGMinion == null)
                    {
                        return;
                    }

                    HuntersPotion.Cast();
                }
            }

            LastRun = Environment.TickCount + 10000;
        }