Breaking one value into multiple values...
|
|
I'm wondering if it's possible to use one numerical value to set the value of four other variables.
The four variables are copper for the 1s place, silver for the 10s place, gold for the 100s place and platinum for the 1000s place. They are the players currency. The item value would be translated into those four currencies, which would then be displayed individually.
Like so...
item_value=37
37 = 37 copper or 3 silver 7 copper
|
item_value=1424
1424 = 1424 copper or 14 gold 2 silver 4 copper or 1 platinum 4 gold 24 copper or 1 platinum 4 gold 2 silver 4 copper
|
item_value=27893
27893 = 27893 copper or 278 gold 9 silver 3 copper or 27 platinum 8 gold 93 copper or 27 platinum 8 gold 9 silver 3 copper
|
|