say you want gold, silver, copper, and platinum in your game how would you go about getting it I got this code...
obj
gold
icon= 'obj.dmi'
icon_state = "gold"
verb
Grab_gold()
set src in oview(1)
usr.gold += 2
usr << "You pick up 2 gold pieces!"
del(src)
silver
icon= 'obj.dmi'
icon_state = "silver"
verb
Grab_silver()
set src in oview(1)
usr.silver += 5
usr << "You pick up 5 silver pieces!"
del(src)
platinum
icon= 'obj.dmi'
icon_state = "platinum"
verb
Grab_platinum()
set src in oview(1)
usr.platinum += 1
usr << "You pick up 1 platinum piece!"
del(src)
copper
icon= 'obj.dmi'
icon_state = "copper"
verb
Grab_copper()
set src in oview(1)
usr.copper += 10
usr << "You pick up 10 copper pieces!"
del(src)
Unidentified vars... it says for copper silver and platinum can I fix this?
ID:174517
![]() Aug 10 2003, 6:19 pm
|
|
Majinveku wrote:
say you want gold, silver, copper, and platinum in your game how would you go about getting it I got this code... also with the bits that your adding onto you can have it slightly random like this: var/resourcename = rand(1,20) usr<<"You pick up [resourcename] resourcename" and in order to fix these problems you need to defign them as vars (for a mob) ex: </dm>mob/var gold=0//that will make recognise things when you have any thing to do with 'gold'</dm> |
mob/var
gold = 0
silver = 0
copper = 0
platinum = 0
that way, people start off with 0 of each, and gain some of each, by picking them up (with your verbs)