; ===================================
; QGO Market Def NPC File : 9Ega-B120
; Gambling House - Gambling Room 2 (20th)
; -----------------------------------
; 6 July 2003 (Xerxes)
;   - Added New text
; ===================================
[@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 @cube
	BreakTimeRecall 
	break

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



; -----------------------------------
[@main-1]
#IF
#ACT
	mov p9 0
#SAY
		;! <$USERNAME> \
		;̰  20°, ǹԴϴ \
		; ǹ濡  Ͻðڽϱ? \
		; ϰų,ų װ  <$USERNAME> \
		;!!  и ø  ִ ȸ ׳ \
		;ġ ð? \
;-------------NEW TEXT-------------------
Come along, come along there <$USERNAME>!\
Savour the joys of this, the 20th Ma-Bang-Jin room! In here,\
you have the option to gamble two of your chips to increase your\
wealth! Alternatively, you can just proceed with your next throw.\
But why rush, when you have so much to gain? I can also convert\
six gambling chips into a gamble chip bundle for you!\\
;-----------END NEW TEXT-----------------
		;<̵ ϰڽϴ./@race> \
		;< ϰڽϴ./@presen> \
		;<а ʹ  и ڽϴ./@bind>
<No thank you, I want to move on/@race> \
<Yes I'll Gamble!/@presen>
<Convert Gambling Chips/@bind> 



; -----------------------------------
[@bind]
#IF
	checkitem GambleChip 6
#ACT
	take GambleChip 6
	give BundleChip 1
#SAY
		;и    ϴ. \ \
;-------------NEW TEXT-------------------
I have given you a gamble chip bundle for 6 of your gambling chips.\\
;-----------END NEW TEXT-----------------
		;<  /@main-1>
<Back/@main-1>

#ELSESAY
		; е ø鼭 и  \
		Ƿ Ͻô ? ٽ ѹ Ȯ  \ \
;-------------NEW TEXT-------------------
You don't have enough Gambling Chips to make a bundle!\
You need six gambling chips to make one!\\
;-----------END NEW TEXT-----------------
		;<  /@main-1>
<Back/@main-1>



; -----------------------------------
[@race]
#IF
#ACT
	mov p9 1
#SAY
		;ֻ  ִ ȸ 帮ڽϴ. \
		;׷  ϴ. \ \
;-------------NEW TEXT-------------------
Very well, you may now use another gambling chip and\
throw your next dice! Good luck!\\
;-----------END NEW TEXT-----------------
;<  /@pre_cube>
<Throw the Dice/@pre_cube>



; -----------------------------------
[@presen]
#IF
#SAY 
		;{3,4,5,6}  :  40  ,  {2,3,4,5}  :  35\
		;{1,2,3,4}  :  35  ,  {6,6,6,6}  :  30\
		;{5,5,5,5}  :  28  ,  {4,4,4,4}  :  26\
		;{3,3,3,3}  :  24  ,  {2,2,2,2}  :  22\
		;{1,1,1,1}  :  20  \
		; ڰ 3ڸ ؼ ö   :   10\
		; ڰ ؼ 2Ʈ ö   :   8\
		; ڰ 2ڸ ؼ ö   :   1\
;-------------NEW TEXT-------------------
You have 4 dice to roll - the following gives you a table of winnings.\
3,4,5,6 = 40 chips; 2,3,4,5 = 35 chips; 1,2,3,4 = 35 chips\
6,6,6,6 = 30 chips; 5,5,5,5 = 28 chips; 4,4,4,4 = 26 chips\
3,3,3,3 = 24 chips; 2,2,2,2 = 22 chips, 1,1,1,1 = 20 chips\
If the dice show three identical numbers = 10 chips\
If the dice show two number pairs (ex. 2,2 & 3,3) = 8 chips\
If the dice show one pair (ex. 2,2)  = 1 chip\\
;-----------END NEW TEXT-----------------
		;<  /@dicestart>
<Roll the Dice/@dicestart>


; -----------------------------------
[@Quit]
#IF
#ACT
	map B011


; -----------------------------------
[@dicestart]
#IF
	checkitem GambleChip 2
#ACT
	take GambleChip 2
	movr d0 6
	movr d1 6
	movr d2 6
	movr d3 6
	inc d0 1
	inc d1 1
	inc d2 1
	inc d3 1
	playdice 4 @next
#SAY
		;ֻ  ֽϴ. \ \
;-------------NEW TEXT-------------------
The dice have been thrown....\\
;-----------END NEW TEXT-----------------
		;<  /@next>
<Continue/@next>

#ELSESAY
		; а ʴϴ. \
		; ¿    ؼ ϽǼ ϴ. \ \
;-------------NEW TEXT-------------------
Oh dear, <$USERNAME>, you don't seem to have any gambling\
chips left... You cannot continue without them. Please return\
when you have acquired some more!\\
;-----------END NEW TEXT-----------------
		;<  /@dicestart>
<Leave the Game/@dicestart>



; -----------------------------------
[@next]
#IF
	equal d0 3
	equal d1 4
	equal d2 5
	equal d3 6
#ACT
	goto @Dedice1
	break

#IF
	equal d0 2
	equal d1 3
	equal d2 4
	equal d3 5
#ACT
	goto @Dedice2
	break

#IF
	equal d0 1
	equal d1 2
	equal d2 3
	equal d3 4
#ACT
	goto @Dedice3
	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 @4dice2
	break

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

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

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

#IF
	equal d0 1
	equal d1 1
	equal d2 1
	equal d3 1
#ACT
	goto @4dice6
	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


; -----------------------------------
[@Dedice1]
#IF
#SAY
		; մϴ!! \ 
		; <$STR(D0)> , <$STR(D1)> , <$STR(D2)> , <$STR(D3)> ɸ̽ϴ. \
		; и 40 帮ڽϴ. \
		; ؼ Ͻðڽϱ? ƴϸ  νðڽϱ? \ \
;-------------NEW TEXT-------------------
Congratulations! The dice show <$STR(D0)>, <$STR(D1)>, <$STR(D2)>,<$STR(D3)>\
That means you won 40 Gambling Chips!\
Do you feel lucky? Do you want to try again?
;-----------END NEW TEXT-----------------
		;< մϴ./@dicestart> \
		;< ΰڽϴ./@main-1>
<Yes I feel lucky/@dicestart> \
<No thank you, I want to stop/@main-1>

#ACT
	give GambleChip 40

; -----------------------------------
[@Dedice2]
#IF
#SAY
		; մϴ!! \ 
		; <$STR(D0)> , <$STR(D1)> , <$STR(D2)> , <$STR(D3)> ɸ̽ϴ. \
		; и 35 帮ڽϴ. \
		; ؼ Ͻðڽϱ? ƴϸ  νðڽϱ? \ \
;-------------NEW TEXT-------------------
Congratulations! The dice show <$STR(D0)>, <$STR(D1)>, <$STR(D2)>,<$STR(D3)>\
That means you won 35 Gambling Chips!\
Do you feel lucky? Do you want to try again?
;-----------END NEW TEXT-----------------
		;< մϴ./@dicestart> \
		;< ΰڽϴ./@main-1>
<Yes I feel lucky/@dicestart> \
<No thank you, I want to stop/@main-1>

#ACT
	give GambleChip 35

; -----------------------------------
[@Dedice3]
#IF
#SAY
		; մϴ!! \ 
		; <$STR(D0)> , <$STR(D1)> , <$STR(D2)> , <$STR(D3)> ɸ̽ϴ. \
		; и 35 帮ڽϴ. \
		; ؼ Ͻðڽϱ? ƴϸ  νðڽϱ? \ \
;-------------NEW TEXT-------------------
Congratulations! The dice show <$STR(D0)>, <$STR(D1)>, <$STR(D2)>,<$STR(D3)>\
That means you won 35 Gambling Chips!\
Do you feel lucky? Do you want to try again?
;-----------END NEW TEXT-----------------
		;< մϴ./@dicestart> \
		;< ΰڽϴ./@main-1>
<Yes I feel lucky/@dicestart> \
<No thank you, I want to stop/@main-1>

#ACT
	give GambleChip 35

; -----------------------------------
[@4dice1]
#IF
#SAY
		; մϴ!! \ 
		; <$STR(D0)> , <$STR(D1)> , <$STR(D2)> , <$STR(D3)> ɸ̽ϴ. \
		; и 30 帮ڽϴ. \
		; ؼ Ͻðڽϱ? ƴϸ  νðڽϱ? \ \
;-------------NEW TEXT-------------------
Congratulations! The dice show <$STR(D0)>, <$STR(D1)>, <$STR(D2)>,<$STR(D3)>\
You have 4 of a kind! You have won 30 Gambling Chips!\
Do you feel lucky? Do you want to try again?
;-----------END NEW TEXT-----------------
		;< մϴ./@dicestart> \
		;< ΰڽϴ./@main-1>
<Yes I feel lucky/@dicestart> \
<No thank you, I want to stop/@main-1>

#ACT
	give GambleChip 30


; -----------------------------------
[@4dice2]
#IF
#SAY
		; մϴ!! \ 
		; <$STR(D0)> , <$STR(D1)> , <$STR(D2)> , <$STR(D3)> ɸ̽ϴ. \
		; и 28 帮ڽϴ. \
		; ؼ Ͻðڽϱ? ƴϸ  νðڽϱ? \ \
;-------------NEW TEXT-------------------
Congratulations! The dice show <$STR(D0)>, <$STR(D1)>, <$STR(D2)>,<$STR(D3)>\
You have 4 of a kind! You have won 28 Gambling Chips!\
Do you feel lucky? Do you want to try again?
;-----------END NEW TEXT-----------------
		;< մϴ./@dicestart> \
		;< ΰڽϴ./@main-1>
<Yes I feel lucky/@dicestart> \
<No thank you, I want to stop/@main-1>

#ACT
	give GambleChip 28


; -----------------------------------
[@4dice3]
#IF
#SAY
		; մϴ!! \ 
		; <$STR(D0)> , <$STR(D1)> , <$STR(D2)> , <$STR(D3)> ɸ̽ϴ. \
		; и 26 帮ڽϴ. \
		; ؼ Ͻðڽϱ? ƴϸ  νðڽϱ? \ \
;-------------NEW TEXT-------------------
Congratulations! The dice show <$STR(D0)>, <$STR(D1)>, <$STR(D2)>,<$STR(D3)>\
You have 4 of a kind! You have won 26 Gambling Chips!\
Do you feel lucky? Do you want to try again?
;-----------END NEW TEXT-----------------
		;< մϴ./@dicestart> \
		;< ΰڽϴ./@main-1>
<Yes I feel lucky/@dicestart> \
<No thank you, I want to stop/@main-1>

#ACT
	give GambleChip 26

; -----------------------------------
[@4dice4]
#IF
#SAY
		; մϴ!! \ 
		; <$STR(D0)> , <$STR(D1)> , <$STR(D2)> , <$STR(D3)> ɸ̽ϴ. \
		; и 24 帮ڽϴ. \
		; ؼ Ͻðڽϱ? ƴϸ  νðڽϱ? \ \
;-------------NEW TEXT-------------------
Congratulations! The dice show <$STR(D0)>, <$STR(D1)>, <$STR(D2)>,<$STR(D3)>\
You have 4 of a kind! You have won 24 Gambling Chips!\
Do you feel lucky? Do you want to try again?
;-----------END NEW TEXT-----------------
		;< մϴ./@dicestart> \
		;< ΰڽϴ./@main-1>
<Yes I feel lucky/@dicestart> \
<No thank you, I want to stop/@main-1>

#ACT
	give GambleChip 24

; -----------------------------------
[@4dice5]
#IF
#SAY
		; մϴ!! \ 
		; <$STR(D0)> , <$STR(D1)> , <$STR(D2)> , <$STR(D3)> ɸ̽ϴ. \
		; и 22 帮ڽϴ. \
		; ؼ Ͻðڽϱ? ƴϸ  νðڽϱ? \ \
;-------------NEW TEXT-------------------
Congratulations! The dice show <$STR(D0)>, <$STR(D1)>, <$STR(D2)>,<$STR(D3)>\
You have 4 of a kind! You have won 22 Gambling Chips!\
Do you feel lucky? Do you want to try again?
;-----------END NEW TEXT-----------------
		;< մϴ./@dicestart> \
		;< ΰڽϴ./@main-1>
<Yes I feel lucky/@dicestart> \
<No thank you, I want to stop/@main-1>

#ACT
	give GambleChip 22

; -----------------------------------
[@4dice6]
#IF
#SAY
		; մϴ!! \ 
		; <$STR(D0)> , <$STR(D1)> , <$STR(D2)> , <$STR(D3)> ɸ̽ϴ. \
		; и 20 帮ڽϴ. \
		; ؼ Ͻðڽϱ? ƴϸ  νðڽϱ? \ \
;-------------NEW TEXT-------------------
Congratulations! The dice show <$STR(D0)>, <$STR(D1)>, <$STR(D2)>,<$STR(D3)>\
You have 4 of a kind! You have won 20 Gambling Chips!\
Do you feel lucky? Do you want to try again?
;-----------END NEW TEXT-----------------
		;< մϴ./@dicestart> \
		;< ΰڽϴ./@main-1>
<Yes I feel lucky/@dicestart> \
<No thank you, I want to stop/@main-1>

#ACT
	give GambleChip 20

; -----------------------------------
[@3dice]
#IF
#SAY
		; մϴ!! \ 
		; <$STR(D0)> , <$STR(D1)> , <$STR(D2)> , <$STR(D3)> ɸ̽ϴ. \
		; и 10 帮ڽϴ. \
		; ؼ Ͻðڽϱ? ƴϸ  νðڽϱ? \ \
;-------------NEW TEXT-------------------
Congratulations! The dice show <$STR(D0)>, <$STR(D1)>, <$STR(D2)>,<$STR(D3)>\
You have 3 of a kind! You have won 10 Gambling Chips!\
Do you feel lucky? Do you want to try again?
;-----------END NEW TEXT-----------------
		;< մϴ./@dicestart> \
		;< ΰڽϴ./@main-1>
<Yes I feel lucky/@dicestart> \
<No thank you, I want to stop/@main-1>

#ACT
	give GambleChip 10

; -----------------------------------
[@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
#SAY
		; մϴ!! \ 
		; <$STR(D0)> , <$STR(D1)> , <$STR(D2)> , <$STR(D3)> ɸ̽ϴ. \
		; и 8 帮ڽϴ. \
		; ؼ Ͻðڽϱ? ƴϸ  νðڽϱ? \ \
;-------------NEW TEXT-------------------
Congratulations! The dice show <$STR(D0)>, <$STR(D1)>, <$STR(D2)>,<$STR(D3)>\
You have 2 pairs! You have won 8 Gambling Chips!\
Do you feel lucky? Do you want to try again?
;-----------END NEW TEXT-----------------
		;< մϴ./@dicestart> \
		;< ΰڽϴ./@main-1>
<Yes I feel lucky/@dicestart> \
<No thank you, I want to stop/@main-1>

#ACT
	give GambleChip 8

; -----------------------------------
[@2dice]
#IF
#SAY
		; մϴ!! \ 
		; <$STR(D0)> , <$STR(D1)> , <$STR(D2)> , <$STR(D3)> ɸ̽ϴ. \
		; и 1 帮ڽϴ. \
		; ؼ Ͻðڽϱ? ƴϸ  νðڽϱ? \ \
;-------------NEW TEXT-------------------
Congratulations! The dice show <$STR(D0)>, <$STR(D1)>, <$STR(D2)>,<$STR(D3)>\
You have a pair! You have won one Gambling Chip!\
Do you feel lucky? Do you want to try again?
;-----------END NEW TEXT-----------------
		;< մϴ./@dicestart> \
		;< ΰڽϴ./@main-1>
<Yes I feel lucky/@dicestart> \
<No thank you, I want to stop/@main-1>

#ACT
;give  1
	give GambleChip 1

; -----------------------------------
[@normal]
#IF
#SAY
		;̱! Ʊ׿! Դϴ.  \ 
		; <$STR(D0)> , <$STR(D1)> , <$STR(D2)> , <$STR(D3)> ɸ̽ϴ. \
		; ؼ Ͻðڽϱ? ƴϸ  νðڽϱ? \ \
;-------------NEW TEXT-------------------
The dice show <$STR(D0)>, <$STR(D1)>, <$STR(D2)>,<$STR(D3)>\
Sorry, but you have not won anything this time...\
Maybe your luck will change! Do you want to try again?
;-----------END NEW TEXT-----------------
		;< մϴ./@dicestart> \
		;< ΰڽϴ./@main-1>
<Yes I feel lucky/@dicestart> \
<No thank you, I want to stop/@main-1>



; -----------------------------------
[@pre_cube]
#IF
	checkitem GambleChip 1
#ACT
	mov p9 2
	take GambleChip 1
	movr d0 6
	inc d0 1
	playdice 1 @cube
#SAY
		;ֻ  ֽϴ. \ \
;-------------NEW TEXT-------------------
The dice has been thrown....\\
;-----------END NEW TEXT-----------------
		;<  /@cube>
<Continue/@cube>

#ELSESAY
		;<$USERNAME>, а Ѱ ó׿. \
		;  ϱ ؼ а ʿ ϰŵ \
		; а  ̻  Ҽ ׿.. \ 
		;а غ ǰŵ ٽ .. \ \
;-------------NEW TEXT-------------------
Oh dear, <$USERNAME>, you don't seem to have any gambling\
chips left... You cannot continue without them. Please return\
when you have acquired some more!\\
;-----------END NEW TEXT-----------------
		;<  /@Quit>
<Leave the Game/@Quit>

#ELSEACT
	mov p9 9


; -----------------------------------
[@cube]
#SAY
		;ֻ  <$STR(D0)>  Դϴ. \
		; <$STR(D0)> ŭ  ̵  帮ڽϴ. \ \
;-------------NEW TEXT-------------------
The dice has stopped on a <$STR(D0)>! That means that you\
can move along <$STR(D0)> rooms!\\
;-----------END NEW TEXT-----------------
		;<  /@next_cube>
<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

; -----------------------------------
[@Posi1]
#IF
#ACT
	batchDelay 1
	addbatch B121
	batchmove

[@Posi2]
#IF
#ACT
	batchDelay 1
	addbatch B121
	addbatch B122
	batchmove

[@Posi3]
#IF
#ACT
	batchDelay 1
	addbatch B121
	addbatch B122
	addbatch B123
	batchmove

[@Posi4]
#IF
#ACT
	batchDelay 1
	addbatch B121
	addbatch B122
	addbatch B123
	addbatch B124
	batchmove

[@Posi5]
#IF
#ACT
	batchDelay 1
	addbatch B121
	addbatch B122
	addbatch B123
	addbatch B124
	addbatch B125
	batchmove

[@Posi6]
#IF
#ACT
	batchDelay 1
	addbatch B121
	addbatch B122
	addbatch B123
	addbatch B124
	addbatch B125
	addbatch B126
	batchmove

