byaccident
Member
Hey all,
Need a hand on my first real script.
I'm trying to build some kind of bow, It already has the ammo but I need it to check for some item when you shoot the bow.
I found this but it seems like changing it to OnAttack won't work.
the part I got (not working)
Need a hand on my first real script.
I'm trying to build some kind of bow, It already has the ammo but I need it to check for some item when you shoot the bow.
Code:
public override Type AmmoType {get { return typeof(Bolt); }}
public override Item Ammo {get { return new Bolt();}}
Code:
public override void OnDoubleClick( Mobile m )
the part I got (not working)
Code:
// starting of required item "theflame" to be able to shoot
public override void Onattack( Mobile m )
{
Item a = m.Backpack.FindItemByType( typeof(theflame) );
if ( a != null )
{
m.SendMessage( "You light up your bolts and are ready to fire..." );
}
else
{
m.SendMessage( "You don't got The Flame. My advise it to RUN" );
}
}
// end of requiered item "theflame"