

OBJECT "RUINSEXIT"
BEGIN
	CUBE 21100,8500,500 21240,8525,600
	BEGIN
		NOWAIT CONTROL OFF
		player.STOP
		FADESCREENOUT
		WAIT SCREENFADE
 		FADESCREENIN
		player.POS 7329 9664 144 48
		CONTROL ON
	END
END



OBJECT "MUDUKON9"
BEGIN
	CUBE 21690,14965,0 21966,15000,144
	BEGIN
		FADESCREENOUT
		WAIT SCREENFADE
		LOCKE.POS 9800 9100 32 37
		FADESCREENIN
	END
END


OBJECT "Varro"
BEGIN
	DIALOG
	BEGIN
		SETCDVOLUME HALF
		WAIT 1

		IF VARROSTATE = 1
		BEGIN
			control off
			player.STOP
			player.COMBAT OFF
			player.pivotobject Varro
			pivotobject player
			say VI1NAV12
			player.say VI1LOC09
			CONTROL ON
		END
		
		IF VARROSTATE < 1
		BEGIN
			control off
			player.STOP
			player.COMBAT OFF
			player.pivotobject Varro
			pivotobject player
			player.say VI1LOC00
			say VI1NAV00
		
		:Start

			Choice no VI1LOC01
			Choice varro VI1LOC02
			Choice great VI1LOC03
			WAIT RESPONSE

		:great
		
			PLAYER.SAY VI1LOC03
			say VI1NAV01
			jump DETON

		:varro

			PLAYER.SAY VI1LOC02
			say VI1NAV02
			JUMP DETON
		
		:NO

			PLAYER.SAY VI1LOC01
			

		:DETON
			say VI1NAV03
			say VI1NAV04
			player.say VI1LOC04
			say VI1NAV05
			say VI1NAV06

		:Start2
		
			Choice state1 VI1LOC05
			Choice state2 VI1LOC06
			WAIT RESPONSE

		:STATE2

			PLAYER.SAY VI1LOC06
			JUMP EDGE
	
		:STATE1

			PLAYER.SAY VI1LOC05
			JUMP EDGE

		:EDGE
			say VI1NAV07
			say VI1NAV08
			player.say VI1LOC07
			say VI1NAV09
			say VI1NAV10
			say VI1NAV11
			player.say VI1LOC08
			say VI1NAV12
			player.say VI1LOC09
			set VARROSTATE=1
			control on
		END
		
		WAIT 1
		SETCDVOLUME FULL
	END
END


OBJECT "PedOne"
BEGIN
	USE "Water Vial"
	BEGIN
		SET PEDONE = 1
		STATE 1
		player.delinv "Water Vial"
	END
	USE "Acid Vial"
	BEGIN
		SET PEDONE = 1
		STATE 1
		player.delinv "Acid Vial"
	END
	USE "Root Vial"
	BEGIN
		SET PEDONE = 1
		STATE 1
		player.delinv "Root Vial"
	END
	USE "Blue Flower Vial"
	BEGIN
		SET PEDONE = 1
		STATE 1
		player.delinv "Blue Flower Vial"
	END
	USE "Issathi Claw Vial"
	BEGIN
		SET PEDONE = 1
		STATE 1
		player.delinv "Issathi Claw Vial"
	END
	USE "Bone Vial"
	BEGIN
		SET PEDONE = 1
		STATE 1
		player.delinv "Bone Vial"
	END
	USE
	BEGIN
		IF PEDONE = 0
		BEGIN
			STATE 0
		END
		ELSE
		BEGIN
			STATE 1
		END
	END
END

OBJECT "PedTwo"
BEGIN
	USE "Water Vial"
	BEGIN
		SET PEDTWO = 1
		STATE 1
		player.delinv "Water Vial"
	END
	USE "Acid Vial"
	BEGIN
		SET PEDTWO = 1
		STATE 1
		player.delinv "Acid Vial"
	END
	USE "Root Vial"
	BEGIN
		SET PEDTWO = 1
		STATE 1
		player.delinv "Root Vial"
	END
	USE "Blue Flower Vial"
	BEGIN
		SET PEDTWO = 1
		STATE 1
		player.delinv "Blue Flower Vial"
	END
	USE "Issathi Claw Vial"
	BEGIN
		SET PEDTWO = 1
		STATE 1
		player.delinv "Issathi Claw Vial"
	END
	USE "Bone Vial"
	BEGIN
		SET PEDTWO = 1
		STATE 1
		player.delinv "Bone Vial"
	END
	USE
	BEGIN
		IF PEDTWO = 0
		BEGIN
			STATE 0
		END
		ELSE
		BEGIN
			STATE 1
		END
	END
END

OBJECT "PedThree"
BEGIN
	USE "Water Vial"
	BEGIN
		SET PEDTHREE = 1
		STATE 1
		player.delinv "Water Vial"
	END
	USE "Acid Vial"
	BEGIN
		SET PEDTHREE = 1
		STATE 1
		player.delinv "Acid Vial"
	END
	USE "Root Vial"
	BEGIN
		SET PEDTHREE = 1
		STATE 1
		player.delinv "Root Vial"
	END
	USE "Blue Flower Vial"
	BEGIN
		SET PEDTHREE = 1
		STATE 1
		player.delinv "Blue Flower Vial"
	END
	USE "Issathi Claw Vial"
	BEGIN
		SET PEDTHREE = 1
		STATE 1
		player.delinv "Issathi Claw Vial"
	END
	USE "Bone Vial"
	BEGIN
		SET PEDTHREE = 1
		STATE 1
		player.delinv "Bone Vial"
	END
	USE
	BEGIN
		IF PEDTHREE = 0
		BEGIN
			STATE 0
		END
		ELSE
		BEGIN
			STATE 1
		END
	END
END

OBJECT "PedFour"
BEGIN
	USE "Water Vial"
	BEGIN
		SET PEDFOUR = 1
		STATE 1
		player.delinv "Water Vial"
	END
	USE "Acid Vial"
	BEGIN
		SET PEDFOUR = 1
		STATE 1
		player.delinv "Acid Vial"
	END
	USE "Root Vial"
	BEGIN
		SET PEDFOUR = 1
		STATE 1
		player.delinv "Root Vial"
	END
	USE "Blue Flower Vial"
	BEGIN
		SET PEDFOUR = 1
		STATE 1
		player.delinv "Blue Flower Vial"
	END
	USE "Issathi Claw Vial"
	BEGIN
		SET PEDFOUR = 1
		STATE 1
		player.delinv "Issathi Claw Vial"
	END
	USE "Bone Vial"
	BEGIN
		SET PEDFOUR = 1
		STATE 1
		player.delinv "Bone Vial"
	END
	USE
	BEGIN
		IF PEDFOUR = 0
		BEGIN
			STATE 0
		END
		ELSE
		BEGIN
			STATE 1
		END
	END
END

OBJECT "PedFive"
BEGIN
	USE "Water Vial"
	BEGIN
		SET PEDFIVE = 1
		STATE 1
		player.delinv "Water Vial"
	END
	USE "Acid Vial"
	BEGIN
		SET PEDFIVE = 1
		STATE 1
		player.delinv "Acid Vial"
	END
	USE "Root Vial"
	BEGIN
		SET PEDFIVE = 1
		STATE 1
		player.delinv "Root Vial"
	END
	USE "Blue Flower Vial"
	BEGIN
		SET PEDFIVE = 1
		STATE 1
		player.delinv "Blue Flower Vial"
	END
	USE "Issathi Claw Vial"
	BEGIN
		SET PEDFIVE = 1
		STATE 1
		player.delinv "Issathi Claw Vial"
	END
	USE "Bone Vial"
	BEGIN
		SET PEDFIVE = 1
		STATE 1
		player.delinv "Bone Vial"
	END
	USE
	BEGIN
		IF PEDFIVE = 0
		BEGIN
			STATE 0
		END
		ELSE
		BEGIN
			STATE 1
		END
	END
END

OBJECT "PedSix"
BEGIN
	USE "Water Vial"
	BEGIN
		SET PEDSIX = 1
		STATE 1
		player.delinv "Water Vial"
	END
	USE "Acid Vial"
	BEGIN
		SET PEDSIX = 1
		STATE 1
		player.delinv "Acid Vial"
	END
	USE "Root Vial"
	BEGIN
		SET PEDSIX = 1
		STATE 1
		player.delinv "Root Vial"
	END
	USE "Blue Flower Vial"
	BEGIN
		SET PEDSIX = 1
		STATE 1
		player.delinv "Blue Flower Vial"
	END
	USE "Issathi Claw Vial"
	BEGIN
		SET PEDSIX = 1
		STATE 1
		player.delinv "Issathi Claw Vial"
	END
	USE "Bone Vial"
	BEGIN
		SET PEDSIX = 1
		STATE 1
		player.delinv "Bone Vial"
	END
	USE
	BEGIN
		IF PEDSIX = 0
		BEGIN
			STATE 0
		END
		ELSE
		BEGIN
			STATE 1
		END
	END
END

OBJECT "WarpRuin"
BEGIN
	ALWAYS
	BEGIN

	WAIT 24

	IF PedOne.state=1
		BEGIN
		IF PedTwo.state=1
			BEGIN
			IF PedThree.state=1
				BEGIN
				IF PedFour.state=1
					BEGIN 
					IF PedFive.state=1
						BEGIN
						IF PedSix.state=1
							BEGIN
							barruin.delete
							toggle invisible
							toggle pause=1
							END
						END
					END
				END
			END
		END
	END
END


