; ===================================
; QGO Market Def NPC File : 9Ega-B140
; Gambling House - Heaven Room (40th)
; -----------------------------------
; 6 July 2003 (Xerxes)
;   - Added New text
; ===================================
[@main]
#IF
;	equal p9 0
	check [797] 0
#ACT
	goto @main-1
	BreakTimeRecall 
	break

#IF
;	equal p9 1
	check [797] 1
#ACT
	goto @race
	BreakTimeRecall 
	break

#IF
;	equal p9 9
	check [796] 1
#ACT
	goto @quit
	BreakTimeRecall 
	break


; -----------------------------------
[@main-1]
#IF
#ACT
;	mov p9 0
	set [797] 0
#SAY
		;! <$USERNAME>.\ 
		;̹   õ Դϴ. \
		;̰  ͸ ص  и ̽ñ. \
		;̰ ÷  ֽϴ.  Ȳ Ǿ \
		; ȿ Ȧ ž մϴ. Ÿ  ѾƳ\
		;ƴϸ,  ⸦ Ͻô... \
		;׷ õǹ ̵ 帮 ϰڽϴ. \\
;-------------NEW TEXT-------------------
Welcome to the Heavenly room, <$USERNAME>!\
This is the last of the Ma-Bang-Jin rooms, and just by\
reaching this point, you have shown great fortitude!\
I will move you to the Heaven room, and you must kill\
an equal adversary as well as trying to evade some\
very difficult monsters. You have 5 minutes; are you\
ready for this challenge?\\
;-----------END NEW TEXT-----------------
		;<  /@next> 
<Yes I Am Ready/@next>



; -----------------------------------
[@next]
;===================================
; AMENDMENT TO HUMAN CHECK - IF PLAYER
; IS IN T140 THEN CURRENT PLAYER MUST
; WAIT BEFORE THEY CAN GET IN
; ==================================
#IF
	checkhum T140 1
#SAY
		;õǹ濡 ٸ ưô±. \
		;Ÿ  ӹ ϼϽ ϼ̱. \
		;̰ ô ϼ̴µ.. ѹ \
		; ϽŴٸ и    ̴ϴ. \ \
;-------------NEW TEXT-------------------
I see that another player is in the Heaven room...\
You may wait until the task room is clear, or\
you can forego this challenge and start again.\\
;-----------END NEW TEXT-----------------
		;<  /@Quit> 
<Wait/@exit>\
<Leave the Game/@Quit>

#ELSEACT
	goto @next1


; -----------------------------------
[@next1]
#IF
	checkitem GambleChip 1
#ACT
	take GambleChip 1
;	mov p9 1
	set [797] 1
	set [798] 0
	goto @chklvl36

#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
	set [796] 1



; -----------------------------------
; NEW SUBROUTINES TO CHECK LEVELS
; -----------------------------------
[@chklvl36]
#IF
	checklevel 36
#ACT
	goto @lvl36
	break
#IF
	checklevel 31
#ACT
	goto @lvl31
	break
#IF
	checklevel 26
#ACT
	goto @lvl26
	break
#IF
	checklevel 21
#ACT
	goto @lvl21
	break

; -----------------------------------
[@race]
#IF
	check [798] 1
#SAY
		; մϴ! ᱹ ׹濡 ȥ Ƽ ̱.. \ 
		;   ϽŰͿ  ǰ 帮ڽϴ. \
		;׷ ſ Ϸ ǽʽÿ \ \
;-------------NEW TEXT-------------------
Congratulations my friend! You are alive, and have succeeded\
in the Heavenly room task! Here is a small gift for your\
bravery and skill in completing the Ma-Bang-Jin!\
A Benediction Oil!\\
;-----------END NEW TEXT-----------------
		;<  /@Quit> 
<Close/@Quit>

#ACT
	set [798] 0
	set [797] 0
	give BenedictionOil 1
;	mov p9 9
;	set [796] 1
	goto @Quit

#ELSESAY
;-------------NEW TEXT-------------------
You have not completed the task I set you, and\
the adversary still lives! You must now go back\
and start again.\\
;-----------END NEW TEXT-----------------
<Leave the Game/@Quit>

#ELSEACT
	set [797] 0
;	mov p9 9
	set [796] 1


; -----------------------------------
[@Quit]
#IF
#ACT
	set [796] 0
	map B011



; ++++++++++++++++++++++++++++++++++++++
[@lvl36]
#ACT
	Monclear T140
	Param1 T140
	Param2 15
	Param3 15
	Mongen ZumaGuardian 15 5
	Param1 T140
	Param2 15
	Param3 15
	Mongen EvilSnake 1 2
	TimeRecall 5
	map T140

[@lvl31]
#ACT
	Monclear T140
	Param1 T140
	Param2 15
	Param3 15
	Mongen ZumaGuardian 15 5
	Param1 T140
	Param2 15
	Param3 15
	Mongen WhiteBoar 1 2
	TimeRecall 5
	map T140

[@lvl26]
#ACT
	Monclear T140
	Param1 T140
	Param2 15
	Param3 15
	Mongen ZumaGuardian 15 5
	Param1 T140
	Param2 15
	Param3 15
	Mongen EvilTongs 1 2
	TimeRecall 5
	map T140

[@lvl21]
#ACT
	Monclear T140
	Param1 T140
	Param2 15
	Param3 15
	Mongen ZumaGuardian 15 5
	Param1 T140
	Param2 15
	Param3 15
	Mongen BigApe 1 2
	TimeRecall 5
	map T140
