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

		(switch(gPreviousRoomNumber)
  (case 39
				(send gEgo:
					posn(314 101)
					loop(1)
				))
         (default
				(send gEgo:
					posn(5 Yposn)
					loop(0)
				)
			)

   (case 64
				(send gEgo:
					posn(103 97)
					loop(2)
				)
			)
     (case 68
				(send gEgo:
					posn(300 174)
					loop(1)
				)

			)
		)

		SetUpEgo()
		(send gEgo:init())
  

	)
)
/******************************************************************************/
(instance RoomScript of Script
	(properties)
       (method (handleEvent pEvent)
     (super:handleEvent(pEvent))
(if(Said('look>'))
(if(Said('/table,board,key'))
Print("Get in the room to look at it.")
)
(if(Said('/window'))
Print("You can see a table trough the window.")
)
(if(Said('/door,doorway'))
Print("It's leading to some room. Could be a control room.")
)
(if(Said('/walkway,path,stair'))
Print("It leads up the spaceship.")
)
(if(Said('/ceiling'))
Print("It's dark and totally not interesting.")
)
(if(Said('/pipe,wall,floor'))
Print("It's not interesting nor important in this game.")
)
(if(Said('/ship,vessel,spaceship'))
Print("It's not visible from here.")
)
            (if(Said('/room,controlroom'))
            Print("There seems to be a table inside the room. Also you can see some board on the wall.")
            )
(if(Said('/'))
Print("You're at the end of the hallway. The upper doorway is leading to some room. To the right there's a small door, which goes to the garage. A walkway leads up to a spaceship.")
        )
        )
        
        )
 
  (method(doit)
   (if(==(send gEgo: onControl()) ctlYELLOW)
 (send gRoom: newRoom(68))
 )
 (if(==(send gEgo: onControl()) ctlRED)
 (send gRoom: newRoom(64))
 )
 )
 )

/******************************************************************************/
