ID:262751
 
I want it so that when you drop a weapon/armor/accessory, if it's equiped, them to unequip then drop it. My drop code is:
obj/verb/Drop()
set src in view(1)
loc = usr.loc


what must io add to it to make it unequip and then drop the item?
Instead of an unequip verb make an unequip proc that is called by the verb. then call that proc in the drop verb.
In response to Dark Weasel
i understand what you mean by making it a proc, but i can't do that because of how my equipment proc is. MNy equipment proc is for each type of weapon/armor. meaning there is one for weapon,armor,shield,etc. and the unequip is specified for each one as is the equip. I want to keep that because it works right, but i want to make it *topic*
My equip proc looks like this

obj
weapon
var/Attack
var/Magic
verb/Equip()
if(usr.W) usr.W.Unequip()
usr.W=src
usr << "You equip a [src]"
usr.Attack += Attack
usr.Magic_Attack += Magic
verb/Unequip()
if(!usr.W)
usr << "You don't have anything equipped"
return
usr.W=null
usr << "You have unequipped [src]"
usr.Attack -= Attack
usr.Magic_Attack -= Magic

there is no problems, but the item remains equiped when dropped.