Kod:
using System;
using System.Collections;
using Server;
using Server.Items;
using Server.Mobiles;
namespace Server.Scripts.Commands
{
public class Band
{
public static void Initialize()
{
Server.Commands.Register( "Band", AccessLevel.Player, new CommandEventHandler( Band_OnCommand ) );
}
public static void Band_OnCommand( CommandEventArgs e )
{
//e.Mobile.SendMessage( "Searching for bandage..." );
Bandage m_Bandage = (Bandage)e.Mobile.Backpack.FindItemByType( typeof( Bandage ) );
int m_Exists = e.Mobile.Backpack.GetAmount( typeof( Bandage ) );
if ( m_Exists == 0 )
e.Mobile.SendMessage( "Cannot find bandage" );
else
{
e.Mobile.SendMessage( "Bandage found" );
//e.Mobile.SendMessage( "Applying bandages" );
m_Bandage.OnDoubleClick(e.Mobile);
}
}
}
public class BandSelf
{
public static void Initialize()
{
Server.Commands.Register( "BandSelf", AccessLevel.Player, new CommandEventHandler( BandSelf_OnCommand ) );
}
[Usage( "BandSelf" )]
public static void BandSelf_OnCommand( CommandEventArgs e )
{
Mobile from = e.Mobile;
if (from==null) return;
Container bp = from.Backpack;
if (bp==null) return;
Bandage b = (Bandage)bp.FindItemByType( typeof(Bandage));
if (b==null)
{
from.SendMessage("You must have bandages in your backpack to heal!");
return;
}
BandageContext.BeginHeal( from, from);
b.Consume();
}
}
}
using System.Collections;
using Server;
using Server.Items;
using Server.Mobiles;
namespace Server.Scripts.Commands
{
public class Band
{
public static void Initialize()
{
Server.Commands.Register( "Band", AccessLevel.Player, new CommandEventHandler( Band_OnCommand ) );
}
public static void Band_OnCommand( CommandEventArgs e )
{
//e.Mobile.SendMessage( "Searching for bandage..." );
Bandage m_Bandage = (Bandage)e.Mobile.Backpack.FindItemByType( typeof( Bandage ) );
int m_Exists = e.Mobile.Backpack.GetAmount( typeof( Bandage ) );
if ( m_Exists == 0 )
e.Mobile.SendMessage( "Cannot find bandage" );
else
{
e.Mobile.SendMessage( "Bandage found" );
//e.Mobile.SendMessage( "Applying bandages" );
m_Bandage.OnDoubleClick(e.Mobile);
}
}
}
public class BandSelf
{
public static void Initialize()
{
Server.Commands.Register( "BandSelf", AccessLevel.Player, new CommandEventHandler( BandSelf_OnCommand ) );
}
[Usage( "BandSelf" )]
public static void BandSelf_OnCommand( CommandEventArgs e )
{
Mobile from = e.Mobile;
if (from==null) return;
Container bp = from.Backpack;
if (bp==null) return;
Bandage b = (Bandage)bp.FindItemByType( typeof(Bandage));
if (b==null)
{
from.SendMessage("You must have bandages in your backpack to heal!");
return;
}
BandageContext.BeginHeal( from, from);
b.Consume();
}
}
}
Yorumlar
Henüz yorum yapılmamıştır.
|
OylamalarOylama :![]()
Üyelerin oylama ortalaması (10 dışında) : Henüz Oylanmamış
Oylar: 0 |
Benzer Sayfalar
| Sayfalar | Yorumlar | Gönderen | Tarih |
| At Temizleme Komutu | 0 | Weight | 17-04-2011 |
| Bandage Sistemi | 0 | aldarson | 26-06-2010 |
| Ressme Komutu | 0 | ubeyid | 23-08-2009 |
| Emote Komutu | 0 | ubeyid | 23-08-2009 |
| Taşa Çevirme Komutu | 0 | ubeyid | 23-08-2009 |







