;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[@MoneyChange]
{
#SAY
I can change GoldBars, GoldChests and Cash\
What would you like to do?\\
<[ Change GoldBars into Gold ]/@BarsToCash>\
<[ Change Gold into GoldBars ]/@CashToBars>\
;<[ Change GoldChests into Gold ]/@ChestsToCash>\
;<[ Change Gold into GoldChests ]/@CashToChests>\\
<[ Change 1 GoldChest into 100 Mil Gold ]/@ChangeAChest>\
<[ Change 100 Mil Gold into 1 GoldChest ]/@ChangeAChestGold>\\
1 GoldBar = 1 Million\
1 GoldChest = 100 Million\\
<[ Exit ]/@exit>\\\

[@ChangeAChest]
#IF
CheckGold 900000000
#SAY
You cannot have more than 1 Billion\\
<[ Exit ]/@exit>\\\
#ACT
Break

#IF
CheckItem  GoldChest  1
#ACT
Take  GoldChest 1
Give  Gold  100000000
#SAY
Here is your Gold.. \
<[ Change Another ]/@ChangeAChest>\\
<[ Exit ]/@exit>\\\
#ELSESAY
You Don't have any GoldChests!\
<[ Exit ]/@exit>\\\


[@ChangeAChestGold]
#IF
CheckGold 100000001
#ACT
Give  GoldChest 1
Take  Gold  100000000
#SAY
Here is your GoldChest.. \
<[ Change Another ]/@ChangeAChestGold>\\
<[ Exit ]/@exit>\\\
#ELSESAY
You Don't have 100 Mil Gold!\\
<[ Exit ]/@exit>\\\


[@BarsToCash]
#SAY
Please enter the amount of GoldBars you wish to sell\
<[ Enter Qty of Bars ]/@@BarsToCash1>\\

[@@BarsToCash1]
#ACT
Mov   D1   %INPUTSTR
#IF
Small D1  1
#SAY
Invalid Qty, please try again\
Must be between 1 and 25\\
<[ Back ]/@BarsToCash]>\
<[ Exit ]/@exit>\\\
#ACT
Break

#IF
Large D1  25
#SAY
Invalid Qty, please try again\
Must be between 1 and 25\\
<[ Back ]/@BarsToCash]>\
<[ Exit ]/@exit>\\\
#ACT
Break

#IF
#ACT
Mov   P1  %D1
Mov   P2  1000000
Mul   P1   P2
Mov   D2   %P9
#SAY
Selling {FCOLOR/10}<$OUTPUT(D1)>{FCOLOR/12} Gold Bars will Give\
you {FCOLOR/10}<$OUTPUT(D2)>{FCOLOR/12} Gold\\
<[ Proceed ]/@BarsToCash2>\\
<[ Exit ]/@exit>\\\

[@BarsToCash2]
#IF
CheckItem  GoldBar  %D1 
#ACT
Give  Gold     %D2
Take  GoldBar  %D1
#SAY
All done, Thanks\\
<[ Exit ]/@exit>\\\


[@CashToBars]
#SAY
Please enter the amount of GoldBars you wish to buy\\
<[ Enter Qty of Bars ]/@@CashToBars1>\\

[@@CashToBars1]
#ACT
Mov   D1   %INPUTSTR
#IF
Small D1  1
#SAY
Invalid Qty, please try again\
Must be between 1 and 25\\
<[ Back ]/@CashToBars]>\
<[ Exit ]/@exit>\\\
#ACT
Break

#IF
Large D1  25
#SAY
Invalid Qty, please try again\
Must be between 1 and 25\\
<[ Back ]/@CashToBars]>\
<[ Exit ]/@exit>\\\
#ACT
Break

#IF
#ACT
Mov   P1  %D1
Mov   P2  1000000
Mul   P1   P2
Mov   D2   %P9
#SAY
Buying {FCOLOR/10}<$OUTPUT(D1)>{FCOLOR/12} Gold Bars will cost\
you {FCOLOR/10}<$OUTPUT(D2)>{FCOLOR/12} Gold\\
<[ Proceed ]/@CashToBars2>\\
<[ Exit ]/@exit>\\\

[@CashToBars2]
#IF

CheckGold  %D2
#ACT
Give  GoldBar     %D1
Take  Gold     %D2
#SAY
All done, Thanks\\
<[ Exit ]/@exit>\\\

[@ChestsToCash]
#SAY
Please enter the amount of GoldChests you wish to sell\
<[ Enter Qty of Chests ]/@@ChestsToCash1>\\

[@@ChestsToCash1]
#ACT
Mov   D1   %INPUTSTR
#IF
Small D1  1
#SAY
Invalid Qty, please try again\
Must be between 1 and 5\\
<[ Back ]/@ChestsToCash]>\
<[ Exit ]/@exit>\\\
#ACT
Break

#IF
Large D1  5
#SAY
Invalid Qty, please try again\
Must be between 1 and 5\\
<[ Back ]/@ChestsToCash]>\
<[ Exit ]/@exit>\\\
#ACT
Break

#IF
#ACT
Mov   P1  %D1
Mov   P2  100000000
Mul   P1   P2
Mov   D2   %P9
#SAY
Selling {FCOLOR/10}<$OUTPUT(D1)>{FCOLOR/12} Gold Chests will Give\
you {FCOLOR/10}<$OUTPUT(D2)>{FCOLOR/12} Gold\\
<[ Proceed ]/@ChestsToCash2>\\
<[ Exit ]/@exit>\\\

[@ChestsToCash2]
#IF
CheckItem  GoldChest  %D1 
#ACT
Give  Gold     %D2
Take  GoldChest  %D1
#SAY
All done, Thanks\\
<[ Exit ]/@exit>\\\


[@CashToChests]
#SAY
Please enter the amount of GoldChests you wish to buy\\
<[ Enter Qty of Chests ]/@@CashToChests1>\\

[@@CashToChests1]
#ACT
Mov   D1   %INPUTSTR
#IF
Small D1  1
#SAY
Invalid Qty, please try again\
Must be between 1 and 5\\
<[ Back ]/@CashToChests]>\
<[ Exit ]/@exit>\\\
#ACT
Break

#IF
Large D1  5
#SAY
Invalid Qty, please try again\
Must be between 1 and 5\\
<[ Back ]/@CashToChests]>\
<[ Exit ]/@exit>\\\
#ACT
Break

#IF
#ACT
Mov   P1  %D1
Mov   P2  100000000
Mul   P1   P2
Mov   D2   %P9
#SAY
Buying {FCOLOR/10}<$OUTPUT(D1)>{FCOLOR/12} Gold Chests will cost\
you {FCOLOR/10}<$OUTPUT(D2)>{FCOLOR/12} Gold\\
<[ Proceed ]/@CashToChests2>\\
<[ Exit ]/@exit>\\\

[@CashToChests2]
#IF

CheckGold  %D2
#ACT
Give  GoldChest     %D1
Take  Gold     %D2
#SAY
All done, Thanks\\
<[ Exit ]/@exit>\\\

}

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;