obj
Gold_Chest
name = "Golden - Chest"
icon = 'Objects.dmi'
verb
Drop()
src.loc=locate(usr.x,usr.y-1,usr.z)
Grab()
set src in oview(1)
src.loc = usr
usr<<"You opened a [src]!"
Problem description: How would I code in that if I were to click the chest, I would gain gold. I've tried this but errors pop up. And I dont know how to create a proc for it.
obj
Gold_Chest
name = "Golden - Chest"
icon = 'Objects.dmi'
verb
Drop()
src.loc=locate(usr.x,usr.y-1,usr.z)
Grab()
set src in oview(1)
src.loc = usr
usr<<"<font color=gold>You opened a [src]!"
var/tmp/goldadd = rand(10-55)
usr.gold += goldadd
Here are the tips
1.Tab your work properly or you will get error 'error: inconsistent indentation'
2.Always use Dream Makers help file which can be accessed by pressing F1