;;Ҫɾ
[@Dice]
{
#IF
#SAY
4 Dice are rolled and I will payout as follows:\\
{FCOLOR/13}Straight_______{FCOLOR/12}i.e. (1,2,3,4) = x {FCOLOR/1}24\
{FCOLOR/13}4 of a Kind__{FCOLOR/12}i.e. (6,6,6,6) = x {FCOLOR/1}12\
{FCOLOR/13}3 of a Kind__{FCOLOR/12}i.e. (1,1,1,X) = x {FCOLOR/1}4\
{FCOLOR/13}2 Pair___________{FCOLOR/12}i.e. (1,1,2,2) = x {FCOLOR/1}6\
{FCOLOR/13}Pair_______________{FCOLOR/12}i.e. (1,1,X,X) = x  {FCOLOR/1}1{FCOLOR/12}\\
All Of the Above combinations{FCOLOR/1} MUST {FCOLOR/12}be consecutive.\\
Please select an amount to Gamble\\
  <[ 10,000 ]/@SetStakes(10000)>\
  <[ 100,000 ]/@SetStakes(100000)>\
  <[ 1,000,000 ]/@SetStakes(1000000)>\
  <[ 10,000,000 ]/@SetStakes(10000000)>\\
  <[ Gambler Main Menu ]/@Main>\
  <[ Exit ]/@exit>\\\

[@SetStakes()]
#ACT
MOV    D5    %ARG(1)
#SAY
So, {FCOLOR/10}<$USERNAME>{FCOLOR/12}, you're a gambler.  I like it!!\
Are you sure you want to wager {FCOLOR/10}<$OUTPUT(D5)> Gold?{FCOLOR/12}\\
  <[ Shake The Dice! ]/@Game_dicestart>\
  <[ Gambler Main Menu ]/@Main>\
  <[ Exit ]/@exit>\\\

[@Game_dicestart]
#IF
CheckGold %D5
#ACT
Take Gold %D5
movr d0 6
movr d1 6
movr d2 6
movr d3 6
inc d0 1
inc d1 1
inc d2 1
inc d3 1
MOV   A7  ""
playdice 4 @Game_next
#SAY
{FCOLOR/10}R{FCOLOR/1}o{FCOLOR/8}l{FCOLOR/11}l{FCOLOR/15}i{FCOLOR/14}n{FCOLOR/9}g{FCOLOR/12}... \\ 
#ELSESAY
You do not have enough Gold!\
  <[ Gambler Main Menu ]/@Main>\
  <[ Exit ]/@exit>\\\

[@Game_next]
#IF
equal d0 3
equal d1 4
equal d2 5
equal d3 6
#ACT
MOV    P1    24
Mov    P2    %D5
Mul    P1    P2
Mov    D6    %P9
#SAY
Congratulations!!! You have a Straight,\
You have won.... {FCOLOR/10}<$OUTPUT(D6)> Gold!!{FCOLOR/12}\\
What do you want to do now?\\
  <[ Play Again ]/@game_dicestart>\
  <[ Change My Stake ]/@Dice>\
  <[ Gambler Main Menu ]/@Main>\
  <[ Exit ]/@exit>\\\

#ACT
Give Gold %D6
AddStr  A7 %USERNAME
AddStr  A7 ","
AddStr  A7 %A1
AddStr  A7 ","
AddStr  A7 %D6
Savelog "QuestDiary\Gambler\GamblerLog.txt" %A7
break

#IF
equal d0 2
equal d1 3
equal d2 4
equal d3 5
#ACT
MOV    P1    24
Mov    P2    %D5
Mul    P1    P2
Mov    D6    %P9
#SAY
Congratulations!!! You have a Straight,\
You have won.... {FCOLOR/10}<$OUTPUT(D6)> Gold!!{FCOLOR/12}\\
What do you want to do now?\\
  <[ Play Again ]/@game_dicestart>\
  <[ Change My Stake ]/@Dice>\
  <[ Gambler Main Menu ]/@Main>\
  <[ Exit ]/@exit>\\\

#ACT
Give Gold %D6
AddStr  A7 %USERNAME
AddStr  A7 ","
AddStr  A7 %A1
AddStr  A7 ","
AddStr  A7 %D6
Savelog "QuestDiary\Gambler\GamblerLog.txt" %A7
break

#IF
equal d0 1
equal d1 2
equal d2 3
equal d3 4
#ACT
MOV    P1    24
Mov    P2    %D5
Mul    P1    P2
Mov    D6    %P9
#SAY
Congratulations!!! You have a Straight,\
You have won.... {FCOLOR/10}<$OUTPUT(D6)> Gold!!{FCOLOR/12}\\
What do you want to do now?\\
  <[ Play Again ]/@game_dicestart>\
  <[ Change My Stake ]/@Dice>\
  <[ Gambler Main Menu ]/@Main>\
  <[ Exit ]/@exit>\\\

#ACT
Give Gold %D6
AddStr  A7 %USERNAME
AddStr  A7 ","
AddStr  A7 %A1
AddStr  A7 ","
AddStr  A7 %D6
Savelog "QuestDiary\Gambler\GamblerLog.txt" %A7
break

#IF
equal d0 6
equal d1 6
equal d2 6
equal d3 6
#ACT
goto @4dice1
break

#IF
equal d0 5
equal d1 5
equal d2 5
equal d3 5
#ACT
goto @4dice1
break

#IF
equal d0 4
equal d1 4
equal d2 4
equal d3 4
#ACT
goto @4dice1
break

#IF
equal d0 3
equal d1 3
equal d2 3
equal d3 3
#ACT
goto @4dice1
break

#IF
equal d0 2
equal d1 2
equal d2 2
equal d3 2
#ACT
goto @4dice1
break

#IF
equal d0 1
equal d1 1
equal d2 1
equal d3 1
#ACT
goto @4dice1
break

#IF
equal d0 6
equal d1 6
equal d2 6
#ACT
goto @3dice
break

#IF
equal d0 5
equal d1 5
equal d2 5
#ACT
goto @3dice
break

#IF
equal d0 4
equal d1 4
equal d2 4
#ACT
goto @3dice
break

#IF
equal d0 3
equal d1 3
equal d2 3
#ACT
goto @3dice
break

#IF
equal d0 2
equal d1 2
equal d2 2
#ACT
goto @3dice
break

#IF
equal d0 1
equal d1 1
equal d2 1
#ACT
goto @3dice
break

#IF
equal d1 6
equal d2 6
equal d3 6
#ACT
goto @3dice
break

#IF
equal d1 5
equal d2 5
equal d3 5
#ACT
goto @3dice
break

#IF
equal d1 4
equal d2 4
equal d3 4
#ACT
goto @3dice
break

#IF
equal d1 3
equal d2 3
equal d3 3
#ACT
goto @3dice
break

#IF
equal d1 2
equal d2 2
equal d3 2
#ACT
goto @3dice
break

#IF
equal d1 1
equal d2 1
equal d3 1
#ACT
goto @3dice
break

#IF
equal d0 6
equal d1 6
#ACT
goto @2dice1
break

#IF
equal d0 5
equal d1 5
#ACT
goto @2dice1
break

#IF
equal d0 4
equal d1 4
#ACT
goto @2dice1
break

#IF
equal d0 3
equal d1 3
#ACT
goto @2dice1
break

#IF
equal d0 2
equal d1 2
#ACT
goto @2dice1
break

#IF
equal d0 1
equal d1 1
#ACT
goto @2dice1
break

#IF
equal d1 6
equal d2 6
#ACT
goto @2dice
break

#IF
equal d1 5
equal d2 5
#ACT
goto @2dice
break

#IF
equal d1 4
equal d2 4
#ACT
goto @2dice
break

#IF
equal d1 3
equal d2 3
#ACT
goto @2dice
break

#IF
equal d1 2
equal d2 2
#ACT
goto @2dice
break

#IF
equal d1 1
equal d2 1
#ACT
goto @2dice
break

#IF
equal d2 6
equal d3 6
#ACT
goto @2dice
break

#IF
equal d2 5
equal d3 5
#ACT
goto @2dice
break

#IF
equal d2 4
equal d3 4
#ACT
goto @2dice
break

#IF
equal d2 3
equal d3 3
#ACT
goto @2dice
break

#IF
equal d2 2
equal d3 2
#ACT
goto @2dice
break

#IF
equal d2 1
equal d3 1
#ACT
goto @2dice
break
#ELSEACT
goto @normal

[@4dice1]
#IF
#ACT
MOV    P1    12
Mov    P2    %D5
Mul    P1    P2
Mov    D6    %P9
#SAY
Congratulations!!! You have 4 of a Kind!,\
You have won.... {FCOLOR/10}<$OUTPUT(D6)> Gold!!{FCOLOR/12}\\
What do you want to do now?\\
  <[ Play Again ]/@game_dicestart>\
  <[ Change My Stake ]/@Dice>\
  <[ Gambler Main Menu ]/@Main>\
  <[ Exit ]/@exit>\\\

#ACT
Give Gold %D6
AddStr  A7 %USERNAME
AddStr  A7 ","
AddStr  A7 %A1
AddStr  A7 ","
AddStr  A7 %D6
Savelog "QuestDiary\Gambler\GamblerLog.txt" %A7
break

[@3dice]
#IF
#ACT
MOV    P1    4
Mov    P2    %D5
Mul    P1    P2
Mov    D6    %P9
#SAY
Congratulations!!! You have 3 of a Kind!,\
You have won.... {FCOLOR/10}<$OUTPUT(D6)> Gold!!{FCOLOR/12}\\
What do you want to do now?\\
  <[ Play Again ]/@game_dicestart>\
  <[ Change My Stake ]/@Dice>\
  <[ Gambler Main Menu ]/@Main>\
  <[ Exit ]/@exit>\\\

#ACT
Give Gold %D6
AddStr  A7 %USERNAME
AddStr  A7 ","
AddStr  A7 %A1
AddStr  A7 ","
AddStr  A7 %D6
Savelog "QuestDiary\Gambler\GamblerLog.txt" %A7
break

[@2dice1]
#IF
equal d2 1
equal d3 1
#ACT
goto @2pair
break

#IF
equal d2 2
equal d3 2
#ACT
goto @2pair
break

#IF
equal d2 3
equal d3 3
#ACT
goto @2pair
break

#IF
equal d2 4
equal d3 4
#ACT
goto @2pair
break

#IF
equal d2 5
equal d3 5
#ACT
goto @2pair
break

#IF
equal d2 6
equal d3 6
#ACT
goto @2pair
break
#ELSEACT
goto @2dice

[@2pair]
#IF
#ACT
MOV    P1    6
Mov    P2    %D5
Mul    P1    P2
Mov    D6    %P9
#SAY
Congratulations!!! You have 2 Pair!,\
You have won.... {FCOLOR/10}<$OUTPUT(D6)> Gold!!{FCOLOR/12}\\
What do you want to do now?\\
  <[ Play Again ]/@game_dicestart>\
  <[ Change My Stake ]/@Dice>\
  <[ Gambler Main Menu ]/@Main>\
  <[ Exit ]/@exit>\\\

#ACT
Give Gold %D6
AddStr  A7 %USERNAME
AddStr  A7 ","
AddStr  A7 %A1
AddStr  A7 ","
AddStr  A7 %D6
Savelog "QuestDiary\Gambler\GamblerLog.txt" %A7
break

[@2dice]
#IF
#ACT
MOV    P1    1
Mov    P2    %D5
Mul    P1    P2
Mov    D6    %P9
#SAY
Congratulations!!! You have 1 Pair!,\
You have won.... {FCOLOR/10}<$OUTPUT(D6)> Gold!!{FCOLOR/12}\\
What do you want to do now?\\
  <[ Play Again ]/@game_dicestart>\
  <[ Change My Stake ]/@Dice>\
  <[ Gambler Main Menu ]/@Main>\
  <[ Exit ]/@exit>\\\

#ACT
Give Gold %D6
AddStr  A7 %USERNAME
AddStr  A7 ","
AddStr  A7 %A1
AddStr  A7 ","
AddStr  A7 %D6
Savelog "QuestDiary\Gambler\GamblerLog.txt" %A7
break

[@normal]
#IF
#SAY
Sorry, no win this time\
What do you want to do now?\\
  <[ Play Again ]/@game_dicestart>\
  <[ Change My Stake ]/@Dice>\
  <[ Gambler Main Menu ]/@Main>\
  <[ Exit ]/@exit>\\\
#ACT
AddStr  A7 %USERNAME
AddStr  A7 ","
AddStr  A7 %A1
AddStr  A7 ",No Win"
Savelog "QuestDiary\Gambler\GamblerLog.txt" %A7

}
;;Ҫɾ