; ===================================
; QGO Market Def NPC File : 9Ega-B104
; Gambling House - Chance Room (4th)
; -----------------------------------
; 4 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>.\
		;̹  4°Դϴ. \
		;̰    ϰ ֽϴ.  \
		;  ״ ޾Ƶ̽ʽÿ. װ ϴ ! \
		; ޾ ̽ð  ϽŴٸ    \
		; Դϴ. ׷  ϴ. \ \
;-------------NEW TEXT-------------------
Welcome, <$USERNAME>, to the 4th room of Ma-Bang-Jin! Here, you\
will play a game of chance, and, depending upon Lady Luck, you\
can win well, or lose badly! Whatever the result, if you accept\
it sportingly, and continue to play, I'm sure that you will soon\
reap handsome rewards! Good luck!\\
;-----------END NEW TEXT-----------------
		;<  /@penalty> 
<Take a Chance/@penalty>



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



; -----------------------------------
[@penalty]
#IF
	random 6
#SAY
		; и 2 м ϴ  ɸ̽ϴ. \ 
		;ҿ Ͻñ.. \ \
;-------------NEW TEXT-------------------
You have been.... \
... Unlucky! You have lost up to two of your gambling chips!\\
;-----------END NEW TEXT-----------------
		;<  /@race>
<Continue/@race>

#ACT
	mov p9 1
	take GambleChip 2
	break

#IF
	random 6
#SAY
		; и 2  ִ  ̽ϴ. \ \
;-------------NEW TEXT-------------------
You have been.... \
... Lucky! You have just won two gambling chips!\\
;-----------END NEW TEXT-----------------
		;<  /@race>
<Continue/@race>

#ACT
	mov p9 1
	give GambleChip 2
	break

#IF
	random 6
#SAY
		; и 3 м ϴ  ɸ̽ϴ. \ 
		;ҿ Ͻñ.. \ \
;-------------NEW TEXT-------------------
You have been.... \
... Unlucky! You have lost up to three of your gambling chips!\\
;-----------END NEW TEXT-----------------
		;<  /@race>
<Continue/@race>

#ACT
	mov p9 1
	take GambleChip 3
	break

#IF
	random 6
#SAY
		;  2000 ޴  ̽ϴ. \ \
;-------------NEW TEXT-------------------
You have been.... \
... Lucky! You have just won 2000 gold!\\
;-----------END NEW TEXT-----------------
		;<  /@race>
<Continue/@race>

#ACT
	mov p9 1
	give Gold 2000
	break

#IF
	random 6
#SAY
		;  üȸ(),ȸ() 5  ִ \
		; ɸ̽ϴ. \ \
;-------------NEW TEXT-------------------
You have been.... \
... Unlucky! You have just lost up to 5 large HP\
drugs and up to 5 large MP drugs!\\
;-----------END NEW TEXT-----------------
		;<  /@race>
<Continue/@race>
#ACT
	mov p9 1
	take (HP)Druglarge 5
	take (MP)Druglarge 5
break

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

#ACT
	mov p9 1
	give (HP)Druglarge 5
	give (MP)Druglarge 5
	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 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 B105
	batchmove

[@Posi2]
#IF
#ACT
	batchDelay 1
	addbatch B105
	addbatch B106
	batchmove

[@Posi3]
#IF
#ACT
	batchDelay 1
	addbatch B105
	addbatch B106
	addbatch B107
	batchmove

[@Posi4]
#IF
#ACT
	batchDelay 1
	addbatch B105
	addbatch B106
	addbatch B107
	addbatch B108
	batchmove

[@Posi5]
#IF
#ACT
	batchDelay 1
	addbatch B105
	addbatch B106
	addbatch B107
	addbatch B108
	addbatch B109
	batchmove

[@Posi6]
#IF
#ACT
	batchDelay 1
	addbatch B105
	addbatch B106
	addbatch B107
	addbatch B108
	addbatch B109
	addbatch B110
	batchmove

