// RunUO 2.0 Venus Düzenlemesi <admin@venus.gen.tr>

using System; 
using System.Collections; 
using Server; 
using Server.Items; 
using Server.Mobiles;
using Server.Commands;

namespace Server.Scripts.Commands 
{
	public class DringPotions
	{ 
		public static void Initialize() 
		{ 
			CommandSystem.Register( "DrinkHeal", AccessLevel.Player, new CommandEventHandler( DrinkHeal_OnCommand ) ); 
			CommandSystem.Register( "DrinkCure", AccessLevel.Player, new CommandEventHandler( DrinkCure_OnCommand ) ); 
			CommandSystem.Register( "DrinkRefresh", AccessLevel.Player, new CommandEventHandler( DrinkRefresh_OnCommand ) ); 
			CommandSystem.Register( "DrinkAgil", AccessLevel.Player, new CommandEventHandler( DrinkAgil_OnCommand ) ); 
			CommandSystem.Register( "DrinkStr", AccessLevel.Player, new CommandEventHandler( DrinkStr_OnCommand ) ); 
		} 
		[Usage( "DrinkHeal" )] 
		private static void DrinkHeal_OnCommand( CommandEventArgs e ) 
		{ 
			GreaterHealPotion m_GreaterHealPotion = (GreaterHealPotion)e.Mobile.Backpack.FindItemByType( typeof( GreaterHealPotion ) ); 
			HealPotion m_HealPotion = (HealPotion)e.Mobile.Backpack.FindItemByType( typeof( HealPotion ) );
			LesserHealPotion m_LesserHealPotion = (LesserHealPotion)e.Mobile.Backpack.FindItemByType( typeof( LesserHealPotion ) ); 
			int m_Exists = e.Mobile.Backpack.GetAmount( typeof( GreaterHealPotion ) );
			int m_Existss = e.Mobile.Backpack.GetAmount( typeof( HealPotion ) );
			int m_Existsss = e.Mobile.Backpack.GetAmount( typeof( LesserHealPotion ) );
      			if ( m_Exists != 0 )
			{
				e.Mobile.SendMessage( "Healpot bulundu..." ); 
				m_GreaterHealPotion.OnDoubleClick(e.Mobile);
			}
			else if ( m_Existss != 0 )
			{
				e.Mobile.SendMessage( "Healpot bulundu..." ); 
				m_HealPotion.OnDoubleClick(e.Mobile);
			}
			else if ( m_Existsss != 0 )
			{
				e.Mobile.SendMessage( "Healpot bulundu..." ); 
				m_LesserHealPotion.OnDoubleClick(e.Mobile);
			}
			else 
				e.Mobile.SendMessage( "Çantanızda Healpot yok." ); 
		} 
		[Usage( "DrinkCure" )] 
		private 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( "Curepot bulundu..." ); 
				m_GreaterCurePotion.OnDoubleClick(e.Mobile);
			}
			else if ( m_Existss != 0 )
			{
				e.Mobile.SendMessage( "Curepot bulundu..." ); 
				m_CurePotion.OnDoubleClick(e.Mobile);
			}
			else if ( m_Existsss != 0 )
			{
				e.Mobile.SendMessage( "Curepot bulundu..." ); 
				m_LesserCurePotion.OnDoubleClick(e.Mobile);
			}
			else 
				e.Mobile.SendMessage( "Çantanızda Curepot yok." ); 
		} 
		[Usage( "DrinkRefresh" )] 
		private static void DrinkRefresh_OnCommand( CommandEventArgs e ) 
		{ 
			TotalRefreshPotion m_TotalRefreshPotion = (TotalRefreshPotion)e.Mobile.Backpack.FindItemByType( typeof( TotalRefreshPotion ) ); 
			RefreshPotion m_RefreshPotion = (RefreshPotion)e.Mobile.Backpack.FindItemByType( typeof( RefreshPotion ) );
			int m_Exists = e.Mobile.Backpack.GetAmount( typeof( TotalRefreshPotion ) );
			int m_Existss = e.Mobile.Backpack.GetAmount( typeof( RefreshPotion ) );
			if ( m_Exists != 0 )
			{
				e.Mobile.SendMessage( "Refreshpot bulundu..." ); 
				m_TotalRefreshPotion.OnDoubleClick(e.Mobile);
			}
			else if ( m_Existss != 0 )
			{
				e.Mobile.SendMessage( "Refreshpot bulundu..." ); 
				m_RefreshPotion.OnDoubleClick(e.Mobile);
			}
			else 
				e.Mobile.SendMessage( "Çantanızda Refreshpot yok." ); 
		 }
		[Usage( "DrinkAgil" )] 
		private static void DrinkAgil_OnCommand( CommandEventArgs e ) 
		{ 
			AgilityPotion m_AgilityPotion = (AgilityPotion)e.Mobile.Backpack.FindItemByType( typeof( AgilityPotion ) ); 
			GreaterAgilityPotion m_GreaterAgilityPotion = (GreaterAgilityPotion)e.Mobile.Backpack.FindItemByType( typeof( GreaterAgilityPotion ) );
			int m_Exists = e.Mobile.Backpack.GetAmount( typeof( AgilityPotion ) );
			int m_Existss = e.Mobile.Backpack.GetAmount( typeof( GreaterAgilityPotion ) );
			if ( m_Exists != 0 )
			{
				e.Mobile.SendMessage( "Agility pot bulundu..." ); 
				m_AgilityPotion.OnDoubleClick(e.Mobile);
			}
			else if ( m_Existss != 0 )
			{
				e.Mobile.SendMessage( "Greater Agility pot bulundu..." ); 
				m_GreaterAgilityPotion.OnDoubleClick(e.Mobile);
			}
			else 
				e.Mobile.SendMessage( "Çantanızda Agilitypot yok." ); 
		 }
		[Usage( "DrinkStr" )] 
		private static void DrinkStr_OnCommand( CommandEventArgs e ) 
		{ 
			StrengthPotion m_StrengthPotion = (StrengthPotion)e.Mobile.Backpack.FindItemByType( typeof( StrengthPotion ) ); 
			GreaterStrengthPotion m_GreaterStrengthPotion = (GreaterStrengthPotion)e.Mobile.Backpack.FindItemByType( typeof( GreaterStrengthPotion ) );
			int m_Exists = e.Mobile.Backpack.GetAmount( typeof( StrengthPotion ) );
			int m_Existss = e.Mobile.Backpack.GetAmount( typeof( GreaterStrengthPotion ) );
			if ( m_Exists != 0 )
			{
				e.Mobile.SendMessage( "Strength pot bulundu..." ); 
				m_StrengthPotion.OnDoubleClick(e.Mobile);
			}
			else if ( m_Existss != 0 )
			{
				e.Mobile.SendMessage( "Greater Strength pot bulundu..." ); 
				m_GreaterStrengthPotion.OnDoubleClick(e.Mobile);
			}
			else 
				e.Mobile.SendMessage( "Çantanızda Strengthpot yok." ); 
		 }
	} 
}