I'm making a shop (or 2, or 3...) and I want to know how to do it, I think I almost have the money part down, the code looks like this:
obj/Money
Gold
var
//mob stat modifiers
HP
dexterity
shield
armor
iq
immunity
Addkarma
money = 1
duration //number of additional digestion rounds
delay //pause (in ticks) between digestion rounds
//if duration==0, delay gives initial pause
parasite //parasite type (if any)
rot //shelf-HP (in ticks)
proc
StoreDesc()
DigestDesc()
Tick()
verb/Store()
obj/Money
Gold
gender="male"
icon='Money.dmi'
money=10
And I saw something about a Buy() thing in an earlier post, how would I use that? Would I assign it to a mob?
Thanks,
Gilser
ID:151153
![]() Mar 4 2001, 2:08 pm
|
|
![]() Mar 4 2001, 2:41 pm
|
|
I would attach it to the obj that your want to buy, maybe with a variable for it (if !variable the allow Buy()).
|
On 3/4/01 4:41 pm Spastic wrote:
I would attach it to the obj that your want to buy, maybe with a variable for it (if !variable the allow Buy()). I'm also having a problem with getting the money to work, I want to make it so the money adds like karma when you eat food, right now when you pick up the gold, it just goes into your inventory but I want it to turn into a number, not and inventory obj. But when I eat food, it adds money! That can't be good, help! Thanks Gils |