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

		(switch(gPreviousRoomNumber)
  (case 976
             (aVessel: init())
             SetUpEgo()
             (send gEgo: init() posn(86 93) view(700) loop(2)moveSpeed(0)cycleSpeed(0))
             )
			(case 41
       (send gTheMusic:
			prevSignal(0)
			stop()
			number(11)
			loop(-1)
			play()
		)
             (aVessel: init())   SetUpEgo()
             (send gEgo: init() posn(86 93) view(700) loop(2)moveSpeed(0)cycleSpeed(0))
              )
              (case 43
              (aVessel: init())
              (send gEgo: init() posn(86 180) loop(3)) SetUpEgo()
			)
		)


	)
)
/******************************************************************************/
(instance RoomScript of Script
	(properties)
  (method (handleEvent pEvent)
(super:handleEvent(pEvent))
(if(Said('look>'))
(if(Said('/island'))
Print("There's a big glass on top of it.")
)
(if(Said('/vessel'))
Print("This is the vessel you use to drive around.")
)
(if(Said('/space'))
Print("Better don't look down because you might feel you're too high away and fall down.")
)
(if(Said('/star'))
Print("You don't see anything special about those. They are just like on Earth.")
)
(if(Said('/pod'))
Print("This is where you can park your vessel like you have done.")
)
(if(Said('/'))
Print("You're standing on a landing dock.")
)
)

(if(Said('(get<in),enter/vessel,ship')or(if(Said('(get<in),enter'))))
(if(==(send gEgo: onControl())ctlYELLOW)
(if(sit)
Print("You're already sitting in your vessel.")
return
)
Print("Ok")
(send gEgo: hide())
(aSit: init() show())
= sit TRUE
return
)
Print("You're too far away from the vessel.")
)
(if(Said('exit,leave,(get<out)/vessel,ship') or (if(Said('exit,leave,(get<out)'))))
(if(sit)
= sit FALSE
(send gEgo: show() loop(2))
(aSit: hide())
return
)
Print("You're already out form the vessel.")
)
(if(Said('drive/vessel,ship')or(if(Said('drive'))))
(if(sit)
Print("You got it!")
(send gRoom:newRoom(41))
return
)
Print("First you need to be in the vessel.")
)
)
)
(instance aVessel of Act
(properties
view 699
x 85
y 83
))
(instance aSit of Act
(properties
view 698
x 73
y 64
))
/******************************************************************************/
