/******************************************************************************/
(include "sci.sh")
(include "game.sh")
/******************************************************************************/
(script 52)
/******************************************************************************/
(use "controls")
(use "cycle")
(use "door")
(use "feature")
(use "game")
(use "inv")
(use "main")
(use "obj")
/******************************************************************************/
(instance public rm052 of Rm
	(properties
		picture scriptNumber
		north 0
		east 0
		south 0
		west 0
	)
	(method (init)
		(super:init())
		(self:setScript(RoomScript))

		(switch(gPreviousRoomNumber)
			(default
				(send gEgo:
					posn(239 179)
					loop(3)
				)
			)
   (case 53
				(send gEgo:
					posn(250 19)
					loop(2)
				)
			)
      (case 60
				(send gEgo:
					posn(72 148)
					loop(2)
				)
			)
		)

		SetUpEgo()
		(send gEgo:init())

            (send gTheMusic:
			prevSignal(0)
			stop()
			number(7)
			loop(-1)
			play()

      )
	)
)
/******************************************************************************/
(instance RoomScript of Script
	(properties)
   (method (handleEvent pEvent)
(super:handleEvent(pEvent))
(if(Said('open/door'))
(if(==(send gEgo: onControl()) ctlYELLOW)
Print("Ok")
(send gRoom: newRoom(53))
return
)
(if(==(send gEgo: onControl()) ctlNAVY)
Print("Ok")
(send gRoom: newRoom(60))
return
)
Print("You're too far away from the door.")
)
(if(Said('look>'))
(if(Said('/floor,ceiling'))
Print("Parts of every building. Nothing special about those.")
)
(if(Said('/door'))
Print("Seem ordinary doors to me.")
)
(if(Said('/wall'))
Print("A text in some strange language is written on the wall.")
)
(if(Said('/text,marking'))
Print("&$£+$£Ž (that means - authorized personel only is allowed to open the door. So get lost!)")
)
(if(Said('/stair'))
Print("It doesn't look like a stair. More like a half-vertical floor.")
)
(if(Said('/'))
Print("You're at the stairs. There are two doors. One upstairs, the other one downstairs.")
)
)
)
 
 (method(doit)
     (if(==(send gEgo: onControl())ctlRED)

    (send gRoom: newRoom(43))
    )
)
)
/******************************************************************************/
