; ===================================
; QGO Market Def NPC File : 9Ega-B127
; Gambling House - not described (27th)
; -----------------------------------
; 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 @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
		;! <$USERNAME>.\
		;̹  27°Դϴ. \
		;̰    ϰ ֽϴ. ڷ ̵ \
		;  ̵ , и ,  ...\
		;   ӿ <$USERNAME> Ͻô  \
		;ñ.. \  
		;׷  ϴ. \ \
;-------------NEW TEXT-------------------
Welcome to the Room of Fortune, <$USERNAME>!\
Here, in the 27th room, your luck will determine whether\
you can move back or forward, and win or lose gambling chips.\
I wish you good fortune, <$USERNAME>, and hope\
that you receive what you desire!\\
;-----------END NEW TEXT-----------------
		;<  /@Penalty>
<Continue/@Penalty>


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


; -----------------------------------
[@Penalty]
#IF
	random 8
#SAY
		; и 2 м ϴ  ɸ̽ϴ. \ 
		;ҿ Ͻñ.. \ \
;-------------NEW TEXT-------------------
Oh dear, how unlucky! You have lost 2 gambling chips!\\
;-----------END NEW TEXT-----------------
		;<  /@race>
<Continue/@race>

#ACT
	mov p9 1
	take GambleChip 2
	break

#IF
	random 8
#SAY
		; и 2  ִ  ̽ϴ. \ \
;-------------NEW TEXT-------------------
Well done! You have won 2 gambling chips!\\
;-----------END NEW TEXT-----------------
		;<  /@race>
<Continue/@race>

#ACT
	mov p9 1
	give GambleChip 2
	break

#IF
	random 8
#SAY
		; 4ĭ  ϴ  ɸ̽ϴ. \ \
;-------------NEW TEXT-------------------
Oh dear! Your luck has determined that you will\
move back 4 rooms.\\
;-----------END NEW TEXT-----------------
		;<  /@back>
<Move/@back>

#ACT
	mov p9 2
	mov p8 1
	break

#IF
	random 8
#SAY
		; 4ĭ ϴ  ̽ϴ. \ \
;-------------NEW TEXT-------------------
Well done! Your luck has determined that you will\
move forward 4 rooms.\\
;-----------END NEW TEXT-----------------
		;<  /@forward>
<Move/@forward>

#ACT
	mov p9 2
	mov p8 2
	break

#IF
	random 8
#SAY
		; и 3 м ϴ  ɸ̽ϴ. \ 
		;ҿ Ͻñ.. \ \
;-------------NEW TEXT-------------------
Oh dear, how unlucky! You have lost 3 gambling chips!\\
;-----------END NEW TEXT-----------------
		;<  /@race>
<Continue/@race>

#ACT
	mov p9 1
	break

#IF
	random 8
#SAY
		;  2000 ޴  ̽ϴ. \ \
;-------------NEW TEXT-------------------
Oh dear! You have just lost 2000 gold!\\
;-----------END NEW TEXT-----------------
		;<  /@race>
<Continue/@race>

#ACT
	take Gold 2000
	mov p9 1
	break

#IF
	random 8
#SAY
		;  üȸ() , ȸ() 5 мϴ \
		; ɸ̽ϴ. \ \
;-------------NEW TEXT-------------------
Oh dear, how unlucky! You have just lost\
5 large HP and 5 large MP drugs!\\
;-----------END NEW TEXT-----------------
		;<  /@race>
<Continue/@race>

#ACT
	take (HP)Druglarge 5
	take (MP)Druglarge 5
	mov p9 1
	break

#IF
	random 8
#SAY
		;  üȸ() , ȸ() 5  ִ \
		; ɸ̽ϴ. \ \
;-------------NEW TEXT-------------------
Well done! You have just won\
5 large HP and 5 large MP drugs!\\
;-----------END NEW TEXT-----------------
		;<  /@race>
<Next/@race>

#ACT
	give (HP)Druglarge 5
	give (MP)Druglarge 5
	mov p9 1
	break

#ELSEACT
	goto @penalty



; -----------------------------------
[@race]
		;  ֻ  ִ ȸ 帮ڽϴ. \
		;׷  ϴ. \ \
;-------------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>


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

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


; -----------------------------------
[@total1]
#IF
	equal p8 1
#SAY
		; 4ĭ ڷ ž մϴ. \ \
;-------------NEW TEXT-------------------
Are you ready to move back 4 rooms?
;-----------END NEW TEXT-----------------
		;<  /@back>
<Move/@back>

#ACT
	break

#IF
	equal p8 2
#SAY
		; 4ĭ  ž մϴ. \ \
;-------------NEW TEXT-------------------
Are you ready to move forward 4 rooms?
;-----------END NEW TEXT-----------------
		;<  /@forward>
<Move/@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

