If Dir$="Starbase_13:" : D1R$="data:" : Else D1R$="data/" : End If
'
Sam Bank 4
Sam Loop On
Sam Play 12,6,8000
TIMETEST=Timer
For Q=1 To 100000
If Timer-TIMETEST>20 : Exit : End If
Next
TIMETEST=Q/5
'
'Unpacks the control panel.
Auto View Off : Unpack 5 To 2 : Locate 10,1 : Paper 0 : Pen 2 : Curs Off : Bar 64,7 To 66,9
Dim INV$(25) : Dim Z(25,4) : Dim OBNAME$(25) : Dim OBJECT(25,3) : Dim BNAME$(25) : Dim HSPOT(25,2) : Dim S(10) : Dim CLUE(25)
Global LINE0$,T0TAL0,TIME0,ROCK,BLASTER,WALL,PO1NT,DEAD,T00TH,STICK,WIRES,FIRST$,LASER,ALARM,HATCH,SCOMM,SCREWDRIVER,SDLASER,RPOWER,ENTER,RECORD,PLBACK,SUBRADIO,SDRILL,DRILLX,DESTROYBASE,D1R$,TIMETEST
Global GRAPHICS$,INV$(),S(),SBOB,TIME,T0TAL,LINE$,WALK,F,NOISE,FIRST,EXTRA,Z(),WZ,XS,YS,OBNAME$(),OBNO,OBJECT(),BNAME$(),EZ,BZ,Q#,HSPOT(),M0DE,NP,ROOM$,Z,NR,CLUE(),CAM,CHOSE,INFO,COMM,OEST,ANST,ALST,ENGINES
Close Editor
'
'Set a few variables
FIRST$="hanger"
OBNO=1
BZ=10
EZ=20
WALK=1
INV$(1)="gun"
INV$(2)="communicator"
BEGIN
Make Mask 27
'
'The restart point when you die
FIRST:
Sam Stop
DEAD=0
ROOM$=FIRST$
A1
Auto View On
Screen To Front 2
SETUPMENU
L0ADSCREEN["hanger",50,155]
MENU
Goto FIRST
'
'Sets up a few things.
Procedure BEGIN
Wind Open 1,80,6,28,7 : Curs Off
Screen To Front 2
Led Off
Wave 1 To 1
Set Envel 1,0 To 3,60
Set Envel 1,1 To 1,60
Set Envel 1,2 To 1,50
Set Envel 1,3 To 1,60
Set Envel 1,4 To 1,50
Set Envel 1,5 To 1,60
Set Envel 1,6 To 5,0
Change Mouse 2 : Hide
Sprite 1,X Mouse,Y Mouse,27
Channel 2 To Sprite 1
Amal 2,"P: M XM-X,0,1;M 0,YM-Y,1;J P" : Amal On 2
Limit Mouse 0,0 To 620,300
Screen 2
Reserve Zone 32
Sam Bank 4
End Proc
'
'Screen zones for the menu.
Procedure SETUPMENU
Screen 2
Set Zone 26,4,4 To 60,12
Set Zone 27,4,13 To 60,21
Set Zone 28,4,22 To 60,30
Set Zone 29,4,30 To 60,38
Set Zone 30,4,39 To 60,47
Set Zone 31,4,48 To 60,56
Set Zone 32,4,57 To 60,65
End Proc
'
'The main loop.
Procedure MENU
10
Do
If TIME>0 : TIME=TIME+1 : If TIME=T0TAL : Proc TRAP : End If : End If
Q$=Inkey$
SCAN=Scancode
If SCAN<>0 : If(SCAN>84 and SCAN<90) : SAVGAME[SCAN-84] : End If : End If
If SCAN<>0 : If(SCAN>79 and SCAN<85) : LODGAME[SCAN-79] : End If : End If
Screen 2
If(Mouse Key=1 and(Y Mouse>219 and X Mouse<195)) and Mouse Zone>0
M0DE=Mouse Zone-26
LITE
Play 1,70,5
Exit
End If
If M0DE=0 : WA1T[10] : WALK : End If
If M0DE=1 : WA1T[10] : EXAMINE : End If
If M0DE=2 : WA1T[10] : OPERATE : End If
If M0DE=3 : WA1T[10] : USE : End If
If M0DE=4 : WA1T[10] : TAKE : End If
If M0DE=5 : WA1T[10] : TALK : End If
If M0DE=6 : WA1T[10] : SH00T : End If
If DEAD=1 : Pop Proc : End If
Loop
If DEAD=1 : Pop Proc : End If
Goto 10
End Proc
'
'Loads a screen, sets up objects, screen zones, Yeno sprite.
Procedure L0ADSCREEN[GRAPHICS$,XSTART,YSTART]
GRAPHICS1$=((GRAPHICS$-"1")-"2")-"3"
GRAPHICS1$=((GRAPHICS1$-"4")-"5")-"6"
GRAPHICS1$=((GRAPHICS1$-"7")-"8")-"9"
Amal Off
If FIRST=0 : Screen 0 : Fade 2 : WA1T[30] : End If
FIRST=0
L0ADPIC["data:"+GRAPHICS1$] : Screen To Back 0 : Double Buffer
Open Random 1,D1R$+GRAPHICS$+".setup"
Field 1,25 As ZON1$,25 As ZON2$,25 As ZON3$,25 As ZON4$,10 As OBNAME$,10 As OBJECTX$,10 As OBJECTY$,10 As OBJECTNO$,20 As BNAME$,20 As HSPOT1$,20 As HSPOT2$
For Q=1 To 25
Z(Q,1)=Val(ZON1$)
Z(Q,2)=Val(ZON2$)
Z(Q,3)=Val(ZON3$)
Z(Q,4)=Val(ZON4$)
OBNAME$(Q)=OBNAME$
OBJECT(Q,1)=Val(OBJECTX$)
OBJECT(Q,2)=Val(OBJECTY$)
OBJECT(Q,3)=Val(OBJECTNO$)
BNAME$(Q)=BNAME$
HSPOT(Q,1)=Val(HSPOT1$)
HSPOT(Q,2)=Val(HSPOT2$)
Get 1,Q
Next
Close 1
If OBNAME$(5)-" "="exercisem" : OBNAME$(5)="exercise machine" : End If
If OBNAME$(3)-" "="strangeob" : OBNAME$(3)="strange object" : End If
If BNAME$(13)-" "="autodestruct" : BNAME$(13)="self destruct" : End If
OBNAME$(1)="yeno"
OBNAME$(22)="stingon"
OBNAME$(23)="stingon"
OBNAME$(24)="stingon"
For OBNO=1 To 10 : If OBJECT(OBNO,3)<>0 : Bob OBNO,OBJECT(OBNO,1),OBJECT(OBNO,2),OBJECT(OBNO,3) : End If : Next
Reserve Zone 26 : For Z=1 To 25 : If Z(Z,2)<>0 : Set Zone Z,Z(Z,1),Z(Z,2) To Z(Z,3),Z(Z,4) : End If : Next
Priority On
Update Every 2
Bob 1,XSTART,YSTART,1+Amreg(6)
If PO1NT=1 : WALKTO[XSTART,YSTART+1] : End If
If PO1NT=2 : WALKTO[XSTART+1,YSTART] : End If
If PO1NT=3 : WALKTO[XSTART,YSTART-1] : End If
If PO1NT=4 : WALKTO[XSTART-1,YSTART] : End If
PO1NT=0
AN1MATE
NICEIFF[0]
Sprite 1,X Mouse,Y Mouse,27
Channel 2 To Sprite 1
Amal 2,"P: M XM-X,0,1;M 0,YM-Y,1;J P" : Amal On 2
If(ROOM$="tower") and X Bob(1)<100 : If ENTER=0 : Clw : PR1NT["You can hear someone coming."] : WA1T[75] : End If : End If
Ink 0 : For Q=7 To 61 Step 9 : Screen 2 : Bar 64,Q To 66,Q+2 : Next
Ink 2 : M=7+9*M0DE : Screen 2 : Bar 64,M To 66,M+2 : Wait Vbl
End Proc
'
'Caution! Dangerous procedures. Unfold at your own risk.
Procedure EXAMINE
NP=0
If Y Mouse>219
I=1
Screen 2 : Clw
Screen 2 : For Q=8 To 15 : Reset Zone Q : Next
For Q=0 To 4 : Locate 0,Q : Print Zone$(INV$(Q+1),Q+8) : Next
For Q=0 To 4 : Locate 13,Q : Print Zone$(INV$(Q+6),Q+13) : Next
End If
Do
If TIME>0 : TIME=TIME+1 : If TIME=T0TAL : Proc TRAP : End If : End If
Q$=Inkey$
SCAN=Scancode
If Q$="c" : PR1NT[Str$(Chip Free)] : End If
If SCAN<>0 : If(SCAN>84 and SCAN<90) : SAVGAME[SCAN-84] : End If : End If
If SCAN<>0 : If(SCAN>79 and SCAN<85) : LODGAME[SCAN-79] : End If : End If
50 Screen 0
If DEAD=1 : Pop Proc : End If
If Mouse Key=1 and(Y Mouse>219 and X Mouse<193) : Screen 2 : Pop Proc : End If
If Mouse Key=1 and(Y Mouse>219 and X Mouse>193) : Screen 2 : End If
IZ=Mouse Zone
If((Mouse Key=1 or NP=1) and(Y Mouse>219 and X Mouse>195) and IZ<>0)
IZ=IZ-7 : Clw : I=0 : Home
Print "examine "+INV$(IZ) : Screen 0 : Goto 52
End If
MZ=Mouse Zone : IZ=0
If Y Mouse>219 and I=0
I=1
Screen 2 : Clw
Screen 2 : For Q=8 To 15 : Reset Zone Q : Next
For Q=0 To 4 : Locate 0,Q : Print Zone$(INV$(Q+1),Q+8) : Next
For Q=0 To 4 : Locate 13,Q : Print Zone$(INV$(Q+6),Q+13) : Next
End If
If((MZ<12 or MZ>21) and Y Mouse<219) and((Mouse Click=1 or NP=1) and Spritebob Col(1)=0) : NP=0 : NR=0 : WALKTO[X Screen(X Mouse),Y Screen(Y Mouse)] : End If
If((-1 or NP=1) and Y Mouse<219) and((MZ>11 and MZ<22) or Spritebob Col(1))
NP=0
MZ1=MZ
For MZ=1 To 25 : If Col(MZ)=-1
X=X Bob(MZ) : Y=Y Bob(MZ) : If MZ>1 : Y=Y+5 : End If : Screen 2 : Pen 2 : Clw : I=0 : Home : Print "examine "+OBNAME$(MZ) : Screen 0 :
Do : If Mouse Click=1 : Exit : End If
If DEAD=1 : Pop Proc : End If
If Spritebob Col(1)=0 : Screen 2 : Clw : Pop Proc : End If
If Col(MZ)=0 : Screen 2 : Clw : Pop Proc : End If
Loop
Goto 51 : End If : Next
MZ=MZ1
If MZ>11 and MZ<22 : X=HSPOT(MZ,1) : Y=HSPOT(MZ,2) : Screen 2 : Pen 2 : Clw : I=0 : Home
Print "examine "+BNAME$(MZ)
Screen 0 : End If
Do : If Mouse Click=1 : Exit : End If
If DEAD=1 : Pop Proc : End If
Screen 0 : If Mouse Zone<>MZ : Screen 2 : Clw : Pop Proc : End If
Loop
51 WALKTO[X,Y] : If NP=1 : Goto 50 : End If
If Abs(X-X Bob(1))>30 or Abs(Y-Y Bob(1))>30 : Screen 2 : Print "you need to move closer"
PR1NT[" <click to continue>"]
CL1CK=Mouse Click
Do
If TIME>0 : TIME=TIME+1 : If TIME=T0TAL : Proc TRAP : End If : End If
If Mouse Click<>0 : Clw : I=0 : Pop Proc : End If
Loop
End If
If Abs(X-X Bob(1))<31 and Abs(Y-Y Bob(1))<31
52 If MZ>0 : ST1$=BNAME$(MZ)-" " : ST2$=OBNAME$(MZ)-" " : End If
If IZ>0 : ST3$=INV$(IZ) : End If
If ST2$="books" : Goto 53 : End If
If ST1$="box" : Goto 56 : End If
If ST1$="camera" and CAM=1 : Goto 54 : End If
If ST1$="wall" and WALL=1 : Goto 55 : End If
If ST1$="hatch" and HATCH=1 : Goto 55 : End If
If(ST1$="door") and((ROOM$="tower") or(ROOM$="security door")) : Goto 57 : End If
Restore EXAMINE : Do : Read ST$ : If(ST1$=ST$) or((ST2$=ST$) or(ST3$=ST$)) : Read ST$ : Read ST : PR1NT[ST$] : If ST<>0 : CLUE(ST)=1 : End If : Goto 59 : End If :
If ST$="end" : PR1NT["you don't see anything interesting."] : Goto 59 : End If : Read ST$ : Read ST : Loop
53 Restore EXAMINE : Do : Read ST$ : If ST$="books" : Read ST$ : If ROOM$="crew room 2" : PR1NT[ST$] : CLUE(2)=1 : Goto 59 : End If : Read ST : Read ST$ : If ROOM$="crew room 3" : PR1NT[ST$] : CLUE(3)=1 : Goto 59 : End If : Read ST$
If ROOM$="crew room 1" : PR1NT[ST$] : CLUE(4)=1 : Goto 59 : End If : End If : Read ST$ : Read ST : Loop
56 Restore EXAMINE : Do : Read ST$ : If ST$="box" : Read ST$ : If ROOM$="laboratory" : PR1NT[ST$] : Goto 59 : End If : Read ST : Read ST$ : If ROOM$="store" : PR1NT[ST$] : Goto 59 : End If : Read ST$
If ROOM$="" : Goto 59 : End If : End If : Read ST$ : Read ST : Loop
54 PR1NT["the camera is totally inoperative."] : Goto 59
55 PR1NT["It looks like there's a passage out there."] : Goto 59
57 PR1NT["The door is made to resist laser fire."] : Goto 59
59 PR1NT[" <click to continue>"]
CL1CK=Mouse Click
Do
If TIME>0 : TIME=TIME+1 : If TIME=T0TAL : Proc TRAP : End If : End If
If Mouse Click<>0 : Clw : I=0 : Exit : End If
Loop
Pop Proc
End If
End If
Loop
EXAMINE:
Data "yourshuttle","This is the standard type AG shuttle which transported you to here.",0
Data "airlock","It is locked.",0
Data "screen","The screen shows a lot of information, which doesn't seem to be of any use to you.",0
Data "cables","Someone has been attempting to cut off the stations power.",0
Data "toolbox","It is a box of tools.",0
Data "computer","An Amiga 20000.",0
Data "uparrow","The arrow points upwards.",0
Data "downarrow","The arrow points downwards.",0
Data "display","The screen shows a picture of the planet which the station is orbiting.",0
Data "seat","The seat's occupant shows no signs of being alive.",0
Data "plants","The plants are very overgrown.",0
Data "view","Impressive, isn't it?",0
Data "camera","This enables the computer to see what is happening in the room.",0
Data "rail","This stops people from falling into the pit (usually).",0
Data "deeppit","The main genarators are at the bottom of the pit.",0
Data "books","You find a log book belonging to Major Jump.",0
Data "You find a log book belonging to Dr. Sillin.","You find a log book belonging to the chief engineer, Mick Annick.",0
Data "fooddispenser","You suddenly feel hungry.",0
Data "entertainmentscreen","The screen is blank.",0
Data "exercisebench","The weights are much too light for you to use.",0
Data "bodyscan","This machine will tell you how fit you are.",0
Data "punchball","An anti-gravity punch ball.",0
Data "door","It is a door.",0
Data "drill","It looks like a drill... You don't want to find out what it's for.",0
Data "flask","The flask is empty.",0
Data "box","This is an extremely advanced piece of scientific equipment but you haven't a clue what it does.",0
Data "The box contains stingon communicators.","",0
Data "gun","Your laser pistol.",0
Data "cup","Inside the cup you find a piece of paper. Written on it is the number '9265358'.",1
Data "communicator","This can be used to talk to the captain on the starship.",0
Data "mountains","Looks like a fractal generated landscape to me.",0
Data "wall","Either the stingons are using rock effect wallpaper or you're in a secret underground base.",0
Data "transmitter","That looks like a short range matter transporter.",0
Data "receiver","Food is sent to here by the transmitter.",0
Data "forcefield","This will only allow very small objects to pass through it.",0
Data "selfdestruct","Just what you are looking for.",0
Data "sign","It says 'out of order'.",0
Data "hatch","It is closed.",0
Data "strangeobject","It's a strange object of some kind...",0
Data "wires","They are attached to the storage unit.",0
Data "stick","It seems to be from that tree.",0
Data "creature","It looks fierce.",0
Data "balloffur","It is a zejphisp, one of the most ferocious creatures in the galaxy.",0
Data "tooth","It looks sharp.",0
Data "wires","There is a blue wire, a red wire and a yellow wire.",0
Data "rocks","There seems to be no way past.",0
Data "boxes","There are too many of them to search.",0
Data "laser","It is a self-powered, hand-held laser.",0
Data "radio","It is the new model stingon communicator with a record function.",0
Data "powerpack","It is the power pack from the laser.",0
Data "lift","This is the transport between the mine and this tower.",0
Data "door","It is a security door, impervious to lasers.",0
Data "doorcontrol","It is voice activated.",0
Data "subspaceradio","You can contact the captain using this.",0
Data "controlpanel","The controls are locked in place.",0
Data "window","You must be on the surface.",0
Data "exit","This must be the way out.",0
Data "end"
End Proc
Procedure OPERATE
NP=0
Screen 2
If Y Mouse>219
Clw : I=1
Screen 2 : For Q=8 To 15 : Reset Zone Q : Next
For Q=0 To 4 : Locate 0,Q : Print Zone$(INV$(Q+1),Q+8) : Next
For Q=0 To 4 : Locate 13,Q : Print Zone$(INV$(Q+6),Q+13) : Next
End If
Do
If TIME>0 : TIME=TIME+1 : If TIME=T0TAL : Proc TRAP : End If : End If
Q$=Inkey$
SCAN=Scancode
If SCAN<>0 : If(SCAN>84 and SCAN<90) : SAVGAME[SCAN-84] : End If : End If
If SCAN<>0 : If(SCAN>79 and SCAN<85) : LODGAME[SCAN-79] : End If : End If
60 Screen 0
If DEAD=1 : Pop Proc : End If
If Mouse Key=1 and(Y Mouse>219 and X Mouse<194) : Screen 2 : Pop Proc : End If
If Mouse Key=1 and(Y Mouse>219 and X Mouse>193) : Screen 2 : End If
IZ=Mouse Zone
If((Mouse Key=1 or NP=1) and(Y Mouse>219 and X Mouse>195) and IZ<>0)
IZ=IZ-7 : Clw : I=0 : Home
Print "operate "+INV$(IZ) : Screen 0 : Goto 62
End If
MZ=Mouse Zone : IZ=0
If Y Mouse>219 and I=0
I=1
Screen 2 : Clw
Screen 2 : For Q=8 To 15 : Reset Zone Q : Next
For Q=0 To 4 : Locate 0,Q : Print Zone$(INV$(Q+1),Q+8) : Next
For Q=0 To 4 : Locate 13,Q : Print Zone$(INV$(Q+6),Q+13) : Next
End If
If((MZ<12 or MZ>21) and Y Mouse<219) and((Mouse Click=1 or NP=1) and Spritebob Col(1)=0) : NP=0 : NR=0 : WALKTO[X Screen(X Mouse),Y Screen(Y Mouse)] : End If
If((-1 or NP=1) and Y Mouse<219) and((MZ>11 and MZ<22) or Spritebob Col(1))
NP=0
If MZ>11 and MZ<22 : X=HSPOT(MZ,1) : Y=HSPOT(MZ,2) : Screen 2 : Pen 2 : Clw : I=0 : Home
Print "operate "+BNAME$(MZ)
Do : If Mouse Click=1 : Exit : End If
Screen 0
If DEAD=1 : Pop Proc : End If
If Mouse Zone<>MZ : Screen 2 : Clw : Pop Proc : End If
Loop
Goto 61
Screen 0 : End If
If MZ<12 or MZ>21 : For MZ=1 To 25 : If Col(MZ)=-1 : Exit : End If : Next : X=X Bob(MZ) : Y=Y Bob(MZ) : If MZ>1 : Y=Y+5 : End If : Screen 2 : Pen 2 : Clw : I=0 : Home : Print "operate "+OBNAME$(MZ) : Screen 0 : End If
Do : If Mouse Click=1 : Exit : End If
If DEAD=1 : Pop Proc : End If
If Spritebob Col(1)=0 : Screen 2 : Clw : Pop Proc : End If
If Col(MZ)=0 : Screen 2 : Clw : Pop Proc : End If
Loop
61 WALKTO[X,Y] : If NP=1 : Goto 60 : End If
If Abs(X-X Bob(1))>30 or Abs(Y-Y Bob(1))>30 : Screen 2 : Print "you need to move closer"
PR1NT[" <click to continue>"]
CL1CK=Mouse Click
Do
If TIME>0 : TIME=TIME+1 : If TIME=T0TAL : Proc TRAP : End If : End If
If Mouse Click<>0 : Clw : Pop Proc : End If
Loop
End If
If Abs(X-X Bob(1))<31 and Abs(Y-Y Bob(1))<31
62 If MZ>0 : ST1$=BNAME$(MZ)-" " : ST2$=OBNAME$(MZ)-" " : End If
If IZ>0 : ST3$=INV$(IZ) : End If
If ST3$="radio" : If RPOWER=0 : PR1NT["It doesn't appear to have a power source."] : End If :
If RPOWER=1 and(ROOM$<>"tower") : PR1NT["You decide not to use it yet."] : End If :
If(RPOWER=1 and ENTER=0) and(ROOM$="tower") : PR1NT["You start the device recording and place it in the door control."] : WALKTO[216,155] : For Q=1 To 10 : If INV$(Q)="radio" : INV$(Q)="" : End If : Next : RECORD=1 : End If
If(RPOWER=1 and ENTER=1) and(ROOM$="tower") : PR1NT["You play the recording back."] : PLBACK=1 :
PR1NT["You set the standard frequency..."] : WA1T[50]
SPEAK["Yeno:","This is Yeno Hou calling starship 8.3."]
SPEAK["Captain:","Yeno! Where are you?"]
SPEAK["Yeno:","I'm in a secret stingon base. I escaped from a maximum security cell and found my way to the communications room."]
SPEAK["Captain:","Building a base on this planet is in violation of treaty. We must report it."]
SPEAK["Yeno:","What about me?"]
SPEAK["Captain:","Oh. Er...escape to the surface and we'll pick you up."]
SPEAK["Yeno:","No problem."]
SPEAK["stingon voice:","Communications officer, You are on an unauthorised frequency. Report to section F at once."]
Exit : End If
ST$="airlock" : If(ST1$=ST$) or(ST2$=ST$) : PR1NT["It won't open."] : Exit : End If
ST$="exit" : If(ST1$=ST$) or(ST2$=ST$) : PR1NT["It won't open."] : Exit : End If
ST$="box" : If((ST1$=ST$) or(ST2$=ST$)) and(ROOM$="laboratory") : PR1NT["A small container marked 'super acid' appears. You take the acid."] : INV$(3)="acid" : Exit : End If
ST$="communicator" : If(ST3$=ST$) : PR1NT["Try talking into it."] : Exit : End If
ST$="gun" : If(ST1$=ST$) or(ST3$=ST$) : PR1NT["You do that with the 'shoot' mode."] : Exit : End If
ST$="computer" : If(ST1$=ST$) or(ST2$=ST$) : PR1NT["In the 31st century, one does not 'operate' computers. Try talking to it instead."] : Exit : End If
ST$="fooddispenser" : If(ST1$=ST$) or(ST2$=ST$) : Sam Play 1,5 : PR1NT["You order a chocolate bar and eat it."] : Exit : End If
ST$="drinksmachine" : If(ST1$=ST$) or(ST2$=ST$) : Noise To 2 : Play 2,60,0 : PR1NT["You order a drink of 7 down."] : Exit : End If
For Q=30 To 50 : Wait Vbl : Hot Spot 40,9,Q : Bob 4,,W, : Next
WA1T[10]
Sam Raw 12,Start(4)+19000,6000,5000
Sam Loop On
For Q=50 To 30 Step -1 : Wait Vbl : Hot Spot 40,9,Q : Bob 4,,W, : Next : Exit : End If
ST$="drawers" : If(ST1$=ST$) or(ST2$=ST$) : PR1NT["Don't be nosey."] : Exit : End If
ST$="storageunit" : If((ST1$=ST$) or(ST2$=ST$)) and LASER=0 : PR1NT["You open the unit."] : If ALARM=0 : Sam Loop On : Sam Play 10 : Clw : PR1NT["Within minutes you are surrounded. This time there will be no escape."] :
WA1T[50] : Screen 0 : Fade 2 : WA1T[30] : DEAD
End If
If ALARM=1 : Screen 0 : Bob 10,231,85,91 : PR1NT["You find a laser."] : LASER=1 : For Q=1 To 10 : If INV$(Q)="" : INV$(Q)="laser" : Exit : End If : Next : WA1T[50] : Bob Off 10 : End If
Exit : End If
ST$="bodyscan" : If(ST1$=ST$) or(ST2$=ST$)
If ENGINES=0
Sam Raw 12,Start(4)+19000,6000,5000
End If
Sam Loop Off : Sam Play 2,7
If ENGINES=0 : Sam Raw 12,Start(4)+19000,6000,5000
WA1T[20]
Sam Raw 12,Start(4)+19000,6000,5000
Sam Loop On : End If
PR1NT["The read-out says '110% fit'. Looks like you have had too much 'special Z' breakfast cereal."] : Exit : End If
ST$="drill" : If(ST1$=ST$) or(ST2$=ST$) : PR1NT["No! Are you suicidal or something?"] : Exit : End If
PR1NT["nothing happens."]
PR1NT[" <click to continue>"]
CL1CK=Mouse Click
Do
If TIME>0 : TIME=TIME+1 : If TIME=T0TAL : Proc TRAP : End If : End If
If Mouse Click<>0 : Clw : Exit : End If
Loop
Pop Proc
End If
End If
Loop
PR1NT[" <click to continue>"]
CL1CK=Mouse Click
Do
If TIME>0 : TIME=TIME+1 : If TIME=T0TAL : Proc TRAP : End If : End If
If Mouse Click<>0 : Clw : Exit : End If
Loop
End Proc
Procedure USE
NP=0
Clw
Screen 2
If Y>219
Clw : I=1
For Q=8 To 15 : Reset Zone Q : Next
For Q=0 To 4 : Locate 0,Q : Print Zone$(INV$(Q+1),Q+8) : Next
For Q=0 To 4 : Locate 13,Q : Print Zone$(INV$(Q+6),Q+13) : Next
End If
Do
70 Screen 2
If TIME>0 : TIME=TIME+1 : If TIME=T0TAL : Proc TRAP : End If : End If
If DEAD=1 : Pop Proc : End If
If Mouse Key=1 and(Y Mouse>219 and X Mouse<194) : Screen 2 : Pop Proc : End If
'If Mouse Key=1 and(Y Mouse>219 and X Mouse>193) : Screen 2 : End If
Do
Q$=Inkey$
SCAN=Scancode
If SCAN<>0 : If(SCAN>84 and SCAN<90) : SAVGAME[SCAN-84] : End If : End If
If SCAN<>0 : If(SCAN>79 and SCAN<85) : LODGAME[SCAN-79] : End If : End If
If TIME>0 : TIME=TIME+1 : If TIME=T0TAL : Proc TRAP : End If : End If
IZ=Mouse Zone
If DEAD=1 : Pop Proc : End If
If Mouse Key=1 and(Y Mouse>219 and X Mouse<194) : Screen 2 : Pop Proc : End If
If Y Mouse>219 and I=0
I=1
Screen 2 : Clw
Screen 2 : For Q=8 To 15 : Reset Zone Q : Next
For Q=0 To 4 : Locate 0,Q : Print Zone$(INV$(Q+1),Q+8) : Next
For Q=0 To 4 : Locate 13,Q : Print Zone$(INV$(Q+6),Q+13) : Next
End If
If((MZ<12 or MZ>21) and Y Mouse<219) and((Mouse Click=1 or NP=1) and Spritebob Col(1)=0) : NP=0 : NR=0 : Screen 0 : WALKTO[X Screen(X Mouse),Y Screen(Y Mouse)] : I=0 : End If
If((Mouse Key=1 or NP=1) and(Y Mouse>219 and X Mouse>195) and IZ<>0)
IZ=IZ-7 : Clw : I=0 : Home
PR1NT["use "+INV$(IZ)+" on "] : WA1T[30]
Clw : I=0
For Q=0 To 4 : Locate 0,Q : Print Zone$(INV$(Q+1),Q+8) : Next
For Q=0 To 4 : Locate 13,Q : Print Zone$(INV$(Q+6),Q+13) : Next
Screen 0 : Exit
End If
Loop
Do
If TIME>0 : TIME=TIME+1 : If TIME=T0TAL : Proc TRAP : End If : End If
If DEAD=1 : Pop Proc : End If
If Mouse Key=1 and(Y Mouse>219 and X Mouse<194) : Screen 2 : Pop Proc : End If
Screen 2 : IZ2=Mouse Zone : MZ=0
If((Mouse Key=1 or NP=1) and(Y Mouse>219 and X Mouse>195) and(IZ2>0 and(IZ2-7)<>IZ))
IZ2=IZ2-7 : Clw : I=0 : Home
PR1NT["use "+INV$(IZ)+" on "+INV$(IZ2)] : Screen 0 : Exit
End If
Screen 0 : MZ=Mouse Zone : IZ2=0
If Y Mouse>219 and I=0
I=1
Screen 2 : Clw
Screen 2 : For Q=8 To 15 : Reset Zone Q : Next
For Q=0 To 4 : Locate 0,Q : Print Zone$(INV$(Q+1),Q+8) : Next
For Q=0 To 4 : Locate 13,Q : Print Zone$(INV$(Q+6),Q+13) : Next
End If
If(MZ<12 and Y Mouse<219) and((Mouse Click=1 or NP=1) and Spritebob Col(1)=0) : NP=0 : NR=0 : Screen 0 : WALKTO[X Screen(X Mouse),Y Screen(Y Mouse)] : I=0 : End If
If Y Mouse<219 and((MZ>11 and MZ<22) or Spritebob Col(1))
TIME=0 : T0TAL=0 : ENGINES=1 : Sam Loop Off : Sam Play 4,5 : WA1T[10] : Sam Play 8,5 : PR1NT["You pour the acid down the pit. Instantly it eats into the engines, causing them to shut down."] : Exit : End If
If(ST1$="acid") and(ST3$<>"deeppit") : PR1NT["That is not a good idea."] : Exit : End If
If((INV$(IZ)="power pack") and(INV$(IZ2)="radio")) and RPOWER=0
PR1NT["You fit the power pack into the radio."] : RPOWER=1
For Q=1 To 10 : If INV$(Q)="power pack" : INV$(Q)="" : Exit : End If : Next
Exit : End If
If((INV$(IZ)="screwdriver") and(INV$(IZ2)="laser")) and SDLASER=0
PR1NT["You take the laser apart and remove the power pack. The laser is now useless so you drop it."]
For Q=1 To 10 : If INV$(Q)="laser" : INV$(Q)="power pack" : Exit : End If : Next
Exit : End If
If((INV$(IZ)="tooth") and(ST3$="wires")) and WIRES=0
PR1NT["Cut which wire first?"] : WA1T[50] : Clw
CHOOSE["The blue wire","The red wire","The yellow wire",""]
If CHOSE=2 : PR1NT["Which wire next?"] : WA1T[50]
CHOOSE["The blue wire","The yellow wire","",""]
If CHOSE=1 : ALARM=1 : End If
Goto 73
End If
If CHOSE=1 : PR1NT["Which wire next?"] : WA1T[50] : Clw
CHOOSE["The red wire","The yellow wire","",""]
Goto 73
End If
If CHOSE=3 : PR1NT["Which wire next?"] : WA1T[50] : Clw
CHOOSE["The blue wire","The red wire","",""]
Goto 73
End If
73 WIRES=1
PR1NT["You cut the last two wires"]
PR1NT[" <click to continue>"]
CL1CK=Mouse Click
Do
If TIME>0 : TIME=TIME+1 : If TIME=T0TAL : Proc TRAP : End If : End If
If Mouse Click<>0 : Clw : Exit : End If
Loop
Pop Proc
End If
If(INV$(IZ)="stick") and(ST2$="tooth")
PR1NT["You reach into the cage with the stick and take the tooth."]
PR1NT[" <click to continue>"]
CL1CK=Mouse Click
Do
If TIME>0 : TIME=TIME+1 : If TIME=T0TAL : Proc TRAP : End If : End If
If Mouse Click<>0 : Clw : Exit : End If
Loop
Bob Off CZ
For Q=1 To 10 : If INV$(Q)="" : INV$(Q)="tooth" : Exit : End If : Next
T00TH=1
Pop Proc
End If
PR1NT["nothing happens."] : Exit
Pop Proc
Loop
PR1NT[" <click to continue>"]
CL1CK=Mouse Click
Do
If TIME>0 : TIME=TIME+1 : If TIME=T0TAL : Proc TRAP : End If : End If
If Mouse Click<>0 : Clw : Exit : End If
Loop
End If
End Proc
Procedure TAKE
NP=0
Do
If TIME>0 : TIME=TIME+1 : If TIME=T0TAL : Proc TRAP : End If : End If
Q$=Inkey$
SCAN=Scancode
If SCAN<>0 : If(SCAN>84 and SCAN<90) : SAVGAME[SCAN-84] : End If : End If
If SCAN<>0 : If(SCAN>79 and SCAN<85) : LODGAME[SCAN-79] : End If : End If
80 Screen 0
If DEAD=1 : Pop Proc : End If
If Mouse Key=1 and(Y Mouse>219 and X Mouse<194) : Screen 2 : Pop Proc : End If
MZ=Mouse Zone
If((MZ<12 or MZ>21) and Y Mouse<219) and((Mouse Click=1 or NP=1) and Spritebob Col(1)=0) : NP=0 : NR=0 : WALKTO[X Screen(X Mouse),Y Screen(Y Mouse)] : End If
If((-1 or NP=1) and Y Mouse<219) and((MZ>11 and MZ<22) or Spritebob Col(1))
NP=0
If MZ>11 and MZ<22 : X=HSPOT(MZ,1) : Y=HSPOT(MZ,2) : Screen 2 : Pen 2 : Clw : Home
Print "take "+BNAME$(MZ)
Do : If Mouse Click=1 : Exit : End If
Screen 0 : If Mouse Zone<>MZ : Screen 2 : Clw : Pop Proc : End If
Loop
Screen 0 : End If
MZ1=MZ
For MZ=1 To 25 : If Col(MZ)=-1 : X=X Bob(MZ) : Y=Y Bob(MZ) : If MZ>1 : Y=Y+5 : End If : Screen 2 : Pen 2 : Clw : Home : Print "take "+OBNAME$(MZ) : Screen 0
Do : If Mouse Click=1 : Exit : End If
If DEAD=1 : Pop Proc : End If
If Spritebob Col(1)=0 : Screen 2 : Clw : Pop Proc : End If
If Col(MZ)=0 : Screen 2 : Clw : Pop Proc : End If
Loop
Goto 83 : End If : Next
MZ=MZ1
83 WALKTO[X,Y] : If NP=1 : Goto 80 : End If
If Abs(X-X Bob(1))>30 or Abs(Y-Y Bob(1))>30 : Screen 2 : Print "you need to move closer"
PR1NT[" <click to continue>"]
CL1CK=Mouse Click
Do
If TIME>0 : TIME=TIME+1 : If TIME=T0TAL : Proc TRAP : End If : End If
If Mouse Click<>0 : Clw : Pop Proc : End If
Loop
End If
If Abs(X-X Bob(1))<31 and Abs(Y-Y Bob(1))<31
82 If MZ>0 : ST1$=BNAME$(MZ)-" "
ST2$=OBNAME$(MZ)-" " : End If
'If IZ>0 : ST3$=INV$(IZ) : End If
If(ST1$="box") and(ROOM$="store" and SCOMM=0) : SCOMM=1
PR1NT["you take a stingon radio."]
For Q=1 To 10 : If INV$(Q)="" : INV$(Q)="radio" : Exit : End If : Next
PR1NT[" <click to continue>"]
CL1CK=Mouse Click
Do
If TIME>0 : TIME=TIME+1 : If TIME=T0TAL : Proc TRAP : End If : End If
If Mouse Click<>0 : Clw : Exit : End If
Loop
Exit : End If
If(ST1$="doorcontrol") and ENTER=1 and CAM<>10
PR1NT["you take the radio"] : CAM=10
For Q=1 To 10 : If INV$(Q)="" : INV$(Q)="radio" : Exit : End If : Next
PR1NT[" <click to continue>"]
CL1CK=Mouse Click
Do
If TIME>0 : TIME=TIME+1 : If TIME=T0TAL : Proc TRAP : End If : End If
If Mouse Click<>0 : Clw : Exit : End If
Loop
Exit : End If
If ST2$="screwdriver" :
If S(4)=0 : Bob 22,120,173,55 : SPEAK["Stingon:","Don't touch that."] : Exit : End If
If S(4)=1 : TAKE=1 : SCREWDRIVER=1 : End If
End If
If ST2$="rock" : TAKE=1 : ROCK=1 : End If
If ST2$="stick" : TAKE=1 : STICK=1 : End If
If ST2$="disintegrator" : TAKE=1 : BLASTER=1 : End If
If ST2$="smalldrill" : TAKE=1 : SDRILL=1 : End If
If TAKE=1
PR1NT["you take the "+OBNAME$(MZ)] : Bob Off MZ
For Q=1 To 10 : If INV$(Q)="" : INV$(Q)=OBNAME$(MZ) : Exit : End If : Next
Exit : End If
If ST2$<>"tooth" : PR1NT["You can't take that."] : End If
If ST2$="tooth" : PR1NT["It isn't safe to reach in there."] : End If
PR1NT[" <click to continue>"]
CL1CK=Mouse Click
Do
If TIME>0 : TIME=TIME+1 : If TIME=T0TAL : Proc TRAP : End If : End If
If Mouse Click<>0 : Clw : Exit : End If
Loop
Pop Proc
End If
End If
Loop
End Proc
Procedure TALK
NP=0
Screen 2
If Y Mouse>219
Clw : I=1
Screen 2 : For Q=8 To 15 : Reset Zone Q : Next
For Q=0 To 4 : Locate 0,Q : Print Zone$(INV$(Q+1),Q+8) : Next
For Q=0 To 4 : Locate 13,Q : Print Zone$(INV$(Q+6),Q+13) : Next
End If
Do
If TIME>0 : TIME=TIME+1 : If TIME=T0TAL : Proc TRAP : End If : End If
Q$=Inkey$
SCAN=Scancode
If SCAN<>0 : If(SCAN>84 and SCAN<90) : SAVGAME[SCAN-84] : End If : End If
If SCAN<>0 : If(SCAN>79 and SCAN<85) : LODGAME[SCAN-79] : End If : End If
90 Screen 0
If DEAD=1 : Pop Proc : End If
If Mouse Key=1 and(Y Mouse>219 and X Mouse<194) : Screen 2 : Pop Proc : End If
If Mouse Key=1 and(Y Mouse>219 and X Mouse>193) : Screen 2 : End If
IZ=Mouse Zone
If((Mouse Key=1 or NP=1) and(Y Mouse>219 and X Mouse>195) and IZ<>0)
IZ=IZ-7 : Clw : I=0 : Home
Print "talk to "+INV$(IZ) : Screen 0 : Goto 92
End If
MZ=Mouse Zone : IZ=0
If Y Mouse>219 and I=0
I=1
Screen 2 : Clw
Screen 2 : For Q=8 To 15 : Reset Zone Q : Next
For Q=0 To 4 : Locate 0,Q : Print Zone$(INV$(Q+1),Q+8) : Next
For Q=0 To 4 : Locate 13,Q : Print Zone$(INV$(Q+6),Q+13) : Next
End If
If((MZ<12 or MZ>21) and Y Mouse<219) and((Mouse Click=1 or NP=1) and Spritebob Col(1)=0) : NP=0 : NR=0 : WALKTO[X Screen(X Mouse),Y Screen(Y Mouse)] : I=0 : End If
If((-1 or NP=1) and Y Mouse<219) and((MZ>11 and MZ<22) or Spritebob Col(1))
NP=0
MZ1=MZ
For MZ=1 To 25 : If Col(MZ)=-1 : X=X Bob(MZ) : Y=Y Bob(MZ) : If MZ>1 : Y=Y+5 : End If : Screen 2 : Pen 2 : Clw : I=0 : Home : Print "talk to "+OBNAME$(MZ) :
Do : If Mouse Click=1 : Exit : End If
If DEAD=1 : Pop Proc : End If
If Spritebob Col(1)=0 : Screen 2 : Clw : I=0 : Pop Proc : End If
If Col(MZ)=0 : Screen 2 : Clw : Pop Proc : End If
Loop
Screen 0 : Goto 91 : End If : Next
MZ=MZ1
If MZ>11 and MZ<22 : X=HSPOT(MZ,1) : Y=HSPOT(MZ,2) : Screen 2 : Pen 2 : Clw : I=0 : Home
Print "talk to "+BNAME$(MZ)
Do : If Mouse Click=1 : Exit : End If
Screen 0 : If Mouse Zone<>MZ : Screen 2 : Clw : Pop Proc : End If
Loop
Screen 0 : End If
91 WALKTO[X,Y] : If NP=1 : Goto 90 : End If
92 If MZ>0 : ST1$=BNAME$(MZ)-" " : ST2$=OBNAME$(MZ)-" " : End If
If IZ>0 : ST3$=INV$(IZ) : End If
If ST2$="yeno" : PR1NT["You really shouldn't talk to yourself."] : Goto 93 : End If
If(ST2$="stingon") and(ROOM$="generator") : Bob 22,120,173,55 : SPEAK["Yeno:","excuse me..."]
SPEAK["Stingon","What do you want?"]
STI: CHOOSE["A prisoner has escaped!","I'm lost.","Prepare to die!","Nothing actually."]
If CHOSE=1 : SPEAK["Stingon:","Really? I'd better report it"] : SWALKTO2[200,173,22] : WA1T[40] : SWALKTO2[273,150,22] : WA1T[37] : Bob Off 22 : S(4)=1 : Exit : End If
If CHOSE=2 : SPEAK["Stingon:","Sorry, I'm new here myself."] : Goto STI : End If
If CHOSE=3 : SPEAK["Stingon:","I can have this room filled with guards in two seconds, you know."]
CHOOSE["So? I'll kill them all.","Oh.","That will be too late.",""]
SPEAK["Stingon:","What are you doing here anyway?"] : Goto STI
End If
If CHOSE=4 : Exit : End If
End If
If ST2$="computer" : SPEAK["yeno:","Computer!"] : SPEAK["computer:","Hello, this is Data Day, the starbase 13 computer. How can I help you?."] :
COM: If INFO=0 : CHOOSE["Where is the crew?","Are there Stingons aboard?","What happened here?",""] : End If
If INFO=1 : CHOOSE["Where is the crew?","Are there Stingons aboard?","",""] : End If
If CHOSE<1 : Exit : End If
If CHOSE=1 : SPEAK["computer:","Well, that's Major Jump in the chair, "]
SPEAK["computer:","Dr. Sillin escaped in an escape pod and I'm not sure about the rest."] : Goto COM : End If
If CHOSE=2
If S(1)+S(2)+S(3)=0 : SPEAK["computer:","I detect three stingons on this starbase."] : End If
If S(1)+S(2)+S(3)=1 : SPEAK["computer:","I detect two stingons on this starbase."] : End If
If S(1)+S(2)+S(3)=2 : SPEAK["computer:","I detect one stingon on this starbase."] : End If
If S(1)+S(2)+S(3)=3 : SPEAK["computer:","No, I do not detect any."] : End If
Goto COM : End If
If CHOSE=3 : SPEAK["computer:","That is restricted information. You must identify yourself. "]
COM2: CHOOSE["I'm commander Yeno Hou.","I'm Major Jump.","I'm Doctor Sillin.","I'm Mick Annick."]
If CHOSE<1 : Exit : End If
If CHOSE=1 : SPEAK["computer:","Sorry, I don't know who actually."] : Goto COM : End If
If CHOSE=2 : SPEAK["computer:","You can't be Major Jump, He's dead."] : Goto COM : End If
If CHOSE=3 : SPEAK["computer:","Dr. sillin is not on board this starbase"] : Goto COM : End If
If CHOSE=4 and CAM=0 : SPEAK["computer:","Oh yeah? According to my visual you look nothing like him."] : Goto COM : End If
If CHOSE=4 and CAM=1 : SPEAK["computer:","Please give your access code."]
COM3:
If CLUE(1)=1 : CHOOSE["9265358","9763351","9165398","6215378"] : End If
If CLUE(1)=0 : CHOOSE["9563356","1225368","4265736","2715358"] : End If
If CLUE(1)=1 and CHOSE=1
SPEAK["computer:","That is correct. All data available."] : SPEAK["Yeno:","Transmit it all to the starship currently orbiting the planet."] : WA1T[25] : SPEAK["computer:","Done."] : INFO=1 :
If ENGINES=0
SPEAK["computer","Self destruct sequence activated. All exits secured. One minute and counting."]
Screen 0 : Gr Writing 0 : Ink 25 : Text 75,20,"STARBASE 13"
SPEAK["Yeno:","You sent for me, sir."]
Screen 0 : Gr Writing 0 : Ink 25 : Text 75,30,"lifescan...."
SPEAK["Captain:","Mr. Hou, take a shuttle to the starbase. We need to know what happened there."]
Screen 0 : Gr Writing 0 : Ink 25 : Text 75,40,"positive"
Screen 0 : Gr Writing 0 : Ink 25 : Text 75,50,"3 Stingons"
SPEAK["Yeno:","I'm on my way, sir."]
Screen 2 : Clw
Sprite 1,X Mouse,Y Mouse,27
Channel 2 To Sprite 1
Amal 2,"P: M XM-X,0,1;M 0,YM-Y,1;J P" : Amal On 2
WALKTO[300,118]
Amal Off : Flash Off
If FIRST=0 : Screen 0 : Fade 2 : WA1T[30] : End If
FIRST=0
L0ADPIC["data:station"]
Screen To Back 0 : Double Buffer
Sam Loop Off
NICEIFF[0]
Screen Open 1,75,130,32,Lowres : Screen To Back 1 : Paper 0 : Cls
Paste Bob 0,0,32
Bank Swap 1,2
For Q=50 To 2 Step -2
Zoom 1,0,0,50,50 To 1,0,55,Q,Q+55 : Wait Vbl : Get Bob Q/2,0,55 To Q,Q+55 : Hot Spot Q/2,$11
Next
Screen Close 1
Channel 2 To Sprite 1
Amal 2,"P: M XM-X,0,1;M 0,YM-Y,1;J P" : Amal On 2
Screen 0
Sam Raw 3,Start(4)+65000,7000,4500
For Q=25 To 0 Step -1
Bob 1,W,100,Q
W=X Bob(1)+Q*0.68
WA1T[5]
Next
Bob Off
Bank Swap 1,2 : Erase 2
WA1T[50]
End Proc
'
'Loads a picture bank and unpacks it. Also avoids the standard disk requester.
Procedure L0ADPIC[G$]
If G$="data:bridge" : Unpack 8 To 0 : Screen Hide 0 : Pop Proc : End If
Screen 2 : Do : Home : If Not Exist(D1R$) : Print "Please insert disk 2" : End If : If Exist(D1R$) : Clw : Exit : End If : WA1T[25] : Play 1,70,5 : Clw : WA1T[25] : Loop
Load D1R$+(G$-"data:")+".abk",3 : Unpack 3 To 0 : Erase 3 : Screen Hide 0 : Pop Proc
End
End Proc
'
'Controls the speech
Procedure SPEAK[NAME$,SPEECH$]
Screen 2
Clw
PR1NT[NAME$]
PR1NT[SPEECH$]
PR1NT[" <click to continue>"]
CL1CK=Mouse Click
Do
If TIME>0 : TIME=TIME+1 : If TIME=T0TAL : Proc TRAP : End If : End If
If Chanan(10)=-1 : If Amreg(10,4)=1 : Every On : End If : End If
If Chanan(11)=-1 : If Amreg(11,4)=1 : Every On : End If : End If
If Chanan(12)=-1 : If Amreg(12,4)=1 : Every On : End If : End If
If Chanan(15)=-1 : If Amreg(15,4)=1 : Every On : End If : End If
Amal Freeze 10
Amal Freeze 11
Amal Freeze 12
Amal Freeze 15
Synchro On
End Proc
'
'Laser death
Procedure LASERDIE[B0B]
TIME=TIME0 : T0TAL=T0TAL0 : LINE$=LINE0$
TIME0=0 : T0TAL0=0 : LINE0$=""
WALK=1
Channel 9 To Bob B0B
Amal 9,"A 1,(50,10)(51,4)(52,4)(53,4)(54,4)"
Amal On 9 : If B0B=1 : Amal Off 1 : Else Amal Off B0B-10
If ROOM$="garden" : S(1)=1 : End If
If ROOM$="medical room" : S(3)=1 : End If
If ROOM$="crew room 2" : S(2)=1 : End If : End If
WA1T[24] : Bob Off B0B
If ROOM$="generator" : PR1NT["The stingons detect the energy surge from the laser. You are soon recaptured..."]
WA1T[100] : Screen 0 : Fade 2 : WA1T[30] : DEAD : End If
If B0B=1 : WA1T[50] : Screen 0 : Fade 2 : WA1T[30] : DEAD : End If
End Proc
Procedure SSHOOT[SBOB,B0B]
Amreg(17)=I Bob(SBOB)
If X Bob(B0B)<X Bob(SBOB) : Amreg(16)=$8000+63 : End If
If X Bob(B0B)>=X Bob(SBOB) : Amreg(16)=63 : End If
Channel SBOB-10 To Bob SBOB
Amal SBOB-10,"A 1,(RQ,30)(RR,1)"
Amal On SBOB-10
Wave 0 To 2 : For Q=90 To 50 Step -2 : Play 2,Q,1 : Next
LASERDIE[B0B]
End Proc
Procedure SH00T2[X,Y]
Y=Y-30
Amreg(15)=I Bob(1)
Q#=(X-X Bob(1))*(Y-(Y Bob(1))-30)^(-1)
Amreg(14)=49
If Abs(Q#)>=1
If X<X Bob(1) : TURN[3] : Amreg(14)=$8000+47 : End If
If X>X Bob(1) : TURN[1] : Amreg(14)=47 : End If
End If
If Abs(Q#)<1 and Y-Y Bob(1)<0 : TURN[4] : Amreg(14)=48 : End If
Channel 1 To Bob 1
Amal 1,"A 1,(RO,30)(RP,1)"
Amal On 1
Wave 0 To 2 : For Q=90 To 50 Step -2 : Play 2,Q,1 : Next
End Proc
'
'Called whenever something needs to happen after a certain period of time.
Procedure TRAP
LINE1$=LINE$
TIME=TIME0 : T0TAL=T0TAL0 : LINE$=LINE0$
TIME0=0 : T0TAL0=0 : LINE0$=""
If LINE1$<>""
Goto LINE1$
Else
Pop Proc
End If
S1: SWALKTO2[100,163,22]
TIME0=TIME : T0TAL0=T0TAL : LINE0$=LINE$
WALK=0 : TIME=1 : T0TAL=3*TIMETEST : LINE$="S2" : Pop Proc
S2: SSHOOT[22,1] : Pop Proc
DETONATE: Screen 0 : Boom : Wait Vbl : Bob Off : Wait Vbl : Cls 1 : Fade 3 : DEAD : Pop Proc
DETONATE2: Screen 0 : Boom : Wait Vbl : Bob Off : Wait Vbl : Cls 1 : Fade 3 : DEAD : Pop Proc
ENTER: If(ROOM$="tower") or(ROOM$="walkway")
Screen 0 : WALK=0 : If ROOM$="tower" : Bob 22,45,140,55 : End If : If ROOM$="walkway" : Bob 22,60,132,55 : End If
SPEAK["stingon commander:","Guards! The prisoner has escaped."] : PR1NT["You are soon overpowered. There will be no escape..."] : WA1T[50] : Screen 0 : Fade 2 : DEAD : End If :
If RECORD=1 : ENTER=1 : End If
End Proc
'
'Requires the player to choose between up to four options
Procedure CHOOSE[C1$,C2$,C3$,C4$]
CHOSE=IZ
Screen 2 : For Q=8 To 15 : Reset Zone Q : Next
Locate 0,1 : Print Zone$("* "+C1$,8)
If C2$<>"" : Locate 0,2 : Print Zone$("* "+C2$,9) : End If
If C3$<>"" : Locate 0,3 : Print Zone$("* "+C3$,10) : End If
If C4$<>"" : Locate 0,4 : Print Zone$("* "+C4$,11) : End If
Do
If TIME>0 : TIME=TIME+1 : If TIME=T0TAL : Proc TRAP : End If : End If
IZ=Mouse Zone
If Mouse Key=1 and(Y Mouse>219 and X Mouse<194) : Screen 2 : Pop Proc : End If
If((Mouse Key=1 or NP=1) and(Y Mouse>219 and X Mouse>195) and IZ<>0)
IZ=IZ-7 : Clw : Home
Exit
End If
Loop
CHOSE=IZ
End Proc
'
'Save and load
Procedure SAVGAME[NO]
If WALK=0 : PR1NT["The game cannot be saved at this point."]
PR1NT[" <click to continue>"]
CL1CK=Mouse Click
Do
If Mouse Click<>0 : Clw : WA1T[5] : Pop Proc : End If
Loop
End If
PR1NT["SAVE GAME:"]
PR1NT["Save game #"+Str$(NO)+"?"]
PR1NT[" <left mouse continue>"]
PR1NT[" <right mouse cancel>"]
Do
If Mouse Key=1 : Exit : End If
If Mouse Key=2 : Clw : Pop Proc : End If
Loop
Trap Open Out 1,"data/save"+Str$(NO)
If Errtrap>0 : PR1NT["Not saved."] : Pop Proc
Else : PR1NT["saving...."+Str$(NO)] : End If
For Q=1 To 25
Print #1,CLUE(Q)
Next
For Q=1 To 10
Print #1,INV$(Q)
Next
For Q=1 To 4
Print #1,S(Q)
Next
Print #1,X Bob(1)
Print #1,Y Bob(1)
Print #1,TIME
Print #1,T0TAL
Print #1,WALK
Print #1,CAM
Print #1,INFO
Print #1,COMM
Print #1,OEST
Print #1,ANST
Print #1,ALST
Print #1,ENGINES
Print #1,GRAPHICS$
Print #1,LINE$
Print #1,ROOM$
Print #1,TIME0
Print #1,T0TAL0
Print #1,LINE0$
Print #1,ROCK
Print #1,BLASTER
Print #1,WALL
Print #1,PO1NT
Print #1,DEAD
Print #1,T00TH
Print #1,STICK
Print #1,WIRES
Print #1,FIRST$
Print #1,LASER
Print #1,ALARM
Print #1,HATCH
Print #1,SCOMM
Print #1,SCREWDRIVER
Print #1,SDLASER
Print #1,RPOWER
Print #1,ENTER
Print #1,RECORD
Print #1,PLBACK
Print #1,SUBRADIO
Print #1,SDRILL
Print #1,DRILLX
Print #1,DESTROYBASE
Close 1
End Proc
Procedure LODGAME[NO]
PR1NT["LOAD GAME:"]
PR1NT["Load game #"+Str$(NO)+"?"]
PR1NT[" <left mouse continue>"]
PR1NT[" <right mouse cancel>"]
Do
If Mouse Key=1 : Exit : End If
If Mouse Key=2 : Clw : Pop Proc : End If
Loop
Trap Open In 1,"data/save"+Str$(NO)
If Errtrap>0 : PR1NT["Not loaded."] : Pop Proc
Else : PR1NT["loading...."+Str$(NO)] : End If
For Q=1 To 25
Input #1,CLUE(Q)
Next
For Q=1 To 10
Input #1,INV$(Q)
Next
For Q=1 To 4
Input #1,S(Q)
Next
Input #1,XB0B
Input #1,YB0B
Input #1,TIME
Input #1,T0TAL
Input #1,WALK
Input #1,CAM
Input #1,INFO
Input #1,COMM
Input #1,OEST
Input #1,ANST
Input #1,ALST
Input #1,ENGINES
Input #1,GRAPHICS$
Input #1,LINE$
Input #1,ROOM$
Input #1,TIME0
Input #1,T0TAL0
Input #1,LINE0$
Input #1,ROCK
Input #1,BLASTER
Input #1,WALL
Input #1,PO1NT
Input #1,DEAD
Input #1,T00TH
Input #1,STICK
Input #1,WIRES
Input #1,FIRST$
Input #1,LASER
Input #1,ALARM
Input #1,HATCH
Input #1,SCOMM
Input #1,SCREWDRIVER
Input #1,SDLASER
Input #1,RPOWER
Input #1,ENTER
Input #1,RECORD
Input #1,PLBACK
Input #1,SUBRADIO
Input #1,SDRILL
Input #1,DRILLX
Input #1,DESTROYBASE
Close 1
L0ADSCREEN[GRAPHICS$,XB0B,YB0B]
End Proc
'
'Resets all variables
Procedure DEAD
For Q=1 To 25
CLUE(Q)=0
Next
For Q=1 To 10
INV$(Q)=""
Next
For Q=1 To 3
S(Q)=0
Next
TIME=0
T0TAL=0
WALK=0
CAM=0
INFO=0
COMM=0
OEST=0
ANST=0
ALST=0
ENGINES=0
GRAPHICS$=""
LINE$=""
ROOM$=""
NR=1
ROOM$=FIRST$
OBNO=1
BZ=10
EZ=20
FIRST=1
WALK=1
INV$(1)="gun"
INV$(2)="communicator"
STICK=0
ROCK=0
BLASTER=0
WALL=0
PO1NT=0
DEAD=0
WIRES=0
LASER=0
ALARM=0
HATCH=0
T00TH=0
SCOMM=0
SDLASER=0
RPOWER=0
RECORD=0
ENTER=0
PLBACK=0
SDRILL=0
DRILLX=0
SUBRADIO=0
DEAD=1
SPEAK["You have failed in your mission.","Prepare to restart."]
Reset Zone
Screen 2
End Proc
'
'Animations
Procedure A2
TIME0=Timer
Amal Off
Sam Loop On
Sam Play 12,6,8000
If FIRST=0 : Screen 0 : Fade 2 : WA1T[30] : End If
FIRST=0
L0ADPIC["data:bridge"] : Screen To Back 0 : Double Buffer
Priority On
Update Every 2
Reserve Zone 1
Set Zone 1,200,100 To 330,130
Bob 1,300,118,1+$8000
Bob 2,127,167,33 : Channel 3 To Bob 2 : Amal 3,"A 0,(33,35)(34,30);Q:P;J Q" : Amal On 3
Bob 3,124,62,35 : Channel 4 To Bob 3 : Amal 4,"A 0,(36,20)(35,20)(36,20)(36+$8000,20)(35+$8000,20)(36+$8000,20);Q:P;J Q" : Amal On 4