ID:266781
 
With Harry Potter the money system is set up a little weird... How would I set it up with having 29 Knuts to a Sickle, and 17 Sickles to a Galleon?
mob/var
Knucks = 0
Sickles = 0
Galleons = 0

just check when you get Knucks if they're over or is 29(e.x

obj/Knucks
var/KnucksHeld = 17
if(usr.Knucks+17 >= 29)
usr.Sickles += 1
usr.Knucks -= 29
del(src)
In response to Thief Jack (#1)
You spelled knuts wrong but oh well... and would that automatically work in reverse for buying stuff, or what should I do when it comes to that?
In response to Eagle Madigan (#2)
Erm.....?
In response to Thief Jack (#3)
Let's say someone has 1 Galleon and an item costs 16 sickles... since 17 sickles are in a galleon the money left would be 1 sickle... would that coding you have work in reverse as well to make it set up like that?
In response to Eagle Madigan (#4)
mob/Dumbeldore_&_Hermoine
verb/Buy()
//lets say it costs 16 sickles are you said
if(usr.Galleon >= 1)
usr.Galleon -= 1
usr.Sickles += 1
else if(usr.Sickes >= 16)
usr.Sickes -= 16
else usr << "Damn your poor!"