Example #1
0
 private static void AutoPotions()
 {
     if (MissInopportuneMenu.SpellsPotionsCheck() && !Player.IsInShopRange() &&
         Player.HealthPercent <= MissInopportuneMenu.SpellsPotionsHP() &&
         !(Player.HasBuff("RegenerationPotion") || Player.HasBuff("ItemCrystalFlaskJungle") ||
           Player.HasBuff("ItemMiniRegenPotion") || Player.HasBuff("ItemCrystalFlask") ||
           Player.HasBuff("ItemDarkCrystalFlask")))
     {
         if (MyActivator.HuntersPot.IsReady() && MyActivator.HuntersPot.IsOwned())
         {
             MyActivator.HuntersPot.Cast();
         }
         if (MyActivator.CorruptPot.IsReady() && MyActivator.CorruptPot.IsOwned())
         {
             MyActivator.CorruptPot.Cast();
         }
         if (MyActivator.Biscuit.IsReady() && MyActivator.Biscuit.IsOwned())
         {
             MyActivator.Biscuit.Cast();
         }
         if (MyActivator.HPPot.IsReady() && MyActivator.HPPot.IsOwned())
         {
             MyActivator.HPPot.Cast();
         }
         if (MyActivator.RefillPot.IsReady() && MyActivator.RefillPot.IsOwned())
         {
             MyActivator.RefillPot.Cast();
         }
     }
     if (MissInopportuneMenu.SpellsPotionsCheck() && !Player.IsInShopRange() &&
         Player.ManaPercent <= MissInopportuneMenu.SpellsPotionsM() &&
         !(Player.HasBuff("RegenerationPotion") || Player.HasBuff("ItemCrystalFlaskJungle") ||
           Player.HasBuff("ItemMiniRegenPotion") || Player.HasBuff("ItemCrystalFlask") ||
           Player.HasBuff("ItemDarkCrystalFlask")))
     {
         if (MyActivator.CorruptPot.IsReady() && MyActivator.CorruptPot.IsOwned())
         {
             MyActivator.CorruptPot.Cast();
         }
     }
 }