; ===================================
; QGO Market Def NPC File : 9Ega-B115
; Gambling House - Miner's Room (15th)
; -----------------------------------
; 6 July 2003 (Xerxes)
;   - Added New text
; ===================================
[@main]
#IF
	equal p9 0
#ACT
	goto @main-1
	BreakTimeRecall 
	break

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

#IF
	equal p9 2
#ACT
	goto @race
	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> \
		;̰  15°, ǹԴϴ \
		;10еȿ  ̵  帰   10¥ \
		;̻ ö  10¥ ̻  ..  ð ȿ \
		;  ϸ ٽ ó   ϼž մϴ. \ \
;-------------NEW TEXT-------------------
Welcome <$USERNAME>!\
This is the Miner's room, the 15th of Ma-Bang-Jin. I will send you\
to a mining area where you must bring back Silver and Iron Ore,\
each with a purity of at least 10. I will also give you a pickaxe\
to work with. You have 10 minutes to complete this task, otherwise\
you will have to leave the game and begin again.\\
;-----------END NEW TEXT-----------------
		;<  /@Pena1>
<Continue/@Pena1>


; -----------------------------------
[@Pena1]
#IF
#ACT
	give Pickaxe 1
	mov p9 1
	TimeRecall 10
	map T115


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


; -----------------------------------
[@complete]
#IF
	checkitem SilverOre 1
	checkitem IronOre 1
	checkdura SilverOre 10
	checkdura IronOre 10
#ACT
	takew Pickaxe 1
	take Pickaxe 1
	take IronOre 40
	take SilverOre 40
	take GoldOre 40
	take CopperOre 40
	take BlackIron 40
	mov p9 2
	goto @race
#ELSESAY
		;  ϼ̱..   Ʈ ذ  \
		;ϿǷ ٽ   \ \
;-------------NEW TEXT-------------------
I'm sorry <$USERNAME> but you have failed\
this task. You must now go back to the starting room\
of Ma-Bang-Jin.\\
;-----------END NEW TEXT-----------------
		;<  /@Quit>
<Leave the Game/@Quit>

#ELSEACT
	takew Pickaxe 1
	take Pickaxe 1
	take IronOre 40
	take SilverOre 40
	take GoldOre 40
	take CopperOre 40
	take BlackIron 40
	mov p9 9

[@race]
		; ؿ̱..   մϴ. ׷ ֻ \
		; ִ ȸ 帮ڽϴ. \ \ 
;-------------NEW TEXT-------------------
Congratulations, you have brought me the ore I needed!\
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
	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

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

[@Posi2]
#IF
#ACT
	batchDelay 1
	addbatch B116
	addbatch B117
	batchmove

[@Posi3]
#IF
#ACT
	batchDelay 1
	addbatch B116
	addbatch B117
	addbatch B118
	batchmove

[@Posi4]
#IF
#ACT
	batchDelay 1
	addbatch B116
	addbatch B117
	addbatch B118
	addbatch B119
	batchmove

[@Posi5]
#IF
#ACT
	batchDelay 1
	addbatch B116
	addbatch B117
	addbatch B118
	addbatch B119
	addbatch B120
	batchmove

[@Posi6]
#IF
#ACT
	batchDelay 1
	addbatch B116
	addbatch B117
	addbatch B118
	addbatch B119
	addbatch B120
	addbatch B121
	batchmove

