public static void DrinkCure_OnCommand(CommandEventArgs e) { GreaterCurePotion m_GreaterCurePotion = (GreaterCurePotion)e.Mobile.Backpack.FindItemByType(typeof(GreaterCurePotion)); CurePotion m_CurePotion = (CurePotion)e.Mobile.Backpack.FindItemByType(typeof(CurePotion)); LesserCurePotion m_LesserCurePotion = (LesserCurePotion)e.Mobile.Backpack.FindItemByType(typeof(LesserCurePotion)); int m_Exists = e.Mobile.Backpack.GetAmount(typeof(GreaterCurePotion)); int m_Existss = e.Mobile.Backpack.GetAmount(typeof(CurePotion)); int m_Existsss = e.Mobile.Backpack.GetAmount(typeof(LesserCurePotion)); if (m_Exists != 0) { e.Mobile.SendMessage("Cure Potion found"); m_GreaterCurePotion.OnDoubleClick(e.Mobile); } else if (m_Existss != 0) { e.Mobile.SendMessage("Cure Potion found"); m_CurePotion.OnDoubleClick(e.Mobile); } else if (m_Existsss != 0) { e.Mobile.SendMessage("Cure Potion found"); m_LesserCurePotion.OnDoubleClick(e.Mobile); } else { e.Mobile.SendMessage("Cannot find Cure Potion"); } }