Currency Handler

by Danny Roe
A small system to easily handle your in-game currency. [More]
To download this library for your Linux/Mac installation, enter this on your command line:

DreamDownload byond://DannyRoe.CurrencyHandler##version=1

Emulator users, in the BYOND pager go to File | Open Location and enter this URL:

byond://DannyRoe.CurrencyHandler##version=1

126 downloads
Version 1
Date added: Mar 4 2013
Last updated: Mar 5 2013
5 fans
This is a currency system such as seen in World of Warcraft, where:

100 Copper = 1 Silver
100 Silver = 1 Gold

Updating a mobs currency is easily handled through the use of the proc currencyUpdate(). Please refer to Notes.dm for further information on using this library.

Comments

AgentLuigi3: (Apr 27 2014, 4:14 am)
Okay, so I get how this currency system works, however is there away that I could make variables so that, for example, when someone completes a level for the first time, they get 10 copper, but after that, they don't get anything? Or is there a way I could delete the, i guess you could call them "variations" of currency and just use coins? I do know this is very convenient, but I just want a simpler economy... In my game there isn't really much to buy.

EDIT: I know I can delete the gold/silver/bronze/copper list and just replace it with 'currencies = Coins' but I don't know how to replace the other stuff.
Solomn Architect: (Mar 6 2013, 10:53 am)
Well, my assumption was that you were taking away simplicity for efficiency.
Emasym: (Mar 6 2013, 10:21 am)
Solomn Architect wrote:
I have to agree with Danny on his choice. Two less variables is just being nit picky and a waste of time to condense it down further. Honestly with the memory allocation in today's computers, memory is only a problem if it leaks.

I was plainly talking about convenience of having one simple number. Nowhere did I ever mention it taking in less memory.
Solomn Architect: (Mar 6 2013, 6:27 am)
I have to agree with Danny on his choice. Two less variables is just being nit picky and a waste of time to condense it down further. Honestly with the memory allocation in today's computers, memory is only a problem if it leaks.
Danny Roe: (Mar 6 2013, 12:47 am)
I had considered using one single numerical variable and just displaying it as Gold, Silver and Copper (You will notice I convert it all to copper to check you have enough to subtract from a mob). However I personally just found this much neater.