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

		(switch(gPreviousRoomNumber)
			(case 63
				(send gEgo:
					posn(5 174)
					loop(0)
				)
			)
   	(case 69
				(send gEgo:
					posn(201 174)
					loop(3)
				)
			)
		)
         PlayerControl()
		SetUpEgo()
		(send gEgo:init())
	)
)
/******************************************************************************/
(instance RoomScript of Script
	(properties)
(method (handleEvent pEvent)
    (super:handleEvent(pEvent))
     (if(Said('enter,(get<in)/ship,vessel,spaceship,cockpit'))
     Print("That's a good idea, but you can't enter from here. Find another way.")
     )
     (if(Said('look>'))
   (if(Said('/floor,wall,ceiling'))
   Print("It doesn't look interesting.")
   )
 (if(Said('/engine'))
 Print("Look powerful. Don't put your fingers inside. Especially when they are working.")
 )
  (if(Said('/hatch'))
 Print("Open it up to see what's behind it.")
 )
    (if(Said('/cockpit'))
 Print("This is where you have to be if you want to get this baby going.")
 
 )
 (if(Said('/window,(cockpit<window)'))
 Print("The driver's cockpit is behind that window.")
 )
   (if(Said('/engines'))
 Print("You can't see inside them because it's very dark inside. And there's nothing outside.")
 )
 (if(Said('/ship,vessel,spaceship'))
 Print("The ship has a small hatch on the side.")
 )
(if(Said('/'))
Print("You're in a garage. A pretty big ship is parked here.")
        )
        )
      (if(Said('open/(small<door,hatch),door,lid,hatch'))
      (if(== (send gEgo: onControl()) ctlRED)
   Print("Ok")
   (send gRoom: newRoom(69))
   return
   )
   Print("You have to move closer.")
   )
 )
)
/******************************************************************************/
