obj |
Problem description:
Ok as the Topic States my stats dont revert back to wat they wer before i put the item on anyone know how to change this
ID:142601
Apr 13 2008, 8:07 pm
|
||
Code:
Problem description: Ok as the Topic States my stats dont revert back to wat they wer before i put the item on anyone know how to change this | ||
-Don't use the : operator
-src.loc=locate(usr.x,usr.y-1,usr.z) is overkill, just use src.loc=usr.loc
-You don't need a worn variable, instead try if(src in usr) to check if the user has the object and create something like mob/var/obj/suit (actually you would want to add /obj/clothes and make all clothes derived from that if you plan to add any other types of clothing) and set that to whatever the person wearing. -You have a ton of possible glitches, for example there's no checking if the user is already wearing something.
-Drop() could be shortened to
Drop()if(src.worn)
usr << "Not while its being worn."
else
src.loc=usr.loc
I'm not sure if any of these are the cause of your problem, but fixing them up would certainly make everything a lot clearer.