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

		(switch(gPreviousRoomNumber)
			(case 17
				(send gEgo:
					posn(314 141)
					loop(1)
				)
			)
		)

		SetUpEgo()
		(send gEgo:init())
  (aDoor: init())
  (if(openn)
  (aDoor: posn(80 94)))
	)
)
/******************************************************************************/
(instance RoomScript of Script
	(properties)
 (method (handleEvent pEvent)
(super:handleEvent(pEvent))
(if(Said('(get<in),enter/vessel,shuttle,spaceship')or(if(Said('(get<in),enter'))))
(if(==(send gEgo: onControl()) ctlNAVY)
(if(openn)
(if(send gEgo: has(INV_COURSE_KEY))
(send gEgo: hide())
(send gRoom: newRoom(32))
return
)
(if(warning)
(send gRoom: newRoom(32))
return
)
Print("Don't get on the spaceship yet. The man at the club told you to come back later.")
= warning TRUE
return
)
Print("The door isn't opened, so you can't get in.")
return
)
Print("You're not close enough to the spaceship.")
)
(if(Said('open/hatch'))
(if(==(send gEgo: onControl()) ctlNAVY)
(aDoor: setMotion(MoveTo 80 94))
+= gScore 1
= openn TRUE
return
)
Print("You're too far away from the rocket door.")
)
(if(Said('open/door'))
(if(==(send gEgo: onControl()) ctlNAVY)
(aDoor: setMotion(MoveTo 80 94))
+= gScore 1
= openn TRUE
return
)
Print("You're too far away from the rocket door.")
)

 (if(Said('look>'))
            (if(Said('/rocket,spaceship,freight'))
            Print("This is the space shuttle you're about to drive. Well, not drive but just travel with it.")
            )
            (if(Said('/door'))
            (if(openn)
            Print("It's the space shuttle door. It's opened.")
            return
            )
            Print("It's the space shuttle door. It's closed.")
            )
            (if(Said('/window'))
            Print("This is where to control room is.")
            )
            (if(Said('/room,controlroom'))
            Print("You can only see the window of that room.")
            )
            (if(Said('/handrail'))
            Print("This prevents you from falling down. At least on one edge.")
            )
            (if(Said('/wall'))
            Print("These walls are very strong. Fire and explosion proof.")
            )
            (if(Said('/floor'))
            Print("It's too far in the bottom. You can't see it.")
            )
            (if(Said('/cable'))
            Print("These cables hold up the platform you're walking on.")
                        )
            (if(Said('/platform,bridge'))
            Print("This is where you walk on, so you can step up the rocket and get in. There's a hand-rail on one side of it.")
            )
            (if(Said('/'))
            Print("You're at the rocket launch room. Don't be here when the rocket launches. You're standing on a platform.")

        )
        )

)
 
         (method (changeState newState)
         (var dyingScript)
  = state newState
  (switch (state)
    (case 0
= cycles 1


    )
    (case 1
    (send gGame:setSpeed(3))
        (send gEgo: hide())
       = dyingScript ScriptID(DYING_SCRIPT)
  (send dyingScript:
    caller(3)
    register("You kinda fell down...")
  )
  (send gGame:setScript(dyingScript))
    
   )
   )
   )
 (method(doit)
 (if(==(send gEgo: onControl()) ctlYELLOW)
 (send gGame:setSpeed(0))
 ProgramControl()
 (send gTheSoundFX:
prevSignal(0)
stop()
number(4)
loop(1)
play())
 (send gEgo: moveSpeed(0) posn(Xposn 149) setMotion(MoveTo Xposn 190 RoomScript))
 

 )
 )
)
(instance aDoor of Act
(properties
view 50
x 80
y 131
))
/******************************************************************************/
