ÄÚµå : |
public static void Initialize()
{
Server.Commands.Register("BandSelf",AccessLevel.Player,new CommandEventHandler( BandSelf ) );
}
//static
public static void BandSelf( CommandEventArgs e ) //¼¿ÇÁºØ´ëÁú
{
Mobile from = e.Mobile;
Container pack = from.Backpack;
if( pack.FindItemByType(typeof( Bandage )) == null)
{
from.SendMessage( "ºØ´ë°¡ ¾ø½À´Ï´Ù" ); // Bandages can not be used on that.
return;
}
Bandage bands = (Bandage)pack.FindItemByType(typeof( Bandage ));
if ( from.InRange( bands.GetWorldLocation(), Core.AOS ? 2 : 1 ) )
{
from.RevealingAction();
if ( bands.Deleted )
return;
if ( from.InRange( bands.GetWorldLocation(), Core.AOS ? 2 : 1 ) )
{
if ( BandageContext.BeginHeal( from, from ) != null )
bands.Consume();
}
else
{
from.SendLocalizedMessage( 500295 ); // You are too far away to do that.
}
}
else
{
from.SendLocalizedMessage( 500970 ); // Bandages can not be used on that.
}
}
|