/******************************************************************************/
(include "sci.sh")
(include "game.sh")
/******************************************************************************/
(script 60)
/******************************************************************************/
(use "controls")
(use "cycle")
(use "door")
(use "feature")
(use "game")
(use "inv")
(use "main")
(use "obj")
(local
numCode
test_
)
/******************************************************************************/
(instance public rm060 of Rm
	(properties
		picture scriptNumber
		north 0
		east 0
		south 0
		west 0
	)
	(method (init)
		(super:init())
		(self:setScript(RoomScript))
        (if(not(guardD))
        (aGuard: init())
        )

         (if(entered)
         (screen2: view(63))
         )


		(switch(gPreviousRoomNumber)
			(default
				(send gEgo:
					posn(89 162)
					loop(3)
				)
			)
		)

		SetUpEgo()
		(send gEgo:init())
        (screen2: init()setCycle(Fwd))
        (screen1: init())
        
        (if(bigDoorOpen)
        (screen1: cel(0))
        )

         (if(guardD)
        (screen2: dispose())
        )
        (if(not(bigDoorOpen))
        (screen1: cel(1))
        )
            (if(wc)
            = wc FALSE
         Print("You entered some control room.")
            )

	)


)
/******************************************************************************/
(instance RoomScript of Script
(properties)

(method (handleEvent pEvent)
(super:handleEvent(pEvent))
(if(Said('take,pull/wires'))
Print("Nah! You don't need these wires.")
)
(if(Said('open/door'))
Print("Just move trough the doorway in the bottom of the screen.")
)
(if(Said('look>'))
(if(Said('/door'))
Print("The only door you can see is the doorway in the bottom of this screen.")
)
(if(Said('/buttons'))
Print("These are just buttons with some random markings, at least for you.")
)
(if(Said('/markings'))
Print("BORING!!")
)
(if(Said('/screen,monitor,display'))
Print("You can see them yourself.")
)
(if(Said('/slot,(keycard<slot)'))
Print("This is where you can insert some kind of keycard.")
)
(if(Said('/guard'))
(if(guardD)
Print("Huh? Where?")
return
)
Print("Hey, what's he doing? ... looks like he's scratching his butt...")
)
(if(Said('/computer'))
Print("Some old XT... or Atari...can't be Apple II..or...dunno!")
)
(if(Said('/wires'))
Print("They don't seem interesting. What do you expect from a wire?")
)
(if(Said('/wall,floor,ceiling'))
Print("I don't see anything special about it.")
)
(if(Said('/'))
Print("You're in some kind of control room. There are some computers here and a keycard slot on the wall.")
)
)
(if(Said('use,activate/computer,screen') or (if(Said('enter,type,inject/code') or (if(Said('enter,type,inject/code/computer,screen'))))))
(if(sysLocked)
Print("You can't. The system is locked.")
return
)
(if(entered)
(if(==(send gEgo: onControl()) ctlNAVY)
(if(guardD)
Print("You just did that.")
return
)
= numCode GetNumber("Please enter the 3 digit authorization code:\n\n")
(if(== numCode randomCode or == numCode 725)
Print("Access Approved!" #title"Speakers...")
Wait(30)
= test_ Print("\" Select the unit: \"" #button "DC7b" 1 #button "XD7" 2 #button "XD6" 0)
(if(< test_ 2)
Print("\" Unit not available. System lock-down. \"")
= sysLocked TRUE
)
(if(== test_ 2)
Print("Unit XD7 move to sector 7G. Initialize mode 3-B!" #title"Speakers...")
= guardD TRUE
+= gScore 2
(aGuard: hide())
(screen2: dispose())
return
)
)
Print("Access Denied!")
return
)
Print("You're too far away from the computer.")
return
)
Print("And why should you do that?")
)
(if(Said('press/button,keypad'))
Print("If you mean the thingy on the wall, then you have to insert an electronic card into it.")

)
(if(Said('use/slot,(keycard<slot)'))
Print("If you want to use this keycard slot, you have to enter a keycard.")
)

(if(Said('enter,insert,inject,slip,use/card,keycard') or (if(Said('enter,inject,slip,use/card,keycard/slot,(keycard<slot)'))))
(if(==(send gEgo: onControl())ctlYELLOW)
(if(haveCard)
(if(entered)
Print("The card is already in.")
return
)
Print("Ok")
Print("You slip in the keycard.")
+= gScore 2
= entered TRUE
(screen2: view(63))
(send gEgo: put(INV_CARD))
return
)
Print("You don't have a card to enter here.")
return
)
Print("You're too far away from the thingy on the wall.")
)
)

(method(doit)
(if(==(send gEgo: onControl())ctlRED)
(send gRoom: newRoom(52))
)
)
)
(instance screen1 of Prop
(properties
view 60
x 133
y 95
cel 0
))
(instance screen2 of Act
(properties
view 61
x 172
y 95
cel 0
cycleSpeed 10
))
(instance aGuard of Prop
(properties
view 60
x 133
y 97
cel 2
))
/******************************************************************************/
