here is my code i need to be able to give the gold back to the player when i sell but i dont know how i should define the object
proc/sell()
var/which_item = input(usr,"Which item do you wish to sell?", ", src.goldvalue") in usr.contents
usr.gold += goldvalue //here is da problem what do i put to make it give you back the items worth
del(which_item)
ID:149645
![]() Mar 19 2002, 10:13 pm
|
|
It depends on how you determine an object's value in the game. If you store it in the object itself (one good way to go), then you can do something like this:
This will work if you store the value in the object where it is appropriate.