/******************************************************************************/
(include "sci.sh")
(include "game.sh")
/******************************************************************************/
(script 138)
/******************************************************************************/
(use "controls")
(use "cycle")
(use "door")
(use "feature")
(use "game")
(use "inv")
(use "main")
(use "obj")
(local
done
sc = 0
)
/******************************************************************************/
(instance public rm138 of Rm
	(properties
		picture scriptNumber
		north 0
		east 0
		south 0
		west 0
	)
	(method (init)
		(super:init())
		(self:setScript(RoomScript))
   = gTimeSeconds2 0
   = sc 3
= USBconnected TRUE
)
)
/******************************************************************************/
(instance RoomScript of Script
(properties)
(method (handleEvent pEvent)
(super:handleEvent(pEvent))
(if( not (send pEvent:claimed) )
(if( (== (send pEvent:type) evKEYBOARD) and (== (send pEvent:message) KEY_1) )
(if(== sc 3)
Print("The service is currently offline.")))
(if( (== (send pEvent:type) evKEYBOARD) and (== (send pEvent:message) KEY_3) )
(if(== sc 3)
Print("The service is currently offline.")))
(if( (== (send pEvent:type) evKEYBOARD) and (== (send pEvent:message) KEY_2) )
(if(== sc 3)
DrawPic(138) = sc 4)
)
)
)
(method(doit)
(send gGame:setCursor(1 SET_CURSOR_VISIBLE)) (send gGame:setSpeed(4))
(if(== sc 4)
Display("Press the number to activate button" dsCOORD 90 7 dsFONT 998 dsCOLOR 10)
Display("1) UNAVAILABLE" dsCOORD 20 30 dsFONT 999 dsCOLOR 4)
Display("2) Radio Communications" dsCOORD 20 40 dsFONT 999 dsCOLOR 12)
Display("3) UNAVAILABLE" dsCOORD 20 50 dsFONT 999 dsCOLOR 4)
)
(if(== sc 3)
Display("Press the number to activate button" dsCOORD 90 7 dsFONT 998 dsCOLOR 10)
Display("1) UNAVAILABLE" dsCOORD 20 30 dsFONT 999 dsCOLOR 4)
Display("2) Radio Communications" dsCOORD 20 40 dsFONT 999 dsCOLOR 12)
Display("3) UNAVAILABLE" dsCOORD 20 50 dsFONT 999 dsCOLOR 4)
)

(if(== gTimeSeconds2 8)
(if(== sc 2) = sc 3
= gTimeSeconds2 9
(load: dispose())
DrawPic(138)return))

(if(== gTimeSeconds2 3)
(if(== sc 0)
= sc 1
= gTimeSeconds 4
DrawPic(138)
(if(USBconnected) = sc 2
Display("Connection established" dsCOORD 100 80 dsFONT 999 dsCOLOR 10)
Display("Downloading software..." dsCOORD 98 90 dsFONT 999 dsCOLOR 2)
(load: init() cycleSpeed(1) setCycle(End))
return
)
Display("Connection failed" dsCOORD 120 60 dsFONT 999 dsCOLOR 12)
Display("Please make sure that connectors are plugged in" dsCOORD 50 80 dsFONT 999 dsCOLOR 4)
Display("properly and hardware is functional." dsCOORD 80 90 dsFONT 999 dsCOLOR 4)
)(if(== sc 0) //room starts
Display("Establishing connection..." dsCOORD 100 90 dsFONT 999 dsCOLOR 9))
)
)//END method

)//END instance
(instance load of Act
(properties
view 180
x 150
y 110
))
/******************************************************************************/
