home *** CD-ROM | disk | FTP | other *** search
/ The Amiga Game Guide / AmigaGameGuide_CD.iso / Amiga / PD-Games / Starbase13 / source / main.amos / main.amosSourceCode < prev    next >
AMOS Source Code  |  1977-12-31  |  75KB  |  2,078 lines

  1. '************************************************************************* 
  2. '*                              Starbase 13                              * 
  3. '*                           From DTO Software                           * 
  4. '*                        Copyright E.W.Clay 1993                        * 
  5. '*                         Freely distributable                          *   
  6. '*                                                                       *     
  7. '*           If you have any questions or comments, write to             * 
  8. '*                                                                       * 
  9. '*                            44, Finstall Rd                            *     
  10. '*                            Aston Fields                               *   
  11. '*                            Bromsgrove                                 *   
  12. '*                            Worcs                                      *   
  13. '*                            B60 2EA                                    *   
  14. '*                                                                       *   
  15. '*                                                                       * 
  16. '* This program was written originally using AMOS V1.2, then updated to  *       
  17. '* V 1.62 because of bugs in V1.2, and finally changed to AMOSPro        *     
  18. '* because of even more bugs. Hopefully it works properly now.           * 
  19. '*                                                                       * 
  20. '************************************************************************* 
  21. '
  22. 'This sets the directory to the correct place. 
  23. If Dir$="Starbase_13:" : D1R$="data:" : Else D1R$="data/" : End If 
  24. '
  25. Sam Bank 4
  26. Sam Loop On 
  27. Sam Play 12,6,8000
  28. TIMETEST=Timer
  29. For Q=1 To 100000
  30. If Timer-TIMETEST>20 : Exit : End If 
  31. Next 
  32. TIMETEST=Q/5
  33. '
  34. 'Unpacks the control panel.  
  35. Auto View Off : Unpack 5 To 2 : Locate 10,1 : Paper 0 : Pen 2 : Curs Off : Bar 64,7 To 66,9
  36. 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)
  37. 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
  38. 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
  39. Close Editor 
  40. '
  41. 'Set a few variables 
  42. FIRST$="hanger"
  43. OBNO=1
  44. BZ=10
  45. EZ=20
  46. WALK=1
  47. INV$(1)="gun"
  48. INV$(2)="communicator"
  49. BEGIN
  50. Make Mask 27
  51. '
  52. 'The restart point when you die
  53. FIRST:
  54. Sam Stop 
  55. DEAD=0
  56. ROOM$=FIRST$
  57. A1
  58. Auto View On 
  59. Screen To Front 2
  60. SETUPMENU
  61. L0ADSCREEN["hanger",50,155]
  62. MENU
  63. Goto FIRST
  64. '
  65. 'Sets up a few things. 
  66. Procedure BEGIN
  67. Wind Open 1,80,6,28,7 : Curs Off 
  68. Screen To Front 2
  69. Led Off 
  70. Wave 1 To 1
  71. Set Envel 1,0 To 3,60
  72. Set Envel 1,1 To 1,60
  73. Set Envel 1,2 To 1,50
  74. Set Envel 1,3 To 1,60
  75. Set Envel 1,4 To 1,50
  76. Set Envel 1,5 To 1,60
  77. Set Envel 1,6 To 5,0
  78. Change Mouse 2 : Hide 
  79. Sprite 1,X Mouse,Y Mouse,27
  80. Channel 2 To Sprite 1
  81. Amal 2,"P: M XM-X,0,1;M 0,YM-Y,1;J P" : Amal On 2
  82. Limit Mouse 0,0 To 620,300
  83. Screen 2
  84. Reserve Zone 32
  85. Sam Bank 4
  86. End Proc
  87. '
  88. 'Screen zones for the menu.  
  89. Procedure SETUPMENU
  90. Screen 2
  91. Set Zone 26,4,4 To 60,12
  92. Set Zone 27,4,13 To 60,21
  93. Set Zone 28,4,22 To 60,30
  94. Set Zone 29,4,30 To 60,38
  95. Set Zone 30,4,39 To 60,47
  96. Set Zone 31,4,48 To 60,56
  97. Set Zone 32,4,57 To 60,65
  98. End Proc
  99. '
  100. 'The main loop.  
  101. Procedure MENU
  102. 10
  103.  Do 
  104. If TIME>0 : TIME=TIME+1 : If TIME=T0TAL : Proc TRAP : End If : End If 
  105. Q$=Inkey$
  106. SCAN=Scancode
  107. If SCAN<>0 : If(SCAN>84 and SCAN<90) : SAVGAME[SCAN-84] : End If : End If 
  108. If SCAN<>0 : If(SCAN>79 and SCAN<85) : LODGAME[SCAN-79] : End If : End If 
  109.   Screen 2
  110.   If(Mouse Key=1 and(Y Mouse>219 and X Mouse<195)) and Mouse Zone>0
  111. M0DE=Mouse Zone-26
  112.    LITE
  113. Play 1,70,5
  114.    Exit 
  115.   End If 
  116.    If M0DE=0 : WA1T[10] : WALK : End If 
  117.    If M0DE=1 : WA1T[10] : EXAMINE : End If 
  118.    If M0DE=2 : WA1T[10] : OPERATE : End If 
  119.    If M0DE=3 : WA1T[10] : USE : End If 
  120.    If M0DE=4 : WA1T[10] : TAKE : End If 
  121.    If M0DE=5 : WA1T[10] : TALK : End If 
  122.    If M0DE=6 : WA1T[10] : SH00T : End If 
  123. If DEAD=1 : Pop Proc : End If 
  124.  Loop 
  125. If DEAD=1 : Pop Proc : End If 
  126. Goto 10
  127. End Proc
  128. '
  129. 'Loads a screen, sets up objects, screen zones, Yeno sprite.   
  130. Procedure L0ADSCREEN[GRAPHICS$,XSTART,YSTART]
  131. GRAPHICS1$=((GRAPHICS$-"1")-"2")-"3"
  132. GRAPHICS1$=((GRAPHICS1$-"4")-"5")-"6"
  133. GRAPHICS1$=((GRAPHICS1$-"7")-"8")-"9"
  134. Amal Off 
  135. If FIRST=0 : Screen 0 : Fade 2 : WA1T[30] : End If 
  136. FIRST=0
  137. L0ADPIC["data:"+GRAPHICS1$] : Screen To Back 0 : Double Buffer 
  138. Open Random 1,D1R$+GRAPHICS$+".setup"
  139. 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$
  140. For Q=1 To 25
  141. Z(Q,1)=Val(ZON1$)
  142. Z(Q,2)=Val(ZON2$)
  143. Z(Q,3)=Val(ZON3$)
  144. Z(Q,4)=Val(ZON4$)
  145. OBNAME$(Q)=OBNAME$
  146. OBJECT(Q,1)=Val(OBJECTX$)
  147. OBJECT(Q,2)=Val(OBJECTY$)
  148. OBJECT(Q,3)=Val(OBJECTNO$)
  149. BNAME$(Q)=BNAME$
  150. HSPOT(Q,1)=Val(HSPOT1$)
  151. HSPOT(Q,2)=Val(HSPOT2$)
  152. Get 1,Q
  153. Next 
  154. Close 1
  155. If OBNAME$(5)-" "="exercisem" : OBNAME$(5)="exercise machine" : End If 
  156. If OBNAME$(3)-" "="strangeob" : OBNAME$(3)="strange object" : End If 
  157. If BNAME$(13)-" "="autodestruct" : BNAME$(13)="self destruct" : End If 
  158. OBNAME$(1)="yeno"
  159. OBNAME$(22)="stingon"
  160. OBNAME$(23)="stingon"
  161. OBNAME$(24)="stingon"
  162. For OBNO=1 To 10 : If OBJECT(OBNO,3)<>0 : Bob OBNO,OBJECT(OBNO,1),OBJECT(OBNO,2),OBJECT(OBNO,3) : End If : Next 
  163. 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 
  164. Priority On 
  165. Update Every 2
  166. Bob 1,XSTART,YSTART,1+Amreg(6)
  167. If PO1NT=1 : WALKTO[XSTART,YSTART+1] : End If 
  168. If PO1NT=2 : WALKTO[XSTART+1,YSTART] : End If 
  169. If PO1NT=3 : WALKTO[XSTART,YSTART-1] : End If 
  170. If PO1NT=4 : WALKTO[XSTART-1,YSTART] : End If 
  171. PO1NT=0
  172. AN1MATE
  173. NICEIFF[0]
  174. Sprite 1,X Mouse,Y Mouse,27
  175. Channel 2 To Sprite 1
  176. Amal 2,"P: M XM-X,0,1;M 0,YM-Y,1;J P" : Amal On 2
  177. If(ROOM$="tower") and X Bob(1)<100 : If ENTER=0 : Clw : PR1NT["You can hear someone coming."] : WA1T[75] : End If : End If 
  178. Screen 2 : Clw : Print((((((((ROOM$-"1")-"2")-"3")-"4")-"5")-"6")-"7")-"8")-"9"
  179. End Proc
  180. '
  181. 'Changes the light when a button is pressed. 
  182. Procedure LITE
  183. Screen 2
  184. Ink 0 : For Q=7 To 61 Step 9 : Screen 2 : Bar 64,Q To 66,Q+2 : Next 
  185. Ink 2 : M=7+9*M0DE : Screen 2 : Bar 64,M To 66,M+2 : Wait Vbl 
  186. End Proc
  187. '
  188. 'Caution! Dangerous procedures. Unfold at your own risk. 
  189. Procedure EXAMINE
  190. NP=0
  191. If Y Mouse>219
  192. I=1
  193. Screen 2 : Clw 
  194. Screen 2 : For Q=8 To 15 : Reset Zone Q : Next 
  195. For Q=0 To 4 : Locate 0,Q : Print Zone$(INV$(Q+1),Q+8) : Next 
  196. For Q=0 To 4 : Locate 13,Q : Print Zone$(INV$(Q+6),Q+13) : Next 
  197. End If 
  198. Do 
  199. If TIME>0 : TIME=TIME+1 : If TIME=T0TAL : Proc TRAP : End If : End If 
  200. Q$=Inkey$
  201. SCAN=Scancode
  202. If Q$="c" : PR1NT[Str$(Chip Free)] : End If 
  203. If SCAN<>0 : If(SCAN>84 and SCAN<90) : SAVGAME[SCAN-84] : End If : End If 
  204. If SCAN<>0 : If(SCAN>79 and SCAN<85) : LODGAME[SCAN-79] : End If : End If 
  205. 50 Screen 0
  206. If DEAD=1 : Pop Proc : End If 
  207. If Mouse Key=1 and(Y Mouse>219 and X Mouse<193) : Screen 2 : Pop Proc : End If 
  208. If Mouse Key=1 and(Y Mouse>219 and X Mouse>193) : Screen 2 : End If 
  209. IZ=Mouse Zone
  210. If((Mouse Key=1 or NP=1) and(Y Mouse>219 and X Mouse>195) and IZ<>0)
  211. IZ=IZ-7 : Clw : I=0 : Home 
  212. Print "examine "+INV$(IZ) : Screen 0 : Goto 52
  213. End If 
  214. MZ=Mouse Zone : IZ=0
  215. If Y Mouse>219 and I=0
  216. I=1
  217. Screen 2 : Clw 
  218. Screen 2 : For Q=8 To 15 : Reset Zone Q : Next 
  219. For Q=0 To 4 : Locate 0,Q : Print Zone$(INV$(Q+1),Q+8) : Next 
  220. For Q=0 To 4 : Locate 13,Q : Print Zone$(INV$(Q+6),Q+13) : Next 
  221. End If 
  222. 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 
  223. If((-1 or NP=1) and Y Mouse<219) and((MZ>11 and MZ<22) or Spritebob Col(1))
  224. NP=0
  225. MZ1=MZ
  226. For MZ=1 To 25 : If Col(MZ)=-1
  227. 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 : 
  228. Do : If Mouse Click=1 : Exit : End If 
  229. If DEAD=1 : Pop Proc : End If 
  230. If Spritebob Col(1)=0 : Screen 2 : Clw : Pop Proc : End If 
  231. If Col(MZ)=0 : Screen 2 : Clw : Pop Proc : End If 
  232. Loop 
  233. Goto 51 : End If : Next 
  234. MZ=MZ1
  235. If MZ>11 and MZ<22 : X=HSPOT(MZ,1) : Y=HSPOT(MZ,2) : Screen 2 : Pen 2 : Clw : I=0 : Home 
  236. Print "examine "+BNAME$(MZ)
  237. Screen 0 : End If 
  238. Do : If Mouse Click=1 : Exit : End If 
  239. If DEAD=1 : Pop Proc : End If 
  240. Screen 0 : If Mouse Zone<>MZ : Screen 2 : Clw : Pop Proc : End If 
  241. Loop 
  242. 51 WALKTO[X,Y] : If NP=1 : Goto 50 : End If 
  243. If Abs(X-X Bob(1))>30 or Abs(Y-Y Bob(1))>30 : Screen 2 : Print "you need to move closer"
  244. PR1NT["     <click to continue>"]
  245. CL1CK=Mouse Click
  246. Do 
  247. If TIME>0 : TIME=TIME+1 : If TIME=T0TAL : Proc TRAP : End If : End If 
  248. If Mouse Click<>0 : Clw : I=0 : Pop Proc : End If 
  249. Loop 
  250. End If 
  251. If Abs(X-X Bob(1))<31 and Abs(Y-Y Bob(1))<31
  252. 52 If MZ>0 : ST1$=BNAME$(MZ)-" " : ST2$=OBNAME$(MZ)-" " : End If 
  253. If IZ>0 : ST3$=INV$(IZ) : End If 
  254. If ST2$="books" : Goto 53 : End If 
  255. If ST1$="box" : Goto 56 : End If 
  256. If ST1$="camera" and CAM=1 : Goto 54 : End If 
  257. If ST1$="wall" and WALL=1 : Goto 55 : End If 
  258. If ST1$="hatch" and HATCH=1 : Goto 55 : End If 
  259. If(ST1$="door") and((ROOM$="tower") or(ROOM$="security door")) : Goto 57 : End If 
  260. 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 : 
  261. If ST$="end" : PR1NT["you don't see anything interesting."] : Goto 59 : End If : Read ST$ : Read ST : Loop 
  262. 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$
  263.  If ROOM$="crew room 1" : PR1NT[ST$] : CLUE(4)=1 : Goto 59 : End If : End If : Read ST$ : Read ST : Loop 
  264. 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$
  265.  If ROOM$="" : Goto 59 : End If : End If : Read ST$ : Read ST : Loop 
  266. 54 PR1NT["the camera is totally inoperative."] : Goto 59
  267. 55 PR1NT["It looks like there's a passage out there."] : Goto 59
  268. 57 PR1NT["The door is made to resist laser fire."] : Goto 59
  269. 59 PR1NT["     <click to continue>"]
  270. CL1CK=Mouse Click
  271. Do 
  272. If TIME>0 : TIME=TIME+1 : If TIME=T0TAL : Proc TRAP : End If : End If 
  273. If Mouse Click<>0 : Clw : I=0 : Exit : End If 
  274. Loop 
  275. Pop Proc
  276. End If 
  277. End If 
  278. Loop 
  279. EXAMINE:
  280. Data "yourshuttle","This is the standard type AG shuttle which transported you to here.",0
  281. Data "airlock","It is locked.",0
  282. Data "screen","The screen shows a lot of information, which doesn't seem to be of any use to you.",0
  283. Data "cables","Someone has been attempting to cut off the stations power.",0
  284. Data "toolbox","It is a box of tools.",0
  285. Data "computer","An Amiga 20000.",0
  286. Data "uparrow","The arrow points upwards.",0
  287. Data "downarrow","The arrow points downwards.",0
  288. Data "display","The screen shows a picture of the planet which the station is orbiting.",0
  289. Data "seat","The seat's occupant shows no signs of being alive.",0
  290. Data "plants","The plants are very overgrown.",0
  291. Data "view","Impressive, isn't it?",0
  292. Data "camera","This enables the computer to see what is happening in the room.",0
  293. Data "rail","This stops people from falling into the pit (usually).",0
  294. Data "deeppit","The main genarators are at the bottom of the pit.",0
  295. Data "books","You find a log book belonging to Major Jump.",0
  296. Data "You find a log book belonging to Dr. Sillin.","You find a log book belonging to the chief engineer, Mick Annick.",0
  297. Data "fooddispenser","You suddenly feel hungry.",0
  298. Data "entertainmentscreen","The screen is blank.",0
  299. Data "exercisebench","The weights are much too light for you to use.",0
  300. Data "bodyscan","This machine will tell you how fit you are.",0
  301. Data "punchball","An anti-gravity punch ball.",0
  302. Data "door","It is a door.",0
  303. Data "drill","It looks like a drill...   You don't want to find out what it's for.",0
  304. Data "flask","The flask is empty.",0
  305. Data "box","This is an extremely advanced piece of scientific equipment but you haven't a clue what it does.",0
  306. Data "The box contains stingon communicators.","",0
  307. Data "gun","Your laser pistol.",0
  308. Data "cup","Inside the cup you find a piece of paper. Written on it is the number '9265358'.",1
  309. Data "communicator","This can be used to talk to the captain on the starship.",0
  310. Data "mountains","Looks like a fractal generated landscape to me.",0
  311. Data "wall","Either the stingons are using rock effect wallpaper or you're in a secret underground base.",0
  312. Data "transmitter","That looks like a short range matter transporter.",0
  313. Data "receiver","Food is sent to here by the transmitter.",0
  314. Data "forcefield","This will only allow very small objects to pass through it.",0
  315. Data "selfdestruct","Just what you are looking for.",0
  316. Data "sign","It says 'out of order'.",0
  317. Data "hatch","It is closed.",0
  318. Data "strangeobject","It's a strange object of some kind...",0
  319. Data "wires","They are attached to the storage unit.",0
  320. Data "stick","It seems to be from that tree.",0
  321. Data "creature","It looks fierce.",0
  322. Data "balloffur","It is a zejphisp, one of the most ferocious creatures in the galaxy.",0
  323. Data "tooth","It looks sharp.",0
  324. Data "wires","There is a blue wire, a red wire and a yellow wire.",0
  325. Data "rocks","There seems to be no way past.",0
  326. Data "boxes","There are too many of them to search.",0
  327. Data "laser","It is a self-powered, hand-held laser.",0
  328. Data "radio","It is the new model stingon communicator with a record function.",0
  329. Data "powerpack","It is the power pack from the laser.",0
  330. Data "lift","This is the transport between the mine and this tower.",0
  331. Data "door","It is a security door, impervious to lasers.",0
  332. Data "doorcontrol","It is voice activated.",0
  333. Data "subspaceradio","You can contact the captain using this.",0
  334. Data "controlpanel","The controls are locked in place.",0
  335. Data "window","You must be on the surface.",0
  336. Data "exit","This must be the way out.",0
  337. Data "end"
  338. End Proc
  339. Procedure OPERATE
  340. NP=0
  341. Screen 2
  342. If Y Mouse>219
  343. Clw : I=1
  344. Screen 2 : For Q=8 To 15 : Reset Zone Q : Next 
  345. For Q=0 To 4 : Locate 0,Q : Print Zone$(INV$(Q+1),Q+8) : Next 
  346. For Q=0 To 4 : Locate 13,Q : Print Zone$(INV$(Q+6),Q+13) : Next 
  347. End If 
  348. Do 
  349. If TIME>0 : TIME=TIME+1 : If TIME=T0TAL : Proc TRAP : End If : End If 
  350. Q$=Inkey$
  351. SCAN=Scancode
  352. If SCAN<>0 : If(SCAN>84 and SCAN<90) : SAVGAME[SCAN-84] : End If : End If 
  353. If SCAN<>0 : If(SCAN>79 and SCAN<85) : LODGAME[SCAN-79] : End If : End If 
  354. 60 Screen 0
  355. If DEAD=1 : Pop Proc : End If 
  356. If Mouse Key=1 and(Y Mouse>219 and X Mouse<194) : Screen 2 : Pop Proc : End If 
  357. If Mouse Key=1 and(Y Mouse>219 and X Mouse>193) : Screen 2 : End If 
  358. IZ=Mouse Zone
  359. If((Mouse Key=1 or NP=1) and(Y Mouse>219 and X Mouse>195) and IZ<>0)
  360. IZ=IZ-7 : Clw : I=0 : Home 
  361. Print "operate "+INV$(IZ) : Screen 0 : Goto 62
  362. End If 
  363. MZ=Mouse Zone : IZ=0
  364. If Y Mouse>219 and I=0
  365. I=1
  366. Screen 2 : Clw 
  367. Screen 2 : For Q=8 To 15 : Reset Zone Q : Next 
  368. For Q=0 To 4 : Locate 0,Q : Print Zone$(INV$(Q+1),Q+8) : Next 
  369. For Q=0 To 4 : Locate 13,Q : Print Zone$(INV$(Q+6),Q+13) : Next 
  370. End If 
  371. 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 
  372. If((-1 or NP=1) and Y Mouse<219) and((MZ>11 and MZ<22) or Spritebob Col(1))
  373. NP=0
  374. If MZ>11 and MZ<22 : X=HSPOT(MZ,1) : Y=HSPOT(MZ,2) : Screen 2 : Pen 2 : Clw : I=0 : Home 
  375. Print "operate "+BNAME$(MZ)
  376. Do : If Mouse Click=1 : Exit : End If 
  377. Screen 0
  378. If DEAD=1 : Pop Proc : End If 
  379. If Mouse Zone<>MZ : Screen 2 : Clw : Pop Proc : End If 
  380. Loop 
  381. Goto 61
  382. Screen 0 : End If 
  383. 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 
  384. Do : If Mouse Click=1 : Exit : End If 
  385. If DEAD=1 : Pop Proc : End If 
  386. If Spritebob Col(1)=0 : Screen 2 : Clw : Pop Proc : End If 
  387. If Col(MZ)=0 : Screen 2 : Clw : Pop Proc : End If 
  388. Loop 
  389. 61 WALKTO[X,Y] : If NP=1 : Goto 60 : End If 
  390. If Abs(X-X Bob(1))>30 or Abs(Y-Y Bob(1))>30 : Screen 2 : Print "you need to move closer"
  391. PR1NT["     <click to continue>"]
  392. CL1CK=Mouse Click
  393. Do 
  394. If TIME>0 : TIME=TIME+1 : If TIME=T0TAL : Proc TRAP : End If : End If 
  395. If Mouse Click<>0 : Clw : Pop Proc : End If 
  396. Loop 
  397. End If 
  398. If Abs(X-X Bob(1))<31 and Abs(Y-Y Bob(1))<31
  399. 62 If MZ>0 : ST1$=BNAME$(MZ)-" " : ST2$=OBNAME$(MZ)-" " : End If 
  400. If IZ>0 : ST3$=INV$(IZ) : End If 
  401. If ST3$="radio" : If RPOWER=0 : PR1NT["It doesn't appear to have a power source."] : End If : 
  402. If RPOWER=1 and(ROOM$<>"tower") : PR1NT["You decide not to use it yet."] : End If : 
  403. 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 
  404. If(RPOWER=1 and ENTER=1) and(ROOM$="tower") : PR1NT["You play the recording back."] : PLBACK=1 : 
  405. Screen 0 : Paste Bob 206,80,108
  406. End If : 
  407. Exit : End If 
  408. ST$="subspaceradio" : If((ST1$=ST$) or(ST2$=ST$)) and(SUBRADIO=0) : 
  409. SUBRADIO=1
  410. PR1NT["You set the standard frequency..."] : WA1T[50]
  411. SPEAK["Yeno:","This is Yeno Hou calling starship 8.3."]
  412. SPEAK["Captain:","Yeno! Where are you?"]
  413. SPEAK["Yeno:","I'm in a secret stingon base. I escaped from a maximum security cell and found my way to the communications room."]
  414. SPEAK["Captain:","Building a base on this planet is in violation of treaty. We must report it."]
  415. SPEAK["Yeno:","What about me?"]
  416. SPEAK["Captain:","Oh. Er...escape to the surface and we'll pick you up."]
  417. SPEAK["Yeno:","No problem."]
  418. SPEAK["stingon voice:","Communications officer, You are on an unauthorised frequency. Report to section F at once."]
  419. Exit : End If 
  420. ST$="airlock" : If(ST1$=ST$) or(ST2$=ST$) : PR1NT["It won't open."] : Exit : End If 
  421. ST$="exit" : If(ST1$=ST$) or(ST2$=ST$) : PR1NT["It won't open."] : Exit : End If 
  422. 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 
  423. ST$="communicator" : If(ST3$=ST$) : PR1NT["Try talking into it."] : Exit : End If 
  424. ST$="gun" : If(ST1$=ST$) or(ST3$=ST$) : PR1NT["You do that with the 'shoot' mode."] : Exit : End If 
  425. 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 
  426. ST$="fooddispenser" : If(ST1$=ST$) or(ST2$=ST$) : Sam Play 1,5 : PR1NT["You order a chocolate bar and eat it."] : Exit : End If 
  427. 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 
  428. ST$="punchball" : If(ST1$=ST$) or(ST2$=ST$) : PR1NT[""] : W=Y Bob(4) : E=X Bob(4)
  429. If ENGINES=0
  430. Sam Raw 12,Start(4)+19000,6000,5000
  431. End If 
  432. Sam Loop Off : Sam Play 1,5
  433. If ENGINES=0
  434. Sam Raw 12,Start(4)+19000,6000,5000
  435. End If 
  436. For Q=30 To 50 : Wait Vbl : Hot Spot 40,9,Q : Bob 4,,W, : Next 
  437. WA1T[10]
  438. Sam Raw 12,Start(4)+19000,6000,5000
  439. Sam Loop On 
  440. For Q=50 To 30 Step -1 : Wait Vbl : Hot Spot 40,9,Q : Bob 4,,W, : Next : Exit : End If 
  441. ST$="drawers" : If(ST1$=ST$) or(ST2$=ST$) : PR1NT["Don't be nosey."] : Exit : End If 
  442. 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."] : 
  443. WA1T[50] : Screen 0 : Fade 2 : WA1T[30] : DEAD
  444. End If 
  445. 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 
  446. Exit : End If 
  447. ST$="bodyscan" : If(ST1$=ST$) or(ST2$=ST$)
  448. If ENGINES=0
  449. Sam Raw 12,Start(4)+19000,6000,5000
  450. End If 
  451. Sam Loop Off : Sam Play 2,7
  452. If ENGINES=0 : Sam Raw 12,Start(4)+19000,6000,5000
  453. WA1T[20]
  454. Sam Raw 12,Start(4)+19000,6000,5000
  455. Sam Loop On : End If 
  456. PR1NT["The read-out says '110% fit'. Looks like you have had too much 'special Z' breakfast cereal."] : Exit : End If 
  457. ST$="drill" : If(ST1$=ST$) or(ST2$=ST$) : PR1NT["No! Are you suicidal or something?"] : Exit : End If 
  458. PR1NT["nothing happens."]
  459. PR1NT["     <click to continue>"]
  460. CL1CK=Mouse Click
  461. Do 
  462. If TIME>0 : TIME=TIME+1 : If TIME=T0TAL : Proc TRAP : End If : End If 
  463. If Mouse Click<>0 : Clw : Exit : End If 
  464. Loop 
  465. Pop Proc
  466. End If 
  467. End If 
  468. Loop 
  469. PR1NT["     <click to continue>"]
  470. CL1CK=Mouse Click
  471. Do 
  472. If TIME>0 : TIME=TIME+1 : If TIME=T0TAL : Proc TRAP : End If : End If 
  473. If Mouse Click<>0 : Clw : Exit : End If 
  474. Loop 
  475. End Proc
  476. Procedure USE
  477. NP=0
  478. Clw 
  479. Screen 2
  480. If Y>219
  481. Clw : I=1
  482. For Q=8 To 15 : Reset Zone Q : Next 
  483. For Q=0 To 4 : Locate 0,Q : Print Zone$(INV$(Q+1),Q+8) : Next 
  484. For Q=0 To 4 : Locate 13,Q : Print Zone$(INV$(Q+6),Q+13) : Next 
  485. End If 
  486. Do 
  487. 70 Screen 2
  488. If TIME>0 : TIME=TIME+1 : If TIME=T0TAL : Proc TRAP : End If : End If 
  489. If DEAD=1 : Pop Proc : End If 
  490. If Mouse Key=1 and(Y Mouse>219 and X Mouse<194) : Screen 2 : Pop Proc : End If 
  491. 'If Mouse Key=1 and(Y Mouse>219 and X Mouse>193) : Screen 2 : End If 
  492. Do 
  493. Q$=Inkey$
  494. SCAN=Scancode
  495. If SCAN<>0 : If(SCAN>84 and SCAN<90) : SAVGAME[SCAN-84] : End If : End If 
  496. If SCAN<>0 : If(SCAN>79 and SCAN<85) : LODGAME[SCAN-79] : End If : End If 
  497. If TIME>0 : TIME=TIME+1 : If TIME=T0TAL : Proc TRAP : End If : End If 
  498. IZ=Mouse Zone
  499. If DEAD=1 : Pop Proc : End If 
  500. If Mouse Key=1 and(Y Mouse>219 and X Mouse<194) : Screen 2 : Pop Proc : End If 
  501. If Y Mouse>219 and I=0
  502. I=1
  503. Screen 2 : Clw 
  504. Screen 2 : For Q=8 To 15 : Reset Zone Q : Next 
  505. For Q=0 To 4 : Locate 0,Q : Print Zone$(INV$(Q+1),Q+8) : Next 
  506. For Q=0 To 4 : Locate 13,Q : Print Zone$(INV$(Q+6),Q+13) : Next 
  507. End If 
  508. 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 
  509. If((Mouse Key=1 or NP=1) and(Y Mouse>219 and X Mouse>195) and IZ<>0)
  510. IZ=IZ-7 : Clw : I=0 : Home 
  511. PR1NT["use "+INV$(IZ)+" on "] : WA1T[30]
  512. Clw : I=0
  513. For Q=0 To 4 : Locate 0,Q : Print Zone$(INV$(Q+1),Q+8) : Next 
  514. For Q=0 To 4 : Locate 13,Q : Print Zone$(INV$(Q+6),Q+13) : Next 
  515. Screen 0 : Exit 
  516. End If 
  517. Loop 
  518. Do 
  519. If TIME>0 : TIME=TIME+1 : If TIME=T0TAL : Proc TRAP : End If : End If 
  520. If DEAD=1 : Pop Proc : End If 
  521. If Mouse Key=1 and(Y Mouse>219 and X Mouse<194) : Screen 2 : Pop Proc : End If 
  522. Screen 2 : IZ2=Mouse Zone : MZ=0
  523. If((Mouse Key=1 or NP=1) and(Y Mouse>219 and X Mouse>195) and(IZ2>0 and(IZ2-7)<>IZ))
  524. IZ2=IZ2-7 : Clw : I=0 : Home 
  525. PR1NT["use "+INV$(IZ)+" on "+INV$(IZ2)] : Screen 0 : Exit 
  526. End If 
  527. Screen 0 : MZ=Mouse Zone : IZ2=0
  528. If Y Mouse>219 and I=0
  529. I=1
  530. Screen 2 : Clw 
  531. Screen 2 : For Q=8 To 15 : Reset Zone Q : Next 
  532. For Q=0 To 4 : Locate 0,Q : Print Zone$(INV$(Q+1),Q+8) : Next 
  533. For Q=0 To 4 : Locate 13,Q : Print Zone$(INV$(Q+6),Q+13) : Next 
  534. End If 
  535. 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 
  536. If Y Mouse<219 and((MZ>11 and MZ<22) or Spritebob Col(1))
  537.   For CZ=1 To 25 : If Col(CZ)=-1
  538.   Screen 2 : Clw : I=0 : PR1NT["use "+INV$(IZ)+" on "+OBNAME$(CZ)]
  539. Do : If Mouse Click=1 : Exit : End If 
  540. If Spritebob Col(1)=0 : Screen 2 : Clw : I=0 : CZ=0 : Exit : End If 
  541. If Col(CZ)=0 : Screen 2 : Clw : I=0 : CZ=0 : Exit : End If 
  542. Loop 
  543. Exit : End If : Next 
  544.   If MZ>11 and MZ<22 : Screen 2 : Clw : I=0 : PR1NT["use "+INV$(IZ)+" on "+BNAME$(MZ)] : 
  545. Do : If Mouse Click=1 : CZ=0 : Exit : End If 
  546. Screen 0 : If MZ<>Mouse Zone : Screen 2 : Clw : I=0 : CZ=0 : Exit : End If 
  547. Loop 
  548. End If 
  549. End If 
  550. CZ=0
  551. If((Mouse Key=1 or NP=1) and Y Mouse<219) and((MZ>11 and MZ<22)) : Exit : End If 
  552. If((Mouse Key=1 or NP=1) and Y Mouse<219) and(Spritebob Col(1)) : 
  553. For CZ=1 To 25 : If Col(CZ)=-1 : Exit : End If : Next : Exit : End If 
  554. Loop 
  555. If MZ=0 and CZ=0 : Goto 72 : End If 
  556. NP=0
  557. If MZ>11 and MZ<22 : X=HSPOT(MZ,1) : Y=HSPOT(MZ,2) : Screen 2 : Pen 2 : Clw : I=0 : Home 
  558. PR1NT["use "+INV$(IZ)+" on "+BNAME$(MZ)]
  559. Screen 0 : End If 
  560. If CZ<>0 : X=X Bob(CZ) : Y=Y Bob(CZ) : If CZ>1 : Y=Y+5 : End If : Screen 2 : Pen 2 : Clw : I=0 : Home 
  561. PR1NT["use "+INV$(IZ)+" on "+OBNAME$(CZ)]
  562. Screen 0 : End If 
  563. ST2$=OBNAME$(CZ)-" "
  564. If(INV$(IZ)="rock") and(ST2$="disintegrator")
  565. PR1NT["You throw the rock at the gun, knocking it into the transmitter."]
  566. PR1NT["     <click to continue>"]
  567. CL1CK=Mouse Click
  568. Do 
  569. If TIME>0 : TIME=TIME+1 : If TIME=T0TAL : Proc TRAP : End If : End If 
  570. If Mouse Click<>0 : Clw : Exit : End If 
  571. Loop 
  572. For Q=1 To 10 : If INV$(Q)="rock" : INV$(Q)="" : End If : Next 
  573. BLASTER=1
  574. Bob 11,200,110,82
  575. Bob 10,77,106,83 : Pop Proc
  576. End If 
  577. WALKTO[X,Y] : If NP=1 : Goto 70 : End If 
  578. If Abs(X-X Bob(1))>30 or Abs(Y-Y Bob(1))>30 : Screen 2 : Print "you need to move closer" : 
  579. PR1NT["     <click to continue>"]
  580. CL1CK=Mouse Click
  581. Do 
  582. If TIME>0 : TIME=TIME+1 : If TIME=T0TAL : Proc TRAP : End If : End If 
  583. If Mouse Click<>0 : Clw : Pop Proc : End If 
  584. Loop 
  585. End If 
  586. If Abs(X-X Bob(1))<31 and Abs(Y-Y Bob(1))<31
  587. 72 ST1$=INV$(IZ)
  588. If MZ>0 : ST3$=BNAME$(MZ)-" " : ST2$=OBNAME$(CZ)-" " : End If 
  589. If IZ2>0 : ST4$=INV$(IZ2) : End If 
  590. If ST1$="gun" : PR1NT["You do that with the 'shoot' mode."] : Exit : End If 
  591. If(ST1$="small drill") and(ST3$="exit")
  592. Paste Bob 273,100,109 : DRILLX=1
  593. For Q=1 To 5 : Sam Loop Off : Sam Play 2,3,30000 : Wait 4 : Next 
  594. Exit : End If 
  595. If(ST1$="acid") and(ST3$="deeppit") : INV$(3)="" : LINE$="" : 
  596. 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 
  597. If(ST1$="acid") and(ST3$<>"deeppit") : PR1NT["That is not a good idea."] : Exit : End If 
  598. If((INV$(IZ)="power pack") and(INV$(IZ2)="radio")) and RPOWER=0
  599. PR1NT["You fit the power pack into the radio."] : RPOWER=1
  600. For Q=1 To 10 : If INV$(Q)="power pack" : INV$(Q)="" : Exit : End If : Next 
  601. Exit : End If 
  602. If((INV$(IZ)="screwdriver") and(INV$(IZ2)="laser")) and SDLASER=0
  603. PR1NT["You take the laser apart and remove the power pack. The laser is now useless so you drop it."]
  604. For Q=1 To 10 : If INV$(Q)="laser" : INV$(Q)="power pack" : Exit : End If : Next 
  605. Exit : End If 
  606. If((INV$(IZ)="tooth") and(ST3$="wires")) and WIRES=0
  607. PR1NT["Cut which wire first?"] : WA1T[50] : Clw 
  608. CHOOSE["The blue wire","The red wire","The yellow wire",""]
  609. If CHOSE=2 : PR1NT["Which wire next?"] : WA1T[50]
  610.  CHOOSE["The blue wire","The yellow wire","",""]
  611.  If CHOSE=1 : ALARM=1 : End If 
  612.  Goto 73
  613. End If 
  614. If CHOSE=1 : PR1NT["Which wire next?"] : WA1T[50] : Clw 
  615.  CHOOSE["The red wire","The yellow wire","",""]
  616.  Goto 73
  617. End If 
  618. If CHOSE=3 : PR1NT["Which wire next?"] : WA1T[50] : Clw 
  619.  CHOOSE["The blue wire","The red wire","",""]
  620. Goto 73
  621. End If 
  622. 73 WIRES=1
  623. PR1NT["You cut the last two wires"]
  624. PR1NT["     <click to continue>"]
  625. CL1CK=Mouse Click
  626. Do 
  627. If TIME>0 : TIME=TIME+1 : If TIME=T0TAL : Proc TRAP : End If : End If 
  628. If Mouse Click<>0 : Clw : Exit : End If 
  629. Loop 
  630. Pop Proc
  631. End If 
  632. If(INV$(IZ)="stick") and(ST2$="tooth")
  633. PR1NT["You reach into the cage with the stick and take the tooth."]
  634. PR1NT["     <click to continue>"]
  635. CL1CK=Mouse Click
  636. Do 
  637. If TIME>0 : TIME=TIME+1 : If TIME=T0TAL : Proc TRAP : End If : End If 
  638. If Mouse Click<>0 : Clw : Exit : End If 
  639. Loop 
  640. Bob Off CZ
  641. For Q=1 To 10 : If INV$(Q)="" : INV$(Q)="tooth" : Exit : End If : Next 
  642. T00TH=1
  643. Pop Proc
  644. End If 
  645. PR1NT["nothing happens."] : Exit 
  646. Pop Proc
  647. Loop 
  648. PR1NT["     <click to continue>"]
  649. CL1CK=Mouse Click
  650. Do 
  651. If TIME>0 : TIME=TIME+1 : If TIME=T0TAL : Proc TRAP : End If : End If 
  652. If Mouse Click<>0 : Clw : Exit : End If 
  653. Loop 
  654. End If 
  655. End Proc
  656. Procedure TAKE
  657. NP=0
  658. Do 
  659. If TIME>0 : TIME=TIME+1 : If TIME=T0TAL : Proc TRAP : End If : End If 
  660. Q$=Inkey$
  661. SCAN=Scancode
  662. If SCAN<>0 : If(SCAN>84 and SCAN<90) : SAVGAME[SCAN-84] : End If : End If 
  663. If SCAN<>0 : If(SCAN>79 and SCAN<85) : LODGAME[SCAN-79] : End If : End If 
  664. 80 Screen 0
  665. If DEAD=1 : Pop Proc : End If 
  666. If Mouse Key=1 and(Y Mouse>219 and X Mouse<194) : Screen 2 : Pop Proc : End If 
  667. MZ=Mouse Zone
  668. 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 
  669. If((-1 or NP=1) and Y Mouse<219) and((MZ>11 and MZ<22) or Spritebob Col(1))
  670. NP=0
  671. If MZ>11 and MZ<22 : X=HSPOT(MZ,1) : Y=HSPOT(MZ,2) : Screen 2 : Pen 2 : Clw : Home 
  672. Print "take "+BNAME$(MZ)
  673. Do : If Mouse Click=1 : Exit : End If 
  674. Screen 0 : If Mouse Zone<>MZ : Screen 2 : Clw : Pop Proc : End If 
  675. Loop 
  676. Screen 0 : End If 
  677. MZ1=MZ
  678. 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
  679. Do : If Mouse Click=1 : Exit : End If 
  680. If DEAD=1 : Pop Proc : End If 
  681. If Spritebob Col(1)=0 : Screen 2 : Clw : Pop Proc : End If 
  682. If Col(MZ)=0 : Screen 2 : Clw : Pop Proc : End If 
  683. Loop 
  684. Goto 83 : End If : Next 
  685. MZ=MZ1
  686. 83 WALKTO[X,Y] : If NP=1 : Goto 80 : End If 
  687. If Abs(X-X Bob(1))>30 or Abs(Y-Y Bob(1))>30 : Screen 2 : Print "you need to move closer"
  688. PR1NT["     <click to continue>"]
  689. CL1CK=Mouse Click
  690. Do 
  691. If TIME>0 : TIME=TIME+1 : If TIME=T0TAL : Proc TRAP : End If : End If 
  692. If Mouse Click<>0 : Clw : Pop Proc : End If 
  693. Loop 
  694. End If 
  695. If Abs(X-X Bob(1))<31 and Abs(Y-Y Bob(1))<31
  696. 82 If MZ>0 : ST1$=BNAME$(MZ)-" "
  697. ST2$=OBNAME$(MZ)-" " : End If 
  698. 'If IZ>0 : ST3$=INV$(IZ) : End If  
  699. If(ST1$="box") and(ROOM$="store" and SCOMM=0) : SCOMM=1
  700. PR1NT["you take a stingon radio."]
  701. For Q=1 To 10 : If INV$(Q)="" : INV$(Q)="radio" : Exit : End If : Next 
  702. PR1NT["     <click to continue>"]
  703. CL1CK=Mouse Click
  704. Do 
  705. If TIME>0 : TIME=TIME+1 : If TIME=T0TAL : Proc TRAP : End If : End If 
  706. If Mouse Click<>0 : Clw : Exit : End If 
  707. Loop 
  708. Exit : End If 
  709. If(ST1$="doorcontrol") and ENTER=1 and CAM<>10
  710. PR1NT["you take the radio"] : CAM=10
  711. For Q=1 To 10 : If INV$(Q)="" : INV$(Q)="radio" : Exit : End If : Next 
  712. PR1NT["     <click to continue>"]
  713. CL1CK=Mouse Click
  714. Do 
  715. If TIME>0 : TIME=TIME+1 : If TIME=T0TAL : Proc TRAP : End If : End If 
  716. If Mouse Click<>0 : Clw : Exit : End If 
  717. Loop 
  718. Exit : End If 
  719. If ST2$="screwdriver" : 
  720. If S(4)=0 : Bob 22,120,173,55 : SPEAK["Stingon:","Don't touch that."] : Exit : End If 
  721. If S(4)=1 : TAKE=1 : SCREWDRIVER=1 : End If 
  722. End If 
  723. If ST2$="rock" : TAKE=1 : ROCK=1 : End If 
  724. If ST2$="stick" : TAKE=1 : STICK=1 : End If 
  725. If ST2$="disintegrator" : TAKE=1 : BLASTER=1 : End If 
  726. If ST2$="smalldrill" : TAKE=1 : SDRILL=1 : End If 
  727. If TAKE=1
  728. PR1NT["you take the "+OBNAME$(MZ)] : Bob Off MZ
  729. For Q=1 To 10 : If INV$(Q)="" : INV$(Q)=OBNAME$(MZ) : Exit : End If : Next 
  730. Exit : End If 
  731. If ST2$<>"tooth" : PR1NT["You can't take that."] : End If 
  732. If ST2$="tooth" : PR1NT["It isn't safe to reach in there."] : End If 
  733. PR1NT["     <click to continue>"]
  734. CL1CK=Mouse Click
  735. Do 
  736. If TIME>0 : TIME=TIME+1 : If TIME=T0TAL : Proc TRAP : End If : End If 
  737. If Mouse Click<>0 : Clw : Exit : End If 
  738. Loop 
  739. Pop Proc
  740. End If 
  741. End If 
  742. Loop 
  743. End Proc
  744. Procedure TALK
  745. NP=0
  746. Screen 2
  747. If Y Mouse>219
  748. Clw : I=1
  749. Screen 2 : For Q=8 To 15 : Reset Zone Q : Next 
  750. For Q=0 To 4 : Locate 0,Q : Print Zone$(INV$(Q+1),Q+8) : Next 
  751. For Q=0 To 4 : Locate 13,Q : Print Zone$(INV$(Q+6),Q+13) : Next 
  752. End If 
  753. Do 
  754. If TIME>0 : TIME=TIME+1 : If TIME=T0TAL : Proc TRAP : End If : End If 
  755. Q$=Inkey$
  756. SCAN=Scancode
  757. If SCAN<>0 : If(SCAN>84 and SCAN<90) : SAVGAME[SCAN-84] : End If : End If 
  758. If SCAN<>0 : If(SCAN>79 and SCAN<85) : LODGAME[SCAN-79] : End If : End If 
  759. 90 Screen 0
  760. If DEAD=1 : Pop Proc : End If 
  761. If Mouse Key=1 and(Y Mouse>219 and X Mouse<194) : Screen 2 : Pop Proc : End If 
  762. If Mouse Key=1 and(Y Mouse>219 and X Mouse>193) : Screen 2 : End If 
  763. IZ=Mouse Zone
  764. If((Mouse Key=1 or NP=1) and(Y Mouse>219 and X Mouse>195) and IZ<>0)
  765. IZ=IZ-7 : Clw : I=0 : Home 
  766. Print "talk to "+INV$(IZ) : Screen 0 : Goto 92
  767. End If 
  768. MZ=Mouse Zone : IZ=0
  769. If Y Mouse>219 and I=0
  770. I=1
  771. Screen 2 : Clw 
  772. Screen 2 : For Q=8 To 15 : Reset Zone Q : Next 
  773. For Q=0 To 4 : Locate 0,Q : Print Zone$(INV$(Q+1),Q+8) : Next 
  774. For Q=0 To 4 : Locate 13,Q : Print Zone$(INV$(Q+6),Q+13) : Next 
  775. End If 
  776. 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 
  777. If((-1 or NP=1) and Y Mouse<219) and((MZ>11 and MZ<22) or Spritebob Col(1))
  778. NP=0
  779. MZ1=MZ
  780. 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) : 
  781. Do : If Mouse Click=1 : Exit : End If 
  782. If DEAD=1 : Pop Proc : End If 
  783. If Spritebob Col(1)=0 : Screen 2 : Clw : I=0 : Pop Proc : End If 
  784. If Col(MZ)=0 : Screen 2 : Clw : Pop Proc : End If 
  785. Loop 
  786. Screen 0 : Goto 91 : End If : Next 
  787. MZ=MZ1
  788. If MZ>11 and MZ<22 : X=HSPOT(MZ,1) : Y=HSPOT(MZ,2) : Screen 2 : Pen 2 : Clw : I=0 : Home 
  789. Print "talk to "+BNAME$(MZ)
  790. Do : If Mouse Click=1 : Exit : End If 
  791. Screen 0 : If Mouse Zone<>MZ : Screen 2 : Clw : Pop Proc : End If 
  792. Loop 
  793. Screen 0 : End If 
  794. 91 WALKTO[X,Y] : If NP=1 : Goto 90 : End If 
  795. 92 If MZ>0 : ST1$=BNAME$(MZ)-" " : ST2$=OBNAME$(MZ)-" " : End If 
  796. If IZ>0 : ST3$=INV$(IZ) : End If 
  797. If ST2$="yeno" : PR1NT["You really shouldn't talk to yourself."] : Goto 93 : End If 
  798. If(ST2$="stingon") and(ROOM$="generator") : Bob 22,120,173,55 : SPEAK["Yeno:","excuse me..."]
  799. SPEAK["Stingon","What do you want?"]
  800. STI: CHOOSE["A prisoner has escaped!","I'm lost.","Prepare to die!","Nothing actually."]
  801. 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 
  802. If CHOSE=2 : SPEAK["Stingon:","Sorry, I'm new here myself."] : Goto STI : End If 
  803. If CHOSE=3 : SPEAK["Stingon:","I can have this room filled with guards in two seconds, you know."]
  804. CHOOSE["So? I'll kill them all.","Oh.","That will be too late.",""]
  805. SPEAK["Stingon:","What are you doing here anyway?"] : Goto STI
  806. End If 
  807. If CHOSE=4 : Exit : End If 
  808. End If 
  809. If ST2$="computer" : SPEAK["yeno:","Computer!"] : SPEAK["computer:","Hello, this is Data Day, the starbase 13 computer. How can I help you?."] : 
  810. COM: If INFO=0 : CHOOSE["Where is the crew?","Are there Stingons aboard?","What happened here?",""] : End If 
  811. If INFO=1 : CHOOSE["Where is the crew?","Are there Stingons aboard?","",""] : End If 
  812. If CHOSE<1 : Exit : End If 
  813. If CHOSE=1 : SPEAK["computer:","Well, that's Major Jump in the chair, "]
  814. SPEAK["computer:","Dr. Sillin escaped in an escape pod and I'm not sure about the rest."] : Goto COM : End If 
  815. If CHOSE=2
  816.  If S(1)+S(2)+S(3)=0 : SPEAK["computer:","I detect three stingons on this starbase."] : End If 
  817.  If S(1)+S(2)+S(3)=1 : SPEAK["computer:","I detect two stingons on this starbase."] : End If 
  818.  If S(1)+S(2)+S(3)=2 : SPEAK["computer:","I detect one stingon on this starbase."] : End If 
  819.  If S(1)+S(2)+S(3)=3 : SPEAK["computer:","No, I do not detect any."] : End If 
  820. Goto COM : End If 
  821. If CHOSE=3 : SPEAK["computer:","That is restricted information. You must identify yourself. "]
  822. COM2: CHOOSE["I'm commander Yeno Hou.","I'm Major Jump.","I'm Doctor Sillin.","I'm Mick Annick."]
  823. If CHOSE<1 : Exit : End If 
  824. If CHOSE=1 : SPEAK["computer:","Sorry, I don't know who actually."] : Goto COM : End If 
  825. If CHOSE=2 : SPEAK["computer:","You can't be Major Jump, He's dead."] : Goto COM : End If 
  826. If CHOSE=3 : SPEAK["computer:","Dr. sillin is not on board this starbase"] : Goto COM : End If 
  827. If CHOSE=4 and CAM=0 : SPEAK["computer:","Oh yeah? According to my visual you look nothing like him."] : Goto COM : End If 
  828. If CHOSE=4 and CAM=1 : SPEAK["computer:","Please give your access code."]
  829. COM3:
  830. If CLUE(1)=1 : CHOOSE["9265358","9763351","9165398","6215378"] : End If 
  831. If CLUE(1)=0 : CHOOSE["9563356","1225368","4265736","2715358"] : End If 
  832. If CLUE(1)=1 and CHOSE=1
  833. 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 : 
  834. If ENGINES=0
  835. SPEAK["computer","Self destruct sequence activated. All exits secured. One minute and counting."]
  836. TIME=1 : T0TAL=50*TIMETEST : LINE$="detonate"
  837. Sam Play 2,11,8000
  838. COM4: CHOOSE["What?","Help!","Oh no.","Cancel Self destruct."]
  839. If CHOSE=1 : SPEAK["computer:","In one minute the generators will go supercritical, destroying this starbase."] : End If 
  840. If CHOSE=4 : SPEAK["computer:","Only Major jump can authorise that."] : End If 
  841. End If 
  842. Exit 
  843. Else 
  844. SPEAK["computer:","Incorrect. Access denied."] : Exit 
  845. End If 
  846. End If 
  847. End If 
  848. Exit : End If 
  849. If ST3$="communicator" : SPEAK["yeno:","Captain! This is commander Hou."]
  850. If COMM=0 : SPEAK["Captain:","This is the captain. Have you anything to report?"] : End If 
  851. If COMM=1 : SPEAK["Captain:","Yes, what is it this time?"] : End If 
  852. COMM=1
  853.  If S(1)+S(2)+S(3)=1 and OEST=0 : SPEAK["Yeno:","One stingon exterminated sir."] : OEST=1 : SED=1 : End If 
  854.  If S(1)+S(2)+S(3)=2 and ANST=0 : SPEAK["Yeno:","Two stingons exterminated sir."] : ANST=1 : SED=1 : End If 
  855.  If S(1)+S(2)+S(3)=3 and ALST=0 : SPEAK["Yeno:","All stingons exterminated sir."] : ALST=1 : SED=1 : End If 
  856.  If LINE$="detonate" : SPEAK["yeno: ","I'm going to die!"]
  857. SPEAK["captain:","Oh dear, what a pity."] : Exit : End If 
  858.  If SED=0 : SPEAK["Yeno:","Er... nothing actually."] : End If 
  859.  If SED=0 : SPEAK["Captain:","Well don't waste my time then."]
  860.  Else 
  861. SPEAK["Captain:","Good."]
  862. End If 
  863. Exit : End If 
  864. PR1NT["It can't hear you."]
  865. 93 PR1NT["     <click to continue>"]
  866. CL1CK=Mouse Click
  867. Do 
  868. If TIME>0 : TIME=TIME+1 : If TIME=T0TAL : Proc TRAP : End If : End If 
  869. If Mouse Click<>0 : Clw : Exit : End If 
  870. Loop 
  871. Pop Proc
  872. End If 
  873. Loop 
  874. End Proc
  875. Procedure SH00T
  876. Do 
  877. If TIME>0 : TIME=TIME+1 : If TIME=T0TAL : Proc TRAP : End If : End If 
  878. Q$=Inkey$
  879. SCAN=Scancode
  880. If SCAN<>0 : If(SCAN>84 and SCAN<90) : SAVGAME[SCAN-84] : End If : End If 
  881. If SCAN<>0 : If(SCAN>79 and SCAN<85) : LODGAME[SCAN-79] : End If : End If 
  882. Screen 0
  883. If DEAD=1 : Pop Proc : End If 
  884. If Mouse Key=1 and Y Mouse>219 : Screen 2 : Pop Proc : End If 
  885. MZ=Mouse Zone : IZ=0
  886. If((-1 or NP=1) and Y Mouse<219) and((MZ>11 and MZ<22) or Spritebob Col(1))
  887. NP=0
  888. MZ1=MZ
  889. 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 "shoot "+OBNAME$(MZ) : 
  890. Do : If Mouse Click=1 : Exit : End If 
  891. If DEAD=1 : Pop Proc : End If 
  892. If Spritebob Col(1)=0 : Screen 2 : Clw : Pop Proc : End If 
  893. If Col(MZ)=0 : Screen 2 : Clw : Pop Proc : End If 
  894. Loop 
  895. Screen 0 : Goto 101 : End If : Next 
  896. MZ=MZ1
  897. If MZ>11 and MZ<22 : X=HSPOT(MZ,1) : Y=HSPOT(MZ,2) : Screen 2 : Pen 2 : Clw : Home 
  898. Print "shoot "+BNAME$(MZ)
  899. Do : If Mouse Click=1 : Exit : End If 
  900. If DEAD=1 : Pop Proc : End If 
  901. Screen 0 : If MZ<>Mouse Zone : Screen 2 : Clw : Pop Proc : End If 
  902. Loop 
  903. Screen 0 : End If 
  904. 101 ST1$=BNAME$(MZ)-" " : ST2$=OBNAME$(MZ)-" "
  905. Do 
  906. ST$="stingon" : If(ST1$=ST$) or(ST2$=ST$) : SH00T2[X,Y] : LASERDIE[MZ] : Exit : End If 
  907. ST$="camera" : If((ST1$=ST$) or(ST2$=ST$)) and CAM=0 : SH00T2[X,Y] : CAM=1 : Exit : End If 
  908. ST$="wall" : If((ST1$=ST$) or(ST2$=ST$)) : For Q=1 To 10 : If INV$(Q)="disintegrator" : SH00T2[X,Y] : INV$(Q)="" : PR1NT["The disintegrator loses its charge and disintegrates."] : WALL=1 : 
  909. Screen 0 : Paste Bob 96,79,86 : 
  910. Exit : End If : Next 
  911. If WALL=0 : PR1NT["You haven't a gun."] : End If : Exit : End If 
  912. ST$="hatch" : If((ST1$=ST$) or(ST2$=ST$)) and HATCH=0 : For Q=1 To 10 : If INV$(Q)="laser" : SH00T2[X,Y] : HATCH=1 : 
  913. Screen 0 : Paste Bob 280,150,99 : Paste Bob 291,109,100
  914. Exit : End If : Next 
  915. If HATCH=0 : PR1NT["You haven't a gun."]
  916. PR1NT["     <click to continue>"]
  917. CL1CK=Mouse Click
  918. Do 
  919. If TIME>0 : TIME=TIME+1 : If TIME=T0TAL : Proc TRAP : End If : End If 
  920. If Mouse Click<>0 : Clw : I=0 : Exit : End If 
  921. Loop 
  922. End If : Exit : End If 
  923. PR1NT["you don't really want to shoot that."]
  924. PR1NT["     <click to continue>"]
  925. CL1CK=Mouse Click
  926. Do 
  927. If TIME>0 : TIME=TIME+1 : If TIME=T0TAL : Proc TRAP : End If : End If 
  928. If Mouse Click<>0 : Clw : I=0 : Exit : End If 
  929. If DEAD=1 : Exit : End If 
  930. Loop 
  931. Exit 
  932. Loop 
  933. Pop Proc
  934. End If 
  935. Loop 
  936. End Proc
  937. Procedure WALK
  938. NP=0 : NR=0
  939. Do 
  940. If TIME>0 : TIME=TIME+1 : If TIME=T0TAL : Proc TRAP : End If : End If 
  941. Q$=Inkey$
  942. SCAN=Scancode
  943. If SCAN<>0 : If(SCAN>84 and SCAN<90) : SAVGAME[SCAN-84] : End If : End If 
  944. If SCAN<>0 : If(SCAN>79 and SCAN<85) : LODGAME[SCAN-79] : End If : End If 
  945. Screen 0
  946. If DEAD=1 : Pop Proc : End If 
  947. If Mouse Key=1 and Y Mouse>219 : Screen 2 : Pop Proc : End If 
  948. If NR=1 : NR=0
  949. Sprite 1,X Mouse,Y Mouse,27
  950. Channel 2 To Sprite 1
  951. Amal 2,"P: M XM-X,0,1;M 0,YM-Y,1;J P" : Amal On 2
  952. End If 
  953. If(Mouse Click=1 or NP=1) and(Y Mouse<219 and WALK=1)
  954. NP=0 : NR=0
  955. X=X Screen(X Mouse) : Y=Y Screen(Y Mouse)
  956. WALKTO[X,Y]
  957. End If 
  958. Loop 
  959. End Proc
  960. '
  961. 'Turns Yeno to face a particular direction.  
  962. Procedure TURN[D]
  963. If D=1 : If I Bob(1)=-32767 : Amreg(6)=16 : WA1T[10] : End If : Amreg(6)=0 : End If 
  964. If D=2 : If I Bob(1)=9 : Amreg(6)=0 : WA1T[10] : End If : Amreg(6)=16 : End If 
  965. If D=3 : If I Bob(1)=1 : Amreg(6)=16 : WA1T[10] : End If : Amreg(6)=$8000 : End If 
  966. If D=4 : If I Bob(1)=17 : Amreg(6)=0 : WA1T[10] : End If : Amreg(6)=8 : End If 
  967. End Proc
  968. '
  969. 'Controls the route the Yeno takes to reach his destination. 
  970. 'This is nowhere near as sophisticated as the one used in the Monkey Island  
  971. 'games, but it usually works.
  972. Procedure WALKTO[X,Y]
  973. If WALK=1
  974. WALKTO2[X,Y] : If NP=1 or NR=1 : Pop Proc : End If 
  975. If X Bob(1)=X and Y Bob(1)=Y : Pop Proc : End If 
  976. 20 X1=X Bob(1) : Y1=Y Bob(1)
  977. WALKTO2[X Bob(1),Y] : If NP=1 or NR=1 : Pop Proc : End If 
  978. WALKTO2[X,Y Bob(1)] : If NP=1 or NR=1 : Pop Proc : End If 
  979. If X Bob(1)=X and Y Bob(1)=Y : Pop Proc : End If 
  980. If X Bob(1)<>X1 or Y Bob(1)<>Y1 : Goto 20 : End If 
  981. End If 
  982. End Proc
  983. '
  984. 'Does the real work of animating Yeno. 
  985. Procedure WALKTO2[X,Y]
  986. Screen 0
  987. Channel 1 To Bob 1
  988. AM1$="AU (I RE=1 D S);S:A 0,(1+RG,2) ;Q:I RB=1 J L;I RB=2 J U;I RB=3 J D;J Q;L: A 0,(1+RG,1)(2+RG,1)(3+RG,1)(4+RG,1)(5+RG,1)(6+RG,1)(7+RG,1)(8+RG,1);M RA-X,RD-Y,RC;A 0,(1+RG,2);J Q;"
  989. AM1$=AM1$+"U: A 0,(9,1)(10,1)(11,1)(12,1)(13,1)(14,1)(15,1)(16,1);M RA-X,RD-Y,RC;A 0,(9,2);J Q;"
  990. AM1$=AM1$+"D: A 0,(17,1)(18,1)(19,1)(20,1)(21,1)(22,1)(23,1)(24,1);M RA-X,RD-Y,RC;A 0,(17,2);J Q"
  991. Amal 1,AM1$
  992. Amal On 1
  993. Amreg(0)=X : Amreg(3)=Y : Amreg(4)=0
  994. XS=6*(((X-X Bob(1))^2+(Y-Y Bob(1))^2)^(-0.5))*((X)-X Bob(1)) : If XS>6 : XS=6 : End If 
  995. YS=6*(((X-X Bob(1))^2+(Y-Y Bob(1))^2)^(-0.5))*((Y)-Y Bob(1)) : If YS>6 : YS=6 : End If 
  996.  Q#=(X-X Bob(1))*(Y-Y Bob(1))^(-1)
  997.   If Abs(Q#)>=1.2
  998.  Amreg(2)=(((X-X Bob(1))^2+(Y-Y Bob(1))^2)^0.5)/5
  999.    If X<X Bob(1) : DR=1 : TURN[3] : Amreg(6)=$8000 : End If 
  1000.    If X>X Bob(1) : DR=2 : TURN[1] : Amreg(6)=0 : End If 
  1001.    Z=Zone(X Bob(1)+XS,Y Bob(1)+YS) : If(Z>0 and Z<12) or Z>20 : Amal Freeze 1 : Amreg(1)=1 : End If 
  1002.    Do 
  1003. WALKTIME=Timer
  1004.     Z=Zone(X Bob(1)+XS,Y Bob(1)+YS) : If Z=0 or(Z>11 and Z<21) : Amreg(4)=1 : Exit : End If 
  1005.     If Z>20 and NR=0 : Amreg(4)=1 : Amreg(1)=0 : EXXIT : Pop Proc : End If 
  1006.     If Amreg(0)=X Bob(1) and Amreg(3)=Y Bob(1) : Amreg(4)=1 : Exit : End If : If Mouse Click=1 : NP=1 : Amreg(4)=1 : Exit : End If 
  1007.     If Mouse Click=1 : NP=1 : Pop Proc : End If 
  1008. Do 
  1009. If Timer-WALKTIME>4 : Exit : End If 
  1010. Loop 
  1011. Synchro Off 
  1012. Amal On 1
  1013. Synchro : Wait Vbl 
  1014. Amal Freeze 1 : Synchro On 
  1015. Loop 
  1016. Amreg(1)=0
  1017. Amal On 1
  1018.   End If 
  1019.   If Abs(Q#)<1.2 and Y-Y Bob(1)<0
  1020.    TURN[4] : DR=3 : Amreg(6)=8
  1021.    Amreg(2)=(((X-X Bob(1))^2+(Y-Y Bob(1))^2)^0.5)/3
  1022.    Z=Zone(X Bob(1)+XS,Y Bob(1)+YS) : If(Z>0 and Z<12) or Z>20 : Amal Freeze 1 : Amreg(1)=2 : End If 
  1023.    Do 
  1024.    Z=Zone(X Bob(1)+XS,Y Bob(1)+YS) : If Z=0 or(Z>11 and Z<21) : Amreg(4)=1 : Exit : End If 
  1025. If Z>20 and NR=0 : Amreg(4)=1 : Amreg(1)=0 : EXXIT : Pop Proc : End If 
  1026.    If Amreg(0)=X Bob(1) and Amreg(3)=Y Bob(1) : Amreg(4)=1 : Exit : End If : If Mouse Click=1 : NP=1 : Amreg(4)=1 : Exit : End If 
  1027. If Mouse Click=1 : NP=1 : Pop Proc : End If 
  1028. Wait 4
  1029. Synchro Off 
  1030. Amal On 1
  1031. Synchro : Wait Vbl 
  1032. Amal Freeze 1 : Synchro On 
  1033. Loop : Amreg(1)=0 : Amal On 1
  1034.   End If 
  1035.   If Abs(Q#)<1.2 and Y-Y Bob(1)>0
  1036.    TURN[2] : DR=4 : Amreg(6)=16
  1037.    Amreg(2)=(((X-X Bob(1))^2+(Y-Y Bob(1))^2)^0.5)/3
  1038.    Z=Zone(X Bob(1)+XS,Y Bob(1)+YS) : If(Z>0 and Z<12) or Z>20 : Amal Freeze 1 : Amreg(1)=3 : End If 
  1039.    Do 
  1040.    Z=Zone(X Bob(1)+XS,Y Bob(1)+YS) : If Z=0 or(Z>11 and Z<21) : Amreg(4)=1 : Exit : End If 
  1041. If Z>20 and NR=0 : Amreg(4)=1 : Amreg(1)=0 : EXXIT : Pop Proc : End If 
  1042.    If Amreg(0)=X Bob(1) and Amreg(3)=Y Bob(1) : Amreg(4)=1 : Exit : End If : If Mouse Click=1 : NP=1 : Amreg(4)=1 : Exit : End If 
  1043. If Mouse Click=1 : NP=1 : Pop Proc : End If 
  1044. Wait 4
  1045. Synchro Off 
  1046. Amal On 1
  1047. Synchro : Wait Vbl 
  1048. Amal Freeze 1 : Synchro On 
  1049.    Loop : Amreg(1)=0 : Amal On 1
  1050.   End If 
  1051. Amreg(5)=DR
  1052. End Proc
  1053. '
  1054. 'Which screens to load when you walk through a door. 
  1055. Procedure EXXIT
  1056. If ROOM$="hanger"
  1057. If Z=22 : ROOM$="corridor 1" : L0ADSCREEN["corridor",32,165] : NR=1 : End If 
  1058. If Z=23 and((S(1)=1 and S(2)=1) and((S(3)=1 and ENGINES=1) and INFO=1)) : 
  1059. A2
  1060. ROOM$="planet's surface" : L0ADSCREEN["mountain**",75,170] : NR=1
  1061. Else 
  1062. If Z=23 : Screen 2 : Clw : PR1NT["you can't leave yet."] : NR=1 : Screen 0 : WALKTO2[X Bob(1),Y Bob(1)+10] : Pop Proc : End If : End If 
  1063. End If 
  1064. If ROOM$="corridor 1"
  1065. If Z=22 : ROOM$="hanger" : L0ADSCREEN["hanger",255,130] : NR=1 : End If 
  1066. If Z=23 : ROOM$="control room" : L0ADSCREEN["control",43,125] : NR=1 : End If 
  1067. End If 
  1068. If ROOM$="corridor 2"
  1069. If Z=23 : ROOM$="corridor 3" : L0ADSCREEN["corridor**",32,165] : NR=1 : End If 
  1070. If Z=22 : ROOM$="control room" : PO1NT=1 : L0ADSCREEN["control",119,115] : NR=1 : End If 
  1071. End If 
  1072. If ROOM$="corridor 3"
  1073. If Z=23 : ROOM$="crew room 1" : L0ADSCREEN["room1",142,158] : NR=1 : End If 
  1074. If Z=22 : ROOM$="corridor 2" : L0ADSCREEN["corridor*",275,165] : NR=1 : End If 
  1075. If Z=24 : ROOM$="crew room 2" : L0ADSCREEN["room2",142,158] : NR=1 : End If 
  1076. If Z=25 : ROOM$="crew room 3" : L0ADSCREEN["room3",142,158] : NR=1 : End If 
  1077. End If 
  1078. If ROOM$="control room"
  1079. If Z=22 : ROOM$="power room" : PO1NT=1 : L0ADSCREEN["power",68,114] : NR=1 : End If 
  1080. If Z=23 : ROOM$="corridor 2" : PO1NT=1 : L0ADSCREEN["corridor*",68,157] : NR=1 : End If 
  1081. If Z=24 : ROOM$="corridor 1" : L0ADSCREEN["corridor",275,165] : NR=1 : End If 
  1082. If Z=25 : ROOM$="garden" : L0ADSCREEN["garden",28,161] : NR=1 : End If 
  1083. End If 
  1084. If ROOM$="garden"
  1085. If Z=23 : ROOM$="control room" : L0ADSCREEN["control",286,142] : NR=1 : End If 
  1086. If Z=22 : ROOM$="viewing room" : L0ADSCREEN["view",115,158] : NR=1 : End If 
  1087. End If 
  1088. If ROOM$="viewing room"
  1089. If Z=22 : ROOM$="garden" : L0ADSCREEN["garden",141,102] : NR=1 : End If 
  1090. End If 
  1091. If ROOM$="power room"
  1092. If Z=22 : ROOM$="control room" : PO1NT=1 : L0ADSCREEN["control",77,115] : NR=1 : End If 
  1093. If Z=23 : ROOM$="exercise room" : L0ADSCREEN["games",267,132] : NR=1 : End If 
  1094. If Z=24 : ROOM$="corridor 4" : L0ADSCREEN["corridor",32,165] : NR=1 : End If 
  1095. End If 
  1096. If ROOM$="crew room 1"
  1097. If Z=23 : ROOM$="corridor 3" : L0ADSCREEN["corridor**",65,157] : NR=1 : End If 
  1098. End If 
  1099. If ROOM$="crew room 2"
  1100. If Z=23 : ROOM$="corridor 3" : L0ADSCREEN["corridor**",155,157] : NR=1 : End If 
  1101. End If 
  1102. If ROOM$="crew room 3"
  1103. If Z=23 : ROOM$="corridor 3" : L0ADSCREEN["corridor**",252,157] : NR=1 : End If 
  1104. End If 
  1105. If ROOM$="corridor 4"
  1106. If Z=22 : ROOM$="power room" : L0ADSCREEN["power",290,130] : NR=1 : End If 
  1107. If Z=23 : ROOM$="medical room" : L0ADSCREEN["medical",75,143] : NR=1 : End If 
  1108. End If 
  1109. If ROOM$="exercise room"
  1110. If Z=22 : ROOM$="power room" : L0ADSCREEN["power",32,132] : NR=1 : End If 
  1111. End If 
  1112. If ROOM$="medical room"
  1113. If Z=22 : ROOM$="corridor 4" : L0ADSCREEN["corridor",275,164] : NR=1 : End If 
  1114. If Z=23 : ROOM$="laboratory" : L0ADSCREEN["lab",158,133] : NR=1 : End If 
  1115. End If 
  1116. If ROOM$="laboratory"
  1117. If Z=23 : ROOM$="medical room" : L0ADSCREEN["medical",158,163] : NR=1 : End If 
  1118. End If 
  1119. If ROOM$="planet's surface"
  1120. If Z=23 : A3 : ROOM$="prison" : L0ADSCREEN["prison",100,150] : End If 
  1121. End If 
  1122. If ROOM$="prison"
  1123. If Z=22 and WALL=1 : ROOM$="service corridor" : L0ADSCREEN["scorridor",141,165] : NR=1 : End If 
  1124. If Z=24 : ROOM$="passage 3" : PO1NT=1 : L0ADSCREEN["passage*3",151,145] : NR=1 : End If 
  1125. End If 
  1126. If ROOM$="service corridor"
  1127. If Z=23 : ROOM$="service corridor 2" : PO1NT=4 : L0ADSCREEN["scorridor*",240,155] : NR=1 : End If 
  1128. If Z=22 and HATCH=1 : ROOM$="passage 3" : PO1NT=1 : L0ADSCREEN["passage*3",245,140] : NR=1 : End If 
  1129. End If 
  1130. If ROOM$="service corridor 2"
  1131. If Z=23 : ROOM$="service corridor 3" : L0ADSCREEN["scorridor\d",280,90] : NR=1 : End If 
  1132. If Z=22 : ROOM$="service corridor" : PO1NT=2 : L0ADSCREEN["scorridor",90,160] : NR=1 : End If 
  1133. End If 
  1134. If ROOM$="service corridor 3"
  1135. If Z=23 : ROOM$="strange place" : L0ADSCREEN["place",80,133] : NR=1 : End If 
  1136. If Z=22 : ROOM$="service corridor 2" : L0ADSCREEN["scorridor*",220,165] : NR=1 : End If 
  1137. End If 
  1138. If ROOM$="strange place"
  1139. If Z=23 : ROOM$="passage 8" : L0ADSCREEN["passage8",30,155] : NR=1 : End If 
  1140. If Z=22 : ROOM$="service corridor 3" : L0ADSCREEN["scorridor\d",50,155] : NR=1 : End If 
  1141. End If 
  1142. If ROOM$="passage 2"
  1143. If Z=24 : ROOM$="passage 3" : L0ADSCREEN["passage*3",265,150] : NR=1 : End If 
  1144. If Z=23 : ROOM$="generator" : PO1NT=4 : L0ADSCREEN["generator",260,150] : NR=1 : End If 
  1145. If Z=22 : ROOM$="passage 5" : PO1NT=4 : L0ADSCREEN["passage*5",270,150] : NR=1 : End If 
  1146. End If 
  1147. If ROOM$="passage 3"
  1148. If Z=22 : ROOM$="passage 6" : PO1NT=2 : L0ADSCREEN["passage*6",30,155] : NR=1 : End If 
  1149. If Z=23 : ROOM$="prison" : PO1NT=4 : L0ADSCREEN["prison1",270,155] : NR=1 : End If 
  1150. If Z=24 : ROOM$="service corridor" : PO1NT=4 : L0ADSCREEN["scorridor",250,150] : NR=1 : End If 
  1151. If Z=25 : ROOM$="passage 2" : PO1NT=2 : L0ADSCREEN["passage2",40,150] : NR=1 : End If 
  1152. If Z=26 and X Bob(1)<100 : ROOM$="walkway" : PO1NT=2 : L0ADSCREEN["walkway",80,132] : NR=1 : End If 
  1153. End If 
  1154. If ROOM$="passage 5"
  1155. If Z=23 : ROOM$="passage 2" : PO1NT=1 : L0ADSCREEN["passage2",80,145] : NR=1 : End If 
  1156. If Z=22 : ROOM$="store" : L0ADSCREEN["store",270,155] : NR=1 : End If 
  1157. End If 
  1158. If ROOM$="passage 8"
  1159. If Z=22 : ROOM$="strange place" : L0ADSCREEN["place",260,150] : NR=1 : End If 
  1160. If Z=23 : ROOM$="passage 9" : PO1NT=1 : L0ADSCREEN["passage*9",80,140] : NR=1 : End If 
  1161. End If 
  1162. If ROOM$="passage 6"
  1163. If Z=22 : ROOM$="passage 3" : PO1NT=1 : L0ADSCREEN["passage*3",80,140] : NR=1 : End If 
  1164. If Z=23 : ROOM$="stairs up" : PO1NT=3 : L0ADSCREEN["stairsup",203,160] : NR=1 : End If 
  1165. End If 
  1166. If ROOM$="stairs up"
  1167. If Z=22 : ROOM$="stairs down" : L0ADSCREEN["stairsdown",150,145] : NR=1 : End If 
  1168. If Z=23 : ROOM$="passage 6" : PO1NT=3 : L0ADSCREEN["passage*6",243,160] : NR=1 : End If 
  1169. End If 
  1170. If ROOM$="stairs down"
  1171. If Z=22 : ROOM$="stairs up" : L0ADSCREEN["stairsup",120,145] : NR=1 : End If 
  1172. If Z=23 : ROOM$="security door" : PO1NT=1 : L0ADSCREEN["sectionf",180,145] : NR=1 : End If 
  1173. End If 
  1174. If ROOM$="security door"
  1175. If Z=23 : ROOM$="stairs down" : L0ADSCREEN["stairsdown",180,165] : NR=1 : End If 
  1176. If Z=22 and SUBRADIO=1 : ROOM$="section F" : L0ADSCREEN["scontrol",40,160] : If DESTROYBASE=0 : A5 : End If : NR=1 : End If 
  1177. End If 
  1178. If ROOM$="section F"
  1179. If Z=22 : ROOM$="security door" : L0ADSCREEN["sectionf",230,145] : NR=1 : End If 
  1180. If Z=23 and DRILLX=1 : A4 : End If 
  1181. End If 
  1182. If ROOM$="passage 9"
  1183. If Z=22 : ROOM$="passage 8" : PO1NT=4 : L0ADSCREEN["passage8",270,155] : NR=1 : End If 
  1184. If Z=23 : ROOM$="passage 7" : PO1NT=4 : L0ADSCREEN["rockfall",270,155] : NR=1 : End If 
  1185. If Z=24 : ROOM$="plants" : L0ADSCREEN["plants",150,140] : NR=1 : End If 
  1186. If Z=25 : ROOM$="animals" : L0ADSCREEN["animals",100,135] : NR=1 : End If 
  1187. End If 
  1188. If ROOM$="passage 7"
  1189. If Z=22 : ROOM$="passage 9" : PO1NT=1 : L0ADSCREEN["passage*9",245,140] : NR=1 : End If 
  1190. End If 
  1191. If ROOM$="plants"
  1192. If Z=22 : ROOM$="passage 9" : PO1NT=3 : L0ADSCREEN["passage*9",250,160] : NR=1 : End If 
  1193. End If 
  1194. If ROOM$="animals"
  1195. If Z=23 : ROOM$="passage 9" : PO1NT=3 : L0ADSCREEN["passage*9",80,160] : NR=1 : End If 
  1196. End If 
  1197. If ROOM$="generator"
  1198. If Z=22 : ROOM$="passage 2" : PO1NT=1 : L0ADSCREEN["passage2",245,140] : NR=1 : End If 
  1199. End If 
  1200. If ROOM$="store"
  1201. If Z=22 : ROOM$="passage 5" : L0ADSCREEN["passage*5",30,150] : NR=1 : End If 
  1202. End If 
  1203. If ROOM$="walkway"
  1204. If Z=22 : ROOM$="passage 3" : PO1NT=3 : L0ADSCREEN["passage*3",75,165] : NR=1 : End If 
  1205. If Z=23 : ROOM$="tower" : L0ADSCREEN["tower",50,150] : NR=1 : End If 
  1206. End If 
  1207. If ROOM$="tower"
  1208. If Z=22 : ROOM$="walkway" : PO1NT=4 : L0ADSCREEN["walkway",250,132] : NR=1 : End If 
  1209. If Z=23 : ROOM$="mine" : L0ADSCREEN["mine",75,140] : NR=1 : End If 
  1210. If Z=24 and PLBACK=1 : ROOM$="radio" : L0ADSCREEN["radio",75,140] : NR=1 : End If 
  1211. End If 
  1212. If ROOM$="mine"
  1213. If Z=22 : ROOM$="tower" : PO1NT=1 : L0ADSCREEN["tower",163,132] : NR=1 : End If 
  1214. End If 
  1215. If ROOM$="radio"
  1216. If Z=22 : ROOM$="tower" : L0ADSCREEN["tower",190,142] : NR=1 : End If 
  1217. End If 
  1218. End Proc
  1219. '
  1220. 'Taken from an example AMOS program and slightly modified. 
  1221. 'Fades from black to the screen palette.   
  1222. Procedure NICEIFF[SFADE]
  1223.    Auto View Off 
  1224.    Screen SFADE : Screen Clone 3 : Screen To Front SFADE : Screen To Front 2
  1225.    For W=0 To 31 : Colour W,0 : Next 
  1226.    View : Auto View On 
  1227. Screen Show SFADE : Screen SFADE : Fade 1 To 3 : Screen Close 3 : WA1T[15]
  1228. Screen 2
  1229. End Proc
  1230. '
  1231. 'Used throughout the program as a replacement for the standard Print 
  1232. 'instruction. Automatically selects the text window and word-wraps the text.   
  1233. Procedure PR1NT[ST$]
  1234. Screen 2
  1235. PR1NT1: If Len(ST$)<28 : Screen 2 : Print ST$ : Pop Proc : End If 
  1236. For Q=27 To 0 Step -1
  1237. If Mid$(ST$,Q,1)=" " : Exit : End If 
  1238. Next 
  1239. ST1$=Left$(ST$,Q) : Print ST1$
  1240. ST$=Right$(ST$,Len(ST$)-Q) : Goto PR1NT1
  1241. End Proc
  1242. '
  1243. 'An animation. 
  1244. Procedure A1
  1245. Amal Off 
  1246. Sam Loop On 
  1247. Sam Play 12,6,8000
  1248. If FIRST=0 : Screen 0 : Fade 2 : WA1T[30] : End If 
  1249. FIRST=0
  1250. L0ADPIC["data:bridge"] : Screen To Back 0 : Double Buffer 
  1251. Auto View On 
  1252. Priority On 
  1253. Update Every 2
  1254. Reserve Zone 1
  1255. Set Zone 1,200,100 To 330,130
  1256. Bob 1,236,118,1+$8000
  1257. Bob 2,127,167,33 : 
  1258. Channel 3 To Bob 2 : Amal 3,"A 0,(33,35)(34,30);Q:P;J Q" : Amal On 3
  1259. 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
  1260. Flash 3,"(fca,5)(fdb,5)(fdc,5)(fed,5)(fdc,5)(fdb,5)"
  1261. NICEIFF[0]
  1262. NOISE=6 : F=10000
  1263. Screen 0 : Gr Writing 0 : Ink 25 : Text 75,20,"STARBASE 13"
  1264. SPEAK["Yeno:","You sent for me, sir."]
  1265. Screen 0 : Gr Writing 0 : Ink 25 : Text 75,30,"lifescan...."
  1266. SPEAK["Captain:","Mr. Hou, take a shuttle to the starbase. We need to know what happened there."]
  1267. Screen 0 : Gr Writing 0 : Ink 25 : Text 75,40,"positive"
  1268. Screen 0 : Gr Writing 0 : Ink 25 : Text 75,50,"3 Stingons"
  1269. SPEAK["Yeno:","I'm on my way, sir."]
  1270. Screen 2 : Clw 
  1271. Sprite 1,X Mouse,Y Mouse,27
  1272. Channel 2 To Sprite 1
  1273. Amal 2,"P: M XM-X,0,1;M 0,YM-Y,1;J P" : Amal On 2
  1274. WALKTO[300,118]
  1275. Amal Off : Flash Off 
  1276. If FIRST=0 : Screen 0 : Fade 2 : WA1T[30] : End If 
  1277. FIRST=0
  1278. L0ADPIC["data:station"]
  1279. Screen To Back 0 : Double Buffer 
  1280. Sam Loop Off 
  1281. NICEIFF[0]
  1282. Screen Open 1,75,130,32,Lowres : Screen To Back 1 : Paper 0 : Cls 
  1283. Paste Bob 0,0,32
  1284. Bank Swap 1,2
  1285. For Q=50 To 2 Step -2
  1286. 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
  1287. Next 
  1288. Screen Close 1
  1289. Channel 2 To Sprite 1
  1290. Amal 2,"P: M XM-X,0,1;M 0,YM-Y,1;J P" : Amal On 2
  1291. Screen 0
  1292. Sam Raw 3,Start(4)+65000,7000,4500
  1293. For Q=25 To 0 Step -1
  1294. Bob 1,W,100,Q
  1295. W=X Bob(1)+Q*0.68
  1296. WA1T[5]
  1297. Next 
  1298. Bob Off 
  1299. Bank Swap 1,2 : Erase 2
  1300. WA1T[50]
  1301. End Proc
  1302. '
  1303. 'Loads a picture bank and unpacks it. Also avoids the standard disk requester. 
  1304. Procedure L0ADPIC[G$]
  1305. If G$="data:bridge" : Unpack 8 To 0 : Screen Hide 0 : Pop Proc : End If 
  1306. 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 
  1307. Load D1R$+(G$-"data:")+".abk",3 : Unpack 3 To 0 : Erase 3 : Screen Hide 0 : Pop Proc
  1308. End 
  1309. End Proc
  1310. '
  1311. 'Controls the speech 
  1312. Procedure SPEAK[NAME$,SPEECH$]
  1313. Screen 2
  1314. Clw 
  1315. PR1NT[NAME$]
  1316. PR1NT[SPEECH$]
  1317. PR1NT["     <click to continue>"]
  1318. CL1CK=Mouse Click
  1319. Do 
  1320. If TIME>0 : TIME=TIME+1 : If TIME=T0TAL : Proc TRAP : End If : End If 
  1321. If Mouse Click<>0 : Clw : WA1T[5] : Exit : End If 
  1322. Loop 
  1323. End Proc
  1324. '
  1325. 'Background animations, samples, pick-up-able objects, Stingons. 
  1326. Procedure AN1MATE
  1327. Sam Stop 
  1328. Sam Loop Off : Volume 63
  1329. If ROOM$="laboratory"
  1330. Channel 3 To Bob 4
  1331. Amal 3,"A 0,(45,20)(44,20):Q:P;J Q"
  1332. Amal On 
  1333. Sam Loop On 
  1334. Volume 12,10
  1335. Sam Play 12,6,2000
  1336. End If 
  1337. If ROOM$="exercise room"
  1338. Channel 3 To Bob 4
  1339. Amal 3,"M 0,20,1"
  1340. Amal On 
  1341. If ENGINES=0
  1342. Sam Loop On 
  1343. Volume 12,10
  1344. Sam Raw 12,Start(4)+19000,6000,5000
  1345. End If 
  1346. End If 
  1347. If ROOM$="power room"
  1348. If ENGINES=0
  1349. Sam Loop On 
  1350. Sam Raw 12,Start(4)+19000,6000,5000
  1351. End If 
  1352. End If 
  1353. If ROOM$="corridor 4"
  1354. If ENGINES=0
  1355. Sam Loop On 
  1356. Volume 12,10
  1357. Sam Raw 12,Start(4)+19000,6000,5000
  1358. End If 
  1359. End If 
  1360. If ROOM$="medical room"
  1361. Sam Loop On 
  1362. Sam Play 12,6,2000
  1363. End If 
  1364. If ROOM$="control room"
  1365. Sam Loop On 
  1366. Sam Play 12,6,8000
  1367. End If 
  1368. If ROOM$="corridor 1"
  1369. Volume 12,10
  1370. Sam Loop On 
  1371. Sam Play 12,6,8000
  1372. End If 
  1373. If ROOM$="garden"
  1374. If S(1)=0 : 
  1375. TIME0=TIME : LINE0$=LINE$ : T0TAL0=T0TAL
  1376. WALK=0 : Bob 22,150,150,55+$8000 : TIME=1 : T0TAL=2*TIMETEST : LINE$="S1" : End If 
  1377. End If 
  1378. If ROOM$="crew room 2"
  1379. If S(2)=0 : 
  1380. TIME0=TIME : LINE0$=LINE$ : T0TAL0=T0TAL
  1381. Bob 22,200,150,55+$8000 : TIME=1 : T0TAL=3*TIMETEST : LINE$="S2" : WALK=0 : End If 
  1382. End If 
  1383. If ROOM$="medical room"
  1384. If S(3)=0 : 
  1385. TIME0=TIME : LINE0$=LINE$ : T0TAL0=T0TAL
  1386. Bob 22,200,150,55+$8000 : TIME=1 : T0TAL=TIMETEST : LINE$="S2" : WALK=0 : End If 
  1387. End If 
  1388. If ROOM$="planet's surface"
  1389. Sam Loop On 
  1390. Sam Play 4,9,7000
  1391. Sam Play 8,9,4000
  1392. End If 
  1393. If ROOM$="prison"
  1394. If BLASTER=0 : Bob 10,195,106,83 : OBNAME$(10)="disintegrator" : End If 
  1395. If ROCK=0 : Bob 11,81,133,82 : OBNAME$(11)="rock" : End If 
  1396. If WALL=1 : Screen 0 : Paste Bob 96,79,86 : End If 
  1397. End If 
  1398. If ROOM$="generator"
  1399. If SCREWDRIVER=0 : Bob 10,140,123,105 : OBNAME$(10)="screwdriver" : End If 
  1400. If S(4)=0 : Bob 22,120,173,75 : End If 
  1401. End If 
  1402. If ROOM$="strange place"
  1403. Sam Loop On 
  1404. Sam Play 12,12,8000
  1405. End If 
  1406. If ROOM$="passage 8"
  1407. Paste Bob 14,95,88
  1408. Paste Bob 275,95,88+$8000
  1409. End If 
  1410. If ROOM$="passage 2"
  1411. Paste Bob 14,95,88
  1412. Paste Bob 60,87,87
  1413. Paste Bob 230,87,87+$8000
  1414. End If 
  1415. If ROOM$="passage 9"
  1416. Paste Bob 60,80,87
  1417. Paste Bob 230,80,87+$8000
  1418. Paste Bob 55,166,89
  1419. Paste Bob 225,166,89
  1420. End If 
  1421. If ROOM$="passage 5"
  1422. Paste Bob 14,90,88
  1423. Paste Bob 275,90,88+$8000
  1424. End If 
  1425. If ROOM$="passage 6"
  1426. Colour 4,$40
  1427. Paste Bob 138,80,104
  1428. Paste Bob 60,80,104
  1429. Paste Bob 230,80,104
  1430. Paste Bob 14,90,88
  1431. Paste Bob 225,166,89
  1432. End If 
  1433. If ROOM$="passage 3"
  1434. Set Zone 26,59,167 To 95,172
  1435. Paste Bob 60,80,87
  1436. Paste Bob 225,90,103
  1437. Paste Bob 135,80,87
  1438. Paste Bob 55,166,89
  1439. Paste Bob 275,90,88+$8000
  1440. End If 
  1441. If ROOM$="plants"
  1442. If STICK=0 : Bob 10,250,165,97 : OBNAME$(10)="stick" : End If 
  1443. End If 
  1444. If ROOM$="animals"
  1445. Channel 3 To Bob 3
  1446. Amal 3,"A 0,(92,100)(93,5)(94,100)(93,5):Q:P;J Q"
  1447. Channel 4 To Bob 4
  1448. Amal 4,"A 0,(96,500)(95,25):Q:P;J Q"
  1449. Amal On 
  1450. If T00TH=0 : Bob 10,165,130,98 : OBNAME$(10)="tooth" : End If 
  1451. End If 
  1452. If ROOM$="service corridor"
  1453. If HATCH=1 : Screen 0 : Paste Bob 280,150,99 : Paste Bob 291,109,100 : End If 
  1454. End If 
  1455. If ROOM$="tower"
  1456. If X Bob(1)<100 and ENTER=0
  1457. TIME=1 : T0TAL=30*TIMETEST : LINE$="enter"
  1458. End If 
  1459. If PLBACK=1 : Paste Bob 206,80,108 : End If 
  1460. End If 
  1461. If ROOM$="security door"
  1462. Colour 4,$40
  1463. If SUBRADIO=1 : Paste Bob 240,90,108 : End If 
  1464. End If 
  1465. If ROOM$="section F"
  1466. If DESTROYBASE=0 : Bob 22,125,145,75 : End If 
  1467. End If 
  1468. If ROOM$="walkway"
  1469. If LINE$="enter" : TIME=T0TAL-1 : End If 
  1470. End If 
  1471. If ROOM$="mine"
  1472. If SDRILL=0 : Bob 10,250,150,106 : OBNAME$(10)="small drill" : End If 
  1473. If(LINE$="enter") : TIME=0 : LINE$="" : If RECORD=1 : ENTER=1 : End If : End If 
  1474. End If 
  1475. If(LINE$="detonate") or(LINE0$="detonate")
  1476. Sam Loop On 
  1477. Sam Play 2,11,8000
  1478. End If 
  1479. End Proc
  1480. '
  1481. 'These two procedures control the movement of all characters except Yeno.
  1482. 'There is no route finder, since they are not player controlled
  1483. 'and are multitasking, using an Every command. 
  1484. Procedure SWALKTO2[X,Y,SBOB]
  1485. Screen 0
  1486. SBOB1=SBOB-10
  1487. Channel SBOB1 To Bob SBOB
  1488. AM1$="Q:I R4=1 J L;J Q;L: "
  1489. AM1$=AM1$+"A 0,(R5+R6,1)(R5+1+R6,1)(R5+2+R6,1)(R5+3+R6,1);"
  1490. AM1$=AM1$+"M R0-X,R1-Y,R7;A 0,(R5+R6,2);L R4=0"
  1491. Amal SBOB1,AM1$
  1492. Amal On SBOB1
  1493. Amreg(SBOB1,0)=X : Amreg(SBOB1,1)=Y : Amreg(SBOB1,4)=0 : Amreg(SBOB1,5)=I Bob(SBOB) : If Amreg(SBOB1,5)<0 : Amreg(SBOB1,5)=Amreg(SBOB1,5)+$8000 : End If 
  1494.    Amreg(SBOB1,7)=(((X-X Bob(SBOB))^2+(Y-Y Bob(SBOB))^2)^0.5)/5
  1495.    Amreg(SBOB1,8)=X Bob(SBOB)
  1496.    Amreg(SBOB1,9)=Y Bob(SBOB)
  1497.    If X<X Bob(SBOB) : Amreg(SBOB1,6)=$8000 : End If 
  1498.    If X>X Bob(SBOB) : Amreg(SBOB1,6)=0 : End If 
  1499. Amreg(SBOB1,4)=1
  1500. Amal Freeze SBOB1
  1501. Every Off : Every 5 Proc SYNCH
  1502. End Proc
  1503. Procedure SYNCH
  1504. Synchro Off 
  1505. Amal On 10
  1506. Amal On 11
  1507. Amal On 12
  1508. Amal On 15
  1509. Synchro : Wait Vbl 
  1510. If Chanan(10)=-1 : If Amreg(10,4)=1 : Every On : End If : End If 
  1511. If Chanan(11)=-1 : If Amreg(11,4)=1 : Every On : End If : End If 
  1512. If Chanan(12)=-1 : If Amreg(12,4)=1 : Every On : End If : End If 
  1513. If Chanan(15)=-1 : If Amreg(15,4)=1 : Every On : End If : End If 
  1514. Amal Freeze 10
  1515. Amal Freeze 11
  1516. Amal Freeze 12
  1517. Amal Freeze 15
  1518. Synchro On 
  1519. End Proc
  1520. '
  1521. 'Laser death 
  1522. Procedure LASERDIE[B0B]
  1523. TIME=TIME0 : T0TAL=T0TAL0 : LINE$=LINE0$
  1524. TIME0=0 : T0TAL0=0 : LINE0$=""
  1525. WALK=1
  1526. Channel 9 To Bob B0B
  1527. Amal 9,"A 1,(50,10)(51,4)(52,4)(53,4)(54,4)"
  1528. Amal On 9 : If B0B=1 : Amal Off 1 : Else Amal Off B0B-10
  1529.  If ROOM$="garden" : S(1)=1 : End If 
  1530.  If ROOM$="medical room" : S(3)=1 : End If 
  1531.  If ROOM$="crew room 2" : S(2)=1 : End If : End If 
  1532. WA1T[24] : Bob Off B0B
  1533.  If ROOM$="generator" : PR1NT["The stingons detect the energy surge from the laser. You are soon recaptured..."]
  1534. WA1T[100] : Screen 0 : Fade 2 : WA1T[30] : DEAD : End If 
  1535. If B0B=1 : WA1T[50] : Screen 0 : Fade 2 : WA1T[30] : DEAD : End If 
  1536. End Proc
  1537. Procedure SSHOOT[SBOB,B0B]
  1538. Amreg(17)=I Bob(SBOB)
  1539.    If X Bob(B0B)<X Bob(SBOB) : Amreg(16)=$8000+63 : End If 
  1540.    If X Bob(B0B)>=X Bob(SBOB) : Amreg(16)=63 : End If 
  1541. Channel SBOB-10 To Bob SBOB
  1542. Amal SBOB-10,"A 1,(RQ,30)(RR,1)"
  1543. Amal On SBOB-10
  1544. Wave 0 To 2 : For Q=90 To 50 Step -2 : Play 2,Q,1 : Next 
  1545. LASERDIE[B0B]
  1546. End Proc
  1547. Procedure SH00T2[X,Y]
  1548. Y=Y-30
  1549. Amreg(15)=I Bob(1)
  1550.  Q#=(X-X Bob(1))*(Y-(Y Bob(1))-30)^(-1)
  1551.   Amreg(14)=49
  1552.   If Abs(Q#)>=1
  1553.    If X<X Bob(1) : TURN[3] : Amreg(14)=$8000+47 : End If 
  1554.    If X>X Bob(1) : TURN[1] : Amreg(14)=47 : End If 
  1555. End If 
  1556.   If Abs(Q#)<1 and Y-Y Bob(1)<0 : TURN[4] : Amreg(14)=48 : End If 
  1557. Channel 1 To Bob 1
  1558. Amal 1,"A 1,(RO,30)(RP,1)"
  1559. Amal On 1
  1560. Wave 0 To 2 : For Q=90 To 50 Step -2 : Play 2,Q,1 : Next 
  1561. End Proc
  1562. '
  1563. 'Called whenever something needs to happen after a certain period of time. 
  1564. Procedure TRAP
  1565. LINE1$=LINE$
  1566. TIME=TIME0 : T0TAL=T0TAL0 : LINE$=LINE0$
  1567. TIME0=0 : T0TAL0=0 : LINE0$=""
  1568. If LINE1$<>""
  1569. Goto LINE1$
  1570. Else 
  1571. Pop Proc
  1572. End If 
  1573. S1: SWALKTO2[100,163,22]
  1574. TIME0=TIME : T0TAL0=T0TAL : LINE0$=LINE$
  1575. WALK=0 : TIME=1 : T0TAL=3*TIMETEST : LINE$="S2" : Pop Proc
  1576. S2: SSHOOT[22,1] : Pop Proc
  1577. DETONATE: Screen 0 : Boom : Wait Vbl : Bob Off : Wait Vbl : Cls 1 : Fade 3 : DEAD : Pop Proc
  1578. DETONATE2: Screen 0 : Boom : Wait Vbl : Bob Off : Wait Vbl : Cls 1 : Fade 3 : DEAD : Pop Proc
  1579. ENTER: If(ROOM$="tower") or(ROOM$="walkway")
  1580. Screen 0 : WALK=0 : If ROOM$="tower" : Bob 22,45,140,55 : End If : If ROOM$="walkway" : Bob 22,60,132,55 : End If 
  1581. 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 : 
  1582. If RECORD=1 : ENTER=1 : End If 
  1583. End Proc
  1584. '
  1585. 'Requires the player to choose between up to four options  
  1586. Procedure CHOOSE[C1$,C2$,C3$,C4$]
  1587. CHOSE=IZ
  1588. Screen 2 : For Q=8 To 15 : Reset Zone Q : Next 
  1589. Locate 0,1 : Print Zone$("* "+C1$,8)
  1590. If C2$<>"" : Locate 0,2 : Print Zone$("* "+C2$,9) : End If 
  1591. If C3$<>"" : Locate 0,3 : Print Zone$("* "+C3$,10) : End If 
  1592. If C4$<>"" : Locate 0,4 : Print Zone$("* "+C4$,11) : End If 
  1593. Do 
  1594. If TIME>0 : TIME=TIME+1 : If TIME=T0TAL : Proc TRAP : End If : End If 
  1595. IZ=Mouse Zone
  1596. If Mouse Key=1 and(Y Mouse>219 and X Mouse<194) : Screen 2 : Pop Proc : End If 
  1597. If((Mouse Key=1 or NP=1) and(Y Mouse>219 and X Mouse>195) and IZ<>0)
  1598. IZ=IZ-7 : Clw : Home 
  1599. Exit 
  1600. End If 
  1601. Loop 
  1602. CHOSE=IZ
  1603. End Proc
  1604. '
  1605. 'Save and load 
  1606. Procedure SAVGAME[NO]
  1607. If WALK=0 : PR1NT["The game cannot be saved at this point."]
  1608. PR1NT["     <click to continue>"]
  1609. CL1CK=Mouse Click
  1610. Do 
  1611. If Mouse Click<>0 : Clw : WA1T[5] : Pop Proc : End If 
  1612. Loop 
  1613. End If 
  1614. PR1NT["SAVE GAME:"]
  1615. PR1NT["Save game #"+Str$(NO)+"?"]
  1616. PR1NT["   <left mouse continue>"]
  1617. PR1NT["   <right mouse cancel>"]
  1618. Do 
  1619. If Mouse Key=1 : Exit : End If 
  1620. If Mouse Key=2 : Clw : Pop Proc : End If 
  1621. Loop 
  1622. Trap Open Out 1,"data/save"+Str$(NO)
  1623. If Errtrap>0 : PR1NT["Not saved."] : Pop Proc
  1624. Else : PR1NT["saving...."+Str$(NO)] : End If 
  1625. For Q=1 To 25
  1626. Print #1,CLUE(Q)
  1627. Next 
  1628. For Q=1 To 10
  1629. Print #1,INV$(Q)
  1630. Next 
  1631. For Q=1 To 4
  1632. Print #1,S(Q)
  1633. Next 
  1634. Print #1,X Bob(1)
  1635. Print #1,Y Bob(1)
  1636. Print #1,TIME
  1637. Print #1,T0TAL
  1638. Print #1,WALK
  1639. Print #1,CAM
  1640. Print #1,INFO
  1641. Print #1,COMM
  1642. Print #1,OEST
  1643. Print #1,ANST
  1644. Print #1,ALST
  1645. Print #1,ENGINES
  1646. Print #1,GRAPHICS$
  1647. Print #1,LINE$
  1648. Print #1,ROOM$
  1649. Print #1,TIME0
  1650. Print #1,T0TAL0
  1651. Print #1,LINE0$
  1652. Print #1,ROCK
  1653. Print #1,BLASTER
  1654. Print #1,WALL
  1655. Print #1,PO1NT
  1656. Print #1,DEAD
  1657. Print #1,T00TH
  1658. Print #1,STICK
  1659. Print #1,WIRES
  1660. Print #1,FIRST$
  1661. Print #1,LASER
  1662. Print #1,ALARM
  1663. Print #1,HATCH
  1664. Print #1,SCOMM
  1665. Print #1,SCREWDRIVER
  1666. Print #1,SDLASER
  1667. Print #1,RPOWER
  1668. Print #1,ENTER
  1669. Print #1,RECORD
  1670. Print #1,PLBACK
  1671. Print #1,SUBRADIO
  1672. Print #1,SDRILL
  1673. Print #1,DRILLX
  1674. Print #1,DESTROYBASE
  1675. Close 1
  1676. End Proc
  1677. Procedure LODGAME[NO]
  1678. PR1NT["LOAD GAME:"]
  1679. PR1NT["Load game #"+Str$(NO)+"?"]
  1680. PR1NT["   <left mouse continue>"]
  1681. PR1NT["   <right mouse cancel>"]
  1682. Do 
  1683. If Mouse Key=1 : Exit : End If 
  1684. If Mouse Key=2 : Clw : Pop Proc : End If 
  1685. Loop 
  1686. Trap Open In 1,"data/save"+Str$(NO)
  1687. If Errtrap>0 : PR1NT["Not loaded."] : Pop Proc
  1688. Else : PR1NT["loading...."+Str$(NO)] : End If 
  1689. For Q=1 To 25
  1690. Input #1,CLUE(Q)
  1691. Next 
  1692. For Q=1 To 10
  1693. Input #1,INV$(Q)
  1694. Next 
  1695. For Q=1 To 4
  1696. Input #1,S(Q)
  1697. Next 
  1698. Input #1,XB0B
  1699. Input #1,YB0B
  1700. Input #1,TIME
  1701. Input #1,T0TAL
  1702. Input #1,WALK
  1703. Input #1,CAM
  1704. Input #1,INFO
  1705. Input #1,COMM
  1706. Input #1,OEST
  1707. Input #1,ANST
  1708. Input #1,ALST
  1709. Input #1,ENGINES
  1710. Input #1,GRAPHICS$
  1711. Input #1,LINE$
  1712. Input #1,ROOM$
  1713. Input #1,TIME0
  1714. Input #1,T0TAL0
  1715. Input #1,LINE0$
  1716. Input #1,ROCK
  1717. Input #1,BLASTER
  1718. Input #1,WALL
  1719. Input #1,PO1NT
  1720. Input #1,DEAD
  1721. Input #1,T00TH
  1722. Input #1,STICK
  1723. Input #1,WIRES
  1724. Input #1,FIRST$
  1725. Input #1,LASER
  1726. Input #1,ALARM
  1727. Input #1,HATCH
  1728. Input #1,SCOMM
  1729. Input #1,SCREWDRIVER
  1730. Input #1,SDLASER
  1731. Input #1,RPOWER
  1732. Input #1,ENTER
  1733. Input #1,RECORD
  1734. Input #1,PLBACK
  1735. Input #1,SUBRADIO
  1736. Input #1,SDRILL
  1737. Input #1,DRILLX
  1738. Input #1,DESTROYBASE
  1739. Close 1
  1740. L0ADSCREEN[GRAPHICS$,XB0B,YB0B]
  1741. End Proc
  1742. '
  1743. 'Resets all variables
  1744. Procedure DEAD
  1745. For Q=1 To 25
  1746. CLUE(Q)=0
  1747. Next 
  1748. For Q=1 To 10
  1749. INV$(Q)=""
  1750. Next 
  1751. For Q=1 To 3
  1752. S(Q)=0
  1753. Next 
  1754. TIME=0
  1755. T0TAL=0
  1756. WALK=0
  1757. CAM=0
  1758. INFO=0
  1759. COMM=0
  1760. OEST=0
  1761. ANST=0
  1762. ALST=0
  1763. ENGINES=0
  1764. GRAPHICS$=""
  1765. LINE$=""
  1766. ROOM$=""
  1767. NR=1
  1768. ROOM$=FIRST$
  1769. OBNO=1
  1770. BZ=10
  1771. EZ=20
  1772. FIRST=1
  1773. WALK=1
  1774. INV$(1)="gun"
  1775. INV$(2)="communicator"
  1776. STICK=0
  1777. ROCK=0
  1778. BLASTER=0
  1779. WALL=0
  1780. PO1NT=0
  1781. DEAD=0
  1782. WIRES=0
  1783. LASER=0
  1784. ALARM=0
  1785. HATCH=0
  1786. T00TH=0
  1787. SCOMM=0
  1788. SDLASER=0
  1789. RPOWER=0
  1790. RECORD=0
  1791. ENTER=0
  1792. PLBACK=0
  1793. SDRILL=0
  1794. DRILLX=0
  1795. SUBRADIO=0
  1796. DEAD=1
  1797. SPEAK["You have failed in your mission.","Prepare to restart."]
  1798. Reset Zone 
  1799. Screen 2
  1800. End Proc
  1801. '
  1802. 'Animations
  1803. Procedure A2
  1804. TIME0=Timer
  1805. Amal Off 
  1806. Sam Loop On 
  1807. Sam Play 12,6,8000
  1808. If FIRST=0 : Screen 0 : Fade 2 : WA1T[30] : End If 
  1809. FIRST=0
  1810. L0ADPIC["data:bridge"] : Screen To Back 0 : Double Buffer 
  1811. Priority On 
  1812. Update Every 2
  1813. Reserve Zone 1
  1814. Set Zone 1,200,100 To 330,130
  1815. Bob 1,300,118,1+$8000
  1816. 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
  1817. 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
  1818. Flash 3,"(fca,5)(fdb,5)(fdc,5)(fed,5)(fdc,5)(fdb,5)"
  1819. NICEIFF[0]
  1820. WALKTO[236,118]
  1821. Screen 0 : Gr Writing 0 : Ink 25 : Text 75,20,"STARBASE 13"
  1822. SPEAK["Yeno:","Mission accomplished, sir."]
  1823. Screen 0 : Gr Writing 0 : Ink 25 : Text 75,30,"deep radar..."
  1824. SPEAK["Captain:","Excellent. We have been analysing the data you sent back......"]
  1825. SPEAK["Captain:","......but we still don't know what the stingons wanted here."]
  1826. Screen 0 : Gr Writing 0 : Ink 25 : Text 75,40,"ship detected"
  1827. SPEAK["Yeno:","Any clues?."]
  1828. Screen 0 : Gr Writing 0 : Ink 25 : Text 75,50,"evasive action"
  1829. Screen 2 : Clw 
  1830. Screen 0 : Screen Clone 3 : Screen To Back 3
  1831. Screen 0 : Fade 3 : Flash Off 
  1832. Boom 
  1833. Colour 1,$FFF : Colour 2,$CCC : Colour 3,$AAA : Colour 4,$888
  1834. Screen Offset 0,10,0 : Wait 3
  1835. Screen Offset 0,0,0 : Wait 3
  1836. Screen Offset 0,-10,0 : Wait 3
  1837. Screen Offset 0,0,0 : Wait 3
  1838. Screen Offset 0,10,0 : Wait 3
  1839. Screen Offset 0,0,0 : Wait 3
  1840. Colour 1,$FFF : Colour 2,$CCC : Colour 3,$AAA : Colour 4,$888
  1841. WA1T[30]
  1842. Colour 1,$FFF : Colour 2,$CCC : Colour 3,$AAA : Colour 4,$888
  1843. SPEAK["Captain:","Emergency lights!"]
  1844. Screen 0 : Fade 2 To 3 : WA1T[30]
  1845. Screen Close 3
  1846. L0ADPIC["data:stars"] : Screen To Front 2 : Screen 0 : Double Buffer 
  1847. Bob 1,50,150,64
  1848. Bob 2,300,0,65
  1849. Priority Off 
  1850. Screen Show 0
  1851. SPEAK["yeno:","Shields holding, sir."]
  1852. Channel 2 To Bob 2
  1853. Amal 2,"A 1,(65,30)(66,30)(67,30)(68,30);F R0=0 To 10;M -12+R0,R0+15,9;N R0"
  1854. Screen 0 : Bob 2,300,0,65
  1855. Amal On 2
  1856. WA1T[15] : Sam Play 4 : WA1T[20] : Sam Play 4 : WA1T[30]
  1857. Bob 3,55,110,69
  1858. Channel 3 To Bob 3
  1859. Amal 3,"A 1,(69,5)(70,5)(71,5)(72,5)"
  1860. Amal On 3
  1861. Boom : WA1T[20] : Bob Off 3 : Boom 
  1862. WA1T[50] : Bob Off 1
  1863. Auto View Off 
  1864. Screen Display 0,,35,,
  1865. Screen Offset 0,150,0
  1866. Auto View On 
  1867. Bob 2,290,100,65
  1868. SPEAK["captain:","Return fire!"]
  1869. Sam Play 1 : WA1T[15] : Sam Play 1 : WA1T[20]
  1870. Channel 2 To Bob 2
  1871. Amal 2,"M 0,-20,1;A 1,(69,5)(70,5)(71,5)(72,5)"
  1872. Amal On 2
  1873. Boom : WA1T[20] : Bob Off 2
  1874. FIRST=0
  1875. Amal Off 
  1876. If FIRST=0 : Screen 0 : Fade 2 : WA1T[30] : End If 
  1877. FIRST=0
  1878. L0ADPIC["data:bridge"] : Screen To Back 0 : Double Buffer 
  1879. Priority On 
  1880. Update Every 2
  1881. Reserve Zone 1
  1882. Set Zone 1,200,100 To 330,130
  1883. Bob 1,236,118,1+$8000
  1884. Bob 2,127,167,33
  1885. Bob 3,124,62,35
  1886. 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
  1887. Flash 3,"(fca,5)(fdb,5)(fdc,5)(fed,5)(fdc,5)(fdb,5)"
  1888. NICEIFF[0]
  1889. Screen 0 : Gr Writing 0 : Ink 25 : Text 75,20,"STARBASE 13"
  1890. SPEAK["Yeno:","That was a stingon ship."]
  1891. SPEAK["navigator:","Captain! I detect life signs on the planet. It could be a a survivor from the starbase."]
  1892. SPEAK["yeno:","I volunteer to go down to the surface."]
  1893. SPEAK["captain:","Affirmative. Take shuttle number 2."]
  1894. WALKTO[300,118]
  1895. Flash Off 
  1896. Fade 2
  1897. Screen Close 0
  1898. Sam Loop Off 
  1899. L0ADPIC["data:mountain***"] : Screen To Back 0 : Double Buffer 
  1900. NICEIFF[0]
  1901. Screen Open 1,75,130,32,Lowres : Screen To Back 1 : Paper 0 : Cls 
  1902. Paste Bob 0,0,73
  1903. Bank Swap 1,2
  1904. For Q=50 To 2 Step -2
  1905. 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
  1906. Next 
  1907. Screen Close 1
  1908. Channel 2 To Sprite 1
  1909. Amal 2,"P: M XM-X,0,1;M 0,YM-Y,1;J P" : Amal On 2
  1910. Screen 0
  1911. Sam Raw 3,Start(4)+65000,7000,4500
  1912. For Q=25 To 0 Step -1
  1913. Bob 1,W,100-3*(25-Q),Q
  1914. W=X Bob(1)+Q*0.68
  1915. WA1T[5]
  1916. Next 
  1917. Bob Off 
  1918. Bank Swap 1,2 : Erase 2
  1919. WA1T[50]
  1920. L0ADPIC["data:mountain**-"] : Screen To Back 0 : Double Buffer 
  1921. Bob 1,0,40,74
  1922. Channel 1 To Bob 1
  1923. Amal 1,"M 340,0,136"
  1924. NICEIFF[0]
  1925. Amal On 1
  1926. WA1T[200]
  1927. End Proc
  1928. Procedure A3
  1929. Amal Off 
  1930. If FIRST=0 : Screen 0 : Fade 2 : WA1T[30] : End If 
  1931. FIRST=0
  1932. L0ADPIC["data:mountain*"] : Screen To Back 0 : Double Buffer 
  1933. Bob 25,210,160,81
  1934. Bob 1,30,170,1
  1935. Reserve Zone 1
  1936. Set Zone 1,1,110 To 330,180
  1937. NICEIFF[0]
  1938. WA1T[30]
  1939. Bob 25,210,160,77+$8000
  1940. SWALKTO2[110,165,25]
  1941. WA1T[10]
  1942. SPEAK["Doctor:","At last. I was beginning to think I would be stuck on this planet for ever."]
  1943. WALKTO2[70,167]
  1944. SPEAK["Yeno:","I'm commander Yeno Hou of starship 8.3. You must be Dr. Sillin."]
  1945. SPEAK["Doctor:","Yes. Doctor Penny Sillin."]
  1946. SPEAK["Yeno:","My shuttle is on the next screen. Follow me."]
  1947. Amal Off 15
  1948. Screen 0
  1949. Bob 20,0,165,55
  1950. Bob 21,320,175,55+$8000
  1951. Bob 22,340,175,55
  1952. SWALKTO2[40,165,20]
  1953. WA1T[10]
  1954. 'Amal Off 10 
  1955. SPEAK["Stingon:","Not so fast!"]
  1956. SWALKTO2[150,175,21]
  1957. WA1T[10]
  1958. SWALKTO2[180,175,22]
  1959. WA1T[10]
  1960. SWALKTO2[160,160,22]
  1961. WA1T[20]
  1962. Amal Off 
  1963. Bob 1,70,167,17
  1964. WA1T[20]
  1965. SPEAK["Yeno:","I should have guessed."]
  1966. SPEAK["Stingon:","I will now communicate with your captain,"]
  1967. SPEAK["Stingon:","(beep)...Captain of space vessel 8.3; this is your enemy speaking."]
  1968. WA1T[10]
  1969. Bob 1,70,167,1+$8000
  1970. WA1T[20]
  1971. SPEAK["Captain:","I hear you."]
  1972. SPEAK["Stingon:","I have ten prisoners here on the planet. Surrender or they die."]
  1973. SPEAK["second Stingon:","Two prisoners actually sir."]
  1974. SSHOOT[20,21]
  1975. Channel 15 To Bob 25
  1976. Amal 15,"A 1,(81,5)(77,20)(77,20)(81,1)"
  1977. Amal On 15
  1978. 'SWALKTO2[150,175,22]
  1979. SPEAK["Stingon:","Ten prisoners. Surrender or I will kill both of them. Er.....All of them."]
  1980. SPEAK["Captain:","I cannot surrender my entire crew for two people."]
  1981. SPEAK["Stingon:","You will receive a boarding party of twenty stingons. If you resist, the prisoners die."]
  1982. SPEAK["Captain:","Very well."]
  1983. Screen 0
  1984. Fade 2
  1985. Sam Loop Off : WA1T[50]
  1986. For Q=1 To 10 : INV$(Q)="" : Next 
  1987. End Proc
  1988. Procedure A4
  1989. TIME=0 : LINE$="" : Sam Loop Off 
  1990. Screen 0 : Fade 2 : WA1T[30]
  1991. L0ADPIC["data:mountain"] : Screen To Back 0 : Double Buffer 
  1992. Reserve Zone 1
  1993. Set Zone 1,0,0 To 320,200
  1994. Bob 1,30,160,1
  1995. Bob 25,200,160,81
  1996. NICEIFF[0]
  1997. WA1T[30]
  1998. Bob 25,,,77
  1999. SWALKTO2[110,160,25]
  2000. WA1T[10]
  2001. SPEAK["Doctor Sillin:","What kept you?"]
  2002. Channel 15 To Bob 25
  2003. WA1T[30]
  2004. Amal 15,"A 1,(81,5)(77,1)"
  2005. Amal On 15
  2006. SPEAK["Doctor Sillin:","Look, The shuttle's coming."]
  2007. Screen 0 : Fade 2 : WA1T[30]
  2008. L0ADPIC["data:station"] : Screen To Back 0 : Double Buffer 
  2009. NICEIFF[0]
  2010. PR1NT["Soon....."]
  2011. WA1T[50]
  2012. Screen 0
  2013. Bob 2,73,115,110
  2014. Channel 2 To Bob 2
  2015. Amal 2,"A 1,(110,2)(111,3)(112,6)(111,7)(110,8)(113,1)"
  2016. Amal On 2
  2017. Boom 
  2018. WA1T[100]
  2019. Screen 0 : Fade 2
  2020. Sam Loop On 
  2021. Sam Play 12,6,8000
  2022. L0ADPIC["data:bridge"] : Screen To Back 0 : Double Buffer 
  2023. Priority On 
  2024. Update Every 2
  2025. Reserve Zone 1
  2026. Set Zone 1,200,100 To 330,130
  2027. Bob 1,300,118,1+$8000
  2028. Bob 2,127,167,33 : Channel 3 To Bob 2 : Amal 3,"A 0,(33,35)" : Amal On 3
  2029. 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" : 
  2030. Flash 3,"(fca,5)(fdb,5)(fdc,5)(fed,5)(fdc,5)(fdb,5)"
  2031. NICEIFF[0]
  2032. WALKTO[236,118]
  2033. SPEAK["Captain:","Well, you did it again. Next time, escape without blowing the place to bits."]
  2034. SPEAK["Captain:","Oh, shuttle 2 was still down there when it blew. I'll have to take it out of your pay."]
  2035. SPEAK["Yeno:","Yes, sir."]
  2036. WALKTO[300,118]
  2037. Flash Off : Screen 0 : Fade 4 : WA1T[60] : Screen Close 0 : Sam Loop Off 
  2038. PR1NT[""]
  2039. PR1NT["        The end."]
  2040. PR1NT["Look out for the next game from DTO Software:"]
  2041. PR1NT["'The Lost Prince'"]
  2042. 'WA1T[50] : Fade 2 
  2043. Sam Loop Off 
  2044. 'Do : Loop 
  2045. Wait Key 
  2046. End 
  2047. End Proc
  2048. Procedure A5
  2049. Screen 0
  2050. Bob 22,125,145,75 : 
  2051. WA1T[25]
  2052. SPEAK["stingon:","Communications officer, you were on an unauthorised frequency. How do yoy explain that?"]
  2053. Bob 22,,,55
  2054. SWALKTO2[100,155,22]
  2055. SPEAK["stingon:","You!"]
  2056. SPEAK["Yeno:","No, Hou. Yeno Hou."]
  2057. SPEAK["stingon:","How did you escape? Well, it doesn't matter. We will kill you, destroy your ship and soon..."]
  2058. SPEAK["stingon:","...we will be ready to declare war on the United Planets."]
  2059. SPEAK["Yeno:","It's already too late. The UP know about this base and they will send a fleet to capture it."]
  2060. SPEAK["stingon:","Then for the sake of the empire, I must destroy this base."]
  2061. SPEAK["Yeno:","Hey! I wanted to do that."]
  2062. SWALKTO2[125,135,22]
  2063. WA1T[30]
  2064. Channel 12 To Bob 22
  2065. Amal 12,"A 1,(75,50)(55,5)(76,1)"
  2066. Amal On 12
  2067. WA1T[55]
  2068. SPEAK["stingon:","The controls are set. You cannot escape. Goodbye..."]
  2069. Wave 0 To 2 : For Q=96 To 60 Step -2 : Play 2,Q,1 : Next 
  2070. LASERDIE[22]
  2071. TIME=1 : T0TAL=70*TIMETEST : LINE$="detonate2"
  2072. DESTROYBASE=1
  2073. End Proc
  2074. '
  2075. 'The Wait command interferes with Every, so I use this instead.
  2076. Procedure WA1T[WA1T]
  2077. For Q=1 To WA1T : Wait 1 : Next 
  2078. End Proc