home *** CD-ROM | disk | FTP | other *** search
/ Phoenix CD 2.0 / Phoenix_CD.cdr / 02a / pcgjan87.zip / ROOM.BAS < prev    next >
BASIC Source File  |  1987-01-18  |  29KB  |  483 lines

  1. 10 CLS:KEY OFF:PRINT:PRINT"                                   The Room":PRINT
  2. 20 PRINT"You awake on a bed in strange room. Your head starts to clear. But whatever     reason you are here escapes you.  You mentally take a quick inventory of your   surroundings."
  3. 50 NQ=66
  4. 100 DIM WORD$(20),WORD%(20,1),OBJ$(NQ),OBJ%(NQ)
  5. 110 EXTRA=0:LAY=1:HOLD=0:LC=1:ZAP=99
  6. 115 DIM RM$(2),RM%(2,10)
  7. 117 RM$(1)="Inside the room":RM$(2)="Outside the room"
  8. 118 RM%(2,4)=1
  9. 120 DIM VERBS$(150),VERBS%(150),TYPE$(250),TYPE%(250,1)
  10. 150 OPEN "VERBS.TXT" FOR INPUT AS #1
  11. 160 NV=1
  12. 170 INPUT #1,VERBS$(NV),VERBS%(NV):IF VERBS$(NV)="<<END>>" THEN 200
  13. 180 NV=NV+1:GOTO 170
  14. 200 CLOSE #1
  15. 210 OPEN "WORDS.TXT" FOR INPUT AS #1
  16. 220 N=1
  17. 230 INPUT #1,TYPE$(N),TYPE%(N,0),TYPE%(N,1):IF TYPE$(N)="<<END>>" THEN 250
  18. 240 N=N+1:GOTO 230
  19. 250 CLOSE#1:TYPE=N-1
  20. 260 FOR N=1 TO NQ:READ OBJ$(N),OBJ%(N):NEXT
  21. 280 DATA north,-1,south,-1,east,-1,west,-1,up,-1,down,-1,northwest,-1,northeast,-1
  22. 290 DATA southwest,-1,southeast,-1
  23. 300 DATA door on east side,1,large freezer,1,cabinet,1,grill high on wall,1
  24. 305 DATA vent on ceiling,1,grate on floor,1,shelf on wall,1,red decorative stripe on wall,1
  25. 310 DATA brown carpet,1,bed,1,table,1,desk,1,toolbox,1,cassette player,-1
  26. 315 DATA telephone,1,dime,-1,quarter,-1
  27. 320 DATA thick book,-1,heavy thermos,-1,label,-1,sneaker,-1,string,-1,cord,-1
  28. 325 DATA silver key,-1,panel,-1,batteries,-1,liquid nitrogen,-1,wrench,-1,small screws,-1,small key,-1,pair of scissors,-1,hammer,-1,pair of pliers,-1,screwdriver,-1,papers,-1
  29. 330 DATA thin book,-1,large book,-1,small book,-1,gold key,-1,electromagnet,-1,set of earphones,-1
  30. 340 DATA hinge,-1,mirror,1,bolts,-1,small screws,-1,padlock,-1,latch,-1,hole,-1
  31. 345 DATA Adventurer's Handbook,-1,Don't Panic button,-1,crumbs,-1,mouse,-1,diary,-1,cashbox,-1,rusty key,-1,mittens,-1
  32. 1000 'main loop
  33. 1002 IF K=13 AND NOUN=99 THEN MOVE=MOVE-1
  34. 1005 IF MOVE>ZAP THEN MOVE=ZAP
  35. 1010 IF MOVE=10 AND BP=0 THEN PRINT"There is a strange noise.":GOTO 5470
  36. 1012 IF ZAP-MOVE<4 THEN PRINT"The hiss of rushing gas can be heard.":IF MOVE=ZAP THEN PRINT"You keel over.":GOTO 8000
  37. 1014 IF LC=2 THEN PRINT:PRINT"Congratulations.  You have made it out.":SCORE=SCORE+25000:PRINT:PRINT"Score is"SCORE"out of 1,000,000":END
  38. 1016 IF LK=2 THEN PRINT"If you look one more time I might think you're vain.":LK=3
  39. 1024 GOSUB 9500
  40. 1026 MOVE=MOVE+1
  41. 1028 IF EXTRA THEN A$=A1$:PRINT A$:GOSUB 9007 ELSE GOSUB 9000
  42. 1030 GOSUB 9200
  43. 1032 IF K=0 THEN PRINT"I don't know how to "WORD$(1):GOTO 1090
  44. 1035 PRINT
  45. 1040 FOR N=1 TO NUM:WORD%(N,0)=0:WORD%(N,1)=0:GOSUB 9100:NEXT N
  46. 1050 FOR X=1 TO NUM:IF WORD%(X,1)=1 THEN 1060
  47. 1055 NEXT X
  48. 1060 IF WORD%(X,0)=999 THEN 1080
  49. 1061 IF NUM=1 THEN 1080
  50. 1062 NOUN$="":NOUN=0:IF WORD%(X+1,1)=4 THEN CONJ1=1:CONJ2=WORD%(X+1,0)
  51. 1065 IF X>NUM THEN PRINT"That sentence is beyond my vocabulary and comprehension.":GOTO 1000
  52. 1067 NOUN$=WORD$(X):NOUN=WORD%(X,0)
  53. 1070 ADJ$="":ADJ=0:FOR Y=2 TO NUM-1:IF WORD%(Y,1)=2 THEN ADJ$=WORD$(Y):ADJ=WORD%(Y,0):GOTO 1075
  54. 1072 NEXT:IF ADJ=0 THEN Y=0
  55. 1075 PREP$="":PREP=0:FOR Z=2 TO NUM-1:IF WORD%(Z,1)=3 THEN PREP$=WORD$(Z):PREP=WORD%(Z,0):GOTO 1080
  56. 1077 NEXT:IF PREP=0 THEN Z=0
  57. 1080 IF (NOUN=34 OR NOUN=28) AND ADJ=0 THEN PRINT"You will have to be more descriptive.":GOTO 1000
  58. 1082 IF PREP=204 AND WORD%(Z+1,0)=999 THEN WORD%(Z+1,0)=LASTNOUN:WORD$(Z+1)=LASTNOUN$:GOTO 1200
  59. 1085 IF NOUN=34 THEN GOSUB 1460
  60. 1087 IF NOUN=28 THEN GOSUB 1480
  61. 1090 IF PREP=204 AND (WORD%(NUM,0)=34 OR WORD%(NUM,0)=28) THEN GOSUB 8900
  62. 1095 LASTNOUN=NOUN:LASTNOUN$=NOUN$
  63. 1200 '
  64. 1210 IF K<11 THEN NOUN$=VERB$:VERB$="GO":NOUN=WORD%(1,0):GOTO 1300
  65. 1220 ON K-10 GOTO 1300,1400,1500,1600,2000,2100,2200,2300,2400,2500
  66. 1230 ON K-20 GOTO 2600,2700,2800,2900,3000,3100,3200,3300,3400,3500
  67. 1240 ON K-30 GOTO 3600,3700,3800,3800,3800,1290,4200,4300,4400,4500
  68. 1250 ON K-40 GOTO 4600,4700,4800,4900,5000,5100,5200,5300,5400,3600
  69. 1260 ON K-50 GOTO 3600,5600,5700,5800,5900,6000,6100
  70. 1290 PRINT"Huh??!!":GOTO 1000
  71. 1300 '
  72. 1305 IF LAY THEN PRINT"You need to get up first.":GOTO 1000
  73. 1310 IF NOUN>10 THEN PRINT"Huh??":GOTO 1000
  74. 1315 IF RM%(LC,NOUN)>0 THEN LC=RM%(LC,NOUN):GOTO 1000
  75. 1320 PRINT"You can't go that way.":GOTO 1000
  76. 1400 IF NOUN=99 THEN PRINT"Sorry, but please name off the items so I can tell if you can really get them.":GOTO 1000  'get
  77. 1401 IF NOUN=5 AND LAY=1 THEN PRINT"You are on your feet":LAY=0:SCORE=SCORE+250000!:GOTO 1000
  78. 1402 IF LAY THEN PRINT"You can't do much on your back!":GOTO 1000
  79. 1403 GOSUB 1405:N2=NOUN:GOSUB 7000:IF N2<>NOUN THEN MOVE=MOVE+1:GOTO 1403
  80. 1404 GOTO 1000
  81. 1405 IF NOUN=0 THEN PRINT"Huh??":GOTO 1000
  82. 1406 IF MOVE=10 AND BP=0 THEN PRINT"There is a strange noise.":BP=1:ZAP=MOVE+30:BEEP
  83. 1408 IF NOUN=6 THEN PRINT"Well, all right!!! Anything you say, Bro!!":GOTO 1000
  84. 1410 IF NOUN<23 THEN PRINT"You can't get the "OBJ$(NOUN):GOTO 1000
  85. 1412 IF NOUN=52 OR NOUN=54 THEN PRINT"The "OBJ$(NOUN)" are too tightly bound to the wall and door.":RETURN
  86. 1413 IF NOUN=58 THEN PRINT"You cant get the hole.":RETURN
  87. 1414 IF NOUN=29 AND MIT=0 THEN PRINT"The thermos is too cold. Your hand freezes.  You go into shock.  You aren't     active for the rest of the   alotted time.":GOTO 2315
  88. 1415 IF NOUN=37 THEN PRINT"Your hand freezes.  You go into shock.  You aren't active for the rest of the   alotted time.":GOTO 9900
  89. 1418 IF OBJ%(NOUN)=-2 AND HIK THEN SCORE=SCORE+25000:GOTO 1446
  90. 1419 IF OBJ%(NOUN)=-2 THEN PRINT"It's out of reach.":RETURN
  91. 1420 IF NOUN=65 AND PREP=204 AND WORD%(NUM,0)=44 AND OBJ%(44)=0 THEN 1446
  92. 1422 IF NOUN=39 AND PREP=204 AND WORD%(NUM,0)=26 AND OBJ%(26)=0 THEN CAB=1:PRINT"Latch with padlock drops off":GOTO 1446
  93. 1423 IF NOUN=39 AND PREP=204 AND WORD%(NUM,0)=44 THEN PRINT"The screwdriver is too big to get the screws.":RETURN
  94. 1424 IF (NOUN=39 OR NOUN=56 OR NOUN=57) AND CAB=0 THEN PRINT"Unable to get "OBJ$(NOUN):RETURN
  95. 1426 IF NOUN=65 AND PREP=204 AND WORD%(NUM,0)=44 THEN 1446
  96. 1428 IF NOUN=65 THEN PRINT"The mouse stops your effort.":RETURN
  97. 1444 IF OBJ%(NOUN)<>LC THEN PRINT"I don't see any "OBJ$(NOUN):RETURN
  98. 1446 PRINT OBJ$(NOUN);:IF HOLD=12 THEN PRINT". You are carrying too much already":RETURN
  99. 1448 OBJ%(NOUN)=0:HOLD=HOLD+1
  100. 1450 PRINT"-Taken-":RETURN
  101. 1460 IF ADJ=171 THEN NOUN=40:RETURN
  102. 1462 IF ADJ=161 THEN NOUN=49:RETURN
  103. 1464 IF ADJ=162 THEN NOUN=34:RETURN
  104. 1465 IF ADJ=175 THEN NOUN=65:RETURN
  105. 1468 PRINT"Huh?":RETURN
  106. 1480 IF ADJ=173 THEN NOUN=28:RETURN
  107. 1482 IF ADJ=172 THEN NOUN=46:RETURN
  108. 1484 IF ADJ=170 THEN NOUN=47:RETURN
  109. 1486 IF ADJ=171 THEN NOUN=48:RETURN
  110. 1488 PRINT"Huh?":RETURN
  111. 1490 FOR N=23 TO 51:IF HOLD=9 THEN 1498
  112. 1492 IF REJECT=N THEN 1497
  113. 1493 IF REJECT2=N THEN 1497
  114. 1494 IF REJECT3=N THEN 1497
  115. 1496 IF OBJ%(N)=LC THEN OBJ%(N)=0:HOLD=HOLD+1:PRINT OBJ$(N)" - taken."
  116. 1497 NEXT N
  117. 1498 IF HOLD=12 THEN PRINT"That's all you can hold."
  118. 1499 GOTO 1000
  119. 1500 'drop
  120. 1502 IF LAY THEN PRINT"You can't do much on your back!":GOTO 1000
  121. 1505 IF NOUN=0 THEN PRINT"Huh??!!":GOTO 1000
  122. 1507 IF NOUN=99 AND CONJ1 THEN GOSUB 8700
  123. 1508 IF NOUN=99 THEN 1550
  124. 1510 IF OBJ%(NOUN)<>0 THEN PRINT"You don't have the "OBJ$(NOUN):GOTO 1000
  125. 1512 IF (NOUN=51 AND WEAR) OR (NOUN=60 AND PANIC) THEN PRINT"You will first have to remove the "OBJ$(NOUN):GOTO 1000
  126. 1520 OBJ%(NOUN)=LC:HOLD=HOLD-1
  127. 1530 PRINT"-Dropped-":GOTO 1000
  128. 1550 FOR N=23 TO NQ:IF HOLD=0 THEN 1580
  129. 1552 IF MOVE=10 AND BP=0 THEN PRINT"There is a strange noise.":BP=1:ZAP=MOVE+30:BEEP
  130. 1555 IF REJECT=N THEN 1575
  131. 1560 IF REJECT2=N THEN 1575
  132. 1565 IF REJECT3=N THEN 1575
  133. 1570 IF OBJ%(N)=0 THEN OBJ%(N)=LC:HOLD=HOLD-1:PRINT OBJ$(N)" - dropped.":MOVE=MOVE+1
  134. 1575 NEXT N
  135. 1580 GOTO 1000
  136. 1600 'look
  137. 1610 IF NUM=1 OR WORD$(2)="AROUND" THEN GOSUB 9530:GOTO 1000
  138. 1612 IF OBJ%(NOUN)<>1 AND OBJ%(NOUN)<>0 THEN PRINT"I do not see any "OBJ$(NOUN):GOTO 1000
  139. 1615 IF NOUN=0 THEN PRINT"I don't understand what you want to look at.":GOTO 1000
  140. 1620 IF PREP=202 THEN PRINT"You'll have to be more specific with where you're looking.":GOTO 1000
  141. 1630 IF PREP=205 THEN 1700
  142. 1632 IF NOUN=14 THEN 7500
  143. 1634 IF NOUN=15 THEN 7600
  144. 1640 IF NOUN=58 AND OBJ%(65)=-1 THEN PRINT"It is a very narrow hole. Within it just out of reach is a rusty key.":GOTO 1000
  145. 1645 IF NOUN=63 THEN PRINT"There is a single entry: `Got up. Looked at everything. Panic set in.  Went back to sleep.'":GOTO 1000
  146. 1650 IF NOUN=11  AND OBJ%(52)=-1 THEN PRINT"The door is of heavy metal mounted with a large hinge that has small bolts.  It has been locked.":OBJ%(52)=1:OBJ%(54)=1:GOTO 1000
  147. 1652 IF NOUN=24 THEN PRINT"It is a tightly sealed unit with a service panel in the back.":IF OBJ%(35)=-1 THEN OBJ%(35)=OBJ%(24):GOTO 1000 ELSE GOTO 1000
  148. 1653 IF NOUN=53 AND BROKE THEN PRINT"You see an array of nondescript, above average adventure game players.":LK=LK+1:GOTO 1000
  149. 1654 IF NOUN=53 THEN PRINT"You see a nondescript, above average adventure game player.":LK=LK+1:GOTO 1000
  150. 1655 IF NOUN=16 AND OBJ%(34)=<-1 THEN OBJ%(34)=-2:PRINT"A silver key can be seen through the grate.":SCORE=SCORE+25000:GOTO 1000
  151. 1657 IF NOUN=57 AND OBJ%(55)=-1 THEN PRINT"The latch is held on by small screws.":OBJ%(39)=1:GOTO 1000
  152. 1660 IF NOUN=17 AND OBJ%(28)=-1 THEN PRINT"On the shelf is a large book, a thick book, a small book, a thin book and a     cassette player with earphones.":OBJ%(28)=1:OBJ%(46)=1:OBJ%(47)=1:OBJ%(48)=1:OBJ%(24)=1:OBJ%(51)=1:SCORE=SCORE+25000:GOTO 1000
  153. 1662 IF NOUN=13 AND OBJ%(66)=-1 THEN PRINT"The cabinet is latched and padlocked.  On top is a pair of heavy mittens.":OBJ%(66)=1:OBJ%(56)=1:OBJ%(57)=1:GOTO 1000
  154. 1665 IF NOUN=21 AND OBJ%(59)=-1 THEN OBJ%(59)=1:PRINT"There is an Adventurer's handbook on the table.":GOTO 1000
  155. 1667 IF NOUN=59 THEN 1900
  156. 1670 IF NOUN=46 THEN PRINT"It is entitled `Venting Anger' by C.A.Grille. It doesn't offer you much help    within its pages.":GOTO 1000
  157. 1672 IF NOUN=28 THEN PRINT"It is entitled `The Cold War' by the President's Cabinet. It doesn't offer you  much help within its pages.":GOTO 1000
  158. 1674 IF NOUN=48 THEN PRINT"It is entitled `Magnetic Personalities' by Bell.  It doesn't offer you much helpwithin its pages.":GOTO 1000
  159. 1676 IF NOUN=47 THEN PRINT"It is entitled `Grateful for Beautiful Parks' by Kin-Lee.  It doesn't offer you much help within its pages.":GOTO 1000
  160. 1678 IF NOUN=25 THEN PRINT"You notice that its cord is not connected":IF OBJ%(33)=-1 THEN OBJ%(33)=1:GOTO 1000 ELSE GOTO 1000
  161. 1680 IF NOUN=29 THEN PRINT"You notice a label that reads `Liquid Nitrogen                                                    Extreme cold - Extreme caution is advised':goto 1000
  162. 1682 IF NOUN=30 THEN PRINT"            `Liquid Nitrogen                                                    Extreme cold - Extreme caution is advised'":GOTO 1000
  163. 1684 IF NOUN=31 AND OBJ%(32)=-1 THEN OBJ%(32)=OBJ%(31):PRINT"The shoe has a string.":GOTO 1000
  164. 1685 IF NOUN=33 THEN PRINT"There are leads at both ends of cord.":GOTO 1000
  165. 1690 PRINT"There nothing special about the "OBJ$(NOUN):GOTO 1000
  166. 1700 '
  167. 1705 IF NOUN=20 THEN PRINT"You see dust.":IF OBJ%(31)=-1 THEN PRINT"There is a sneaker.":OBJ%(31)=1:GOTO 1000 ELSE GOTO 1000
  168. 1790 PRINT"You can't see under the "OBJ$(NOUN):GOTO 1000
  169. 1800 ''
  170. 1810 IF NOUN=16 THEN 1650
  171. 1890 PRINT"You can't see in the "OBJ$(NOUN):GOTO 1000
  172. 1900 'handbook
  173. 1905 HANDBOOK=HANDBOOK+1:ON HANDBOOK GOTO 1910,1920,1930,1940,1950
  174. 1910 PRINT"Handy hint number one:   Always wear your Don't Panic button.":GOTO 1000
  175. 1920 PRINT"Handy hint number two:   Never take off your Don't Panic button.":GOTO 1000
  176. 1930 PRINT"Handy hint number three: Think about all your options.":GOTO 1000
  177. 1940 PRINT"Handy hint number four:  If there is any possibilities of gas, work fast.":GOTO 1000
  178. 1950 PRINT"Handy hint number five:  Don't Panic!":HANDBOOK=0:GOTO 1000
  179. 2000 'again
  180. 2090 GOTO 1000
  181. 2100 'wait
  182. 2110 PRINT"Time passes . . ."
  183. 2120 GOTO 1000
  184. 2200 'hit
  185. 2202 IF LAY THEN PRINT"You can't do much on your back!":GOTO 1000
  186. 2210 IF NOUN=0 THEN PRINT"I don't understand.":GOTO 1000
  187. 2212 IF PREP=204 THEN 2215
  188. 2214 PRINT"You inflict slight damage exclusively to your hand.":GOTO 1000
  189. 2215 GOSUB 2260:IF X1>NUM THEN PRINT"I don't understand.":GOTO 1000
  190. 2220 '
  191. 2230 IF NOUN=52 AND ICE=2 THEN PRINT"The hinge shatters.  The door totters a bit.":ICE=3:SCORE=SCORE+25000:GOTO 1000
  192. 2235 IF NOUN=53 THEN BROKE=1:PRINT"The mirror fractures. It stays together with many cracks through it.":SCORE=SCORE-250000!:GOTO 1000
  193. 2240 PRINT"Trying to destroy the "OBJ$(NOUN)" doesn't accomplish much."
  194. 2250 GOTO 1000
  195. 2260 FOR X1=X+2 TO NUM:IF WORD%(X1,1)=1 THEN X$=WORD$(X1):GOTO 2270
  196. 2265 NEXT X1
  197. 2270 RETURN
  198. 2300 'quit
  199. 2310 INPUT"Are you sure? ",J$:IF LEFT$(J$,1)="Y" OR LEFT$(J$,1)="y" THEN 2315 ELSE 2320
  200. 2315 PRINT"End of session.":PRINT:PRINT"Your score is"SCORE"out of 1,000,000":END
  201. 2320 GOTO 1000
  202. 2400 'save
  203. 2410 PRINT"Sorry, but you can't save this game.  That's what makes this game so            challenging.":PRINT". . .and now, back to the game. . .":GOTO 1000
  204. 2415 GOTO 1000
  205. 2500 'restore
  206. 2510 PRINT"There's nothing to restore.":GOTO 1000
  207. 2600 'restart
  208. 2610 RUN
  209. 2700 'open
  210. 2702 IF LAY THEN PRINT"You can't do much on your back!":GOTO 1000
  211. 2705 IF NOUN=0 THEN PRINT"Huh??!!":GOTO 1000
  212. 2710 IF OBJ%(NOUN)<0 THEN PRINT"I don't see any "OBJ$(NOUN):GOTO 1000
  213. 2720 IF NOUN=23 AND TOOL=1 THEN PRINT"The toolbox is open":TOOL=2:GOSUB 2796 :GOTO 1000
  214. 2725 IF NOUN=11 AND ICE=3 THEN RM%(1,3)=2:PRINT"There is a way out to the east.":GOTO 1000
  215. 2730 IF NOUN =22 THEN DESK=1:IF OBJ%(40)=-1 THEN OBJ%(40)=1:OBJ%(41)=1:OBJ%(60)=1:OBJ%(26)=1:OBJ%(27)=1:PRINT"Within the desk is a Panic Button, a small key, a pair of scissors, a dime and a   quarter.":GOTO 1000 ELSE GOTO 1000
  216. 2740 IF NOUN=25 THEN PRINT"Ok":IF OBJ%(50)=-1 THEN PRINT"You see an electromagnet in the handset.":OBJ%(50)=1:GOTO 1000 ELSE GOTO 1000
  217. 2750 IF NOUN=28 OR NOUN=46 OR NOUN=47 OR NOUN=48 OR NOUN=59 OR NOUN=63 THEN PRINT"Within its pages there are many words.":GOTO 1000
  218. 2755 IF NOUN=35 THEN PRINT"Ok":IF OBJ%(36)=-1 THEN PRINT"Inside you see some batteries.":OBJ%(36)=1:GOTO 1000 ELSE GOTO 1000
  219. 2760 IF NOUN=29 THEN PRINT"Ok":THERM=1:GOTO 1000
  220. 2770 IF NOUN=12 AND REFRIG THEN PRINT"There is a heavy thermos with a label on it inside.":OBJ%(29)=1:OBJ%(30)=1:GOTO 1000
  221. 2780 IF NOUN=13 AND CAB=1 THEN PRINT"Inside you see a diary, crumbs, cashbox & a mouse scurrying through a cabinet crack across the floor into a small hole.":OBJ%(61)=1:OBJ%(63)=1:OBJ%(58)=1:OBJ%(64)=1:CAB=2:GOTO 1000
  222. 2785 IF NOUN=64 AND CASHBOX THEN PRINT"Ok. There is nothing inside but a IOU for $5.00 scrawled accross the inside of  the lid.":GOTO 1000
  223. 2790 PRINT"Can't"
  224. 2791 IF NOUN=11 OR NOUN=12 OR NOUN=64 OR NOUN=13 THEN PRINT"It is locked."
  225. 2792 IF NOUN=14 OR NOUN=15 OR NOUN=16 THEN PRINT"It is tightly sealed."
  226. 2793 IF NOUN=24 THEN PRINT"You might want to look closer."
  227. 2795 GOTO 1000
  228. 2796 IF OBJ%(49)<>-1 THEN PRINT"Ok":RETURN
  229. 2797 OBJ%(49)=1:OBJ%(38)=1:OBJ%(42)=1:OBJ%(43)=1:OBJ%(44)=1
  230. 2798 PRINT"Within the toolbox is a gold key, a wrench, a hammer, a pair of pliers and a    srewdriver.":GOTO 1000
  231. 2800 'tie
  232. 2802 IF LAY THEN PRINT"You can't do much on your back!":GOTO 1000
  233. 2810 IF NOUN=33 OR NOUN=32 THEN PRINT"Ok":GOTO 1000
  234. 2820 PRINT"You can't tie the "OBJ$(NOUN)
  235. 2895 GOTO 1000
  236. 2900 'untie
  237. 2902 IF LAY THEN PRINT"You can't do much on your back!":GOTO 1000
  238. 2910 IF NOUN=33 OR NOUN=32 THEN PRINT"Ok":GOTO 1000
  239. 2920 PRINT"You can't untie the "OBJ$(NOUN)
  240. 2950 GOTO 1000
  241. 3000 'connect
  242. 3002 IF LAY THEN PRINT"You can't do much on your back!":GOTO 1000
  243. 3010 IF (NOUN=33 OR NOUN=50) AND PREP AND (WORD%(NUM,0)=33 OR WORD%(NUM,0)=50) THEN ELE=ELE+4:PRINT"Ok - cord is attached to electromagnet":IF ELE>7 THEN ELE=4
  244. 3020 IF (NOUN=33 OR NOUN=36) AND PREP AND (WORD%(NUM,0)=33 OR WORD%(NUM,0)=36) THEN ELE=ELE+3:PRINT"Ok - cord is attached to the batteries":IF ELE>7 THEN ELE=3
  245. 3030 IF ELE<3 THEN 3070
  246. 3040 IF ELE=7 THEN PRINT"The electromagnet begins to function.":IF LOW THEN PRINT"Key literally jumps up and clings to electromagnet.":LOW=2:SCORE=SCORE+25000
  247. 3050 GOTO 1000
  248. 3070 PRINT"That does not accomplish much.":GOTO 1000
  249. 3095 GOTO 1000
  250. 3100 'unhook
  251. 3102 IF LAY THEN PRINT"You can't do much on your back!":GOTO 1000
  252. 3110 IF (NOUN=33 OR NOUN=50) AND PREP AND (WORD%(NUM,0)=33 OR WORD%(NUM,0)=50) THEN ELE=ELE-4:PRINT"Ok - cord is detached from electromagnet":IF ELE<0 THEN ELE=0
  253. 3120 IF (NOUN=33 OR NOUN=36) AND PREP AND (WORD%(NUM,0)=33 OR WORD%(NUM,0)=36) THEN ELE=ELE-3:PRINT"Ok - cord is detached from batteries":IF ELE<7 THEN ELE=0
  254. 3140 IF ELE=7 AND LOW>1 THEN PRINT"Key is no longer held by magnetic pull.  It drops.":LOW=1:SCORE=SCORE-25000
  255. 3150 PRINT"Ok":GOTO 1000
  256. 3195 GOTO 1000
  257. 3200 'wear
  258. 3201 IF LAY THEN PRINT"You can't do much on your back!":GOTO 1000
  259. 3202 IF NOUN=66 AND OBJ%(66)=0 THEN PRINT"Ok":MIT=1:GOTO 1000
  260. 3203 IF NOUN=66 THEN PRINT"You don't have them.":GOTO 1000
  261. 3205 IF NOUN=60 AND OBJ%(60)=0 THEN PRINT"Ok. A gentle calm settles over you.":SCORE=SCORE+500000!:PANIC=1:GOTO 1000
  262. 3207 IF NOUN=60 THEN PRINT"You don't have it.":GOTO 1000
  263. 3210 IF NOUN<>51 THEN PRINT"You can't wear that!!":GOTO 1000
  264. 3215 IF OBJ%(51) THEN PRINT"You don't have them.":GOTO 1000
  265. 3220 WEAR=1:PRINT"The earphones are placed comfortably over your ears."
  266. 3250 GOTO 1000
  267. 3300 'remove
  268. 3302 IF LAY THEN PRINT"You can't do much on your back!":GOTO 1000
  269. 3305 IF NOUN=66 AND MIT THEN PRINT"Ok":MIT=0:GOTO 1000
  270. 3306 IF NOUN=66 THEN PRINT"You are not wearing them.":GOTO 1000
  271. 3320 IF NOUN=36 AND OBJ%(36)>0 THEN PRINT"Ok":IF HOLD<12 THEN OBJ%(36)=0:HOLD=HOLD+1:GOTO 1000 ELSE GOTO 1000
  272. 3325 IF NOUN=50 AND OBJ%(50)>0 THEN PRINT"Ok":IF HOLD<12 THEN OBJ%(50)=0:HOLD=HOLD+1:GOTO 1000 ELSE GOTO 1000
  273. 3330 IF NOUN=51 AND WEAR THEN PRINT"Ok":WEAR=0:GOTO 1000
  274. 3340 IF NOUN=54 AND OBJ%(54)=1 THEN PRINT"They are frozen tight."
  275. 3345 IF NOUN=60 AND PANIC THEN PRINT"A deep depression settles upon you. You panic.  You are not able to do anything for ten moves.":SCORE=SCORE-500000!:PANIC=0:MOVE=MOVE+10:IF ZAP=99 THEN ZAP=41:BEEP:GOTO 1000 ELSE GOTO 1000
  276. 3390 PRINT"Sorry, unable to remove "OBJ$(NOUN)
  277. 3395 GOTO 1000
  278. 3400 'close
  279. 3401 IF LAY THEN PRINT"You can't do much on your back!":GOTO 1000
  280. 3410 PRINT"If you insist."
  281. 3495 GOTO 1000
  282. 3500 'replace
  283. 3510 PRINT"Huh??"
  284. 3595 GOTO 1000
  285. 3600 'smile
  286. 3610 PRINT"If you insist."
  287. 3695 GOTO 1000
  288. 3700 PRINT"Aw, come on.  It can't be that bad."
  289. 3795 GOTO 1000
  290. 3800 'talk
  291. 3810 PRINT"You're wasting your breath."
  292. 3895 GOTO 1000
  293. 4200 'enter
  294. 4202 IF LAY THEN PRINT"You can't do much on your back!":GOTO 1000
  295. 4210 PRINT"Hey, your job is to get out of this room."
  296. 4250 GOTO 1000
  297. 4300 'exit
  298. 4310 PRINT"Please specify a direction."
  299. 4395 GOTO 1000
  300. 4400 'cut
  301. 4410 IF NOUN=33 THEN PRINT"Ok.  The "OBJ$(NOUN)" is cut.":CORDCUT=1:GOTO 1000
  302. 4415 IF NOUN=32 THEN PRINT"Ok.  The "OBJ$(NOUN)" is cut.":GOTO 1000
  303. 4490 PRINT"Huh?"
  304. 4495 GOTO 1000
  305. 4500 'unlock
  306. 4510 IF NOUN=0 THEN PRINT"Huh??!!":GOTO 1000
  307. 4520 IF NOUN=23 AND PREP=204 AND WORD%(NUM,0)=40 AND OBJ%(40)=0 THEN TOOL=1:PRINT"Ok":SCORE=SCORE+25000:GOTO 1000
  308. 4521 IF NOUN=12 AND PREP=204 AND WORD%(NUM,0)=34 AND OBJ%(34)=0 THEN REFRIG=1:PRINT"Ok":SCORE=SCORE+25000:GOTO 1000
  309. 4522 IF NOUN=64 AND PREP=204 AND WORD%(NUM,0)=65 AND OBJ%(65)=0 THEN CASHBOX=1:PRINT"Ok":GOTO 1000
  310. 4523 IF NOUN=64 AND PREP=204 AND WORD$(NUM)="KEY" AND (OBJ%(40)=0 OR OBJ%(49)=0 OR OBJ%(34)=0) THEN PRINT"The key doesn't fit.":GOTO 1000
  311. 4525 IF NOUN=12 AND PREP=204 AND WORD$(NUM)="KEY" AND (OBJ%(40)=0 OR OBJ%(49)=0 OR OBJ%(65)=0) THEN PRINT"The key doesn't fit.":GOTO 1000
  312. 4527 IF NOUN=23 AND PREP=204 AND WORD$(NUM)="KEY" AND (OBJ%(34)=0 OR OBJ%(49)=0 OR OBJ%(65)=0) THEN PRINT"The key doesn't fit.":GOTO 1000
  313. 4530 IF NOUN=11 AND PREP=204 AND WORD$(NUM)="KEY" AND (OBJ%(65)=0 OR OBJ%(34)=0 OR OBJ%(40)=0 OR OBJ%(49)=0) THEN PRINT"The key doesn't fit.":GOTO 1000
  314. 4535 IF NOUN=56 AND PREP=204 AND WORD$(NUM)="KEY" AND (OBJ%(65)=0 OR OBJ%(34)=0 OR OBJ%(40)=0 OR OBJ%(49)=0) THEN PRINT"The key doesn't fit.":GOTO 1000
  315. 4540 PRINT"You are unable to unlock the "OBJ$(NOUN):GOTO 1000
  316. 4595 GOTO 1000
  317. 4600 'lock
  318. 4602 IF LAY THEN PRINT"You can't do much on your back!":GOTO 1000
  319. 4695 GOTO 1000
  320. 4700 'jump
  321. 4702 IF LAY THEN PRINT"You can't do much on your back!":GOTO 1000
  322. 4710 PRINT"Nothing happens."
  323. 4795 GOTO 1000
  324. 4800 'invent
  325. 4810 PRINT"You have in your possession the following items:"
  326. 4820 N1=0:FOR N=23 TO NQ:IF OBJ%(N)=0 THEN PRINT TAB(15) OBJ$(N):N1=N1+1
  327. 4840 NEXT N:IF N1=0 THEN PRINT TAB(15)"Nothing."
  328. 4850 GOTO 1000
  329. 4900 'push
  330. 4902 IF LAY THEN PRINT"You can't do much on your back!":GOTO 1000
  331. 4910 IF NOUN=11 AND ICE=3 THEN RM%(1,3)=2:PRINT"The door falls away.  There is a way out to the east.":GOTO 1000
  332. 4940 PRINT"Nothing happens."
  333. 4950 GOTO 1000
  334. 5000 'pull
  335. 5002 IF LAY THEN PRINT"You can't do much on your back!":GOTO 1000
  336. 5010 IF NOUN=11 AND ICE=3 THEN RM%(1,3)=2:PRINT"The door falls away.  There is a way out to the east.":GOTO 1000
  337. 5090 PRINT"Nothing happens."
  338. 5095 GOTO 1000
  339. 5100 'put
  340. 5110 PRINT"We forgot to put PUT into the vocabulary."
  341. 5195 GOTO 1000
  342. 5200 'light
  343. 5210 PRINT"Nothing happens."
  344. 5250 GOTO 1000
  345. 5300 'touch
  346. 5302 IF LAY THEN PRINT"You can't do much on your back!":GOTO 1000
  347. 5310 PRINT"Nothing happens."
  348. 5395 GOTO 1000
  349. 5400 'listen
  350. 5410 IF NOUN=51 OR NOUN=24 THEN 5420
  351. 5415 IF ZAP-MOVE<4 THEN PRINT"There is only the sound of gas rushing in.":GOTO 1000
  352. 5417 PRINT"There is only the sound of your own breathing.":GOTO 1000
  353. 5420 IF WEAR THEN 5430 ELSE PRINT"You need to wear the earphones to listen to the cassette player.":GOTO 1000
  354. 5430 PRINT"Hello there, applicant.  This is the first phase of your testing.  The problem  is to get out of this room.  Everything necessary is within these walls."
  355. 5435 PRINT:PRINT"Oh, to make it more interesting, there is a time limit.  You have 27            moves from the time you hear the beep before the knockout gas is released."
  356. 5440 PRINT"You then will have 3 more moves to get out before you succumb."
  357. 5450 PRINT:PRINT"Quick thinking and imagination will get you out.  Hope you succeed."
  358. 5460 PRINT:PRINT:PRINT"             -end of tape-           ":PRINT:PRINT"         (smoke spews out of player as cassette self-destructs.)"
  359. 5470 IF BP=0 THEN BEEP:ZAP=MOVE+30:BP=1
  360. 5495 GOTO 1000
  361. 5600 'turn
  362. 5602 IF LAY THEN PRINT"You can't do much on your back!":GOTO 1000
  363. 5605 IF NOUN=24 AND WEAR THEN 5420
  364. 5607 IF NOUN=24 THEN PRINT"The cassette player seems to working but you don't hear anything.":GOTO 1000
  365. 5610 PRINT"Nothing happens."
  366. 5695 GOTO 1000
  367. 5700 'lower
  368. 5702 IF LAY THEN PRINT"You can't do much on your back!":GOTO 1000
  369. 5710 IF NOUN<>33 AND NOUN<>50 THEN PRINT"That does not accomplish much.":GOTO 1000
  370. 5715 IF ELE<7 AND ELE>3 AND PREP AND WORD%(NUM,0)=16 AND CORDCUT=1 THEN PRINT"The cord with electromagnet is lowered into grate dangling high above the silver key.":GOTO 1000
  371. 5720 IF ELE<7 AND ELE>3 AND PREP AND WORD%(NUM,0)=16 THEN PRINT"The cord with electromagnet is lowered into grate.":LOW=1:GOTO 1000
  372. 5730 IF ELE=7 AND PREP AND WORD%(NUM,0)=16 THEN PRINT"The cord with electromagnet attaches itself to grate.":LOW=0:GOTO 1000
  373. 5795 PRINT"Huh??":GOTO 1000
  374. 5800 'raise
  375. 5802 IF LAY THEN PRINT"You can't do much on your back!":GOTO 1000
  376. 5830 IF ELE=7 AND LOW=2 THEN PRINT"The cord with electromagnet and silver key attaches itself to grate.":HIK=1:OBJ%(34)=-2:SCORE=SCORE+25000:GOTO 1000
  377. 5840 IF ELE<7 THEN PRINT"Ok":LOW=0:GOTO 1000
  378. 5895 PRINT"Huh??":GOTO 1000
  379. 5900 'use
  380. 5902 IF LAY THEN PRINT"You can't do much on your back!":GOTO 1000
  381. 5910 IF NOUN=25 THEN PRINT"It is dead.":GOTO 1000
  382. 5920 PRINT"The use of USE can be useful. Unfortunately, we decided to use USE very         selectively.  Like Use the telephone."
  383. 5990 GOTO 1000
  384. 6000 'play
  385. 6002 IF LAY THEN PRINT"You can't do much on your back!":GOTO 1000
  386. 6005 IF NOUN<>24 THEN PRINT"Not much is accomplished by playing "OBJ$(NOUN):GOTO 1000
  387. 6010 IF OBJ%(NOUN)=0 THEN 5420
  388. 6100 'pour
  389. 6102 IF LAY THEN PRINT"You can't do much on your back!":GOTO 1000
  390. 6105 IF NOUN<>37 THEN PRINT"Huh??":GOTO 1000
  391. 6110 IF THERM=0 THEN PRINT"You are unable to pour the liquid under the current circumstances.":GOTO 1000
  392. 6120 IF PREP AND WORD%(NUM,0)=52 THEN PRINT"The hinge is frozen.":ICE=2:SCORE=SCORE+25000:GOTO 1000
  393. 6130 PRINT"The liquid nitrogen pours out slowly and freezes instantly what it touches.":GOTO 1000
  394. 7000 '
  395. 7002 IF X=>NUM THEN RETURN
  396. 7003 IF WORD%(X+1,0)<>241 THEN RETURN
  397. 7005 X2=X:FOR X=X2+1 TO NUM:IF WORD%(X,1)=2 THEN ADJ=WORD%(X,0)
  398. 7010 IF WORD%(X,1)=1 THEN NOUN=WORD%(X,0):GOTO 7020
  399. 7015 NEXT X
  400. 7020 IF NOUN=28 THEN GOSUB 1480
  401. 7025 IF NOUN=34 THEN GOSUB 1460
  402. 7030 RETURN
  403. 7500 GRILL=GRILL+1:ON GRILL GOTO 7520,7530,7540,7550
  404. 7510 PRINT"Hey forget the grill!  It's a waste of time!":GOTO 1000
  405. 7520 PRINT"There is nothing to be seen at this time.":GOTO 1000
  406. 7530 PRINT"A small spider crawls out and then back in.":GOTO 1000
  407. 7540 PRINT"There is nothing to be seen at this time.":GOTO 1000
  408. 7550 PRINT"Looking at the "OBJ$(NOUN)" doesn't seem to accomplish much.":GOTO 1000
  409. 7600 VENT=VENT+1:ON VENT GOTO 7620,7630,7640,7650
  410. 7610 PRINT"Hey forget the vent!  It's a waste of time!":GOTO 1000
  411. 7620 PRINT"There is nothing to be seen at this time.":GOTO 1000
  412. 7630 PRINT"A small spider crawls out and then back in.":GOTO 1000
  413. 7640 PRINT"There is nothing to be seen at this time.":GOTO 1000
  414. 7650 PRINT"Looking at the "OBJ$(NOUN)" doesn't seem to accomplish much.":GOTO 1000
  415. 8000 'fail
  416. 8010 PRINT:PRINT"Sorry, you have failed in your mission.":PRINT:PRINT"Your score is"SCORE"out of 1,000,000":END
  417. 8700 'but/and
  418. 8705 ADJ1=0:ADJ2=0:ADJ3=0
  419. 8710 REJECT=0:REJECT2=0:REJECT3=0:FOR X2=X+1 TO NUM:IF WORD%(X2,1)=1 THEN REJECT=WORD%(X2,0):GOTO 8730
  420. 8715 IF WORD%(X2,1)=2 THEN ADJ1=WORD%(X2,0)
  421. 8720 NEXT X2:IF X2>=NUM THEN RETURN
  422. 8730 IF REJECT =34 THEN SWAP ADJ1,ADJ:SWAP REJECT ,NOUN:GOSUB 1460:SWAP ADJ1,ADJ:SWAP REJECT ,NOUN
  423. 8731 IF REJECT =28 THEN SWAP ADJ1,ADJ:SWAP REJECT ,NOUN:GOSUB 1480:SWAP ADJ1,ADJ:SWAP REJECT ,NOUN
  424. 8732 IF WORD%(X2+1,0)=241 THEN 8735 ELSE RETURN
  425. 8735 FOR X3=X2+2 TO NUM:IF WORD%(X3,1)=1 THEN REJECT2=WORD%(X3,0):GOTO 8745
  426. 8737 IF WORD%(X3,1)=2 THEN ADJ2=WORD%(X3,0)
  427. 8740 NEXT X3:IF X3>=NUM THEN RETURN
  428. 8745 IF REJECT2=34 THEN SWAP ADJ2,ADJ:SWAP REJECT2,NOUN:GOSUB 1460:SWAP ADJ2,ADJ:SWAP REJECT2,NOUN
  429. 8746 IF REJECT2=28 THEN SWAP ADJ2,ADJ:SWAP REJECT2,NOUN:GOSUB 1480:SWAP ADJ2,ADJ:SWAP REJECT2,NOUN
  430. 8747 IF WORD%(X3+1,0)=241 THEN 8750 ELSE RETURN
  431. 8750 FOR X2=X3+2 TO NUM:IF WORD%(X2,1)=1 THEN REJECT3=WORD%(X2,0):GOTO 8760
  432. 8752 IF WORD%(X2,1)=2 THEN ADJ3=WORD%(X2,0)
  433. 8755 NEXT X2:IF X3>=NUM THEN RETURN
  434. 8760 IF REJECT3=34 THEN SWAP ADJ3,ADJ:SWAP REJECT3,NOUN:GOSUB 1460:SWAP ADJ3,ADJ:SWAP REJECT3,NOUN
  435. 8762 IF REJECT3=28 THEN SWAP ADJ3,ADJ:SWAP REJECT3,NOUN:GOSUB 1480:SWAP ADJ3,ADJ:SWAP REJECT3,NOUN
  436. 8765 RETURN
  437. 8900 'with
  438. 8910 ADJ2=0:FOR N=X+2 TO NUM:IF WORD%(N,1)=2 THEN ADJ2=WORD%(N,0)
  439. 8920 NEXT N:NOUN2=WORD%(NUM,0):NOUN3=NOUN
  440. 8930 IF NOUN2=34 THEN GOSUB 1460
  441. 8940 IF NOUN2=28 THEN GOSUB 1480
  442. 8950 NOUN2=NOUN:NOUN=NOUN3:WORD%(NUM,0)=NOUN2
  443. 8960 RETURN
  444. 9000 'parser
  445. 9005 LINE INPUT "> ",A$:GOSUB 10000
  446. 9007 A1$=""
  447. 9010 N1=0:EXTRA=0:V=0
  448. 9015 IF LEN(A$)<3 AND A$<>"G" THEN VERB$=A$:NUM=1:WORD$(1)=A$:GOTO 9050
  449. 9020 V=INSTR(A$," THEN "):IF V THEN A1$=MID$(A$,V+6):GOTO 9030
  450. 9025 V=INSTR(A$,". "):IF V THEN A1$=MID$(A$,V+2)
  451. 9030 IF V THEN A$=LEFT$(A$,V-1):EXTRA=1
  452. 9032 IF A$="G" OR A$="AGAIN" THEN RETURN
  453. 9035 NUM=1:V=0:V1=1
  454. 9040 V=INSTR(V1,A$,CHR$(32)):IF V THEN WORD$(NUM)=MID$(A$,V1,V-V1):WORD$(NUM)=LEFT$(WORD$(NUM),6):V1=V+1::NUM=NUM+1:GOTO 9040
  455. 9042 WORD$(NUM)=MID$(A$,V1)
  456. 9045 VERB$=WORD$(1):IF V1=1 THEN VERB$=A$
  457. 9050 '
  458. 9090 RETURN
  459. 9100 '
  460. 9110 FOR I=1 TO TYPE:IF LEFT$(WORD$(N),6)=TYPE$(I) THEN WORD%(N,0)=TYPE%(I,0):WORD%(N,1)=TYPE%(I,1):GOTO 9140
  461. 9120 NEXT I
  462. 9140 RETURN
  463. 9200 K=0:FOR I=1 TO NV-1:IF LEFT$(VERB$,6)=VERBS$(I) THEN K=VERBS%(I):GOTO 9220
  464. 9210 NEXT I
  465. 9220 RETURN
  466. 9500 J=CSRLIN:LOCATE 1,1:COLOR 0,7:PRINT RM$(LC);:PRINT STRING$(50-LEN(RM$(LC)),32);
  467. 9510 PRINT"Moves:"MOVE"          ";:LOCATE 1,67:PRINT"Score:"SCORE:COLOR 7,0:LOCATE J,1
  468. 9520 IF RM%(LC,0)=0 THEN 9530
  469. 9525 RETURN
  470. 9530 PRINT"Your location is "RM$(LC)".":RM%(LC,0)=1:J=0
  471. 9540 FOR N=1 TO 10:IF RM%(LC,N)>0 THEN PRINT"An apparent exit is to the "OBJ$(N)".":J=J+1
  472. 9545 NEXT N
  473. 9550 N1=0:PRINT"Within this area you immediately notice the following:"
  474. 9560 FOR N=11 TO NQ:IF OBJ%(N)=LC THEN PRINT TAB(15) OBJ$(N):N1=N1+1:J=J+1
  475. 9565 IF J>19 THEN COLOR 0,7:PRINT" More...press Enter ";:COLOR 7,0:PRINT" ":J=0:INPUT"",J$:LOCATE CSRLIN-2,1:PRINT"                         ";:LOCATE CSRLIN,15
  476. 9570 NEXT N:IF N1=0 THEN PRINT"Nothing."
  477. 9580 RETURN
  478. 9900 '
  479. 9950 END
  480. 10000 FOR N=1 TO LEN(A$):A=ASC(MID$(A$,N,1))
  481. 10010 IF A>96 AND A<123 THEN MID$(A$,N,1)=CHR$(A-32)
  482. 10020 NEXT:RETURN
  483.