ID:263332
 
Problem:
how would I go about making a W? Thats supposed to be the weapon you have equipped. I also can't figure out 1) the weapon you have equipped doesn't show anything like (Equipped) so how would I show that? and 2) I can drop the weapon even when it's equipped how do i fix it?

Code:
    verb
equip()
if(usr.weapon == 1)
if(src.eqp == 1)
usr << "The [src] is already equiped."
else
src.eqp = 1
//W.eqp = 0
usr << "You remove the W and equip the [src]."
usr.wpmin = 1
usr.wpmax = 4
else
src.eqp = 1
usr << "You equip the [src]."
usr.wpmin = 1
usr.wpmax = 4

unequip()
if(usr.weapon == 0)
usr << "Nothing is equipped."
else
src.eqp = 0
usr << "You remove the [src]."
usr.wpmin = 0
usr.wpmax = 2


Problem description:

    verb
equip()
if(src.suffix)//if it has a suffix
usr<<"The [src] is already equiped."//tell usr its already equiped
else//if it has no suffix, equp it
src.eqp = 1
usr << "You equip the [src]."
usr.wpmin = 1
usr.wpmax = 4
src.suffix="Equipped"//give the obj a siffix as in Equipped on the side of it
unequip()
if(src.suffix)//if it has a suffix. remove the item
src.eqp = 0
usr << "You remove the [src]."
usr.wpmin = 0
usr.wpmax = 2
src.suffix=null//make the src suffix null
drop()
if(src.suffix)//if the item your gonna drop has a suffix, make it unequip
src.eqp = 0
usr << "You dropped [src]."
usr.wpmin = 0
usr.wpmax = 2
src.suffix=null//make the src suffix null


You use suffix to make the words, and using suffix is a better way to tell if its equiped or not.

- Dark Emrald
I think the other guy pretty much answered it all.
But i'd like to add, for things like:

if(src.argumentA == 1)
src.argumentB=1


The bit in "if" need not have '==1'. Instead, use this:
</dm>
if(src.argumentA)   //if argumentA is true
src.argumentB=1

OR
if(!src.argumentA)   //if argumentA is not true
src.argumentB=0


Moral of th story: things in the if() dont need ==1 or ==0. If its any other value, then it DOES need ==___.
Things being true/false based on equalling 1 or 0 is known as boolean.