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

		(switch(gPreviousRoomNumber)
			(default
             = objective 3
				(send gEgo:
					posn(177 130)
					loop(2)
				)
			)
   (case 10
      (aOxLevel: init() cel(oxLev))
				(send gEgo:
					posn(5 132)
					loop(0)
				)
			)
		)

		SetUpEgo()
		(send gEgo:init())

 (if(== gPreviousRoomNumber 8)
   (aOxLevel: init() cel(0))
  = oxLev 0
  = gTimeSeconds2 0
 Print("Looks like you forgot to consider one thing - the air ... so you have to hold your breath. Good thing you were in the swimming team back in high-school. But don't stay here for too long." #at 65 160)
 )

	)
)
/******************************************************************************/
(instance RoomScript of Script
	(properties)
 (method(doit)
 (if(== gTimeSeconds2 2)
= gTimeSeconds2 0
  (aOxLevel: cel(oxLev))

  += oxLev 1
  
  (if(== oxLev 16)
    = dyingScript ScriptID(DYING_SCRIPT)
  (send dyingScript:
    caller(3)
    register("You couldn't hold your breath any longer.")
  )
  (send gGame:setScript(dyingScript))
  )
 )
 
 )
      (method (handleEvent pEvent)
   (super:handleEvent(pEvent))
   (if(Said('take>'))
   (if(Said('/tree'))
   Print("Why? As a souvenire?")
   )
      (if(Said('/moon'))
   Print("It's kinda far away, don't you think?")
   )
   )

   (if(Said('climb/tree'))
   Print("What would you accomplish by climbing the tree?")
   )

       (if(Said('look>'))

            (if(Said('/ground'))
            Print("It looks very strange.")
            )
            (if(Said('/tree'))
            Print("Are you sure this is a tree? I'm not.")
                        )
            (if(Said('/moon'))
            Print("You can see two of those. Cool!")
                                    )
            (if(Said('/shadow,(dark<land)'))
            Print("Did you really think that I would write a response to such a object to look at? Yeah, but shadows aren't very interesting.")
                                   )
            (if(Said('/stars'))
            Print("They are too far to see them, so you can only see the light coming from them. The star itself may not exist anymore but the light coming from it is still traveling.")
            )
            (if(Said('/space'))
            Print("Strange. You're in space but you can breath (poorly). That means here's some Oxygen.")
            )
            (if(Said('/'))
            Print("You're in some WEIRD place. Better be careful.")

        )
        )
        )
)
(instance aOxLevel of Act
(properties
view 64
x 20
y 185
))
/******************************************************************************/
