; ===================================
; Market Def NPC File : 8Ega-B127
; Gambleroom
; -----------------------------------
; Name: GambleWoman
; Job: 
; Map No: B127
; Pos X 10
; Pos Y 6
; File name: *removed*
; Comment: Gambleroom

;================================================= =
;

[@main]
#IF
equal p9 0
#ACT
goto @main-1
BreakTimeRecall 
break

#IF
equal p9 1
#ACT
goto @race
BreakTimeRecall 
break

#IF
equal p9 2
#ACT
goto @total
BreakTimeRecall 
break

#IF
equal p9 3
#ACT
goto @total1
BreakTimeRecall 
break

#IF
equal p9 4
#ACT
goto @cube
BreakTimeRecall 
break

#IF
equal p9 9
#ACT
goto @quit
BreakTimeRecall 
break

[@main-1]
#IF
#ACT
mov p9 0
#SAY
Hello <$USERNAME>.\
Welcome to room 27.\
Here you might get a present, we will see\
Or I might be nasty and take something from you\
Mwhahah\ \
<Continue/@Penalty>

[@Quit]
#IF
#ACT
map B011

[@Penalty]
#IF
random 8
#SAY
I take 2 gamble chips\
Unlucky\ \
<Damn it/@race>
#ACT
mov p9 1
take gamblechip 2
break

#IF
random 8
#SAY
I give 2 gamble chips\
Lucky Boy\ \
<Thanks/@race>
#ACT
mov p9 1
give gamblechip 2
break

#IF
random 8
#SAY
Well, I'm not taking nor giving anything this time\ \
<Ok/@back>
#ACT
mov p9 2
mov p8 1
break

#IF
random 8
#SAY
Well, I'm not taking nor giving anything this time\ \
<Damn/@forward>
#ACT
mov p9 2
mov p8 2
break

#IF
random 8
#SAY
Well, I'm not taking nor giving anything this time\ \
<Damn/@race>
#ACT
mov p9 1
break

#IF
random 8
#SAY
I will take 2000 gold thank you very much!\ \
<Nooo/@race>
#ACT
take gold 2000
mov p9 1
break

#IF
random 8
#SAY
I will take some items off your hands this time\ \
<Damn/@race>
#ACT
take GambleChip 5
mov p9 1
break

#IF
random 8
#SAY
Here, have 5 GambleChips\
Use them well\ \
<Thanks/@race>
#ACT
give GambleChip 5
mov p9 1
break
#ELSEACT
goto @penalty

[@race]
Go role the dice...\ \
<Will do/@pre_Cube>

[@pre_cube]
#IF
checkitem gamblechip 1
#ACT
mov p9 4
take gamblechip 1
movr d0 6
inc d0 1
playdice 1 @cube
#SAY
Continue\ \
<Ok/@cube>
#ELSESAY
<$USERNAME>, You haven't got any chips!\
Go get some if you want to gamble.\ \
<Silly Me/@Quit>
#ELSEACT
mov p9 9

[@cube]
#SAY
Hey, you rolled a <$STR(D0)> \
You can now move <$STR(D0)> rooms forward.\ \
<Sweet, lets move!/@next_cube>

[@next_cube]
#IF
equal d0 1 
#ACT
goto @posi1
break

#IF
equal d0 2 
#ACT
goto @posi2
break

#IF
equal d0 3 
#ACT
goto @posi3
break

#IF
equal d0 4 
#ACT
goto @posi4
break

#IF
equal d0 5
#ACT
goto @posi5
break

#IF
equal d0 6 
#ACT
goto @posi6
break

[@total]
#IF
checkitem gamblechip 1
#ACT
mov p9 3
take gamblechip 1
goto @total1
#ELSESAY
<$USERNAME>, You haven't got any chips!\
Go get some if you want to gamble.\ \
<Silly Me/@Quit>
#ELSEACT
mov p9 9

[@total1]
#IF
equal p8 1
#SAY
You are going back a few rooms I am afraid.\ \
<Nooo/@back>
#ACT
break

#IF
equal p8 2
#SAY
You are going forward a few rooms.\ \
<Cool/@forward>
#ACT
break

[@back]
#IF
#ACT
batchDelay 1
addbatch B126
addbatch B125
addbatch B124
addbatch B123
batchmove

[@forward]
#IF
#ACT
batchDelay 1
addbatch B128
addbatch B129
addbatch B130
addbatch B131
batchmove

[@Posi1]
#IF
#ACT
batchDelay 1
addbatch B128
batchmove

[@Posi2]
#IF
#ACT
batchDelay 1
addbatch B128
addbatch B129
batchmove

[@Posi3]
#IF
#ACT
batchDelay 1
addbatch B128
addbatch B129
addbatch B130
batchmove

[@Posi4]
#IF
#ACT
batchDelay 1
addbatch B128
addbatch B129
addbatch B130
addbatch B131
batchmove

[@Posi5]
#IF
#ACT
batchDelay 1
addbatch B128
addbatch B129
addbatch B130
addbatch B131
addbatch B132
batchmove

[@Posi6]
#IF
#ACT
batchDelay 1
addbatch B128
addbatch B129
addbatch B130
addbatch B131
addbatch B132
addbatch B133
batchmove

