

OBJECT "FAIRYENT"
BEGIN
	CUBE 9600,16134,0 9646,16233,100
	BEGIN
		FADESCREENOUT
		WAIT SCREENFADE
		LOCKE.POS 7900 9200 760 39
		FADESCREENIN
	END
END


OBJECT "AUSTIN"
BEGIN
	CUBE 12190,17514,110 12194,17518,114
	BEGIN
		IF RINGSTATE = 0
		BEGIN
			CONTROL OFF
			PLAYER.PIVOT 64
			CHICK1.TRY CHEER
			SCROLLTO BAEZ
			WAIT 48
			NOWAIT BAEZ.GOTO 12482 17265
			NOWAIT CHICK2.GOTO 12403 17092
			CHICK3.GOTO 12547 17094
			NOWAIT CHICK2.TRY STANDR
			CHICK3.TRY STANDL
			WAIT 24
			BAEZ.TRY WALK
			BAEZ.TRY COMBAT	
			BAEZ.TRY ROAR	
			BAEZ.STAT AGGRESSIVE = 1
			WAIT 24
			SCROLLTO PLAYER
			WAIT 24
			NOWAIT CHICK1.DELETE
			NOWAIT CHICK2.DELETE
			CHICK3.DELETE
			RINGWALL.TOGGLE NOWALK = 0
			NOWAIT CONTROL ON
			SET RINGSTATE = 1
			TOGGLE PAUSE = 1
		END
	END
END


OBJECT "Shari1"
BEGIN
	DIALOG
	BEGIN
		SETCDVOLUME HALF
		WAIT 1
		CONTROL OFF
		player.STOP
		player.COMBAT OFF
		NOWAIT PIVOTOBJECT player
		player.PIVOTOBJECT SHARIL1
		SAY II23TW300
		SAY II23TW301
		SAY II23TW302
		SAY II23TW303
		PIVOT 30
		CONTROL ON
		SETCDVOLUME FULL
	END
END



OBJECT "Pepper1"
BEGIN
	DIALOG
	BEGIN
		SETCDVOLUME HALF
		WAIT 1
		CONTROL OFF
		player.STOP	
		player.COMBAT OFF
		NOWAIT PIVOTOBJECT player
		player.PIVOTOBJECT PEPPER1
		SAY II23TM500
		SAY II23TM501
		PIVOT 64
		CONTROL ON
		SETCDVOLUME FULL
	END
END


OBJECT "BOY1"
BEGIN
	DIALOG
	BEGIN
		CONTROL OFF
		player.STOP
		player.COMBAT OFF
		NOWAIT player.PIVOTOBJECT BOY1
		PIVOTOBJECT player
		WAIT 48
		PIVOT 240
		CONTROL ON	
	END
END


OBJECT "GIRL1"
BEGIN
	DIALOG
	BEGIN
		CONTROL OFF
		player.STOP
		player.COMBAT OFF
		NOWAIT player.PIVOTOBJECT GIRL1
		PIVOTOBJECT player
		WAIT 48
		PIVOT 220
		CONTROL ON	
	END
END


OBJECT "Lucas1"
BEGIN
	DIALOG
	BEGIN
		SETCDVOLUME HALF
		WAIT 1
		CONTROL OFF
		player.STOP
		player.COMBAT OFF
		NOWAIT player.PIVOTOBJECT LUCAS1
		PIVOTOBJECT player

		IF MISTSTATE < 4
		BEGIN
			IF LUCASSTATE = 1
			BEGIN
				say II11LUC11
			END
			IF LUCASSTATE = 0
			BEGIN
 				player.say II11LOC07
				say II11LUC00
				say II11LUC01
				say II11LUC02
				say II11LUC03
				player.say II11LOC08
				say II11LUC04
				say II11LUC05
				say II11LUC06
				player.say II11LOC09
				say II11LUC07
				say II11LUC08
				player.say II11LOC10
				say II11LUC09
				say II11LUC10
				say II11LUC11
				player.say II11LOC11
				say II11LUC12
				SET LUCASSTATE = 1
				END
			END
		IF MISTSTATE > 3
		BEGIN
		IF MISTSTATE < 6
		BEGIN
			IF LUCASSTATE = 2
			BEGIN
				say II21LUC08
			END
			IF LUCASSTATE < 2
			BEGIN
 				say II21LUC00
				say II21LUC01
				say II21LUC02
				player.say II21LOC10
		
				:Start1

					Choice Boat II21LOC11
					Choice Hidden II21LOC12
					wait response
	
				:Hidden

					player.say II21LOC12
					say II21LUC03
					say II21LUC04
					Jump Start1
	
				:Boat
		
					player.say II21LOC11
					say II21LUC05
					say II21LUC06
					player.say II21LOC13
					say II21LUC07
					say II21LUC08
					player.say II21LOC14
					SET LUCASSTATE = 2
			END
		END
		END
		IF MISTSTATE > 5
		BEGIN
			IF LUCASSTATE = 3
			BEGIN
				say V8LUC00
				player.say V8LOC10
			END
			IF LUCASSTATE < 3
			BEGIN
 				say V8LUC00
				player.say V8LOC10
				say V8LUC01
				player.say V8LOC11
				player.say V8LOC12
				say V8LUC02
				say V8LUC03
				player.say V8LOC13
				say V8LUC04
				SET LUCASSTATE = 3
			END
		END
		PIVOT 128
		CONTROL ON
		SETCDVOLUME FULL
	END
END



OBJECT "FORSTYXXTOMB"
BEGIN
	ALWAYS
	BEGIN
		IF THIS.STAT LOCKED = 0
		BEGIN
			STYXXCHEST.TOGGLE NOWALK = 0
			STYXXCHEST.TOGGLE INVISIBLE = 0
			PLAYER.DELINV ROSE
			ADDAT 4268 23080 105 CYANFONT
			TOGGLE PAUSE = 1
		END
		IF THIS.STAT LOCKED = 1
		BEGIN
			STYXXCHEST.TOGGLE NOWALK = 1
			STYXXCHEST.TOGGLE INVISIBLE = 1
			WAIT 24
		END
	END
END


OBJECT "Olihoot1"
BEGIN
	DIALOG
	BEGIN
		SETCDVOLUME HALF
		WAIT 1
		IF MISTSTATE < 5
		BEGIN
			CONTROL OFF
			player.STOP
			player.COMBAT OFF
			NOWAIT player.PIVOTOBJECT OLIHOOT1
			PIVOTOBJECT player
			IF OLIHOOTSTATE = 1
			BEGIN
				say III11OLI19
				TRY "FLOATING"
			END
			IF OLIHOOTSTATE < 1
			BEGIN
				player.say III11LOC00
				say III11OLI00
				player.say III11LOC01
				say III11OLI01
				player.say III11LOC02
				say III11OLI02
				say III11OLI03
				player.say III11LOC03
				say III11OLI04
				player.say III11LOC04
				say III11OLI05
				player.say III11LOC05
				
				:Start

					Choice Useful III11LOC06
					Choice Recover III11LOC07
					Choice Getthere III11LOC08
					Choice Nothing III11LOC09
					wait response
	
				:Useful

					player.say III11LOC06
					say III11OLI06
					say III11OLI07
					say III11OLI08
					Jump Start
	
				:Recover
		
					player.say III11LOC07
					say III11OLI09
					say III11OLI10
					say III11OLI11
					say III11OLI12
					Jump Start
	
				:Getthere

					player.say III11LOC08
					say III11OLI13
					say III11OLI14
					Jump Start

				:Nothing

					player.say III11LOC09
					NOWAIT say III11OLI15
					player.ADDINV "SKY"
					say III11OLI16
					say III11OLI17
					player.say III11LOC10
					say III11OLI18
					say III11OLI19
					TRY "FLOATING"
					SET OLIHOOTSTATE = 1
			END
		END
		IF MISTSTATE = 5
		BEGIN
			CONTROL OFF
			player.STOP
			player.COMBAT OFF
			NOWAIT player.PIVOTOBJECT OLIHOOT1
			PIVOTOBJECT player
			IF OLIHOOTSTATE = 2
			BEGIN
				say III13OLI17
				say III13OLI18
				TRY "FLOATING"
			END
			IF OLIHOOTSTATE < 2
			BEGIN
 				say III13OLI00
				
				:Start2

					Choice Quest III13LOC00
					Choice Caves III13LOC01
					Choice Help III13LOC02
					wait response
	
				:Quest

					player.say III13LOC00
					say III13OLI01
					say III13OLI02
					Jump Start2

				:Caves
		
					player.say III13LOC01
					say III13OLI05
					player.say III13LOC03
					say III13OLI06
					say III13OLI07
					Jump Start3
	
				:Help
					player.say III13LOC02
					say III13OLI03
					say III13OLI04
					Jump Start2
	
				:Start3

					Choice Killer III13LOC04
					Choice Treasure III13LOC05
					Choice Fools III13LOC06
					wait response
	
				:Killer

					player.say III13LOC04
					say III13OLI08
					say III13OLI09
					Jump Start3

				:Treasure

					player.say III13LOC05
					say III13OLI10
					say III13OLI11
					Jump Start3

				:Fools

					player.say III13LOC06
					say III13OLI12
					say III13OLI13
					say III13OLI14
					say III13OLI15
					player.say III13LOC07
					say III13OLI16
					say III13OLI17
					say III13OLI18
					TRY "FLOATING"
					SET OLIHOOTSTATE = 2
				END
			END
		IF MISTSTATE = 6
		BEGIN
			CONTROL OFF
			player.STOP
			player.COMBAT OFF
			NOWAIT player.PIVOTOBJECT OLIHOOT1
			PIVOTOBJECT player

			IF OLIHOOTSTATE = 3
			BEGIN
				say III14OLI17
				TRY "FLOATING"
			END
			IF OLIHOOTSTATE < 3
			BEGIN
 				player.say III14LOC00
				say III14OLI00
				player.say III14LOC01
				say III14OLI01
				player.say III14LOC02
				say III14OLI02
				say III14OLI03
				
				:Start4

					Choice Why III14LOC03
					Choice Empire III14LOC04
					Choice Vision III14LOC05
					wait response
	
				:Vision

					player.say III14LOC05
					say III14OLI04
				
				:Why
		
					player.say III14LOC03
					say III14OLI05
					say III14OLI06
					player.say III14LOC06
					say III14OLI07
					say III14OLI08
					say III14OLI09
					player.say III14LOC07
					say III14OLI10
					Jump Start5
	
				:Empire
		
					player.say III14LOC04
					say III14OLI05
					say III14OLI06
					player.say III14LOC06
					say III14OLI07
					say III14OLI08
					say III14OLI09
					player.say III14LOC07
					say III14OLI10
						
				:Start5

					Choice Something III14LOC08
					Choice Cav III14LOC09
					wait response
	
				:Cav

					player.say III14LOC09
					say III14OLI11
					say III14OLI12
							
				:Something

					player.say III14LOC08
					player.say III14LOC10
					player.say III14LOC11
					player.say III14LOC12
					player.say III14LOC13
					say III14OLI13
					say III14OLI14
					say III14OLI16
					player.say III14LOC14
					say III14OLI17
					TRY "FLOATING"
					SET OLIHOOTSTATE = 3
			END
		END
		IF MISTSTATE = 7
		BEGIN
			CONTROL OFF
			player.STOP
			player.COMBAT OFF
			player.GOTO 5857 24869
			NOWAIT player.PIVOTOBJECT OLIHOOT1
			PIVOTOBJECT player
			player.say III15LOC00
			say III15OLI00
			player.say III15LOC01
			say III15OLI01
			say III15OLI02
			say III15OLI03
			player.say III15LOC02
			player.say III15LOC03
			say III15OLI04
			player.say III15LOC04
			player.say III15LOC05
			player.say III15LOC06
			say III15OLI05
			player.say III15LOC07
			say III15OLI06
			say III15OLI07
			say III15OLI08
			say III15OLI09
			say III15OLI10
			say III15OLI11
			Sardok9.POS 5742 24924 35
			NOWAIT SARDOK9.TOGGLE INVISIBLE
			NOWAIT FADECHARACTERIN SARDOK9
			NOWAIT SARDOK9.TRY SPELL
			ADDAT 5742 24924 35 TELEPORTER
			SARDOK9.STAT MANA = 1000
			WAIT 24
			NOWAIT PIVOTOBJECT SARDOK9
			player.PIVOTOBJECT SARDOK9
			WAIT 48
			SARDOK9.PIVOTOBJECT OLIHOOT1
			SARDOK9.say III15SAR00
			WAIT 24
			NOWAIT SARDOK9.CAST "napalm"
			NOWAIT SARDOK9.TRY spell
			player.PIVOTOBJECT OLIHOOT1
			BURN
			NOWAIT PLAY III15OLI12
			BURN
			STATE 9
			TRY DEAD
			player.PIVOTOBJECT SARDOK9
			NOWAIT player.say III15LOC08
			NOWAIT SARDOK9.PIVOTOBJECT playeR
			FADECHARACTEROUT OLIHOOT1
			WAIT 24
			Sardok9.say III15SAR01
			player.say III15LOC09
			OLIHOOT1.TOGGLE INVISIBLE = 1
			OLIHOOT1.POS 5744 24800 35
			Sardok9.say III15SAR02
			Sardok9.say III15SAR03
			player.say III15LOC10
			Sardok9.say III15SAR04
			Sardok9.say III15SAR05
			NOWAIT SARDOK9.TRY SPELL
			ADDAT 5742 24924 35 TELEPORTER
			
			//ADDAT 5857 24869 35 TELEPORTER
			
			WAIT 48
			SARDOK9.TOGGLE INVISIBLE = 1
			SARDOK9.POS 5622 24734 46
			
			//FADESCREENOUT
			//CONTROL ON
			//WAIT SCREENFADE
			//FADESCREENIN
			//player.POS 11973 9645 304 2
		
		END
		
		CONTROL ON
		SETCDVOLUME FULL
	END
	ALWAYS
	BEGIN
		TRY "FLOATING"
		WAIT 24
	END	
END

//	TOWN


OBJECT "KEEPIN"
BEGIN
	USE
	BEGIN
		CONTROL OFF
		player.STOP
		player.COMBAT OFF
		player.GOTORELATIVEPOSITION THIS 0 60
		player.FACEOBJECT THIS
 		STATE "OPENING"
		WAIT 12
		FADESCREENOUT
		WAIT SCREENFADE
		CONTROL ON
		FADESCREENIN
		player.POS 12212 12688 161 2
		STATE "CLOSED"
		STATE "CLOSED"
	END
END


OBJECT "TOWERIN"
BEGIN
	USE
	BEGIN
		CONTROL OFF
		player.STOP
		player.COMBAT OFF
		player.GOTORELATIVEPOSITION THIS 60 0
		player.FACEOBJECT THIS
 		STATE "OPENING"
		WAIT 12
		FADESCREENOUT
		WAIT SCREENFADE
		CONTROL ON
		FADESCREENIN
		player.POS 10412 10080 18 3
		STATE "CLOSED"
		STATE "CLOSED"
	END
END


OBJECT "Jong1"
BEGIN
	DATA
	BEGIN
		NUMBER MUDOX1 0
		NUMBER MUDOY1 0
	END
	DIALOG
	BEGIN
		IF TRAINSTATE = 1
		BEGIN
			JUMP NOCOMPLETE1
		END
		IF TRAINSTATE = 2
		BEGIN
			JUMP NOCOMPLETE2
		END
		IF TRAINSTATE = 3
		BEGIN
			JUMP NOCOMPLETE3
		END
		IF TRAINSTATE = 4
		BEGIN
			JUMP NOCOMPLETE4
		END
		IF TRAINSTATE = 5
		BEGIN
			JUMP NOCOMPLETE5
		END
		IF TRAINSTATE = 6
		BEGIN
			JUMP NOCOMPLETE6
		END
		IF TRAINSTATE = 7
		BEGIN
			JUMP NOCOMPLETE7
		END
		IF TRAINSTATE = 8
		BEGIN
			JUMP NOCOMPLETE8
		END
		IF TRAINSTATE = 9
		BEGIN
			JUMP NOCOMPLETE9
		END
		
		SETCDVOLUME HALF
		WAIT 1
		SET MUDOKONSTATE = 1
		COMBAT2IN.STAT LOCKED = 1
		CONTROL OFF
		player.STOP
		player.COMBAT OFF
		player.GOTORELATIVEPOSITION JONGWAY00 0 80
		NOWAIT player.PIVOTOBJECT JONG1
		
		IF JONGMEETSTATE = 1
		BEGIN
			IF MISTSTATE < 4
			BEGIN
				SAY II6JON00
				
				:START
		
				CHOICE SPARYES SPAR
				CHOICE COMBAT FIGHT
				WAIT RESPONSE
			END
			IF MISTSTATE > 3
			BEGIN
				IF MISTSTATE < 6
				BEGIN
					SAY II14JON00
					player.SAY II14LOC00
					SAY II14JON01
					SAY II14JON02
					:START2
		
					CHOICE SPARYES SPAR
					CHOICE COMBAT FIGHT
					WAIT RESPONSE
				END
			END
			IF MISTSTATE = 6
			BEGIN
				SAY V2JON00
				:START3
		
				CHOICE SPARYES SPAR
				CHOICE COMBAT FIGHT
				WAIT RESPONSE
			END
			IF MISTSTATE = 7
			BEGIN
				player.SAY VIII3LOC00
				SAY VIII3JON00
				player.SAY VIII3LOC01
				SAY VIII3JON01
				player.SAY VIII3LOC02
				player.SAY VIII3LOC03
				SAY VIII3JON02
				player.SAY VIII3LOC04
				SAY VIII3JON03
				player.SAY VIII3LOC05
				:START4
		
				CHOICE SPARYES SPAR
				CHOICE COMBAT FIGHT
				WAIT RESPONSE
			END
		END
		IF JONGMEETSTATE < 1
		BEGIN
			player.SAY II2LOC00
			SAY II2JON00
			player.SAY II2LOC01
			SAY II2JON01
			player.SAY II2LOC02
			SAY II2JON02
			SAY II2JON03
			player.TRY combat
			WAIT 48
			SAY II2JON04
			SAY II2JON05
			SAY II2JON06
			SAY II2JON07
			SAY II2JON08
			SAY II2JON09
			SAY II2JON10
			SAY II2JON11
			player.SAY ANIM COMBAT II2LOC03
			PLAYER.TRY WALK
			WAIT 12
			SAY II2JON12
			player.SAY II2LOC04
			SAY II2JON13
			SAY II2JON14
			SAY II2JON15
			player.SAY II2LOC05
			SET JONGMEETSTATE = 1
		END

		
//	*****  player PRACTICES NEW COMBAT MOVES  *****

		:COMBAT



//	*****  THE CHARGING THRUST - LEVEL 1 REQUIREMENT  *****

		IF player.STAT LEVEL > 0
		BEGIN
		IF player.STAT ATTACKLEVEL < 1
		BEGIN
			player.STAT ATTACKLEVEL = 1
			SAY II2JON16
			WAIT 24
			SET JONGLOOKSTATE = 2
			SET EQUIPSTATE = 1
					
			//	*****	REPOSITION MUDUKON IF OUT OF RANGE  *****
			NOWAIT SETPROTOVARIABLE MUDOX1 = MUDOKON1.POSITION.X
			SETPROTOVARIABLE MUDOY1 = MUDOKON1.POSITION.Y
			IF MUDOX1 > 1114
			BEGIN
			IF MUDOX1 < 1200
			BEGIN
			IF MUDOY1 > 29852
			BEGIN
			IF MUDOY1 < 29952
			BEGIN
				JUMP REPOS1
			END
			END
			END
			END

			TRY CASTSPELL
			NOWAIT FADECHARACTEROUT MUDOKON1
			ADDAT MUDOX1 MUDOY1 FIREFLASH
			WAIT 48
			MUDOKON1.POS 1155 29902 17
			WAIT 48
			NOWAIT FADECHARACTERIN MUDOKON1
			ADDAT 1155 29902 FIREFLASH

			:REPOS1

			GOTORELATIVEPOSITION MUDOKON1 -150 0
			SCROLLTO JONG1
			MESSAGE JONGM1
			MESSAGE JONGM1B
			PIVOTOBJECT MUDOKON1
			TOGGLE AI = 0
			BEGINFIGHTING MUDOKON1
			WAIT 48
			NOWAIT SPECIFICATTACK 25
			WAIT 48
			TOGGLE AI = 1
			COMBAT OFF
			WAIT 12
			GOTORELATIVEPOSITION JONGWAY00 0 0
			NOWAIT pivotobject player
			SCROLLTO player
			WAIT 24
			SET TRAINSTATE = 1
			CONTROL ON
			SET JONGLOOKSTATE = 1
			
			:nocomplete1
			
			if player.lastattack = "CHARGETHRUST"
			begin
				jump complete1
			end
			
			wait 4	
			jump nocomplete1

			:complete1
			
			MESSAGE "Превосходно!"
			CONTROL OFF
			PLAYER.STOP
			WAIT 24
			player.TRY WALK
			SET EQUIPSTATE = 0
			SET TRAINSTATE = 0
			WAIT 24
			player.PIVOTOBJECT JONG1
			NOWAIT TRY CLAPPING
			player.TRY BOWING
			WAIT 12
			player.GOTORELATIVEPOSITION JONGWAY00 0 80
			player.PIVOTOBJECT JONG1
			player.UNEQUIP "TRAINING SWORD"
			WAIT 24
			player.DELINV "TRAINING SWORD"
			SET LEARNSTATE = 1
		END
		END


//	*****  THE SPINNING SLASH - LEVEL 3 REQUIREMENT  *****

		IF player.STAT LEVEL > 2
		BEGIN
		IF player.STAT ATTACKLEVEL < 3
		BEGIN
			player.STAT ATTACKLEVEL = 3
			SAY II2JON16
			WAIT 24
			SET JONGLOOKSTATE = 2
			SET EQUIPSTATE = 1
			
			//	*****	REPOSITION MUDUKON IF OUT OF RANGE  *****
			NOWAIT SETPROTOVARIABLE MUDOX1 = MUDOKON1.POSITION.X
			SETPROTOVARIABLE MUDOY1 = MUDOKON1.POSITION.Y
			IF MUDOX1 > 1114
			BEGIN
			IF MUDOX1 < 1200
			BEGIN
			IF MUDOY1 > 29852
			BEGIN
			IF MUDOY1 < 29952
			BEGIN
				JUMP REPOS2
			END
			END
			END
			END

			TRY CASTSPELL
			NOWAIT FADECHARACTEROUT MUDOKON1
			ADDAT MUDOX1 MUDOY1 FIREFLASH
			WAIT 48
			MUDOKON1.POS 1155 29902 17
			WAIT 48
			NOWAIT FADECHARACTERIN MUDOKON1
			ADDAT 1155 29902 FIREFLASH

			:REPOS2

			GOTORELATIVEPOSITION MUDOKON1 -120 0
			SCROLLTO JONG1
			MESSAGE JONGM2
			MESSAGE JONGM2B
			PIVOTOBJECT MUDOKON1
			TOGGLE AI = 0
			BEGINFIGHTING MUDOKON1
			WAIT 48
			NOWAIT SPECIFICATTACK 26
			WAIT 48
			TOGGLE AI = 1
			COMBAT OFF
			WAIT 12
			GOTORELATIVEPOSITION JONGWAY00 0 0
			pivotobject player
			SCROLLTO player
			WAIT 12
			SET TRAINSTATE = 2
			CONTROL ON
			SET JONGLOOKSTATE = 1
			
			:nocomplete2
			
			if player.lastattack = "SPINSWING"
			begin
				jump complete2
			end
			
			wait 4	
			jump nocomplete2

			:complete2
			
			MESSAGE "Превосходно!"
			CONTROL OFF
			PLAYER.STOP
			WAIT 24
			player.TRY WALK
			SET EQUIPSTATE = 0
			SET TRAINSTATE = 0
			WAIT 24
			player.PIVOTOBJECT JONG1
			NOWAIT TRY CLAPPING
			player.TRY BOWING
			WAIT 12
			player.GOTORELATIVEPOSITION JONGWAY00 0 80
			player.PIVOTOBJECT JONG1
			player.UNEQUIP "TRAINING SWORD"
			WAIT 24
			player.DELINV "TRAINING SWORD"
			SET LEARNSTATE = 1
		END
		END


//	*****  THE JUMPING CHOP - LEVEL 6 REQUIREMENT  *****

		IF player.STAT LEVEL > 5
		BEGIN
		IF player.STAT ATTACKLEVEL < 6
		BEGIN
			player.STAT ATTACKLEVEL = 6
			SAY II2JON16
			WAIT 24
			SET JONGLOOKSTATE = 2
			SET EQUIPSTATE = 1
			
			//	*****	REPOSITION MUDUKON IF OUT OF RANGE  *****
			NOWAIT SETPROTOVARIABLE MUDOX1 = MUDOKON1.POSITION.X
			SETPROTOVARIABLE MUDOY1 = MUDOKON1.POSITION.Y
			IF MUDOX1 > 1114
			BEGIN
			IF MUDOX1 < 1200
			BEGIN
			IF MUDOY1 > 29852
			BEGIN
			IF MUDOY1 < 29952
			BEGIN
				JUMP REPOS3
			END
			END
			END
			END

			TRY CASTSPELL
			NOWAIT FADECHARACTEROUT MUDOKON1
			ADDAT MUDOX1 MUDOY1 FIREFLASH
			WAIT 48
			MUDOKON1.POS 1155 29902 17
			WAIT 48
			NOWAIT FADECHARACTERIN MUDOKON1
			ADDAT 1155 29902 FIREFLASH

			:REPOS3

			GOTORELATIVEPOSITION MUDOKON1 -160 0
			SCROLLTO JONG1
			MESSAGE JONGM3
			MESSAGE JONGM3B
			PIVOTOBJECT MUDOKON1
			TOGGLE AI = 0
			BEGINFIGHTING MUDOKON1
			WAIT 48
			NOWAIT SPECIFICATTACK 27
			WAIT 48
			TOGGLE AI = 1
			COMBAT OFF
			WAIT 12
			GOTORELATIVEPOSITION JONGWAY00 0 0
			pivotobject player
			SCROLLTO player
			WAIT 12
			SET TRAINSTATE = 3
			CONTROL ON
			SET JONGLOOKSTATE = 1
			
			:nocomplete3
			
			if player.lastattack = "JUMPCHOP"
			begin
				jump complete3
			end
			
			wait 4	
			jump nocomplete3

			:complete3
			
			MESSAGE "Превосходно!"
			CONTROL OFF
			PLAYER.STOP
			WAIT 24
			player.TRY WALK
			SET EQUIPSTATE = 0
			SET TRAINSTATE = 0
			WAIT 24
			player.PIVOTOBJECT JONG1
			NOWAIT TRY CLAPPING
			player.TRY BOWING
			WAIT 12
			player.GOTORELATIVEPOSITION JONGWAY00 0 80
			player.PIVOTOBJECT JONG1
			player.UNEQUIP "TRAINING SWORD"
			WAIT 24
			player.DELINV "TRAINING SWORD"
			SET LEARNSTATE = 1
		END
		END



//	*****  COMBO A - LEVEL 9 REQUIREMENT *****

		IF player.STAT LEVEL > 8
		BEGIN
		IF player.STAT ATTACKLEVEL < 9
		BEGIN
			player.STAT ATTACKLEVEL = 9
			SAY II2JON16
			WAIT 24
			SET JONGLOOKSTATE = 2
			SET EQUIPSTATE = 1
			
			//	*****	REPOSITION MUDUKON IF OUT OF RANGE  *****
			NOWAIT SETPROTOVARIABLE MUDOX1 = MUDOKON1.POSITION.X
			SETPROTOVARIABLE MUDOY1 = MUDOKON1.POSITION.Y
			IF MUDOX1 > 1114
			BEGIN
			IF MUDOX1 < 1200
			BEGIN
			IF MUDOY1 > 29852
			BEGIN
			IF MUDOY1 < 29952
			BEGIN
				JUMP REPOS4
			END
			END
			END
			END

			TRY CASTSPELL
			NOWAIT FADECHARACTEROUT MUDOKON1
			ADDAT MUDOX1 MUDOY1 FIREFLASH
			WAIT 48
			MUDOKON1.POS 1155 29902 17
			WAIT 48
			NOWAIT FADECHARACTERIN MUDOKON1
			ADDAT 1155 29902 FIREFLASH

			:REPOS4

			GOTORELATIVEPOSITION MUDOKON1 -120 0
			SCROLLTO JONG1
			MESSAGE JONGM4
			MESSAGE JONGM4B
			PIVOTOBJECT MUDOKON1
			TOGGLE AI = 0
			BEGINFIGHTING MUDOKON1
			WAIT 48
			NOWAIT GOTORELATIVEPOSITION MUDOKON1 -100 0
			WAIT 12
			NOWAIT SPECIFICATTACK 0
			WAIT 24
			NOWAIT SPECIFICATTACK 1
			WAIT 48
			TOGGLE AI = 1
			COMBAT OFF
			WAIT 12
			GOTORELATIVEPOSITION JONGWAY00 0 0
			pivotobject player
			SCROLLTO player
			WAIT 12
			SET TRAINSTATE = 4
			CONTROL ON
			SET JONGLOOKSTATE = 1
			
			:nocomplete4
			
			if player.lastattack = "COMBOA2"
			begin
				jump complete4
			end
			
			wait 4	
			jump nocomplete4

			:complete4
			
			MESSAGE "Превосходно!"
			CONTROL OFF
			PLAYER.STOP
			WAIT 24
			player.TRY WALK
			SET EQUIPSTATE = 0
			SET TRAINSTATE = 0
			WAIT 24
			player.PIVOTOBJECT JONG1
			NOWAIT TRY CLAPPING
			player.TRY BOWING
			WAIT 12
			player.GOTORELATIVEPOSITION JONGWAY00 0 80
			player.PIVOTOBJECT JONG1
			player.UNEQUIP "TRAINING SWORD"
			WAIT 24
			player.DELINV "TRAINING SWORD"
			SET LEARNSTATE = 1
		END
		END

//	*****  THRUST COMBO - LEVEL 12 REQUIREMENT *****

		IF player.STAT LEVEL > 11
		BEGIN
		IF player.STAT ATTACKLEVEL < 12
		BEGIN
			player.STAT ATTACKLEVEL = 12
			SAY II2JON16
			WAIT 24
			SET JONGLOOKSTATE = 2
			SET EQUIPSTATE = 1
			
			//	*****	REPOSITION MUDUKON IF OUT OF RANGE  *****
			NOWAIT SETPROTOVARIABLE MUDOX1 = MUDOKON1.POSITION.X
			SETPROTOVARIABLE MUDOY1 = MUDOKON1.POSITION.Y
			IF MUDOX1 > 1114
			BEGIN
			IF MUDOX1 < 1200
			BEGIN
			IF MUDOY1 > 29852
			BEGIN
			IF MUDOY1 < 29952
			BEGIN
				JUMP REPOS5
			END
			END
			END
			END

			TRY CASTSPELL
			NOWAIT FADECHARACTEROUT MUDOKON1
			ADDAT MUDOX1 MUDOY1 FIREFLASH
			WAIT 48
			MUDOKON1.POS 1155 29902 17
			WAIT 48
			NOWAIT FADECHARACTERIN MUDOKON1
			ADDAT 1155 29902 FIREFLASH

			:REPOS5

			GOTORELATIVEPOSITION MUDOKON1 -130 0
			SCROLLTO JONG1
			MESSAGE JONGM5
			MESSAGE JONGM5B
			PIVOTOBJECT MUDOKON1
			TOGGLE AI = 0
			BEGINFIGHTING MUDOKON1
			WAIT 48
			NOWAIT GOTORELATIVEPOSITION MUDOKON1 -120 0
			WAIT 12
			NOWAIT SPECIFICATTACK 10
			WAIT 24
			NOWAIT SPECIFICATTACK 11
			WAIT 2
			NOWAIT SPECIFICATTACK 12
			WAIT 48
			TOGGLE AI = 1
			COMBAT OFF
			WAIT 12
			GOTORELATIVEPOSITION JONGWAY00 0 0
			pivotobject player
			SCROLLTO player
			WAIT 12
			SET TRAINSTATE = 5
			CONTROL ON
			SET JONGLOOKSTATE = 1
			
			:nocomplete5
			
			if player.lastattack = "THRUSTCHAIN3"
			begin
				jump complete5
			end
			
			wait 4	
			jump nocomplete5

			:complete5
			
			MESSAGE "Превосходно!"
			CONTROL OFF
			PLAYER.STOP
			WAIT 24
			player.TRY WALK
			SET EQUIPSTATE = 0
			SET TRAINSTATE = 0
			WAIT 24
			player.PIVOTOBJECT JONG1
			NOWAIT TRY CLAPPING
			player.TRY BOWING
			WAIT 12
			player.GOTORELATIVEPOSITION JONGWAY00 0 80
			player.PIVOTOBJECT JONG1
			player.UNEQUIP "TRAINING SWORD"
			WAIT 24
			player.DELINV "TRAINING SWORD"
			SET LEARNSTATE = 1
		END
		END



//	*****  SWING COMBO - LEVEL 15 REQUIREMENT

		IF player.STAT LEVEL > 14
		BEGIN
		IF player.STAT ATTACKLEVEL < 15
		BEGIN
			player.STAT ATTACKLEVEL = 15
			SAY II2JON16
			WAIT 24
			SET JONGLOOKSTATE = 2
			SET EQUIPSTATE = 1
			
			//	*****	REPOSITION MUDUKON IF OUT OF RANGE  *****
			NOWAIT SETPROTOVARIABLE MUDOX1 = MUDOKON1.POSITION.X
			SETPROTOVARIABLE MUDOY1 = MUDOKON1.POSITION.Y
			IF MUDOX1 > 1114
			BEGIN
			IF MUDOX1 < 1200
			BEGIN
			IF MUDOY1 > 29852
			BEGIN
			IF MUDOY1 < 29952
			BEGIN
				JUMP REPOS6
			END
			END
			END
			END

			TRY CASTSPELL
			NOWAIT FADECHARACTEROUT MUDOKON1
			ADDAT MUDOX1 MUDOY1 FIREFLASH
			WAIT 48
			MUDOKON1.POS 1155 29902 17
			WAIT 48
			NOWAIT FADECHARACTERIN MUDOKON1
			ADDAT 1155 29902 FIREFLASH

			:REPOS6

			GOTORELATIVEPOSITION MUDOKON1 -130 0
			SCROLLTO JONG1
			MESSAGE JONGM6
			MESSAGE JONGM6B
			PIVOTOBJECT MUDOKON1
			TOGGLE AI = 0
			BEGINFIGHTING MUDOKON1
			WAIT 48
			NOWAIT GOTORELATIVEPOSITION MUDOKON1 -120 0
			WAIT 12
			NOWAIT SPECIFICATTACK 13
			WAIT 24
			NOWAIT SPECIFICATTACK 14
			WAIT 2
			NOWAIT SPECIFICATTACK 15
			WAIT 48
			TOGGLE AI = 1
			COMBAT OFF
			WAIT 12
			GOTORELATIVEPOSITION JONGWAY00 0 0
			pivotobject player
			SCROLLTO player
			WAIT 12
			SET TRAINSTATE = 6
			CONTROL ON
			SET JONGLOOKSTATE = 1
			
			:nocomplete6
			
			if player.lastattack = "SWINGCHAIN3"
			begin
				jump complete6
			end
			
			wait 4	
			jump nocomplete6

			:complete6
			
			MESSAGE "Превосходно!"
			CONTROL OFF
			PLAYER.STOP
			WAIT 24
			player.TRY WALK
			SET EQUIPSTATE = 0
			SET TRAINSTATE = 0
			WAIT 24
			player.PIVOTOBJECT JONG1
			NOWAIT TRY CLAPPING
			player.TRY BOWING
			WAIT 12
			player.GOTORELATIVEPOSITION JONGWAY00 0 80
			player.PIVOTOBJECT JONG1
			player.UNEQUIP "TRAINING SWORD"
			WAIT 24
			player.DELINV "TRAINING SWORD"
			SET LEARNSTATE = 1
		END
		END


//	*****  CHOP COMBO - LEVEL 18 REQUIREMENT *****

		IF player.STAT LEVEL > 17
		BEGIN
		IF player.STAT ATTACKLEVEL < 18
		BEGIN
			player.STAT ATTACKLEVEL = 18
			SAY II2JON16
			WAIT 24
			SET JONGLOOKSTATE = 2
			SET EQUIPSTATE = 1
			
			//	*****	REPOSITION MUDUKON IF OUT OF RANGE  *****
			NOWAIT SETPROTOVARIABLE MUDOX1 = MUDOKON1.POSITION.X
			SETPROTOVARIABLE MUDOY1 = MUDOKON1.POSITION.Y
			IF MUDOX1 > 1114
			BEGIN
			IF MUDOX1 < 1200
			BEGIN
			IF MUDOY1 > 29852
			BEGIN
			IF MUDOY1 < 29952
			BEGIN
				JUMP REPOS7
			END
			END
			END
			END

			TRY CASTSPELL
			NOWAIT FADECHARACTEROUT MUDOKON1
			ADDAT MUDOX1 MUDOY1 FIREFLASH
			WAIT 48
			MUDOKON1.POS 1155 29902 17
			WAIT 48
			NOWAIT FADECHARACTERIN MUDOKON1
			ADDAT 1155 29902 FIREFLASH

			:REPOS7

			GOTORELATIVEPOSITION MUDOKON1 -130 0
			SCROLLTO JONG1
			MESSAGE JONGM7
			MESSAGE JONGM7B
			PIVOTOBJECT MUDOKON1
			TOGGLE AI = 0
			BEGINFIGHTING MUDOKON1
			WAIT 48
			NOWAIT GOTORELATIVEPOSITION MUDOKON1 -120 0
			WAIT 12
			NOWAIT SPECIFICATTACK 16
			WAIT 24
			NOWAIT SPECIFICATTACK 17
			WAIT 2
			NOWAIT SPECIFICATTACK 18
			WAIT 48
			TOGGLE AI = 1
			COMBAT OFF
			WAIT 12
			GOTORELATIVEPOSITION JONGWAY00 0 0
			pivotobject player
			SCROLLTO player
			WAIT 12
			SET TRAINSTATE = 7
			CONTROL ON
			SET JONGLOOKSTATE = 1
			
			:nocomplete7
			
			if player.lastattack = "CHOPCHAIN3"
			begin
				jump complete7
			end
			
			wait 4	
			jump nocomplete7

			:complete7
			
			MESSAGE "Превосходно!"
			CONTROL OFF
			PLAYER.STOP
			WAIT 24
			player.TRY WALK
			SET EQUIPSTATE = 0
			SET TRAINSTATE = 0
			WAIT 24
			player.PIVOTOBJECT JONG1
			NOWAIT TRY CLAPPING
			player.TRY BOWING
			WAIT 12
			player.GOTORELATIVEPOSITION JONGWAY00 0 80
			player.PIVOTOBJECT JONG1
			player.UNEQUIP "TRAINING SWORD"
			WAIT 24
			player.DELINV "TRAINING SWORD"
			SET LEARNSTATE = 1
		END
		END



//	*****  COMBO B - LEVEL 21 REQUIREMENT *****

		IF player.STAT LEVEL > 20
		BEGIN
		IF player.STAT ATTACKLEVEL < 21
		BEGIN
			player.STAT ATTACKLEVEL = 21
			SAY II2JON16
			WAIT 24
			SET JONGLOOKSTATE = 2
			SET EQUIPSTATE = 1
			
			//	*****	REPOSITION MUDUKON IF OUT OF RANGE  *****
			NOWAIT SETPROTOVARIABLE MUDOX1 = MUDOKON1.POSITION.X
			SETPROTOVARIABLE MUDOY1 = MUDOKON1.POSITION.Y
			IF MUDOX1 > 1114
			BEGIN
			IF MUDOX1 < 1200
			BEGIN
			IF MUDOY1 > 29852
			BEGIN
			IF MUDOY1 < 29952
			BEGIN
				JUMP REPOS8
			END
			END
			END
			END

			TRY CASTSPELL
			NOWAIT FADECHARACTEROUT MUDOKON1
			ADDAT MUDOX1 MUDOY1 FIREFLASH
			WAIT 48
			MUDOKON1.POS 1155 29902 17
			WAIT 48
			NOWAIT FADECHARACTERIN MUDOKON1
			ADDAT 1155 29902 FIREFLASH

			:REPOS8

			GOTORELATIVEPOSITION MUDOKON1 -120 0
			SCROLLTO JONG1
			MESSAGE JONGM8
			MESSAGE JONGM8B
			PIVOTOBJECT MUDOKON1
			TOGGLE AI = 0
			BEGINFIGHTING MUDOKON1
			WAIT 48
			NOWAIT GOTORELATIVEPOSITION MUDOKON1 -100 0
			WAIT 12
			NOWAIT SPECIFICATTACK 2
			WAIT 24
			NOWAIT SPECIFICATTACK 3
			WAIT 2
			NOWAIT SPECIFICATTACK 4
			WAIT 24
			TOGGLE AI = 1
			COMBAT OFF
			WAIT 12
			GOTORELATIVEPOSITION JONGWAY00 0 0
			pivotobject player
			SCROLLTO player
			WAIT 12
			SET TRAINSTATE = 8
			CONTROL ON
			SET JONGLOOKSTATE = 1
			
			:nocomplete8
			
			if player.lastattack = "COMBOB3"
			begin
				jump complete8
			end
			
			wait 4	
			jump nocomplete8

			:complete8
			
			MESSAGE "Превосходно!"
			CONTROL OFF
			PLAYER.STOP
			WAIT 24
			player.TRY WALK
			SET EQUIPSTATE = 0
			SET TRAINSTATE = 0
			WAIT 24
			player.PIVOTOBJECT JONG1
			NOWAIT TRY CLAPPING
			player.TRY BOWING
			WAIT 12
			player.GOTORELATIVEPOSITION JONGWAY00 0 80
			player.PIVOTOBJECT JONG1
			player.UNEQUIP "TRAINING SWORD"
			WAIT 24
			player.DELINV "TRAINING SWORD"
			SET LEARNSTATE = 1
		END
		END



//	*****  COMBO C - LEVEL 24 REQUIREMENT *****

		IF player.STAT LEVEL > 23
		BEGIN
		IF player.STAT ATTACKLEVEL < 24
		BEGIN
			player.STAT ATTACKLEVEL = 24
			SAY II2JON16
			WAIT 24
			SET JONGLOOKSTATE = 2
			SET EQUIPSTATE = 1
			
			//	*****	REPOSITION MUDUKON IF OUT OF RANGE  *****
			NOWAIT SETPROTOVARIABLE MUDOX1 = MUDOKON1.POSITION.X
			SETPROTOVARIABLE MUDOY1 = MUDOKON1.POSITION.Y
			IF MUDOX1 > 1114
			BEGIN
			IF MUDOX1 < 1200
			BEGIN
			IF MUDOY1 > 29852
			BEGIN
			IF MUDOY1 < 29952
			BEGIN
				JUMP REPOS9
			END
			END
			END
			END

			TRY CASTSPELL
			NOWAIT FADECHARACTEROUT MUDOKON1
			ADDAT MUDOX1 MUDOY1 FIREFLASH
			WAIT 48
			MUDOKON1.POS 1155 29902 17
			WAIT 48
			NOWAIT FADECHARACTERIN MUDOKON1
			ADDAT 1155 29902 FIREFLASH

			:REPOS9

			GOTORELATIVEPOSITION MUDOKON1 -120 0
			SCROLLTO JONG1
			MESSAGE JONGM9
			MESSAGE JONGM9B
			PIVOTOBJECT MUDOKON1
			TOGGLE AI = 0
			BEGINFIGHTING MUDOKON1
			WAIT 48
			NOWAIT GOTORELATIVEPOSITION MUDOKON1 -100 0
			WAIT 12
			NOWAIT SPECIFICATTACK 5
			WAIT 24
			NOWAIT SPECIFICATTACK 6
			WAIT 24
			NOWAIT SPECIFICATTACK 7
			WAIT 24
			NOWAIT SPECIFICATTACK 8
			WAIT 24
			NOWAIT SPECIFICATTACK 9
			WAIT 48
			TOGGLE AI = 1
			COMBAT OFF
			WAIT 12
			GOTORELATIVEPOSITION JONGWAY00 0 0
			pivotobject player
			SCROLLTO player
			WAIT 12
			SET TRAINSTATE = 9
			CONTROL ON
			SET JONGLOOKSTATE = 1
			
			:nocomplete9
			
			if player.lastattack = "COMBOC5"
			begin
				jump complete1
			end
			
			wait 4	
			jump nocomplete9

			:complete1
			
			MESSAGE "Превосходно!"
			CONTROL OFF
			PLAYER.STOP
			WAIT 24
			player.TRY WALK
			SET EQUIPSTATE = 0
			SET TRAINSTATE = 0
			WAIT 24
			player.PIVOTOBJECT JONG1
			NOWAIT TRY CLAPPING
			player.TRY BOWING
			WAIT 12
			player.GOTORELATIVEPOSITION JONGWAY00 0 80
			player.PIVOTOBJECT JONG1
			player.UNEQUIP "TRAINING SWORD"
			WAIT 24
			player.DELINV "TRAINING SWORD"
			SET LEARNSTATE = 1
		END
		END

	
//	JONG AND player FINISH CONVERSATION

		IF LEARNSTATE = 1
		BEGIN
			IF MISTSTATE < 4
			BEGIN
				SAY II2JON17
				SAY II2JON18
				player.SAY II2LOC06
			END
			IF MISTSTATE > 3
			BEGIN
				IF MISTSTATE < 6
				BEGIN
					SAY V2JON06
					SAY V2JON07
					SAY V2JON08
					SAY V2JON09
					player.SAY V2LOC00
				END
			END
		END
		IF LEARNSTATE = 0
		BEGIN
			IF MISTSTATE < 5
			BEGIN
				SAY II6JON01
				SAY II6JON02
			END
			IF MISTSTATE = 5
			BEGIN
				SAY II14JON03
				SAY II14JON04
			END
			IF MISTSTATE = 6
			BEGIN
				SAY V2JON01
				SAY V2JON02
			END
			IF MISTSTATE = 7
			BEGIN
				SAY VIII3JON02
			END
		END
		CONTROL ON
		JUMP TRAINEND
	
		:SPARYES

			SET EQUIPSTATE = 1
			SET JONGLOOKSTATE = 3
			MUDOKON1.STAT AGGRESSIVE = 0

			//	*****	REPOSITION MUDUKON  *****
			
			NOWAIT SETPROTOVARIABLE MUDOX1 = MUDOKON1.POSITION.X
			SETPROTOVARIABLE MUDOY1 = MUDOKON1.POSITION.Y
			PIVOTOBJECT MUDOKON1
			TRY CASTSPELL
			NOWAIT FADECHARACTEROUT MUDOKON1
			ADDAT MUDOX1 MUDOY1 FIREFLASH
			WAIT 24
			MUDOKON1.POS 1000 29638 32
			PIVOTOBJECT player
			NOWAIT TRY BOWING
			player.TRY BOWING
			player.COMBAT ON
			TRY ROLLBACK
			STAT AGGRESSIVE = 1
			BEGINFIGHTING player
			CONTROL ON
		
		:START2
				
			CHOICE SPARENDYES ENDSPAR
			WAIT RESPCTRLON

		:SPARENDYES
				
			WAIT 12
			CONTROL OFF
			TOGGLE AI = 0
			STAT AGGRESSIVE = 0
			NOWAIT COMBAT OFF
			player.COMBAT OFF
			TOGGLE AI = 1
			SET EQUIPSTATE = 0
			WAIT 12
			player.UNEQUIP "TRAINING SWORD"
			WAIT 12
			player.DELINV "TRAINING SWORD"
			IF JONG1.POSITION.X < 940
			BEGIN
				GOTO JONGWAY00
			END
			GOTO JONGWAY00
			PIVOT 65
			MUDOKON1.POS 1155 29902 17
			TRY CASTSPELL
			NOWAIT ADDAT 1155 29902 FIREFLASH	
			FADECHARACTERIN MUDOKON1
			MUDOKON1.STAT AGGRESSIVE = 1
			CONTROL ON
					
		:TRAINEND

		IF PLAYER.GETITEMAMOUNT "TRAINING SWORD" > 0
		BEGIN
			SET EQUIPSTATE = 0
			player.DELINV "TRAINING SWORD"
			JUMP TRAINEND
		END
		SET JONGLOOKSTATE = 1
		SET LEARNSTATE = 0
		combat2in.STAT LOCKED = 0
		SETCDVOLUME FULL

	END
	ALWAYS
	BEGIN
		WAIT 24

		IF JONGLOOKSTATE = 3
		BEGIN
			player.STAT HEALTH = LOKHEALTH		
		END
	END
END


OBJECT "MUDOKON1"
BEGIN
	DATA
	BEGIN
		NUMBER MUDOX 0
		NUMBER MUDOY 0
		NUMBER LOKHEALTH 0
	END
	ALWAYS
	BEGIN
		WAIT 24
		STAT HEALTH = 1800
		JONG1.STAT HEALTH = 1800
		
		IF MUDOKONSTATE = 1
		BEGIN
			SETPROTOVARIABLE LOKHEALTH = player.STAT HEALTH
			SET MUDOKONSTATE = 0		
		END
		IF JONGLOOKSTATE = 3
		BEGIN
			player.STAT HEALTH = LOKHEALTH		
		END
		IF JONGLOOKSTATE = 1
		BEGIN
			SETPROTOVARIABLE MUDOX = MUDOKON1.POSITION.X
			SETPROTOVARIABLE MUDOY = MUDOKON1.POSITION.Y
			JONG1.PIVOTOBJECT player
			
			IF MUDOY < 29796
			BEGIN
				JUMP ORIGPOS
			END
			IF MUDOY > 30264
			BEGIN
				JUMP ORIGPOS
			END
			IF MUDOX < 750
			BEGIN
				JUMP ORIGPOS
			END
			IF MUDOX > 1416
			BEGIN
				JUMP ORIGPOS
			END
			IF MUDOY < 29990
			BEGIN
			IF MUDOX < 940
			BEGIN
				JUMP ORIGPOS
			END
			END
			IF MUDOY < 29910
			BEGIN
			IF MUDOX < 1021
			BEGIN
				JUMP ORIGPOS
			END
			END
			
			JUMP ORIGPOSEND

			:ORIGPOS
			
			NOWAIT SETPROTOVARIABLE MUDOX = MUDOKON1.POSITION.X
			SETPROTOVARIABLE MUDOY = MUDOKON1.POSITION.Y
			JONG1.TRY CASTSPELL
			WAIT 12
			NOWAIT FADECHARACTEROUT MUDOKON1
			ADDAT MUDOX MUDOY FIREFLASH
			WAIT 24
			POS 1155 29902 17	
			NOWAIT FADECHARACTERIN MUDOKON1
			ADDAT 1155 29902 FIREFLASH
			
			:ORIGPOSEND
		
		END	
		IF JONGLOOKSTATE = 2
		BEGIN
			player.PIVOTOBJECT JONG1
		END
		IF EQUIPSTATE = 1
		BEGIN
			IF player.GETITEMAMOUNT "TRAINING SWORD" = 0
			BEGIN
				WAIT 24
				"TRAINING SWORD".DELETE
				player.ADDINV "TRAINING SWORD"
			END
			player.EQUIP "TRAINING SWORD"	
		END
	END
END



OBJECT "GUS3"
BEGIN
	CUBE player 500,28250,0 600,28300,100
	BEGIN
		CONTROL OFF
		WAIT 12
		player.PIVOT 190
		WAIT 48
		say II13GUS12
		say II13GUS13
		say II13GUS14
		player.say II13LOC08
		say II13GUS15
		player.say II13LOC09
		say II13GUS16
		FADESCREENOUT
		WAIT SCREENFADE
		FADESCREENIN
		player.POS 10000 10000 16 4
		CONTROL ON
		TOGGLE PAUSE
	END
END





//	DRUHG CAMP


OBJECT "JASON1"
BEGIN
	DIALOG
	BEGIN
		FACE 80
		CONTROL OFF
		player.STOP
		player.COMBAT OFF

			PLAYER.GOTORELATIVEPOSITION JASON1 30 0
			PLAYER.PIVOT 190
			NOWAIT PLAYER.TRY SAY
			WAIT 24
			PLAYER.GOTORELATIVEPOSITION JASON1 140 0
			TRY WALKF
			player.PIVOTOBJECT JASON1
			WAIT 12
			SETCDVOLUME HALF
			WAIT 12
			Say III16JAS00
			say III16JAS01
			player.say III16LOC00
			say III16JAS02
			say III16JAS03
			player.say III16LOC01
			say III16JAS04
			player.say III16LOC02
			say III16JAS05
			player.ADDINV "GOLDEN SUN KEY"
			say III16JAS06
			say III16JAS07
			say III16JAS08
			GOTORELATIVEPOSITION DRUWAY03 0 0
			WAIT 1
			GOTORELATIVEPOSITION DRUWAY05 0 0
			WAIT 1
			CONTROL ON
			SET JASONSTATE = 3
			WAIT 1
			SETCDVOLUME FULL
			WAIT 1
			
	END
	ALWAYS
	BEGIN
		IF JASONSTATE = 1
		BEGIN
			TRY TIEDTOTREE
			WAIT 24
		END
		IF MISTSTATE > 1
		BEGIN
			IF JASONSTATE = 0
			BEGIN
				TOGGLE INVISIBLE = 0
				SET JASONSTATE = 1
			END
			IF JASONSTATE = 3
			BEGIN
				TOGGLE INVISIBLE = 1
				POS 3016 15870 47
				TOGGLE PAUSE = 1
			END

			WAIT 24
		END
		IF MISTSTATE = 1
		BEGIN
			TOGGLE INVISIBLE = 1
			WAIT 24
		END
	END
END


//	OGROK CAMP




OBJECT "Gatekeeper1"
BEGIN
	DIALOG
	BEGIN
		SETCDVOLUME HALF
		WAIT 1
		
		IF MISTSTATE < 5
		BEGIN
		
		IF player.GETITEMAMOUNT "AMULET OF ROGOSS" = 0
		BEGIN
			IF gatekeeperstate = 1
			BEGIN
				CONTROL OFF
				player.STOP
				player.COMBAT OFF
				NOWAIT PIVOTOBJECT player
				player.PIVOTOBJECT GATEKEEPER
				say III6GAT08
				say III6GAT09
				CONTROL ON
			END
			IF gatekeeperstate < 1
			BEGIN
				CONTROL OFF
				player.STOP
				player.COMBAT OFF
				NOWAIT PIVOTOBJECT player
				player.PIVOTOBJECT GATEKEEPER
				say III6GAT00
				say III6GAT01
				player.say III6LOC00
				say III6GAT02
				
				:Start

					Choice CHIEF III6LOC01
					Choice THREAT III6LOC02
					wait response
	
				:CHIEF

					player.say III6LOC01
					say III6GAT03

				:THREAT
					
					player.say III6LOC02
					say III6GAT04
					player.say III6LOC03
					say III6GAT05
					say III6GAT06
					player.say III6LOC04
					say III6GAT07
					say III6GAT08
					SAY III6GAT09
					SET gatekeeperstate = 1
					CONTROL ON
			END
		END
		
		IF player.GETITEMAMOUNT "AMULET OF ROGOSS" = 1
		BEGIN
			CONTROL OFF
			player.STOP
			player.COMBAT OFF
			NOWAIT PIVOTOBJECT player
			player.PIVOTOBJECT GATEKEEPER
		
			IF gatekeeperstate = 1
			BEGIN
			say III7GAT00
			SAY III7GAT01
			END

			PIVOT 0
			SAY III7GAT02
			player.SAY III7LOC00
			PIVOTOBJECT player
			SAY III7GAT03
			SAY III7GAT04
			FADESCREENOUT
			WAIT SCREENFADE
			FADESCREENIN
			player.POS 13500 17728 32
			CONTROL ON
		END
		
		END

		IF MISTSTATE > 4
		BEGIN
			CONTROL OFF
			player.STOP
			player.COMBAT OFF
			NOWAIT PIVOTOBJECT player
			player.PIVOTOBJECT GATEKEEPER
			SAY III7GAT04
			FADESCREENOUT
			WAIT SCREENFADE
			FADESCREENIN
			player.POS 13500 17728 32
			CONTROL ON
		END
		
		SETCDVOLUME FULL
	END
	ALWAYS
	BEGIN
		GOTORELATIVEPOSITION GATEWAY01 0 0
		WAIT 24
		PIVOT 120
		WAIT 24
		WAIT 24
		WAIT 24
		WAIT 24
		PIVOTOBJECT GATEWAY02
		WAIT 24
		GOTORELATIVEPOSITION GATEWAY02 0 0
		WAIT 24
		PIVOT 120
		WAIT 24
		WAIT 24
		WAIT 24
		WAIT 24
		PIVOTOBJECT GATEWAY01
		WAIT 24
	END
END


OBJECT "CHIEF1"
BEGIN
	CUBE 13499,17727,0 13501,17729,100
	BEGIN
		IF player.GETITEMAMOUNT "AMULET OF ROGOSS" = 1
		BEGIN
			SETCDVOLUME HALF
			WAIT 1
			CONTROL OFF
			player.STOP
			player.COMBAT OFF
			PIVOTOBJECT player
			player.PIVOTOBJECT CHIEF1
			say III8CHI00
			say III8CHI01
			player.say III8LOC00
			player.say III8LOC01
			say III8CHI02
			say III8CHI03
			say III8CHI04
			player.say III8LOC02
			say III8CHI05				
			
			:Start
	
				Choice CAVES III8LOC03
				Choice TRYING III8LOC04
				wait response
		
			:TRYING
	
				player.SAY III8LOC04
				say III8CHI06
				JUMP START
	
			:CAVES
						
				player.SAY III8LOC03
				say III8CHI07
				say III8CHI08
				say III8CHI09
					
			:START2
	
				CHOICE WORTHY III8LOC05
				CHOICE NOTHING III8LOC06
				WAIT RESPONSE
						
			:NOTHING
					
				player.SAY III8LOC06
				say III8CHI10
				say III8CHI11
				say III8CHI12
				JUMP START2
						
			:WORTHY
				
				SET VINCESTATE = 1
	
				player.SAY III8LOC05
				say III8CHI13
				SAY III8CHI14
				player.SAY III8LOC07
				SAY III8CHI15
				SAY III8CHI16
				player.SAY III8LOC08
				player.SAY III8LOC09
				SAY III8CHI17
				PLAYER.DELINV "AMULET OF ROGOSS"
				WAIT 24
				SETCDVOLUME FULL
				WAIT 1
				FADESCREENOUT
				WAIT SCREENFADE
				FADESCREENIN
				player.POS 12192 17516 112
				TOGGLE INVISIBLE
				TOGGLE PAUSE = 1			
		END
	END
END


OBJECT "CHIEF2"
BEGIN
	DIALOG
	BEGIN
		SETCDVOLUME HALF
		WAIT 1
		CONTROL OFF
		player.STOP
		player.COMBAT OFF

		IF MISTSTATE = 5
		BEGIN
			SAY III9CHI08
		END
		IF MISTSTATE > 5
		BEGIN
			IF CHIEFSTATE = 2
			BEGIN
				SAY III12CHI01
			END
			IF CHIEFSTATE = 1
			BEGIN
				say III12CHI00
				player.SAY III12LOC00
				SAY III12CHI01
				SET CHIEFSTATE = 2
			END
		END
		CONTROL ON
		SETCDVOLUME FULL
	END
	ALWAYS
	BEGIN
		WAIT 24

		IF MISTSTATE < 5
		BEGIN

		IF VINCESTATE = 1
		BEGIN
			LOCKE.GIVEWEAPONS "CHIEF2"
			SET VINCESTATE = 2
		END
		IF BAEZ.STAT HEALTH < 1
		BEGIN
			WAIT 12
			player.COMBAT OFF
			WAIT 12
			PLAYER.GOTO 12272 17024
			NOWAIT CHIEF2.PIVOTOBJECT player
			player.PIVOTOBJECT CHIEF2
			CHIEF2.SAY III9CHI00
			CHIEF2.SAY III9CHI01
			CHIEF2.SAY III9CHI02
			CHIEF2.SAY III12CHI02
			CHIEF2.SAY III12CHI03
			CHIEF2.SAY III12CHI04
			CHIEF2.SAY III12CHI05
			CHIEF2.SAY III12CHI06
			CHIEF2.SAY III12CHI07
			player.ADDINV "SOUL CLEAVER" 
			player.SAY III12LOC01
			CHIEF2.SAY III9CHI03
			CHIEF2.SAY III9CHI04
			player.SAY III9LOC00
			CHIEF2.SAY III9CHI05
			CHIEF2.SAY III9CHI06
			
			GIVEWEAPONS "LOCKE"
			SET CHIEFSTATE = 1
			SET MISTSTATE = 5

			MARK.DELETE
			VINCE.DELETE
			MATT.DELETE
			REDO.DELETE
			RIZ.DELETE
			AUSTIN.DELETE
			JASON.DELETE
			HERSH.DELETE
			REX.DELETE
			PAUL.DELETE
			CARL.DELETE

			CONTROL ON
		END

		END
	END
END



//	CAVE ENTRANCE AND EXIT

OBJECT "CAVENTER"
BEGIN
	CUBE 14030,17150,0 14115,17195,100
	BEGIN
		NOWAIT CONTROL OFF
		player.STOP
		FADESCREENOUT
		WAIT SCREENFADE
 		FADESCREENIN
		player.POS 10560 10496 16 30
		CONTROL ON
	END
END


