/******************************************************************************/
(include "sci.sh")
(include "game.sh")
/******************************************************************************/
(script 41)
/******************************************************************************/
(use "controls")
(use "cycle")
(use "door")
(use "feature")
(use "game")
(use "inv")
(use "main")
(use "obj")
(local
moveS
)
/******************************************************************************/
(instance public rm041 of Rm
	(properties
		picture 141
		east 0
		south 0
		west 40
	)
	(method (init)
		(super:init())
		(self:setScript(RoomScript))

		(switch(gPreviousRoomNumber)
			(case 42
   (send gTheMusic:
			prevSignal(0)
			stop()
			number(9)
			loop(-1)
			play()
		)
				(send gEgo:
					posn(271 125)
					loop(3)
				)
    
			)
            (case 50
            (send gTheMusic:
			prevSignal(0)
			stop()
			number(9)
			loop(-1)
			play()
		)
				(send gEgo:
					posn(188 19)
					loop(1)
				)

			)
              (case 51
            (send gTheMusic:
			prevSignal(0)
			stop()
			number(9)
			loop(-1)
			play()
		)
				(send gEgo:
					posn(188 19)
					loop(1)
				)

			)
		)

		SetUpEgo()
  (send gEgo:init()view(45)moveSpeed(1)cycleSpeed(1))
  (aDoor: init())


	)
)
/******************************************************************************/
(instance RoomScript of Script
	(properties)
  (method (handleEvent pEvent)
(super:handleEvent(pEvent))


(if(Said('exit,leave,(get<out)/vessel,ship') or (if(Said('exit,leave,(get<out)'))))
(if(==(send gEgo: onControl()) ctlRED)
Print("Ok")
(send gRoom:newRoom(42))
return
)
(if(< (send gEgo:distanceTo(Loc2)) 11)
(if(tManClub)
Print("Ok")
Wait(5)
Print("You walk into some kind of locker room.")
(send gRoom:newRoom(50))
return
)
Print("Ok")
Wait(5)
Print("You walked into some kind of locker room.")
(send gRoom:newRoom(51))
return
)
Print("This is not a good spot to leave your vessel.")
)
(if(Said('look>'))
(if(Said('/island'))
Print("All the buildings around here are on those flying islands.")
)
(if(Said('/sauna'))
Print("Are the saunas around here like on Earth?")
Print("My sauna heat record is 97 degrees Celsius. I'm such a wuss." #title "Eigen Lenk:" #icon 777 0 5)
)
(if(Said('/dock'))
Print("If you get close enough to it and type 'exit vessel', you can get out.")
)
(if(Said('/vessel'))
Print("This is the vessel you use to ride around.")
)
(if(Said('/sign'))
Print("\n\nCargo Spaceport - We deliver\n\n")
)
(if(Said('/space'))
Print("Better don't look down.")
)
(if(Said('/star'))
Print("You don't see anything special about those. They are just like on Earth.")
)
(if(Said('/land'))
Print("Now this is one big flying island. You see a big building with a fence around it."))
)
(if(Said('/building'))
Print("Lots of building everywhere. ")
)
(if(Said('/'))
Print("You're hoovering around in the local area. There are some buildings. In the bottom area, you see a landing dock and a sign next to it. And in the top, you see 'Sauna X#4'")
)
)
 (method(doit)
 (var dyingScript)
 (if(==(send gEgo: onControl()) ctlNAVY)
 (send gEgo: view(46) setCycle(End))
   = dyingScript ScriptID(DYING_SCRIPT)
  (send dyingScript:
    caller(3)
    register("I think you just crashed!")
  )
  (send gGame:setScript(dyingScript))

 )
 )
 
 
 
)
(instance aDoor of Prop
(properties
view 35
x 48
y 173
)
)

(instance Loc2 of Act
 (properties
 view 300
 x 188
 y 15
 ))
/******************************************************************************/
