/******************************************************************************/
(include "sci.sh")
(include "game.sh")
/******************************************************************************/
(script 74)
/******************************************************************************/
(use "controls")
(use "cycle")
(use "door")
(use "feature")
(use "game")
(use "inv")
(use "main")
(use "obj")
/******************************************************************************/
(instance public rm074 of Rm
	(properties
		picture scriptNumber
		north 0
		east 0
		south 0
		west 0
	)
	(method (init)
		(super:init())
		(self:setScript(RoomScript))
		(switch(gPreviousRoomNumber)
			(default
				(send gEgo:
					posn(2 176)
					loop(0)
				)
			)
		)
       ProgramControl()
		(send gEgo:init())
  (if(>= gPreviousRoomNumber 73)
  = gPreviousRoomNumber 1
  (send gEgo: view(172) cycleSpeed(1) cel(0) setCycle(End Room2))

  )
	)
)
/******************************************************************************/
(instance Room2 of Script
	(properties)
    (method(changeState newState)
    = state newState
    (switch(state)
    (case 0
    Print("Looks like you have reached Orbital Station 7 - The Moon Base. Now you better find the Big Laser and destroy it.")
    Print("And this teleporting has somehow removed your air-tank. At least here's oxygen.")

    = gTimeSeconds2 0
    SetUpEgo()
    += gScore 1
    PlayerControl()
    (send gEgo: view(0))

    )
    )
    )
)
(instance RoomScript of Script
	(properties)
     (method (handleEvent pEvent)
(super:handleEvent(pEvent))
      (if(Said('look>'))
  (if(Said('/teleporter'))
 Print("This is the way you got here.")
 )
  (if(Said('/pole'))
 Print("It's grey and holds up the upper walkway.")
 )
  (if(Said('/keypad'))
 Print("It's too far away and high to examine it.")
 )
  (if(Said('/sign'))
 Print("'Sector AC7FU'. I wonder what does that mean.")
 )
  (if(Said('/wall'))
 Print("Totally metal walls. There's a sign on one of the walls.")
 )
 (if(Said('/door'))
 Print("There's probably something importand behind there as it's protected with a keypad.")
 )
  (if(Said('/stair'))
 Print("It leads to the below areas.")
 )
(if(Said('/'))
Print("You're inside the Orbital Station 7. You just teleported here from the Starbase. There are few doors leading in different direction. A stais is leading below.")
        )
        )
        
        )
   (method(changeState newState)
 = state newState
 (switch(state)
 (case 1
(aGuard: loop(5))
Print("Intruder! Stop!")
Print("You decide not to resist, as you could get killed.")
(aGuard: setCycle(Walk) setMotion(MoveTo 188 170 RoomScript))
)
(case 2
DrawPic(8)
(send gEgo: hide())
(aGuard: hide())
(aGuard: setCycle(Walk) setMotion(MoveTo 186 170 RoomScript))
)
(case 3
Print("You were put in jail (again!?), until Prof. Grankenztein arrives to pick you up ... ")
(send gRoom: newRoom(143))
return
)
)
)
(method(doit)
(if(== gTimeSeconds 22)
(if(== BaseText 1)
= gTimeSeconds 23
(aGuard: init() setCycle(Walk) setMotion(MoveTo 256 165 RoomScript))
ProgramControl()
)
)
(if(==(send gEgo: onControl()) ctlBLACK)
(if(== BaseText 0)
= BaseText 1
Print("You hear a ship docking, further away in the ship. I wonder what's that ship?")
= gTimeSeconds 20
)
)
)
)
(instance aGuard of Act
(properties
view 127
x 314
y 165
))
/******************************************************************************/
