Kunai
icon = 'Kunai.dmi'
var
weapon_strength = 10
equiped = 0
verb
Pick_up()
set src in oview(1)
if(Move(usr))
usr << "You pick up a [src]"
else
usr << "You cannot pick up the [src]"
Destroy()
set src in usr
if(src.equiped == 1)
usr << "You cannot destroy it if it is equiped!"
else
usr << "You destroy the [src]!"
del(src)
Equip()
set src in usr
if(usr.weapon == 0)
usr << "You equip the [src]!"
usr.strength += weapon_strength
suffix = "(Equiped)"
usr.weapon = 1
src.equiped = 1
else
usr << "You may only have one item equiped!"
Unequip()
set src in usr
if(src.equiped == 1)
usr << "You un-equip the [src]"
usr.strength -= weapon_strength
suffix = null
usr.weapon = 0
src.equiped = 0
else
usr << "That is not equiped yet!"
Drop()
if(src.equiped == 0)
src.loc = usr.loc
usr << "You drop the [src]"
else
usr << "You cannot drop this, it is equiped!"
Problem description: Proc definition not allowed in another proc
Ok i am a new coder, and i don't know how to fix this, somone help me!
2 - Why do you just use a boolean variable for the weapon to track whether it's equipped? That should be tracked by the mob doing the equipping.
3 - Why do you check if (equipped==1), rather then just (equipped)?