obj
verb
Get()
set category = "Inventory Commands"
usr <<"> You pick up the item"
src.loc = usr
Drop()
set category = "Inventory Commands"
usr <<"> You drop the item"
src.loc = usr.loc
obj
Iron_Helmet
icon = 'ironhelm.dmi'
obj/Iron_Helmet
verb
Wear()
set category = "Inventory Commands"
if(usr.helm == 1)
usr <<"> You can only wear one helmet at a time!"
else
usr <<"> you wear the helmet!"
usr.overlays += 'ironhelm.dmi'
usr.helm = 1
usr.defense += 10
Remove()
set category = "Inventory Commands"
if(usr.helm == 0)
usr <<"> You can don't got any helmets to remove!"
else
usr <<"> you remove the helmet!"
usr.overlays -= 'ironhelm.dmi'
usr.helm = 0
usr.defense -= 10
----
The drop and get verbs only work when you have the obj.. and i can't pick em up.!
ID:178206
Jun 9 2002, 9:25 am
|
|
In response to Shadowdarke
|
|
heres the code
obj Iron_Helmet icon = 'ironhelm.dmi' obj/Iron_Helmet verb Get() set src in oview(1) set category = "Inventory Commands" usr <<"> You pick up the item" src.loc = usr Wear() set category = "Inventory Commands" if(usr.helm == 1) usr <<"> You can only wear one helmet at a time!" else usr <<"> you wear the helmet!" usr.overlays += 'ironhelm.dmi' usr.helm = 1 usr.defense += 10 Remove() set category = "Inventory Commands" if(usr.helm == 0) usr <<"> You can don't got any helmets to remove!" else usr <<"> you remove the helmet!" usr.overlays -= 'ironhelm.dmi' usr.helm = 0 usr.defense -= 10 Drop() set category = "Inventory Commands" usr <<"> You drop the item" src.loc = usr.loc it doesn't give the get verb now. |
In response to ShadowSiientx
|
|
I just used that exact code from your post in a test case (without the remove and wear verbs) and it worked. You are checking in the "Inventory Commands", right?
|
set src in oview(1)
just after the verb declaration.