; ===================================
; QGO Market Def NPC File : 9Ega-B123
; Gambling House - Patience Room 2 (23rd)
; -----------------------------------
; 6 July 2003 (Xerxes)
;   - Added New text
; ===================================
[@main]
#IF
	equal p9 0
#ACT
	goto @main-1
	BreakTimeRecall 
	break

#IF
	equal p9 1
#ACT
	goto @main-3
	BreakTimeRecall 
	break

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

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

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


; -----------------------------------
[@main-1]
#IF
#ACT
	mov p9 0
#SAY
		;! <$USERNAME> \  
		;̰  23°, γǹԴϴ \
		; γǹ ֻ 2  ù° ֻ  - ι° \
		;ֻ   2 ð ̵ ϽǼ ֽϴ. \
		;5 ȸ 帮, 5  и \
		;1  Ͻʽÿ. ׷  ϴ. \ \
;-------------NEW TEXT-------------------
This is the second Room of Patience, <$USERNAME>!\
You must throw two dice and, if the first dice minus\
the second dice equals 2 (two), then you may proceed to\
your next gamble. You have 5 attempts to do this, after\
which, each attempt will cost you one gambling chip.\\
;-----------END NEW TEXT-----------------
		;<  /@main-2>
<Next/@main-2>



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



; -----------------------------------
[@main-2]
#IF
	checkitem GambleChip 1
#ACT
	goto @main-3
	take GambleChip 1
	mov p2 0
	mov p9 1
#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



; -----------------------------------
[@main-3]
		;и  ϼǷ, ȸ 5 帮ڽϴ. \ \
;-------------NEW TEXT-------------------
Here we are, <$USERNAME>, you now have 5 chances to\
succeed in your gamble.\\
;-----------END NEW TEXT-----------------
		;<  /@dicestart>
<Throw the Dice/@dicestart>



; -----------------------------------
[@dicestart]
#IF
	small p2 5
#ACT
	mov p9 2
	movr d0 6
	movr d1 6
	inc p2 1
	inc d0 1
	inc d1 1
	playdice 2 @next
#SAY
		;ֻ  ֽϴ. \ \  
;-------------NEW TEXT-------------------
The dice has been thrown....\\
;-----------END NEW TEXT-----------------
		;<  /@next>
<Continue/@next>

#ELSEACT
	goto @main-2


; -----------------------------------
[@next]
#IF
	equal d1 1
#ACT
	mov d9 0
	sum d0 
	dec d9 1
	goto @next1
	break

#IF
	equal d1 2
#ACT
	mov d9 0
	sum d0 
	dec d9 2
	goto @next1
	break

#IF
	equal d1 3
#ACT
	mov d9 0
	sum d0 
	dec d9 3
	goto @next1
	break

#IF
	equal d1 4
#ACT
	mov d9 0
	sum d0 
	dec d9 4
	goto @next1
	break

#IF
	equal d1 5
#ACT
	mov d9 0
	sum d0 
	dec d9 5
	goto @next1
	break

#IF
	equal d1 6
#ACT
	mov d9 0
	sum d0 
	dec d9 6
	goto @next1
	break


; -----------------------------------
[@next1]
#IF
	equal d9 2
#SAY
		; <$STR(P2)> ° ֻ ̽ϴ. \
		; ֻ <$STR(D0)> , <$STR(D1)> Դϴ. \
		; ֻ  2̳׿ .. \ 
		;̵ Ҽ ִ ֻ  ְ  帮ڽϴ. \ \
;-------------NEW TEXT-------------------
You have thrown the dice <$STR(P2)> time(s).\
The thrown dice show values of <$STR(D0)> and <$STR(D1)>.\
The first minus the second is equal to 2 - you can\
therefore proceed to throw for your next move.\\
;-----------END NEW TEXT-----------------
		;<  /@pre_cube> 
<Continue/@pre_cube>

#ELSESAY
		; <$STR(P2)> ° ֻ ̽ϴ. \
		; ֻ <$STR(D0)> , <$STR(D1)>  Դϴ. \ 
		; ֻ  2  ó׿.. \
		;ٽ ѹ ñ ٶϴ. \ \
;-------------NEW TEXT-------------------
You have thrown the dice <$STR(P2)> time(s).\
The thrown dice show values of <$STR(D0)> and <$STR(D1)>.\
The first minus the second is not equal to 2.\
You may try again to get the required result.\\
;-----------END NEW TEXT-----------------
		;<  /@dicestart>
<Continue/@dicestart>


; -----------------------------------
[@pre_cube]
#IF
	checkitem GambleChip 1
#ACT
	take GambleChip 1
	mov p9 3
	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

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

[@forward]
#IF
#ACT
	batchDelay 1
	addbatch B124
	addbatch B125
	addbatch B126
	addbatch B127
	batchmove


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

[@Posi2]
#IF
#ACT
	batchDelay 1
	addbatch B124
	addbatch B125
	batchmove

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

[@Posi4]
#IF
#ACT
	batchDelay 1
	addbatch B124
	addbatch B125
	addbatch B126
	addbatch B127
	batchmove

[@Posi5]
#IF
#ACT
	batchDelay 1
	addbatch B124
	addbatch B125
	addbatch B126
	addbatch B127
	addbatch B128
	batchmove

[@Posi6]
#IF
#ACT
	batchDelay 1
	addbatch B124
	addbatch B125
	addbatch B126
	addbatch B127
	addbatch B128
	addbatch B129
	batchmove

