/******************************************************************************/
(include "sci.sh")
(include "game.sh")
/******************************************************************************/
(script 100)
/******************************************************************************/
(use "controls")
(use "cycle")
(use "door")
(use "feature")
(use "game")
(use "inv")
(use "main")
(use "obj")
(local
red
texttt
randomMusic2
)
/******************************************************************************/
(instance public rm100 of Rm
	(properties
		picture scriptNumber
		north 102
		east 101
		south 103
		west 0
	)
	(method (init)
		(super:init())
		(self:setScript(RoomScript))

		(switch(gPreviousRoomNumber)
			(case 70

          (send gEgo: put(INV_WATER))

      (send gTheMusic:
			prevSignal(0)
			stop()
			number(39)
			loop(-1)
			play()
		)
               (send gGame: setSpeed(3))
				(send gEgo:
					posn(15 132)
					loop(0)
				)
			)
   	(case 976


      (send gTheMusic:
			prevSignal(0)
			stop()
			number(39)
			loop(-1)
			play()
		)
               (send gGame: setSpeed(3))
				(send gEgo:
					posn(19 132)
					loop(0)
				)
			)
   	(case 101
				(send gEgo:
					posn(314 136)
					loop(1)
				)
			)
   	(case 102
				(send gEgo:
					posn(140 114)
					loop(2)
				)
			)
   (case 103
				(send gEgo:
					posn(152 185)
					loop(3)
				)
			)
		)
       (if(not(send gEgo: has(INV_EMPTY_BOTTLE)))
       (send gEgo: get(INV_EMPTY_BOTTLE))
       )
		SetUpEgo()
		(send gEgo:init())
  (send gRoom: horizon(107))
	)
)
/******************************************************************************/
(instance RoomScript of Script
	(properties)
      (method (handleEvent pEvent)
(super:handleEvent(pEvent))
(if(Said('drink/water'))
Print("Better not. It's mixed with sand and it wouldn't do you any good.")
)
(if(Said('climb/hole,tunnel,in,back'))
Print("The way you came here is too steep to climb up.")
)
(if(Said('look>'))
(if(Said('/door,doorway'))
Print("It leads to another room.")
)
(if(Said('/shaft,hole'))
Print("That's the way you slide in from. It's too steep to climb back from.")
)
(if(Said('/water'))
Print("Hey, where is this water coming from?")
)
(if(Said('/floor'))
Print("It's just a stone floor.")
)
(if(Said('/hole,tunnel'))
Print("The way you came here. A steep sliding-tunnel.")
)
(if(Said('/marking'))
Print("It's an arrow leading right.")
)
(if(Said('/wall'))
Print("On closer look you discover a marking on the wall.")
)
(if(Said('/'))
Print("You're in one of the rooms of the maze. The walls contain lots of scratches and stuff.")
)
)

        )
(method(doit)
 (if(== gPreviousRoomNumber 70 or (if(== gPreviousRoomNumber 976)))
 (if(not(texttt))
 = texttt TRUE
 Print("Hey, what is this place? Looks like some underground cave. Could this be the place where the moon stone is hidden?" #at 70 130)
 //Print("This is the end. The maze isn't ready yet. You may still look around." #at 70 130)  //for early beta testers
 )
 )
 
 
 )
)
/******************************************************************************/
