Advertisement
sphinxadventures

Sphinx 2.7 Amiga Hisoft Basic

Oct 24th, 2021
229
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 81.05 KB | None | 0 0
  1. Rem /// Sphinx Adventure '/ V1 (Tape for BBC & Electron) '/ V2 (Disc for BBC)
  2. Rem /// (c) 1982, 1984 Acornsoft & Paul Fellows
  3. Rem
  4. Rem /// Sphinx 2 | Converted by ihardcas to QB64 August 2021
  5. Rem /// Sphinx 2.1 | Added SAVE/LOAD logic - use xsave/xload until I can get filenames into the noun/verb mechanism
  6. Rem /// Sphinx 2.1a | Working and plays through - few cosmetic glitches to sort.
  7. Rem /// Sphinx 2.1b | Most old BBC reference code stripped out from comments
  8. Rem /// Sphinx 2.1c | Properly implemented file names in SAVE/LOAD. xsave and xload removed
  9. Rem /// Sphinx 2.1d | Moved Responses to subResponse
  10. Rem /// Sphinx 2.1e | Fixed post DIAXOS movement.
  11. Rem | Changed some labels/procs etc to something more meaningful
  12. Rem | Added turnincrementer logic
  13. Rem | Put the ObjLocs and ExitData to arrays and put in a sub.
  14. Rem | Removed the initialize sub. Brought code to start of main.
  15. Rem /// Sphinx 2.1f | appended .sav to files loaded and saved.
  16. Rem | Some more tidyup of labels etc
  17. Rem | Added dis/ena dwarf command to disable the fckng dwarf
  18. Rem | finagled some more variable names
  19. Rem /// Sphinx 2.1g | fixed bridge printing glitch.
  20. Rem | Fixed some Dwarf business
  21. Rem /// Sphinx 2.1h | Added decent wordwrappery sub
  22. Rem /// Sphinx 2.1i | Moved text output to new wordwrap routing
  23. Rem | Disabled old text output routines
  24. Rem | Fixed dwarf fight routine.
  25. Rem /// Sphinx 2.1j | Some variable tidyup
  26. Rem | fixed iffy pirate behavior.
  27. Rem /// Sphinx 2.2 | Release to other platforms -- still need to do a playthrough to make sure it all still works!!
  28. Rem | Removed all compound statements (:)
  29. Rem /// Sphinx 2.3 | Removed references to subResponse and statically entered responses
  30. Rem /// Sphinx 2.4 | Moved reading in of descriptions to own sub
  31. Rem /// Sphinx 2.5 | Moved reading in of objects to own sub
  32. Rem | Changed the exit printing a bit since it relied on over-reading the object data (cheeky!)
  33. Rem /// Sphinx 2.6 | Moved the verb reading bit out to own sub
  34. Rem | Changed the XOR safe opening logic.
  35. REM /// Sphinx 2.7 | Amiga HiSoft BASIC port
  36.  
  37. ' HB Specific screen setup
  38. Dim Shared colGreen
  39. Dim Shared colRed
  40. Dim Shared colCyan
  41. colGreen = 10
  42. colRed = 5
  43. colCyan = 6
  44.  
  45. 'Color colGreen
  46. 'SCREEN 1,640,512,4,5
  47. 'WINDOW 1, "Sphinx Adventure for Amiga",(0,0)-(600,400),128+64,1
  48.  
  49. ' HB Done
  50.  
  51. DECLARE FUNCTION funcTrimSpaces$(STRING)
  52. DECLARE FUNCTION funcLowerCase$(STRING)
  53.  
  54. DIM SHARED varObjectLocations(56)
  55. DIM SHARED varObjectDesc$(56)
  56. DIM SHARED varExitArray(6)
  57. DIM SHARED varExits(143 * 6)
  58. DIM SHARED varLocationDescription$(143)
  59. DIM SHARED varVerb$(44)
  60.  
  61. DIM SHARED varKilledFlag, varKneelingFlag, varFlamesFlag, varLampLitFlag, varScore, varBearFlag, varRabbitFlag
  62. DIM SHARED varLampFuel, varScreenWidth, varSafeOpenFlag, varDwarfChance, varDwarfFlag, varTurnIncrement, varGoblinEncounters
  63. DIM SHARED varCurrentLocation, varTurnCount, varChasmFlag, varCasketOpenFlag, varDwarfEncounters, varMAX
  64. DIM SHARED varWord1$, varWord2$, varWord1Index, varWord2Index, varGotWaterFlag, varDirections$, varVampireEncounters
  65. DIM SHARED varTurnLastSeenDwarf, varSuppressDwarf ' varTurnLastSeenDwarf is a counter that resets after meeting the Dwarf. Means we dont see him for 25 turns.
  66. DIM SHARED X, varCarryingCounter, K, varWavingAtSphinxFlag, M, cn, N, W, Q, varSpacePos, varBridgeFlag, MAP, O$, R$
  67.  
  68. 'Set up some variables
  69. varDirections$ = "nsewud"
  70. varKneelingFlag = 0
  71. varWavingAtSphinxFlag = 0
  72. varTurnLastSeenDwarf = 0
  73. varGotWaterFlag = 0
  74. varDwarfChance = 0.97
  75. varLampFuel = 150 ' put some fuel in t'lamp
  76. B2$ = " "
  77. K = 0
  78. varWord1Index = 0
  79. I = 0
  80. X = 0
  81. varTurnCount = 0
  82. varChasmFlag = 0
  83. varBridgeFlag = 0
  84. varKilledFlag = 0
  85. varCasketOpenFlag = 0
  86. varSuppressDwarf = 0
  87. varDwarfEncounters = 0
  88. varSafeOpenFlag = 0
  89. varFlamesFlag = 1
  90. varLampLitFlag = 0
  91. varScore = 0
  92. varCarryingCounter = -3 ' varCarryingCounter is the number of items currently being carried. Wonder why it starts at -3?
  93. varVampireEncounters = 0
  94. varGoblinEncounters = 0
  95. varBearFlag = 0
  96. varRabbitFlag = 0
  97. varScreenWidth = 80 ' Set varScreenWidth
  98. varTurnIncrement = 1 ' Set this flag if the Turn counter is to increment. Some subs will set it to zero so the varTurnCount doesnt increment (inv, save etc)
  99.  
  100. Call subReadExits
  101. Call subReadObjectLocations
  102. Call subReadLocationDescriptions
  103. Call subReadObjects
  104. Call subReadVerbs
  105.  
  106. varCurrentLocation = 6 'set starting location
  107.  
  108. Print
  109. Print " W E L C O M E T O "
  110. Print
  111. Print " .d8888b. 8888888b. 888 888 8888888 888b 888 Y88b d88P "
  112. Print "d88P Y88b 888 Y88b 888 888 888 8888b 888 Y88b d88P "
  113. Print "Y88b. 888 888 888 888 888 88888b 888 Y88o88P "
  114. Print " `Y888b. 888 d88P 8888888888 888 888Y88b 888 Y888P "
  115. Print " `Y88b. 8888888P' 888 888 888 888 Y88b888 d888b "
  116. Print " `888 888 888 888 888 888 Y88888 d88888b "
  117. Print "Y88b d88P 888 888 888 888 888 Y8888 d88P Y88b "
  118. Print " `Y8888P' 888 888 888 8888888 888 Y888 d88P Y88b "
  119. Print
  120. Print " A D V E N T U R E "
  121. Print
  122. Print
  123. Print " GOOD LUCK IN YOUR EXPLORATIONS HERE!! "
  124. Print
  125. Print " Try to find all the treasure and take it to the sphinx. "
  126. Print
  127. Print " Original (c) Acornsoft 1982. Dragged into 21st Century by Iain "
  128. Print
  129. Print
  130. Print "Press Enter to continue!"
  131. Input "", dummy$
  132. CLS
  133.  
  134. Call subPrintLocation(varCurrentLocation)
  135.  
  136. labMainLoop: ' Start of main loop
  137. A$ = " "
  138. X = 0
  139. varWord2$ = " "
  140. varWord1$ = " "
  141. varOutputString$ = ""
  142. M = 0
  143. K = 0
  144. If varTurnIncrement = 1 Then
  145. varTurnCount = varTurnCount + 1 ' Increment turn counter
  146. End If
  147.  
  148. 'If Light is lit then decrease fuel
  149. If varLampLitFlag = 1 And varTurnIncrement = 1 Then
  150. varLampFuel = varLampFuel - 1
  151. varWord1Index = 0
  152. varWord2Index = 0
  153. End If
  154.  
  155. 'Reset the Turn Incrementer thingy flag
  156. varTurnIncrement = 1
  157. ' varObjectLocations(31) is the frigging dwarf. This makes the dwarf appear 3% of the time if Turns - s >25. Resets varTurnLastSeenDwarf to turns.
  158. ' Dwarf might reappear after 25 turns
  159. ' I replaced RND(1)>0.97 with varDwarfChance. That way I can stop the damn thing killing me while debugging.
  160. ' Need a better variable name for varTurnLastSeenDwarf
  161.  
  162. If Rnd(1) > varDwarfChance And varDwarfFlag = 0 And (varTurnCount - varTurnLastSeenDwarf) > 25 Then
  163. varObjectLocations(31) = varCurrentLocation 'put the dwarf in this loc
  164. varDwarfFlag = 1
  165. varTurnLastSeenDwarf = varTurnCount
  166. End If
  167.  
  168. If varCurrentLocation <> varObjectLocations(31) Or varDwarfChance = 2 Then 'is the Dwarf NOT here or been disabled
  169. GoTo labNoDwarf
  170. Else
  171. ' Assume Dwarf IS here
  172. varDwarfEncounters = varDwarfEncounters + 1 'increment the dwarf encounter counter.
  173.  
  174. Call subPrintText("There is a dwarf here. He throws an axe at you.")
  175. If varObjectLocations(1) = 0 Then 'we have no axe in inventory
  176. varObjectLocations(1) = varCurrentLocation 'if no then leave axe here
  177. End If
  178.  
  179. If varDwarfEncounters > 6 Or Rnd(1) > 0.95 Then 'Have we seen the dwarf 6 times or do hit the unlucky 5%? =we die
  180. Call subPrintText("The axe hits you hard in the chest and you bleed to death.")
  181. Call subKill
  182. End If
  183.  
  184. If varObjectLocations(1) = varCurrentLocation Then 'do I have axe in inventory (location1)?
  185. Call subPrintText("The axe misses and lands on the ground next to you.")
  186. Else
  187. If varObjectLocations(1) <> varCurrentLocation Then
  188. Call subPrintText("The axe misses then vanishes into thin air.")
  189. End If
  190. END IF
  191. End If
  192.  
  193. 'Reset Dwarf Suppress flag (things like inv, debug etc set this
  194. varSuppressDwarf = 0
  195. labNoDwarf:
  196. ' Lets do the Goblins now.
  197. R$ = " "
  198. If varCurrentLocation = 48 And varCurrentLocation = varObjectLocations(33) Then ' Are we in location 48(Hall of the mountain king) and are there goblins here?
  199. varGoblinEncounters = varGoblinEncounters + 1 'Increment the goblin encounter counTer.
  200. If varGoblinEncounters >= 5 Then 'kill us if more than 5 encounters
  201. Call subPrintText("The goblins suddenly leap upon you and tear you limb from limb!")
  202. Call subKill
  203. R$ = ""
  204. End If
  205. End If
  206.  
  207. If varCurrentLocation = varObjectLocations(43) Then 'Test for presence of vampires
  208. varVampireEncounters = varVampireEncounters + 1 'increment vampire encounter counter
  209. If varVampireEncounters >= 2 Then 'if more than two encounters then....
  210. Call subPrintText("The vampire leaps on you and drains your blood.")
  211. Call subKill ' oh dear...
  212. End If
  213. End If
  214.  
  215. 'is our location>8 ("inside?"), do we not have a lamp, nor is there a lamp here then...
  216. If varCurrentLocation > 8 And varObjectLocations(3) <> 1 And varCurrentLocation <> varObjectLocations(3) Then
  217. Print
  218. Call subPrintText("IT'S VERY DARK.")
  219. Call subPrintText("IF YOU MOVE YOU MAY FALL INTO A PIT.")
  220. GoTo lab200
  221. End If
  222.  
  223. 'Is the lamp out of fuel? is it lit and do we have it?
  224. If varLampFuel <= 0 And varLampLitFlag = 1 And varObjectLocations(3) = 1 Then
  225. Print
  226. Call subPrintText("Your lamp has run out.")
  227. varLampLitFlag = 0
  228. Else
  229. If varLampFuel < 10 And varLampLitFlag = 1 And varObjectLocations(3) = 1 Then 'same tests but for dimming light.
  230. Print
  231. Call subPrintText("Your lamp is getting dim.")
  232. End If
  233. End If
  234.  
  235. If varLampLitFlag = 0 And varCurrentLocation > 8 Then
  236. Print
  237. Call subPrintText("It's very dark.")
  238. CALL subPrintText("If you move, you may fall into a pit.")
  239. End If
  240.  
  241. lab200: 'Get user input and parse it.
  242.  
  243. Print
  244. Input "Command "; A$
  245. Print
  246.  
  247. IF LEN(A$) = 0 THEN
  248. Call subPrintText("What?")
  249. GoTo lab200
  250. END IF
  251.  
  252. A$ = funcLowerCase$(A$)
  253.  
  254. If Left$(A$, 3) = "inv" Then
  255. varTurnIncrement = 0 'Tell the turnIncrementer not to increment
  256. Call subPrintLocation(1)
  257. GoTo labMainLoop
  258. End If
  259.  
  260. If A$ = "disdwarf" Then
  261. Call subPrintText("Dwarf disabled")
  262. varTurnIncrement = 0
  263. varDwarfChance = 2
  264. varDwarfFlag = 0
  265. varDwarfIncrement = 0
  266. varTurnLastSeenDwarf = 0
  267. varObjectLocations(31) = 0
  268. GOTO lab200
  269. End If
  270.  
  271. If A$ = "enadwarf" Then
  272. Call subPrintText("Dwarf enabled")
  273. varDwarfIncrement = 0
  274. varTurnIncrement = 0
  275. varDwarfChance = 0.97
  276. GoTo lab200
  277. End If
  278.  
  279. If A$ = "debug" Then
  280. varTurnIncrement = 0 'Tell the turnIncrementer not to increment
  281. Call subDebug
  282. GoTo labMainLoop
  283. End If
  284.  
  285. 'If single letter command then treat as a direction (NSEWUD)
  286. If Len(A$) = 1 Then
  287. Call subVerbMove(A$, varCurrentLocation)
  288. GoTo labMainLoop
  289. End If
  290.  
  291. 'Look for a space in the command. Then look for another space in the bit of
  292. 'string after the space. Tells us there's more than one word.
  293. varSpacePos = InStr(A$, " ")
  294.  
  295. IF INSTR(funcTrimSpaces$(RIGHT$(A$, LEN(A$) - varSpacePos)), " ") <> 0 THEN
  296. Call subPrintText("I'm sorry. I can't understand more than two words at a time")
  297. varTurnIncrement = 0
  298. GoTo labMainLoop
  299. End If
  300.  
  301. 'If no spaces then process as a single verb
  302. 'else there must be two words so split into varWord1$ and varWord2$ and pass as verb then noun.
  303. If varSpacePos = 0 Then
  304. Call subProcessVerb(A$)
  305. GoTo lab211
  306. ELSE
  307. varWord1$ = funcTrimSpaces$(LEFT$(A$, varSpacePos - 1))
  308. varWord2$ = funcTrimSpaces$(RIGHT$(A$, LEN(A$) - varSpacePos))
  309.  
  310. IF varWord1$ = "load" THEN 'this is a bit cheeky but since the interpreter doesnt take an arbitrary 2nd param, have to intercept & do this.
  311. varTurnIncrement = 0 'Tell the turnIncrementer not to increment
  312. Call subLoad(varWord2$)
  313. GoTo lab200
  314. End If
  315.  
  316. If varWord1$ = "save" Then
  317. varTurnIncrement = 0 'Tell the turnIncrementer not to increment
  318. CALL subSave(varWord2$)
  319. GOTO lab200
  320. END IF
  321.  
  322. CALL subProcessVerb(varWord1$) 'Get the index of the Verb entered
  323. CALL subProcessNoun(varWord2$) 'Get the index of the noun entered
  324. END IF
  325.  
  326. IF varWord1$ = "go" OR varWord1$ = "exit" OR varWord1$ = "leave" THEN
  327. GOTO lab244
  328. End If
  329.  
  330. If varWord1$ = "drink" Then
  331. CALL subVerbEat(varWord2Index, 2)
  332. GoTo labMainLoop
  333. End If
  334.  
  335. 'varWord1Index and varWord2Index are the indexes of the inputted verb and noun.
  336. 'If varWord1Index isnt indexed as a known word then print "I don't understand the word"
  337. If varWord1Index = -1 Then
  338. CALL subPrintText("I don't understand the word " + varWord1$)
  339. varTurnIncrement = 0
  340. If varWord2Index <> -1 Then
  341. GoTo labMainLoop
  342. End If
  343. End If
  344.  
  345. 'Do same for varWord2Index
  346. If varWord2Index = -1 Then
  347. CALL subPrintText("I don't understand the word " + varWord2$)
  348. varTurnIncrement = 0
  349. GoTo labMainLoop
  350. Else
  351. If varWord1Index > 14 Then 'not one of the first 14 words defined at labVerbs: so process otherwise
  352. GoTo lab211
  353. End If
  354. End If
  355.  
  356. ' Verbs:
  357. ' We can see that Get and Take jump to the same routine
  358. ' get, take, open, wave, throw, drop, kill, eat, cross, feed, rub, light, read, pay
  359. On varWord1Index GOTO lab213, lab213, lab214, lab215, lab216, lab217, lab218, lab220, lab221, lab224, lab225, lab226, lab227, lab228
  360.  
  361. lab211:
  362. If A$ = "exit" Then
  363. Call subVerbOut(varCurrentLocation) 'synonym with Out.
  364. GoTo labMainLoop
  365. Else
  366. If varWord1Index <> -1 Then
  367. K = varWord1Index - 14 'so now we've detected a verb that has no noun K=index of that verb - 14 (<14=two word verbs)
  368. Else
  369. Call subProcessNoun(A$)
  370. If varWord2Index = -1 Then
  371. Call subPrintText("I don't understand the word " + A$)
  372. GoTo labMainLoop
  373. Else
  374. Call subPrintText("What do you want to do to the " + A$)
  375. GoTo labMainLoop
  376. End If
  377. End If
  378. End If
  379.  
  380. lab212:
  381. On K GOTO lab237, lab229, lab230, lab230, lab231, lab232, lab235, lab236, lab229, lab238, lab240, lab243, lab243, lab243, lab243, lab243, lab243, lab219, lab244
  382. Call subPrintText("I can't apply that without a noun")
  383. GoTo labMainLoop
  384.  
  385. lab213: 'Get/Take
  386.  
  387. Call subVerbGetTake(varWord2Index, varCurrentLocation, 1)
  388. If X = 0 Then 'X seems to be set to 1 on an unsuccesful get
  389. varCarryingCounter = varCarryingCounter + 1 'varCarryingCounter=Carrying = there's a max of 15
  390. GoTo labMainLoop
  391. Else
  392. GoTo labMainLoop
  393. End If
  394.  
  395. lab214: 'Open
  396. Call subVerbOpen(varWord2Index)
  397.  
  398. GoTo labMainLoop
  399.  
  400. lab215: 'Wave
  401. Call subVerbWave(varWord2Index)
  402. GoTo labMainLoop
  403.  
  404. lab216: 'Throw
  405. Call subVerbThrow(varWord2Index)
  406. If X = 0 Then 'X seems to be set to 1 on an unsuccesful throw
  407. varCarryingCounter = varCarryingCounter - 1 'varCarryingCounter=Carrying - there's a max of 15
  408. GoTo labMainLoop
  409. Else
  410. GoTo labMainLoop
  411. End If
  412.  
  413. lab217: 'drop = takes you to Get routine
  414. Call subVerbGetTake(varWord2Index, 1, varCurrentLocation) 'Drop - calls 'get with INV a location
  415. If X = 0 Then
  416. varCarryingCounter = varCarryingCounter - 1 'varCarryingCounter=Carrying - there's a max of 15
  417. GoTo labMainLoop
  418. Else
  419. GoTo labMainLoop
  420. End If
  421.  
  422. lab218: 'Kill
  423. Call subVerbKill(varWord2Index)
  424. GoTo labMainLoop
  425.  
  426. lab219: 'Fill
  427. Call subVerbFill(varWord2Index)
  428. GoTo labMainLoop
  429.  
  430. lab220: 'Eat
  431. Call subVerbEat(varWord2Index, 1)
  432. GoTo labMainLoop
  433.  
  434. lab221: 'Cross
  435. Call subVerbCross(varWord2Index)
  436. GoTo labMainLoop
  437. If varWord2Index = 53 Then
  438. Call subVerbCross(varWord2Index)
  439. GoTo labMainLoop
  440. End If
  441.  
  442. If varWord2Index = 56 Then 'varWord2Index=building
  443. If varCurrentLocation <> 3 And varCurrentLocation < 9 Then 'Not Blacksmiths Forge and not outside
  444. varCurrentLocation = 3
  445. Call subPrintLocation(varCurrentLocation)
  446. GoTo labMainLoop
  447. Else
  448. If varCurrentLocation = 3 Then
  449. varCurrentLocation = 2
  450. Call subPrintLocation(varCurrentLocation)
  451. GoTo labMainLoop
  452. Else
  453. Call subPrintText("I can't apply that")
  454. GoTo labMainLoop
  455. End If
  456. End If
  457. End If
  458.  
  459. lab224:
  460. Call subVerbFeed(varWord2Index)
  461. GoTo labMainLoop
  462.  
  463. lab225:
  464. Call subVerbRub(varWord2Index)
  465. GoTo labMainLoop
  466.  
  467. lab226:
  468. Call subVerbLight(varWord2Index)
  469. GoTo labMainLoop
  470.  
  471. lab227:
  472. Call subVerbRead(varWord2Index)
  473. GoTo labMainLoop
  474.  
  475. lab228: 'pay
  476. Call subVerbPay(varWord2Index)
  477. GoTo labMainLoop
  478.  
  479. lab229:
  480. Call subVerbIn(varCurrentLocation)
  481. GoTo labMainLoop
  482.  
  483. lab230:
  484. Call subVerbOut(varCurrentLocation)
  485. GoTo labMainLoop
  486.  
  487. lab231:
  488. R$ = "#" 'This # was something different
  489. varKneelingFlag = 1
  490. Call subPrintText("You are kneeling down.")
  491. GoTo labMainLoop
  492.  
  493. lab232:
  494. Call subPrintText("You don't want to quit already do you?")
  495. varTurnIncrement = 0 'dont need to increment the turn counter
  496.  
  497. lab233:
  498. INPUT "Yes OR no ?", A$
  499. A$ = LEFT$(funcLowerCase$(A$), 1)
  500. If A$ = "n" Then
  501. GoTo labMainLoop
  502. End If
  503.  
  504. If A$ = "y" Then
  505. Call subPrintText("OK")
  506. Call subCalculateScore(varCurrentLocation)
  507. End
  508. Else
  509. GoTo lab233
  510. End If
  511.  
  512. lab235: 'score
  513. Call subCalculateScore(varCurrentLocation)
  514. GoTo labMainLoop
  515.  
  516. lab236: 'look
  517. Call subPrintLocation(varCurrentLocation)
  518. GoTo labMainLoop
  519.  
  520. lab237: 'inventory
  521. Call subPrintLocation(1)
  522. GoTo labMainLoop
  523.  
  524. lab238: 'help
  525. Call subPrintHelp
  526. GoTo labMainLoop
  527.  
  528. lab240: 'DIAXOS
  529.  
  530. 'not all BASICs seem to handle XORing so tidily so have done it manually.
  531. If varSafeOpenFlag = 0 Then
  532. varSafeOpenFlag = 1
  533. ElseIf varSafeOpenFlag = 1 Then
  534. varSafeOpenFlag = 0
  535. End If
  536.  
  537. 'varSafeOpenFlag = varSafeOpenFlag Xor 1 'varSafeOpenFlag is the safe door open flag. Every time we say diaxos, the safe door toggles
  538. Call subPrintText("There was a very loud creaking sound then!")
  539. If varCurrentLocation = 137 Then 'Wizards spell chamber
  540. varCurrentLocation = 138 'West Antechamber
  541. Else
  542. If varCurrentLocation = 141 Then 'Room similar to spell chamber
  543. varCurrentLocation = 11 ' Sorcerers Lair
  544. End If
  545. End If
  546. Call subPrintLocation(varCurrentLocation)
  547. GoTo labMainLoop
  548.  
  549. lab243:
  550. varWord1$ = Left$(varWord1$, 1)
  551. Call subVerbMove(varWord1$, varCurrentLocation)
  552. GoTo labMainLoop
  553.  
  554. lab244:
  555. varWord2$ = funcTrimSpaces$(varWord2$)
  556.  
  557. Call subProcessVerb(varWord2$)
  558.  
  559. If varWord1Index > 25 And varWord1Index < 32 Then 'varWord1Index is the verb index. 26=N s,e,w,u 31=D
  560. Call subVerbMove(Left$(varWord2$, 1), varCurrentLocation)
  561. GoTo labMainLoop
  562. Else
  563. If Len(varWord2$) = 1 Then
  564. Call subVerbMove(varWord2$, varCurrentLocation)
  565. GoTo labMainLoop
  566. Else
  567. If varWord1Index <> -1 Then
  568. K = varWord1Index - 14
  569. GoTo lab212
  570. End If
  571. End If
  572. End If
  573.  
  574. 'double check this logic if there's problems
  575. Call subProcessNoun(varWord2$)
  576.  
  577. If varWord2Index = -1 Then
  578. Call subPrintText("I can't apply that")
  579. GoTo labMainLoop
  580. End If
  581.  
  582. If varWord2Index = 53 Then 'bridge
  583. Call subVerbCross(varWord2Index)
  584. GoTo labMainLoop
  585. End If
  586.  
  587. If varWord2Index <> 56 Then 'building
  588. Call subPrintText("I can't apply that")
  589. GoTo labMainLoop
  590. Else
  591. If varCurrentLocation <> 3 And varCurrentLocation < 9 Then
  592. varCurrentLocation = 3
  593. Call subPrintLocation(varCurrentLocation)
  594. GoTo labMainLoop
  595. Else
  596. If varCurrentLocation = 3 Then
  597. varCurrentLocation = 2
  598. Call subPrintLocation(varCurrentLocation)
  599. GoTo labMainLoop
  600. End If
  601. End If
  602. End If
  603.  
  604. Call subPrintText("I can't apply that")
  605. GoTo labMainLoop
  606.  
  607. SUB subKill
  608. PRINT
  609. CALL subPrintText("Oh dear you seem to have been killed !")
  610. varKilledFlag = varKilledFlag - 100
  611. CALL subCalculateScore(varCurrentLocation)
  612. CALL subPrintText("You had " + STR$(varTurnCount) + " turns.")
  613. END
  614. End Sub
  615.  
  616.  
  617.  
  618. Sub subGetObjName (n) 'returns the nth object
  619. 'can get rid of this sub really.
  620. R$ = varObjectDesc$(n)
  621. End Sub
  622.  
  623.  
  624. Sub subProcessNoun (B2$)
  625. 'Process Nouns (B2$ is the second part of a two word command)
  626. 'we're going to get the index number of the noun
  627. i%=0
  628. WHILE B2$ <> R$ AND i% <= 57
  629. i% = i% + 1
  630. R$ = varObjectDesc$(i%)
  631. WEND
  632.  
  633. If i% >= 57 Then
  634. X = 1
  635. varWord2Index = -1
  636. Else
  637. varWord2Index = i% 'Set varWord2Index to the index of the word
  638. varWord2$ = R$ 'and R$ to the word itself
  639. End If
  640. End Sub
  641.  
  642. Sub subProcessVerb (b1$) 'Verb?
  643. 'Process Verbs (B1$ is the first part of a two word command)
  644. i% = 0
  645. Restore labVerbs
  646. While b1$ <> R$ And i% <= 38
  647. i% = i% + 1
  648. R$ = varVerb$(i%)
  649. Wend
  650.  
  651. If i% = 38 Then
  652. X = 1
  653. varWord1Index = -1
  654. Else
  655. varWord1Index = i%
  656. varWord1$ = R$
  657. End If
  658. End Sub
  659.  
  660. Sub subPrintLocation (varCurrentLocation) 'prints out location, exits, objects plus other bits
  661. Dim varOutputString$
  662. varCounter = 0
  663. cn = 0
  664. varOutputString$ = ""
  665. IF varCurrentLocation = 1 THEN GOTO lab278 'called for INV so jump to INV processing
  666. R$ = varLocationDescription$(varCurrentLocation)
  667.  
  668. 'Some Dwarf shenanigans
  669. If varObjectLocations(31) <> 0 Then
  670. varObjectLocations(31) = 0
  671. varDwarfFlag = 1 'weve bumped into the dwarf so set his flag on.
  672. End If
  673.  
  674. Call subPrintText("You are " + R$)
  675.  
  676. If varCurrentLocation = 136 Or varCurrentLocation = 15 Then varObjectLocations(56) = varCurrentLocation
  677.  
  678. If varCurrentLocation = 16 And varFlamesFlag = 1 Then
  679. Call subPrintText("The walls are very hot!")
  680. Else
  681. If varCurrentLocation = 16 Then
  682. Call subPrintText("The walls are steaming!")
  683. End If
  684. End If
  685.  
  686. 'If loc isnt Forge, serpents stomach or bottom of rock slide then call subPrintExits with varCurrentLocation. These locs dont have exits?
  687. If varCurrentLocation <> 3 And varCurrentLocation <> 142 And varCurrentLocation <> 143 Then
  688. Call subPrintExits(varCurrentLocation)
  689. If Abs(varCurrentLocation - 19) = 1 And varChasmFlag = 1 Then
  690. Print
  691. Else
  692. If Abs(varCurrentLocation - 42) = 1 And varBridgeFlag = 1 Then
  693. Print
  694. End If
  695. End If
  696. End If
  697.  
  698. If varChasmFlag = 1 And Abs(varCurrentLocation - 19) = 1 Then
  699. Call subPrintText("A bridge now spans the chasm.")
  700. varObjectLocations(53) = varCurrentLocation 'A bridge now spans the
  701. End If
  702.  
  703. If varBridgeFlag = 1 And Abs(varCurrentLocation - 42) = 1 Then
  704. Call subPrintText("A bridge now spans the glacier.")
  705. varObjectLocations(53) = varCurrentLocation
  706. End If
  707.  
  708. If varCurrentLocation = 26 Or varCurrentLocation = 27 Then
  709. varObjectLocations(53) = varCurrentLocation
  710. End If
  711.  
  712. lab278: 'display the objects, either INV if varCurrentLocation=1 or just what's here
  713. j = 0
  714. I = 0
  715. varCounter = 0
  716. While j < 52 'objects under #52 only.
  717. j = j + 1
  718. If varObjectLocations(j) = varCurrentLocation Then
  719. varCounter = varCounter + 1 'count the number of things at this location.
  720. End If
  721. Wend
  722.  
  723. If varCounter = 0 And varCurrentLocation = 1 Then 'if count=0 and location=1 then print 'not carrying anything'
  724. Call subPrintText("You are not carrying anything.")
  725. GoTo lab284
  726. Else
  727. If varCounter = 0 And varCurrentLocation <> 1 Then
  728. GoTo lab284 'there's nothing here
  729. Else
  730. Print
  731. varMAX = varCounter
  732. End If
  733. End If
  734.  
  735. If varCurrentLocation = 1 Then 'is location =1 (inv)
  736. varOutputString$ = "You're currently holding "
  737. Else
  738. varOutputString$ = "There is "
  739. End If
  740.  
  741. I = 0
  742. cn = 0
  743. varCounter = varMAX
  744.  
  745. While I < 52 'Loop through all the objects, poss replace with a for/next. After obj 52 we dont want to display
  746. I = I + 1
  747. If varObjectLocations(I) = varCurrentLocation Then 'run through the list of objects. check if something is here.
  748. Call subObjectText(I, varCounter, varCurrentLocation) 'If there is then..... call OT with the Ith object (in the object list) and the number of objects at this location, had to add varCurrentLocation - poss QB bug?
  749. varOutputString$ = varOutputString$ + R$
  750. varCounter = varCounter - 1 'reduce the count and repeat
  751. End If
  752. Wend
  753.  
  754. Call subPrintText(varOutputString$)
  755.  
  756. lab284:
  757. If varDwarfEncounters <> 0 And varDwarfFlag = 1 Then
  758. varObjectLocations(31) = varCurrentLocation
  759. End If
  760.  
  761. If varCasketOpenFlag = 1 And varCurrentLocation = 94 Then
  762. Call subPrintText("The casket is open.")
  763. End If
  764.  
  765. If varCurrentLocation = 24 And varSafeOpenFlag = 1 Then
  766. Call subPrintText("The safe door is open.")
  767. End If
  768.  
  769. Print
  770. End Sub
  771.  
  772. Sub subPrintExits (varCurrentLocation)
  773. 'This routine just prints out "there are exits to the North... etc"
  774. I = varCurrentLocation * 6 - 6
  775.  
  776. For J = 1 To 6
  777. MAP = varExits(I + J)
  778. If MAP > 0 Then
  779. varCounter = varCounter + 1 'increment exit counter
  780. varExitArray(J) = 1
  781. Else
  782. varExitArray(J) = 0
  783. End If
  784. Next J
  785.  
  786. If varCounter > 1 Then
  787. O$ = "There are exits to the "
  788. Else
  789. If varCounter = 1 Then
  790. O$ = "There is an exit "
  791. End If
  792. End If
  793. For J = 1 To 6
  794. ' changed this a bit from original code because of data mappings
  795. IF J = 1 THEN R$ = "north"
  796. IF J = 2 THEN R$ = "south"
  797. IF J = 3 THEN R$ = "east"
  798. IF J = 4 THEN R$ = "west"
  799. IF J = 5 THEN R$ = "up"
  800. IF J = 6 THEN R$ = "down"
  801. IF varCounter = 0 OR varExitArray(J) = 0 THEN GOTO lab296
  802. IF varCounter > 2 THEN O$ = O$ + R$ + ", "
  803. IF varCounter = 2 THEN O$ = O$ + R$ + " and "
  804. IF varCounter = 1 THEN O$ = O$ + R$ + "."
  805. varCounter = varCounter - 1
  806. lab296:
  807. NEXT J
  808. CALL subPrintText(O$)
  809. End Sub
  810.  
  811. Sub subVerbOpen (varWord2Index) 'Open
  812. If varObjectLocations(varWord2Index) <> varCurrentLocation And varObjectLocations(varWord2Index) <> 1 And varWord2Index <> 28 Then
  813. Call subPrintText("I see no " + varWord2$ + " here.")
  814. GoTo lab306
  815. End If
  816.  
  817. If varWord2Index = 40 And varCurrentLocation = 94 And varCasketOpenFlag = 0 Then
  818. varObjectLocations(43) = 94
  819. varCasketOpenFlag = 1
  820. Call subPrintLocation(varCurrentLocation)
  821. GoTo lab306
  822. End If
  823.  
  824. If varWord2Index = 39 Then
  825. Call subPrintText("You cant do that at the moment.")
  826. End If
  827.  
  828. If varWord2Index = 8 And varObjectLocations(5) = 1 Then
  829. Call subPrintText("The chest opens easily with the keys revealing many rubies.")
  830. varObjectLocations(16) = varCurrentLocation
  831. Else
  832. If varWord2Index = 8 Then
  833. Call subPrintText("You can't with no keys!")
  834. End If
  835. End If
  836.  
  837. If varWord2Index = 10 And varObjectLocations(7) = 1 Then
  838. Call subPrintText("You open up the clam with the jack and many pearls roll out.")
  839. varObjectLocations(18) = varCurrentLocation
  840. Else
  841. If varWord2Index = 10 Then
  842. Call subPrintText("You can't do that at the moment")
  843. End If
  844. End If
  845.  
  846. If varWord2Index = 8 Or varWord2Index = 10 Or varWord2Index = 39 Then GoTo lab306
  847. Call subPrintText("I can't apply that")
  848. lab306:
  849. End Sub
  850.  
  851. Sub subVerbMove (A$, N)
  852. 'subVerbMove deals with single letter commands so N,S,E,W,U,D
  853. 'N=starting location?
  854. 'A$=the command (N,S... etc)
  855. M = InStr(varDirections$, A$) ' M is the offset of the given command in the string varDirections$
  856. X = 0 'Exit flag
  857.  
  858. If M = 0 Then
  859. Call subPrintText("I don't understand the word " + A$)
  860. GoTo lab318
  861. End If
  862.  
  863. Call subTrialMove(N, M) 'Call subTrialMove with current loc and offset of command
  864. ' RESTORE labExitData
  865.  
  866. If X = 1 Then GoTo lab314
  867.  
  868. If varLampLitFlag = 0 Then
  869. If N > 8 Then
  870. If Rnd(1) > 0.5 Then
  871. Call subPrintText("You fell in a pit")
  872. Call subKill
  873. End If
  874. End If
  875. End If
  876.  
  877. MAP = varExits(N * 6 - 6 + M)
  878.  
  879. If MAP = 0 Then
  880. Call subPrintText("There is no way to go that direction!")
  881. Else
  882. varCurrentLocation = MAP
  883. End If
  884.  
  885. lab314:
  886. If varCurrentLocation = 4 Then 'inside the forest 25% chance of putting you at the end of the road (L2)
  887. If Rnd(1) > 0.75 Then
  888. varCurrentLocation = 2
  889. End If
  890. End If
  891.  
  892. If varBearFlag = 1 Then varObjectLocations(35) = varCurrentLocation 'Make the Bear follow us if bear=1
  893.  
  894. If varRabbitFlag = 1 Then varObjectLocations(38) = varCurrentLocation 'Make the rabbit follow us if rabbit=1
  895.  
  896. Call subPrintLocation(varCurrentLocation)
  897.  
  898. If varCurrentLocation = 33 And Rnd(1) > 0.5 Then
  899. Call subPrintText("A hollow voice whispers DIAXOS.")
  900. End If
  901.  
  902.  
  903. lab318:
  904. End Sub
  905.  
  906. Sub subVerbGetTake (varWord2Index, N, K)
  907. 'Call subVerbGetTake(varWord2Index, 1, varCurrentLocation) - sample call
  908. 'jack, food, mouse,bridge,swamp,lake,building
  909. If Not (varWord2Index = 8 Or varWord2Index = 10 Or Abs(varWord2Index - 37) <= 7 Or varWord2Index >= 53) Then
  910. GoTo lab321
  911. Else
  912. X = 1
  913. If varObjectLocations(varWord2Index) <> N Then
  914. 'Seems to deal with taking something that isnt there. There was some funky code here that I could get the jist of so just removed
  915. 'Call subResponse(8 - Sgn(N - 1)) '??
  916. Call subPrintText("I see no " + varWord2$ + " here")
  917. GoTo lab332
  918. Else
  919. Call subPrintText("You're joking!")
  920. GoTo lab332
  921. End If
  922. End If
  923.  
  924. lab321:
  925. R$ = "'"
  926. If K = 1 And varWord2Index = 28 And varObjectLocations(27) <> 1 And varCurrentLocation = 15 Then
  927. Call subPrintText("You have nothing to put it in, so it runs away through your fingers.")
  928. GoTo lab332
  929. End If
  930.  
  931. If varWord2Index = 28 And varGotWaterFlag = 1 Then
  932. varObjectLocations(28) = 1
  933. Else
  934. If varWord2Index = 28 Then
  935. varObjectLocations(28) = 15
  936. Else
  937. If varWord2Index = 52 And K = 1 Then
  938. Call subPrintText("The mouse runs around refusing to be caught.")
  939. GoTo lab332
  940. End If
  941. End If
  942. End If
  943.  
  944. R$ = " "
  945.  
  946. If varWord2Index = 52 And N = 1 And K = 111 And varObjectLocations(42) = 111 Then
  947. varObjectLocations(42) = 0
  948. varWord1$ = "drop"
  949. varWord2$ = "mouse." + Chr$(10) + Chr$(13) + "The elephant sees it and runs away"
  950. End If
  951.  
  952. R$ = ""
  953.  
  954. If varCarryingCounter = 15 And K = 1 Then
  955. Call subPrintText("You can't carry anything more, you'll have to drop something first.")
  956. X = 1
  957. GoTo lab332
  958. End If
  959.  
  960. If K = 1 And varObjectLocations(27) = 1 And varObjectLocations(28) = 1 And varWord2Index = 28 Then
  961. Call subPrintText("Your bottle is already full.")
  962. X = 1
  963. GoTo lab330
  964. End If
  965.  
  966. If N = 1 And varWord2Index = 27 And varGotWaterFlag = 1 Then
  967. varGotWaterFlag = 0
  968. Call subPrintText("You drop the bottle and all the water leaks away!")
  969. varCarryingCounter = varCarryingCounter - 1
  970. varWord1$ = "will have to get some more from"
  971. varWord2$ = "lake"
  972. End If
  973.  
  974. If varWord2Index = 28 And K = 1 And varObjectLocations(28) = N Then
  975. varWord1$ = "fill"
  976. varWord2$ = "bottle with the water"
  977. End If
  978.  
  979. If varObjectLocations(varWord2Index) = N Then
  980. varObjectLocations(varWord2Index) = K
  981. Call subPrintText("You " + varWord1$ + " the " + varWord2$ + ".")
  982. Else
  983. If K = 1 Then
  984. Call subPrintText("I see no " + varWord2$ + " here.")
  985. X = 1
  986. Else
  987. Call subPrintText("You're not carrying the " + varWord2$ + " here.")
  988. X = 1
  989. End If
  990. End If
  991.  
  992. lab330:
  993. If varObjectLocations(28) = 1 And varWord2Index = 28 Then
  994. varObjectLocations(28) = 15
  995. varGotWaterFlag = 1
  996. Else
  997. If varWord2Index = 28 Then
  998. varObjectLocations(28) = 15
  999. varGotWaterFlag = 0
  1000. End If
  1001. End If
  1002.  
  1003. If varCurrentLocation = 117 And N = 1 And varWord2Index <> 9 Then
  1004. varObjectLocations(varWord2Index) = 0
  1005. Call subPrintText("Oh dear the " + varWord2$ + " sank into the swamp.")
  1006. End If
  1007. lab332:
  1008. End Sub
  1009.  
  1010. Sub subTrialMove (varCurrentLocation, n) 'seems to be like a trial move...
  1011. 'X is set high if a move cant be made for whatever reason.
  1012. If varCurrentLocation = varObjectLocations(36) Then
  1013. I = 11
  1014. Do
  1015. I = I + 1
  1016. Loop Until varObjectLocations(I) = 1 Or I = 30 'Having a quick look through the inv for something the pirate wants
  1017.  
  1018. If I < 30 Then
  1019. varObjectLocations(I) = 51
  1020. Call subGetObjName(I)
  1021. Call subPrintText("The pirate snatches your " + R$)
  1022. c% = c% - 1
  1023. If I = 27 And varGotWaterFlag = 1 Then
  1024. varGotWaterFlag = 0
  1025. End If
  1026. End If
  1027. End If
  1028.  
  1029. If varCurrentLocation = varObjectLocations(35) Then
  1030. varBearFlag = 1
  1031. Call subPrintText("There is a brown bear following you.")
  1032. End If
  1033.  
  1034. If varCurrentLocation = varObjectLocations(38) Then
  1035. varRabbitFlag = 1
  1036. Call subPrintText("The giant rabbit is still with you!")
  1037. End If
  1038.  
  1039. If varCurrentLocation = 16 And varFlamesFlag = 1 And n = 3 Then
  1040. X = 1
  1041. Call subPrintText("The flame's heat drives you back.")
  1042. End If
  1043.  
  1044. If varCurrentLocation = 117 And n = 3 And varObjectLocations(41) = 117 Then
  1045. Call subPrintText("The crocodile snaps its jaws neatly biting your leg off. You bleed to death!")
  1046. Call subKill
  1047. End If
  1048.  
  1049. If varCurrentLocation = 94 And n <> 6 And varCasketOpenFlag = 0 Then
  1050. varObjectLocations(43) = 94
  1051. varCasketOpenFlag = 1
  1052. GoTo lab349
  1053. End If
  1054.  
  1055. If varCurrentLocation = 111 And n = 1 And varCurrentLocation = varObjectLocations(42) Then
  1056. Call subPrintText("The elephant is blocking the way.")
  1057. X = 1
  1058. GoTo lab349
  1059. End If
  1060.  
  1061. If varCurrentLocation = 48 And varCurrentLocation = varObjectLocations(33) And n = 4 Then
  1062. X = 1
  1063. Call subPrintText("The goblins crowd around and stop you.")
  1064. End If
  1065.  
  1066. If varCurrentLocation = 30 And n = 1 And varCurrentLocation = varObjectLocations(32) Then
  1067. X = 1
  1068. Call subPrintText("The ogre is blocking the way.")
  1069. End If
  1070.  
  1071. If varCurrentLocation = 36 And n = 6 And varCurrentLocation = varObjectLocations(30) Then
  1072. X = 1
  1073. Call subPrintText("The dragon is blocking the way.")
  1074. End If
  1075.  
  1076. If varCurrentLocation = 32 And varCurrentLocation = varObjectLocations(37) And varCurrentLocation = varObjectLocations(35) Then
  1077. Call subPrintText("The bear growls and chases the orc away.")
  1078. varObjectLocations(35) = 0 'make poor friendly bear gone
  1079. varObjectLocations(37) = 0 'make Orc gone
  1080. varBearFlag = 0 ' Bear flag = off
  1081. End If
  1082.  
  1083. If varCurrentLocation = 32 And varCurrentLocation = varObjectLocations(37) And n = 1 Then
  1084. X = 1
  1085. Call subPrintText("The orc won't let you get by.")
  1086. End If
  1087.  
  1088. If (varCurrentLocation = 24 And n = 5) Or (varCurrentLocation = 51 And n = 6) Then
  1089. If varSafeOpenFlag = 0 Then
  1090. X = 1
  1091. Call subPrintText("You can't! The safe door is shut.")
  1092. Print
  1093. End If
  1094. End If
  1095.  
  1096. If varCurrentLocation = 51 And n = 6 Then
  1097. If varSafeOpenFlag = 0 Then
  1098. X = 1
  1099. Call subPrintText("You can't! The safe door is shut.")
  1100. PRINT
  1101. End If
  1102. End If
  1103.  
  1104. If varCurrentLocation = 28 And n = 6 Then
  1105. Call subPrintText("ARRRGH! CRASH!! The rocks gave way and you rolled to the bottom of the rock slide.")
  1106. Print
  1107. END IF
  1108.  
  1109. lab349:
  1110.  
  1111. End Sub
  1112.  
  1113.  
  1114.  
  1115. Sub subVerbKill (w) 'Kill
  1116. If varObjectLocations(w) <> varCurrentLocation Then
  1117. Call subPrintText("I see no " + varWord2$ + " here.")
  1118. GoTo lab354
  1119. Else
  1120. If w < 30 Or w = 39 Or w = 40 Or Abs(w - 48) < 4 Or w > 52 Then
  1121. Call subPrintText("You're joking!")
  1122. GoTo lab354
  1123. End If
  1124. END IF
  1125. lab351:
  1126. Input "What with? Your bare hands ? ", b$
  1127. b$ = funcLowerCase$(b$)
  1128. If b$ <> "no" Then
  1129. GoTo lab353
  1130. Else
  1131. Input "What with then ? ", varWord2$
  1132. CALL subProcessNoun(funcLowerCase$(varWord2$))
  1133. If X = 1 Then
  1134. GoTo lab354
  1135. Else
  1136. varWord1$ = "throw"
  1137. Call subVerbThrow(varWord2Index)
  1138. If X = 1 Then
  1139. GoTo lab354
  1140. Else
  1141. varCarryingCounter = varCarryingCounter - 1
  1142. GoTo lab354
  1143. End If
  1144. End If
  1145. End If
  1146.  
  1147. lab353:
  1148. If b$ <> "yes" Then
  1149. Call subPrintText("yes or no")
  1150. GoTo lab351
  1151. Else
  1152. If w = 30 Then
  1153. Call subPrintText("Well done! You vanquished a dragon with your bare hands!")
  1154. varObjectLocations(30) = 0
  1155. varObjectLocations(6) = varCurrentLocation
  1156. Else
  1157. Call subPrintText("Your blows are useless.")
  1158. End If
  1159. End If
  1160.  
  1161. lab354:
  1162. End Sub
  1163.  
  1164. Sub subVerbWave (varWord2Index) 'Wave
  1165. If varObjectLocations(varWord2Index) <> 1 And varWord2Index <> 28 Then
  1166. Call subPrintText("You're not carrying the " + varWord2$ + ".")
  1167. GoTo lab362
  1168. Else
  1169. If varWord2Index = 28 Then
  1170. Call subPrintText("I can't apply that")
  1171. GoTo lab362
  1172. End If
  1173. End If
  1174.  
  1175. If varWord2Index <> 4 Then
  1176. Call subPrintText("OK")
  1177. GoTo lab362
  1178. End If
  1179.  
  1180.  
  1181. If varCurrentLocation = 18 And varChasmFlag = 0 Then
  1182. Call subPrintText("A bridge now spans the chasm.")
  1183. varChasmFlag = 1
  1184. varObjectLocations(53) = varCurrentLocation
  1185. GoTo lab362
  1186. Else
  1187. If varCurrentLocation = 135 And varObjectLocations(26) = 0 Then
  1188. Call subPrintText("The fairy king appears, hands you a mithril ring, bows and slips away.")
  1189. varObjectLocations(26) = 1
  1190. GoTo lab362
  1191. End If
  1192. End If
  1193.  
  1194. If varCurrentLocation = 41 And varBridgeFlag = 0 Then
  1195. Call subPrintText("A bridge now spans the glacier.")
  1196. varBridgeFlag = 1
  1197. varObjectLocations(53) = varCurrentLocation
  1198. GoTo lab362
  1199. End If
  1200.  
  1201. If varCurrentLocation = 50 And varKneelingFlag = 1 Then
  1202. varWavingAtSphinxFlag = 1 'sets flag of waving at sphinx
  1203. Call subFinish
  1204. End If
  1205.  
  1206. Call subPrintText("Nothing happens")
  1207. lab362:
  1208. End Sub
  1209.  
  1210. Sub subVerbEat (varWord2Index, n) 'Eat
  1211. If varWord2Index = 28 And n = 2 And (varGotWaterFlag = 1 Or varCurrentLocation = 15) Then
  1212. Call subPrintText("Thanks! It was delicious")
  1213. varGotWaterFlag = 0
  1214. GoTo lab369
  1215. End If
  1216.  
  1217. If varWord2Index = 28 Then
  1218. Call subPrintText("I can't apply that")
  1219. GoTo lab369
  1220. End If
  1221.  
  1222. If varObjectLocations(varWord2Index) <> 1 Then
  1223. Call subPrintText("You're not carrying the " + varWord2$ + " here.")
  1224. GoTo lab369
  1225. End If
  1226.  
  1227. If n = 1 Then
  1228. If varWord2Index = 9 Or varWord2Index = 29 Or varWord2Index = 50 Then
  1229. Call subPrintText("Thanks! It was delicuious")
  1230. varObjectLocations(varWord2Index) = 0
  1231. GoTo lab369
  1232. End If
  1233. End If
  1234.  
  1235. Call subPrintText("You're joking!")
  1236. lab369:
  1237. End Sub
  1238.  
  1239. Sub subVerbCross (varWord2Index) 'Cross
  1240. If varObjectLocations(varWord2Index) <> 1 And varObjectLocations(varWord2Index) <> varCurrentLocation And varWord2Index <> 28 Then
  1241. Call subPrintText("I see no " + varWord2$ + " here.")
  1242. GoTo lab378
  1243. Else
  1244. If varWord2Index = 28 Then
  1245. Call subPrintText("I can't apply that")
  1246. GoTo lab378
  1247. End If
  1248. End If
  1249.  
  1250. If varCurrentLocation <> 18 Then
  1251. GoTo lab372
  1252. Else
  1253. If varChasmFlag = 1 Then
  1254. varCurrentLocation = 20
  1255. Call subPrintLocation(varCurrentLocation)
  1256. GoTo lab378
  1257. Else
  1258. Call subPrintText("You can't! It's too wide to jump.")
  1259. GoTo lab378
  1260. End If
  1261. End If
  1262.  
  1263. lab372:
  1264. If varCurrentLocation <> 20 Then
  1265. GoTo lab373
  1266. Else
  1267. If varChasmFlag = 1 Then
  1268. varCurrentLocation = 18
  1269. Call subPrintLocation(varCurrentLocation)
  1270. GoTo lab378
  1271. Else
  1272. Call subPrintText("You can't! It's too wide to jump.")
  1273. GoTo lab378
  1274. End If
  1275. End If
  1276.  
  1277. lab373:
  1278. If Abs(varCurrentLocation - 42) <> 1 Then
  1279. GoTo lab374
  1280. Else
  1281. If varBridgeFlag = 0 Then
  1282. Call subPrintText("You can't! It's too wide to jump.")
  1283. GoTo lab378
  1284. Else
  1285. If varObjectLocations(26) = 1 Then
  1286. varCurrentLocation = varCurrentLocation - 2 * Sgn(varCurrentLocation - 42)
  1287. Call subPrintLocation(varCurrentLocation)
  1288. GoTo lab378
  1289. Else
  1290. Call subPrintText("AAARGHH The bridge collapsed!")
  1291. Call subKill
  1292. End If
  1293. End If
  1294. End If
  1295.  
  1296. lab374:
  1297. If Abs(varCurrentLocation - 26.5) < 1 And varObjectLocations(34) = 26 Then 'Test the ABS thing and presence of troll.
  1298. Call subPrintText("The troll wont let you get by.")
  1299. GoTo lab378
  1300. End If
  1301.  
  1302. If varCurrentLocation <> 27 And varCurrentLocation <> 26 Then 'are we next to troll bridge or at troll bridge
  1303. GoTo lab376
  1304. Else
  1305. If varRabbitFlag = 1 Or varBearFlag = 1 Then 'If the rabbit or bear is with us then....
  1306. Call subPrintText("AAARGHH The bridge collapsed!")
  1307. Call subKill
  1308. Else
  1309. varCurrentLocation = 27 + (varCurrentLocation = 27) 'everything is good so move us to 27 if we're not at 27 already
  1310. Call subPrintLocation(varCurrentLocation)
  1311. GoTo lab378
  1312. End If
  1313. End If
  1314.  
  1315. lab376:
  1316. If varCurrentLocation = 15 And varWord2Index = 55 And varObjectLocations(48) = 1 Then
  1317. varCurrentLocation = 142
  1318. Call subPrintText("You set off in the boat. Suddenly a sea-serpent leaps from beneath the waves and swallows you!")
  1319. Call subPrintLocation(varCurrentLocation)
  1320. varObjectLocations(48) = 0
  1321. GoTo lab378
  1322. Else
  1323. If varCurrentLocation = 15 And varWord2Index = 55 Then
  1324. Call subPrintText("It's too wide to swim.")
  1325. GoTo lab378
  1326. End If
  1327. End If
  1328.  
  1329. Call subPrintText("I can't apply that")
  1330. lab378:
  1331. End Sub
  1332.  
  1333. Sub subVerbThrow (varWord2Index) ' throw?
  1334. Call subVerbGetTake(varWord2Index, 1, varCurrentLocation)
  1335. If X = 1 Then GoTo lab407
  1336. R$ = " "
  1337. If varWord2Index > 1 Then GoTo lab393
  1338.  
  1339. If varCurrentLocation = varObjectLocations(31) And Rnd(1) < 0.6 Then
  1340. varObjectLocations(31) = 0 'Dwarf is dead, remove him.
  1341. varDwarfEncounters = 0
  1342. varDwarfFlag = 0
  1343. Call subPrintText("You killed a little dwarf!")
  1344. GoTo lab407
  1345. Else
  1346. If varCurrentLocation = varObjectLocations(31) Then
  1347. Call subPrintText("The dwarf dodges neatly aside.")
  1348. GoTo lab407
  1349. End If
  1350. End If
  1351.  
  1352. If varCurrentLocation = varObjectLocations(32) Then
  1353. Call subPrintText("The ogre catches the axe and slices you in two with it.")
  1354. Call subKill
  1355. End If
  1356.  
  1357. If varCurrentLocation = varObjectLocations(30) Then
  1358. Call subPrintText("The axe bounces harmlessly off the dragon.")
  1359. GoTo lab407
  1360. End If
  1361.  
  1362. If varCurrentLocation = varObjectLocations(33) Then
  1363. Call subPrintText("That made the goblins real mad!")
  1364. GoTo lab407
  1365. End If
  1366.  
  1367. If varCurrentLocation = varObjectLocations(34) Then
  1368. Call subPrintText("The troll ducks, picks up the fallen axe and kills you with a single blow.")
  1369. Call subKill
  1370. End If
  1371.  
  1372. If varCurrentLocation = varObjectLocations(35) Then
  1373. Call subPrintText("The bear is confused. He only wants to be your friend!")
  1374. GoTo lab407
  1375. End If
  1376.  
  1377. If varCurrentLocation = varObjectLocations(36) Then
  1378. Call subPrintText("The pirate dodges smartly away into the tunnels!")
  1379. varObjectLocations(36) = 20 + Int(Rnd(10))
  1380. GoTo lab407
  1381. End If
  1382.  
  1383. If varCurrentLocation = varObjectLocations(37) Then
  1384. Call subPrintText("The orc dodges and then growls ominously at you!")
  1385. GoTo lab407
  1386. End If
  1387.  
  1388. If varCurrentLocation = varObjectLocations(38) Then
  1389. Call subPrintText("The rabbit hops aside and says NEEERH WHATS UP DOC ?")
  1390. End If
  1391.  
  1392. GoTo lab407
  1393.  
  1394. lab393:
  1395. If varWord2Index > 2 Then
  1396. GoTo lab403
  1397. End If
  1398.  
  1399. If varCurrentLocation = varObjectLocations(31) Then
  1400. Call subPrintText("You killed a little dwarf!")
  1401. varDwarfEncounters = 0
  1402. varObjectLocations(31) = 0
  1403. GoTo lab407
  1404. End If
  1405.  
  1406. If varCurrentLocation = varObjectLocations(32) Then
  1407. Call subPrintText("The sword kills the ogre but then melts away.")
  1408. varObjectLocations(32) = 0
  1409. varObjectLocations(2) = 0
  1410. GoTo lab407
  1411. End If
  1412.  
  1413. If varCurrentLocation = varObjectLocations(30) Then
  1414. Call subPrintText("The sword kills the dragon. Then both sword and dragon fade away until only the dragons teeth remain.")
  1415. varObjectLocations(30) = 0
  1416. varObjectLocations(2) = 0
  1417. varObjectLocations(6) = varCurrentLocation
  1418. GoTo lab407
  1419. End If
  1420.  
  1421. If varCurrentLocation = varObjectLocations(33) Then
  1422. Call subPrintText("That made the goblins real mad!")
  1423. GoTo lab407
  1424. End If
  1425.  
  1426. If varCurrentLocation = varObjectLocations(34) Then
  1427. Call subPrintText("The troll catches the sword and kills you with a single stroke.")
  1428. Call subKill
  1429. End If
  1430.  
  1431. If varCurrentLocation = varObjectLocations(35) Then
  1432. Call subPrintText("The bear is confused. He only wants to be your friend!")
  1433. GoTo lab407
  1434. End If
  1435.  
  1436. If varCurrentLocation = varObjectLocations(36) Then
  1437. Call subPrintText("The pirate dodges smartly away into the tunnels!")
  1438. varObjectLocations(36) = 20 + Int(Rnd(10))
  1439. GoTo lab407
  1440. End If
  1441.  
  1442. If varCurrentLocation = varObjectLocations(37) Then
  1443. Call subPrintText("The orc dodges and then growls ominously at you!")
  1444. GoTo lab407
  1445. End If
  1446.  
  1447. If varCurrentLocation = varObjectLocations(38) Then
  1448. Call subPrintText("The rabbit hops aside and says NEEERH WHATS UP DOC ?")
  1449. GoTo lab407
  1450. End If
  1451.  
  1452. lab403:
  1453. If varWord2Index = 28 And varCurrentLocation = 16 And varFlamesFlag = 1 Then
  1454. varFlamesFlag = 0
  1455. Call subPrintText("The flame dies in a cloud of steam.")
  1456. End If
  1457.  
  1458. If varWord2Index = 6 And varCurrentLocation = varObjectLocations(33) Then
  1459. Call subPrintText("The teeth become skeleton warriors and drive the goblins away.")
  1460. varObjectLocations(33) = 0
  1461. varObjectLocations(6) = 0
  1462. Else 'I think this logic can be separated out; it was like this to save a line?
  1463. If varCurrentLocation = varObjectLocations(41) And varWord2Index = 47 Then
  1464. Call subPrintText("The mouse eats the stilton and allows itself to be caught.")
  1465. varObjectLocations(41) = 0
  1466. varObjectLocations(47) = 0
  1467. End If
  1468. End If
  1469.  
  1470. R$ = ""
  1471.  
  1472. If varCurrentLocation = 117 And varWord2Index = 9 Then
  1473. Call subPrintText("Suddenly a huge bird swoops down snatches the food and carries you across the swamp.")
  1474. varCurrentLocation = 118
  1475. varObjectLocations(9) = 0
  1476. Call subPrintLocation(varCurrentLocation)
  1477. End If
  1478.  
  1479. If varCurrentLocation = varObjectLocations(43) And varWord2Index = 49 Then
  1480. Call subPrintText("The stake pierces the vampires chest he screams and is dispersed on the wind.")
  1481. varObjectLocations(43) = 0
  1482. varObjectLocations(49) = 0
  1483. End If
  1484.  
  1485. lab407:
  1486. End Sub
  1487.  
  1488. Sub subVerbFeed (varWord2Index) 'Feed
  1489. If varObjectLocations(varWord2Index) <> varCurrentLocation And varObjectLocations(varWord2Index) <> 1 And varWord2Index <> 28 Then
  1490. Call subPrintText("I see no " + varWord2$ + " here.")
  1491. GoTo lab414
  1492. Else
  1493. If varWord2Index = 28 Then
  1494. Call subPrintText("I can't apply that")
  1495. GoTo lab414
  1496. End If
  1497. End If
  1498.  
  1499. If varWord2Index = 30 Or varWord2Index = 32 Or varWord2Index = 33 Or varWord2Index = 37 Then
  1500. Call subPrintText("The only thing it wants to eat is, possibly, YOU!")
  1501. GoTo lab414
  1502. Else
  1503. If varWord2Index <> 38 And varWord2Index <> 35 And varWord2Index <> 41 And varWord2Index <> 52 Then
  1504. Call subPrintText("You're joking")
  1505. GoTo lab414
  1506. End If
  1507. End If
  1508.  
  1509. If varWord2Index = 41 And varObjectLocations(9) = 1 Then
  1510. Call subPrintText("You throw the food to the crocodile. Suddenly a huge bird swoops down snatches the food and carries you across the swamp.")
  1511. varCurrentLocation = 118
  1512. Call subPrintLocation(varCurrentLocation)
  1513. varObjectLocations(9) = 0
  1514. GoTo lab414
  1515. Else
  1516. If varWord2Index = 41 Then
  1517. Call subPrintText("You have nothing it wants.")
  1518. GoTo lab414
  1519. End If
  1520. End If
  1521.  
  1522. If varWord2Index = 52 And varObjectLocations(50) = 1 Then
  1523. Call subPrintText("The mouse eats the stilton and allows itself to be caught.")
  1524. varObjectLocations(52) = 1
  1525. varObjectLocations(50) = 0
  1526. GoTo lab414
  1527. Else
  1528. If varWord2Index = 52 Then
  1529. Call subPrintText("You have nothing it wants.")
  1530. GoTo lab414
  1531. End If
  1532. End If
  1533.  
  1534. If varWord2Index = 35 Or varWord2Index = 38 Then
  1535. Call subPrintText("What with")
  1536. K = varWord2Index
  1537. O$ = varWord2$
  1538. Input A$
  1539. CALL subProcessNoun(funcLowerCase$(A$))
  1540. If varWord2Index <> 29 And varWord2Index <> 9 Then
  1541. Call subPrintText("You're joking!")
  1542. Else
  1543. Call subEat
  1544. varObjectLocations(varWord2Index) = 0
  1545. varObjectLocations(K) = 0
  1546. varCarryingCounter = varCarryingCounter - 2
  1547. If K = 35 Then
  1548. varBearFlag = 0
  1549. Else
  1550. If K = 38 Then
  1551. varRabbitFlag = 0
  1552. End If
  1553. End If
  1554. End If
  1555. End If
  1556. lab414:
  1557. End Sub
  1558.  
  1559. Sub subVerbRub (varWord2Index) 'Rub?
  1560. If varObjectLocations(varWord2Index) <> varCurrentLocation And varObjectLocations(varWord2Index) <> 1 And varWord2Index <> 28 Then
  1561. Call subPrintText("I see no " + varWord2$ + " here.")
  1562. GoTo lab420
  1563. Else
  1564. If varWord2Index = 28 Then
  1565. Call subPrintText("I can't apply that")
  1566. GoTo lab420
  1567. End If
  1568. End If
  1569.  
  1570. If varWord2Index = 3 And varLampLitFlag = 1 And varLampFuel <= 10 Then
  1571. varLampFuel = 150
  1572. Call subPrintText("Your lamp is brighter now.")
  1573. GoTo lab420
  1574. Else
  1575. If varWord2Index = 3 And varLampFuel <= 0 Then
  1576. varLampFuel = 150
  1577. Call subPrintText("Nothing obvious happens!")
  1578. GoTo lab420
  1579. Else
  1580. If varWord2Index = 3 And varLampFuel > 0 Then
  1581. Call subPrintText("Nothing obvious happens!")
  1582. GoTo lab420
  1583. End If
  1584. End If
  1585. End If
  1586.  
  1587. If varWord2Index = 26 Then
  1588. varCurrentLocation = 11
  1589. Call subPrintLocation(varCurrentLocation)
  1590. GoTo lab420
  1591. End If
  1592.  
  1593. Call subPrintText("You're joking!")
  1594. lab420:
  1595. End Sub
  1596.  
  1597. Sub subVerbLight (varWord2Index) 'Light verb
  1598. If varObjectLocations(varWord2Index) <> varCurrentLocation And varObjectLocations(varWord2Index) <> 1 And varWord2Index <> 28 Then
  1599. Call subPrintText("I see no " + varWord2$ + " here.")
  1600. GoTo labExitVerbLight
  1601. Else
  1602. If varWord2Index = 28 Then
  1603. Call subPrintText("I can't apply that")
  1604. GoTo labExitVerbLight
  1605. End If
  1606. End If
  1607.  
  1608. If varWord2Index = 51 Then
  1609. varObjectLocations(51) = 0
  1610. Call subPrintText("Your matches flare up making a lot of smoke.")
  1611. If varCurrentLocation = 142 Then
  1612. Call subPrintText("The serpent starts to cough violently and you get thrown out.")
  1613. varCurrentLocation = 136
  1614. Call subPrintLocation(varCurrentLocation)
  1615. GoTo labExitVerbLight
  1616. Else
  1617. If varWord2Index = 51 Then
  1618. GoTo labExitVerbLight
  1619. End If
  1620. End If
  1621. End If
  1622.  
  1623. If varWord2Index = 3 And varLampLitFlag = 0 And varLampFuel > 0 Then
  1624. varLampLitFlag = 1
  1625. Call subPrintText("Your lamp is now on.")
  1626. GoTo labExitVerbLight
  1627. Else
  1628. If varWord2Index = 3 And varLampLitFlag = 0 Then
  1629. Call subPrintText(" Your lamp has run out.")
  1630. GoTo labExitVerbLight
  1631. Else
  1632. If varWord2Index = 3 Then
  1633. Call subPrintText("Your lamp is already lit!")
  1634. GoTo labExitVerbLight
  1635. End If
  1636. End If
  1637. End If
  1638. Call subPrintText("I can't apply that")
  1639. labExitVerbLight:
  1640. End Sub
  1641.  
  1642. Sub subVerbRead (varWord2Index) 'read
  1643. If varWord2Index = 28 Then
  1644. Call subPrintText("I can't apply that")
  1645. GoTo labExitVerbRead
  1646. End If
  1647.  
  1648. If varObjectLocations(varWord2Index) <> varCurrentLocation And varObjectLocations(varWord2Index) <> 1 Then
  1649. Call subPrintText("I see no " + varWord2$ + " here")
  1650. GoTo labExitVerbRead
  1651. End If
  1652.  
  1653. If varWord2Index = 21 Then
  1654. Call subPrintText("The books tell of a land across the water.")
  1655. Else
  1656. Call subPrintText("I can't apply that")
  1657. End If
  1658.  
  1659. labExitVerbRead:
  1660. End Sub
  1661.  
  1662. Sub subVerbPay (varWord2Index)
  1663. If varWord2Index = 28 Then
  1664. Call subPrintText("I can't apply that")
  1665. GoTo labExitVerbPay
  1666. End If
  1667.  
  1668. I = 11
  1669. If varObjectLocations(varWord2Index) <> varCurrentLocation And varObjectLocations(varWord2Index) <> 1 Then
  1670. Call subPrintText("I see no " + varWord2$ + " here.")
  1671. GoTo labExitVerbPay
  1672. End If
  1673.  
  1674. If varWord2Index = 34 Then
  1675. While I <> 26 And varObjectLocations(I) <> 1
  1676. I = I + 1
  1677. Wend
  1678. If I < 26 Then
  1679. varObjectLocations(I) = 51
  1680. Call subGetObjName(I)
  1681. Call subSnatch
  1682. varObjectLocations(34) = 0
  1683. varCarryingCounter = varCarryingCounter - 1
  1684. Else
  1685. Call subPrintText("You fell in a pit.")
  1686. End If
  1687. End If
  1688.  
  1689. labExitVerbPay:
  1690. End Sub
  1691.  
  1692. Sub subVerbIn (n) 'In
  1693. If n = 2 Then
  1694. varCurrentLocation = 3
  1695. Call subPrintLocation(varCurrentLocation)
  1696. Else
  1697. If n = 8 Then
  1698. varCurrentLocation = 9
  1699. Call subPrintLocation(varCurrentLocation)
  1700. Else
  1701. Call subPrintText("I can't apply that")
  1702. End If
  1703. End If
  1704. End Sub
  1705.  
  1706. Sub subVerbOut (n) 'out or exit
  1707. 'n is current loc
  1708. If n = 3 Then '
  1709. varCurrentLocation = 2
  1710. Call subPrintLocation(varCurrentLocation)
  1711. Else
  1712. If n = 9 Then
  1713. varCurrentLocation = 8
  1714. Call subPrintLocation(varCurrentLocation)
  1715. Else
  1716. Call subPrintText("I can't apply that")
  1717. End If
  1718. End If
  1719. End Sub
  1720.  
  1721. Sub subCalculateScore (varCurrentLocation)
  1722. 'calculate and print score
  1723. varScore = 0
  1724. 'iterate through these objects. If we have them in inventory (1) or are they at Sphinx (50) then add 30 points
  1725. For j = 11 To 29
  1726. If varObjectLocations(j) = 1 Or varObjectLocations(j) = 50 Then varScore = varScore + 30
  1727. Next j
  1728. For j = 45 To 48
  1729. If varObjectLocations(j) = 1 Or varObjectLocations(j) = 50 Then varScore = varScore + 30
  1730. Next j
  1731.  
  1732. If varWavingAtSphinxFlag = 1 Then ' varWavingAtSphinxFlag is set if we're kneeling and wand waving
  1733. If varCurrentLocation = 50 Then ' are we at the sphinx ?
  1734. varScore = varScore + 170
  1735. End If
  1736. End If
  1737.  
  1738. If varScore + varKilledFlag < 0 Then
  1739. Call subPrintText("You have scored 0 out of a possible 800.")
  1740. Else
  1741. Call subPrintText("You have scored " + Str$(varScore + varKilledFlag) + " out of 800.")
  1742. End If
  1743. End Sub
  1744.  
  1745. FUNCTION funcTrimSpaces$ (z$)
  1746. 'seems to just trim off leading spaces. QB seems not to like ASC(x) so jiggled a bit.
  1747. lab453: 'Surely we can do some loopery here
  1748. If Left$(z$, 1) = " " Then
  1749. z$ = Right$(z$, Len(z$) - 1)
  1750. GoTo lab453
  1751. End If
  1752.  
  1753. lab454: 'surely we can do some loopery here
  1754. If Right$(z$, 1) = " " Then
  1755. z$ = Left$(z$, Len(z$) - 1)
  1756. GoTo lab454
  1757. End If
  1758. funcTrimSpaces$ = z$
  1759. END FUNCTION
  1760.  
  1761. FUNCTION funcLowerCase$ (z$)
  1762. 'Just converts to lower case, puts entire z$ into lower case into B$ and passes to funTrimSpaces$
  1763. b$ = ""
  1764. For j = 1 To Len(z$)
  1765. Q = Asc(Mid$(z$, j, 1))
  1766. If Q > 64 And Q < 91 Then
  1767. Q = Q + 32
  1768. End If
  1769. b$ = b$ + Chr$(Q)
  1770. Next j
  1771. funcLowerCase$ = (funcTrimSpaces$(b$))
  1772. END FUNCTION
  1773.  
  1774. Sub subVerbFill (w) 'F=Fill?
  1775. If w = 28 Then 'is the verb water?
  1776. Call subPrintText("I can't apply that")
  1777. GoTo labExitVerbFill
  1778. End If
  1779.  
  1780. If varObjectLocations(w) <> varCurrentLocation And varObjectLocations(w) <> 1 Then
  1781. Call subPrintText("I see no " + varWord2$ + " here.")
  1782. GoTo labExitVerbFill
  1783. Else
  1784. If varObjectLocations(varWord2Index) <> 1 Then
  1785. Call subPrintText("You're not carrying the " + varWord2$ + ".")
  1786. GoTo labExitVerbFill
  1787. End If
  1788. End If
  1789.  
  1790. If w = 27 And varCurrentLocation = varObjectLocations(28) And varGotWaterFlag = 0 Then
  1791. Call subPrintText("Your bottle is now full of water.")
  1792. varGotWaterFlag = 1
  1793. Else
  1794. If w = 27 And varCurrentLocation = varObjectLocations(28) Then
  1795. Call subPrintText("your bottle is already full.")
  1796. Else
  1797. Call subPrintText("I can't apply that")
  1798. End If
  1799. End If
  1800. labExitVerbFill:
  1801. End Sub
  1802.  
  1803. Sub subObjectText (w, n, varCurrentLocation)
  1804. 'process OT for w=object number, n=count left to deal with
  1805. 'OT seems to print out the description of the object given the objects presence eg "a set of keys" when the object is just 'keys'
  1806. R$ = ""
  1807. K = 0
  1808.  
  1809. If n = 1 And varMAX <> 1 Then
  1810. R$ = R$ + " and "
  1811. End If
  1812.  
  1813. If w = 5 Then 'keys
  1814. R$ = R$ + "a set of keys,"
  1815. GoTo lab478
  1816. End If
  1817.  
  1818. If w = 6 Then 'teeth
  1819. R$ = R$ + "a set of dragon's teeth,"
  1820. GoTo lab478
  1821. End If
  1822.  
  1823. If w = 26 Then 'ring
  1824. R$ = R$ + "a mithril "
  1825. GoTo lab477
  1826. End If
  1827.  
  1828. IF w = 1 OR w = 42 OR w = 17 OR w = 46 THEN 'axe, elephant, emerald, amethyst
  1829. R$ = R$ + "an "
  1830. GoTo lab477
  1831. End If
  1832.  
  1833. If w = 50 Then 'stilton
  1834. R$ = R$ + "a piece of stilton,"
  1835. GoTo lab478
  1836. End If
  1837.  
  1838. If w = 9 Then 'food
  1839. GoTo lab477
  1840. End If
  1841.  
  1842. If w = 7 Then 'jack
  1843. R$ = R$ + "a hydraulic "
  1844. GoTo lab477
  1845. End If
  1846.  
  1847. If w = 48 Or w = 49 Then 'boat, stake
  1848. R$ = R$ + "a wooden "
  1849. GoTo lab477
  1850. End If
  1851.  
  1852. If w = 11 Or w = 20 Then 'sapphires, opals
  1853. R$ = R$ + "a cluster of "
  1854. GoTo lab477
  1855. End If
  1856.  
  1857. If w = 16 Or w = 18 Then 'rubies, pearls
  1858. R$ = R$ + "a small fortune in "
  1859. GoTo lab477
  1860. End If
  1861.  
  1862. If w = 51 Then 'matches
  1863. R$ = R$ + "a box of "
  1864. GoTo lab477
  1865. End If
  1866.  
  1867. If w = 33 Then 'goblins
  1868. R$ = R$ + "a gang of "
  1869. GoTo lab477
  1870. End If
  1871.  
  1872. If w = 22 Then 'spices
  1873. R$ = R$ + "a small jar of "
  1874. GoTo lab477
  1875. End If
  1876.  
  1877. If w = 21 Then 'books
  1878. R$ = R$ + "a collection of library "
  1879. GoTo lab477
  1880. End If
  1881.  
  1882. If w = 19 Then 'coins
  1883. R$ = R$ + "a set of "
  1884. GoTo lab477
  1885. End If
  1886.  
  1887. If w = 43 Then 'vampire
  1888. R$ = R$ + "an evil "
  1889. GoTo lab477
  1890. End If
  1891.  
  1892. If w = 36 Then 'pirate
  1893. R$ = R$ + "a bearded "
  1894. GoTo lab477
  1895. End If
  1896.  
  1897. If Abs(w - 14) < 2 Then 'gold, silver, maybe platinum
  1898. R$ = R$ + "a bar of "
  1899. GoTo lab477
  1900. End If
  1901.  
  1902. If w = 44 Then 'serpent
  1903. R$ = R$ + "a bad smell,"
  1904. GoTo lab478
  1905. End If
  1906.  
  1907. If w = 32 Or w = 37 Or w = 41 Then 'ogre, orc, crocodile
  1908. R$ = R$ + "a mean looking "
  1909. GoTo lab477
  1910. End If
  1911.  
  1912. If w = 30 Or w = 42 Then 'dragon, elephant
  1913. R$ = R$ + "a large "
  1914. GoTo lab477
  1915. End If
  1916.  
  1917. If w = 35 Or w = 38 Then 'bear, rabbit
  1918. R$ = R$ + "a friendly "
  1919. GoTo lab477
  1920. End If
  1921.  
  1922. If w <> 27 Then 'if anything other than the bottle then lab475
  1923. GoTo lab475
  1924. Else 'so we have the bottle
  1925. If varGotWaterFlag = 0 Then 'does it have water.. no
  1926. R$ = R$ + "a bottle,"
  1927. GoTo lab478
  1928. Else
  1929. R$ = R$ + "a bottle of water," 'must have water then
  1930. GoTo lab478
  1931. End If
  1932. End If
  1933.  
  1934. lab475:
  1935. IF w = 28 AND varGotWaterFlag = 1 AND LEFT$(A$, 3) = "inv" THEN 'varWord2Index8= water
  1936. GOTO lab478
  1937. ELSE
  1938. If w = 28 Then
  1939. GoTo lab477
  1940. End If
  1941. End If
  1942.  
  1943. R$ = R$ + "a "
  1944.  
  1945. lab477:
  1946. O$ = R$
  1947. Call subGetObjName(w)
  1948. R$ = O$ + R$ + ", "
  1949.  
  1950. IF INSTR(R$, " ") = 0 THEN
  1951. R$ = " " + R$
  1952. K = 1
  1953. End If
  1954.  
  1955. lab478:
  1956.  
  1957. IF n <= 2 THEN
  1958.  
  1959. R$ = Left$(R$, Len(R$) - 1)
  1960.  
  1961. END IF
  1962.  
  1963. If varCurrentLocation <> 1 And n = 1 Then
  1964. R$ = R$ + " here"
  1965. END IF
  1966.  
  1967.  
  1968. If n = 1 Then
  1969. R$ = R$ + "."
  1970. End If
  1971.  
  1972. 'If Pos(0) + Len(R$) > (varScreenWidth - 2) Then
  1973. ' R$ = funScreenPrint$(R$, (varScreenWidth - 1))
  1974. 'End If
  1975.  
  1976. If K = 1 And R$ = " " Then
  1977. R$ = Right$(R$, Len(R$) - 1)
  1978. End If
  1979. cn = 0
  1980. ' Call subPrintText(R$)
  1981. End Sub
  1982.  
  1983. Sub subPrintText (varScrText$)
  1984. ' Color colCyan 'so we can see what is being run through this sub
  1985. Dim a%, z%, varStringLength
  1986.  
  1987. varStringLength = Len(varScrText$)
  1988. a% = 1
  1989. z% = varScreenWidth + 1 - Pos(0)
  1990. Do
  1991. If z% > varStringLength + 1 Then
  1992. z% = varStringLength + 1
  1993. Else
  1994. DO
  1995. z% = z% - 1
  1996. Loop Until Mid$(varScrText$, z%, 1) = " "
  1997. End If
  1998.  
  1999. If z% < a% Then
  2000. z% = a% + varScreenWidth + 1
  2001. End If
  2002. Print Mid$(varScrText$, a%, z% - a%);
  2003. If z% - a% < varScreenWidth Then
  2004. Print
  2005. Else
  2006. If Mid$(varScrText$, z%, 1) = " " Then
  2007. a% = a% + 1
  2008. Else
  2009. z% = z% + 1
  2010. End If
  2011. End If
  2012.  
  2013. a% = z% + 1
  2014. z% = a% + varScreenWidth + 1
  2015. Loop Until a% > varStringLength
  2016. If Pos(0) > 0 Then
  2017. Print
  2018. GoTo labExit
  2019. Else
  2020. GoTo labExit
  2021. End If
  2022.  
  2023. labExit:
  2024. 'Color colGreen 'put the colour back
  2025. End Sub
  2026.  
  2027. Sub subFinish
  2028. Call subPrintText("Well done, you've solved the puzzle.")
  2029. Call subCalculateScore(varCurrentLocation)
  2030. Call subPrintText("You had " + Str$(varTurnCount) + " turns.")
  2031. End
  2032. End Sub
  2033.  
  2034. Sub subEat
  2035. Call subPrintText("The " + O$ + " eats the " + varWord2$ + " and runs away.")
  2036. End Sub
  2037.  
  2038. Sub subSnatch
  2039. Call subPrintText("The troll snatches your " + R$ + " and runs away.")
  2040. End Sub
  2041.  
  2042. Sub subSave (filename$)
  2043. filename$ = filename$ + ".sav"
  2044. Open filename$ For Output As #1
  2045.  
  2046. Print #1, varBearFlag, varChasmFlag, varCasketOpenFlag, varCarryingCounter, varDwarfEncounters, varFlamesFlag, varGoblinEncounters
  2047. Print #1, varKilledFlag, varCurrentLocation, varLampFuel, varWavingAtSphinxFlag, varRabbitFlag, varTurnLastSeenDwarf, varSafeOpenFlag
  2048. Print #1, varScore, varTurnCount, varBridgeFlag, varVampireEncounters, varGotWaterFlag, varLampLitFlag, varDwarfFlag, varDwarfChance
  2049. Print #1, varSuppressDwarf
  2050.  
  2051. For cnt = 1 To 56
  2052. Print #1, varObjectLocations(cnt)
  2053. Next
  2054. Close #1
  2055. Call subPrintText("Game state saved")
  2056. End Sub
  2057.  
  2058. Sub subLoad (filename$)
  2059. filename$ = filename$ + ".sav"
  2060. Open filename$ For Input As #1
  2061.  
  2062. Input #1, varBearFlag, varChasmFlag, varCasketOpenFlag, varCarryingCounter, varDwarfEncounters, varFlamesFlag, varGoblinEncounters
  2063. Input #1, varKilledFlag, varCurrentLocation, varLampFuel, varWavingAtSphinxFlag, varRabbitFlag, varTurnLastSeenDwarf, varSafeOpenFlag
  2064. Input #1, varScore, varTurnCount, varBridgeFlag, varVampireEncounters, varGotWaterFlag, varLampLitFlag, varDwarfFlag, varDwarfChance
  2065. Input #1, varSuppressDwarf
  2066.  
  2067. FOR cnt = 1 TO 56
  2068. Input #1, varObjectLocations(cnt)
  2069. Next
  2070. Close #1
  2071. Call subPrintText("Game state loaded")
  2072. Print
  2073. Call subPrintLocation(varCurrentLocation)
  2074. End Sub
  2075.  
  2076. Sub subDebug
  2077. 'Prints out the state of play
  2078. If varDwarfChance = 0.97 Then
  2079. varDwarfStatus$ = "ENABLED"
  2080. Else
  2081. varDwarfStatus$ = "DISABLED"
  2082. End If
  2083.  
  2084. 'Color colRed
  2085. Print
  2086. Print "Environment"
  2087. 'Color colGreen
  2088. Print "Location # :"; varCurrentLocation
  2089. Print "Dwarf Status: "; varDwarfStatus$
  2090. Print
  2091. 'Color colRed
  2092. Print "Counters"
  2093. 'Color colGreen
  2094. Print "Turn: "; varTurnCount; "Items :"; varCarryingCounter; " Lamp Fuel="; varLampFuel; "DwarfEncounters: "; varDwarfEncounters
  2095. PRINT "DwarfSeenIncr: "; varTurnLastSeenDwarf
  2096. Print
  2097. 'Color colRed
  2098. Print "Flags"
  2099. 'Color colGreen
  2100. Print "Bear: "; varBearFlag; " Rabbit: "; varRabbitFlag; " Dwarf: "; varDwarfFlag; " Lamp Lit: "; varLampLitFlag
  2101. Print "Water: "; varGotWaterFlag; " Flames: "; varFlamesFlag; " Casket: "; varCasketOpenFlag; " Chasm: "; varChasmFlag
  2102. Print "DwarfSuppress: "; varSuppressDwarf; "Safe: "; varSafeOpenFlag
  2103. Print
  2104. 'Color colRed
  2105. Print "Exit Array"
  2106. 'Color colCyan
  2107. Print " N S E W U D"
  2108. 'Color colCyan + 8
  2109. For i% = 1 To 6
  2110. Print varExitArray(i%);
  2111. Next i%
  2112. 'Color colRed
  2113. PRINT
  2114. INPUT "Press enter for objects",dummy$
  2115. PRINT "Objects array :"
  2116. count%=0
  2117.  
  2118. FOR j%=1 TO 14
  2119. FOR i% = 1 TO 4
  2120. 'Color colCyan + 8
  2121. PRINT count%; ":";
  2122. 'Color colCyan
  2123. PRINT varObjectLocations(count%); " ",
  2124. count%=count%+1
  2125. NEXT i%
  2126. PRINT
  2127. NEXT j%
  2128.  
  2129. 'Color 2
  2130. Print
  2131. End Sub
  2132.  
  2133. Sub subReadExits
  2134. labExitData: 'Keeping labExitData here for now since two SUBs use it and QB64 seems to keep DATA local to the sub. Nor does QB64 allow for it at end.
  2135. '1
  2136. Data 0,0,0,0,0,0
  2137. Data 4,5,4,4,0,0
  2138. Data 0,0,0,0,0,0
  2139. Data 4,4,4,4,0,0
  2140. Data 2,6,7,4,0,0
  2141. Data 5,4,4,4,0,0
  2142. Data 4,4,8,5,0,0
  2143. Data 4,4,4,7,0,9
  2144. Data 0,14,10,0,8,0
  2145. Data 15,11,16,9,0,0
  2146. '11
  2147. Data 10,0,12,0,0,0
  2148. Data 0,13,14,11,0,0
  2149. Data 12,0,0,0,0,17
  2150. Data 9,0,0,12,0,0
  2151. Data 0,10,17,0,0,0
  2152. Data 0,17,18,10,0,0
  2153. Data 16,0,0,15,13,0
  2154. Data 19,0,0,16,0,0
  2155. Data 0,18,0,0,0,0
  2156. Data 21,0,22,0,0,0
  2157. '21
  2158. Data 0,20,23,0,0,0
  2159. Data 0,25,0,20,24,0
  2160. Data 120,0,24,21,0,0
  2161. Data 0,0,0,23,51,22
  2162. Data 22,26,0,0,0,0
  2163. Data 25,0,0,0,0,0
  2164. Data 0,0,30,28,0,0
  2165. Data 0,29,27,0,0,143
  2166. Data 28,39,0,0,0,0
  2167. Data 31,0,0,27,33,0
  2168. '31
  2169. Data 0,30,32,0,0,0
  2170. Data 40,0,0,31,0,0
  2171. Data 0,34,35,0,0,30
  2172. Data 33,0,0,73,0,0
  2173. Data 0,36,0,33,0,0
  2174. Data 35,0,0,0,0,37
  2175. Data 0,0,0,38,36,0
  2176. Data 0,0,37,0,0,0
  2177. Data 29,72,0,0,0,0
  2178. Data 0,32,0,0,42,41
  2179. '41
  2180. Data 0,0,0,0,40,0
  2181. Data 0,0,0,0,0,40
  2182. Data 44,0,0,46,47,0
  2183. Data 45,43,47,46,0,0
  2184. Data 0,44,111,0,46,47
  2185. Data 45,43,44,48,46,47
  2186. Data 45,43,44,0,0,0
  2187. Data 0,0,46,49,0,101
  2188. Data 52,0,48,0,0,0
  2189. Data 0,71,0,0,0,0
  2190. '51
  2191. Data 0,0,0,0,0,24
  2192. Data 0,0,53,49,0,0
  2193. Data 54,52,52,52,0,0
  2194. Data 53,55,53,53,0,0
  2195. Data 54,54,56,54,0,0
  2196. Data 55,55,55,57,0,0
  2197. Data 56,56,58,56,0,0
  2198. Data 57,59,57,57,0,0
  2199. Data 60,58,58,58,0,0
  2200. Data 59,61,59,59,0,0
  2201. '61
  2202. Data 60,60,62,60,0,0
  2203. Data 61,61,61,63,0,0
  2204. Data 62,62,64,62,0,0
  2205. Data 63,65,63,63,0,0
  2206. Data 66,64,64,64,0,0
  2207. Data 65,67,65,65,0,0
  2208. Data 52,66,68,66,0,0
  2209. Data 67,67,67,69,0,0
  2210. Data 68,68,70,68,0,0
  2211. Data 69,71,69,69,0,0
  2212. '71
  2213. Data 50,70,70,70,0,0
  2214. Data 73,39,0,74,0,81
  2215. Data 81,0,86,72,74,0
  2216. Data 0,72,73,75,0,79
  2217. Data 74,0,76,0,76,77
  2218. Data 75,77,0,0,78,75
  2219. Data 78,79,0,0,75,76
  2220. Data 76,0,79,77,0,82
  2221. Data 0,74,78,77,80,0
  2222. Data 0,81,82,86,79,0
  2223. '81
  2224. Data 72,0,73,80,0,82
  2225. Data 80,78,0,0,81,83
  2226. Data 84,87,0,0,85,82
  2227. Data 87,0,85,83,0,88
  2228. Data 0,87,84,83,86,0
  2229. Data 73,0,80,87,0,85
  2230. Data 83,84,0,0,85,86
  2231. Data 84,0,89,90,0,91
  2232. Data 90,0,90,88,0,91
  2233. Data 89,89,0,0,88,91
  2234. '91
  2235. Data 88,89,0,0,92,90
  2236. Data 0,91,0,93,0,0
  2237. Data 0,0,92,0,94,0
  2238. Data 98,99,97,0,95,93
  2239. Data 0,100,0,0,0,94
  2240. Data 0,0,0,0,100,0
  2241. Data 0,0,100,94,0,0
  2242. Data 0,94,0,100,0,0
  2243. Data 94,0,0,0,0,100
  2244. Data 95,0,98,97,99,96
  2245. '101
  2246. Data 102,0,103,0,48,0
  2247. Data 0,101,0,108,0,107
  2248. Data 0,105,0,101,0,109
  2249. Data 0,106,107,0,110,0
  2250. Data 103,0,0,0,0,106
  2251. Data 104,0,0,0,105,0
  2252. Data 0,0,0,104,102,0
  2253. Data 0,0,0,102,0,0
  2254. Data 0,0,0,0,103,0
  2255. Data 0,0,104,0,0,0
  2256. '111
  2257. Data 112,0,0,45,0,0
  2258. Data 0,111,0,0,113,0
  2259. Data 0,0,114,0,0,112
  2260. Data 119,0,0,113,0,0
  2261. Data 0,116,0,120,0,0
  2262. Data 115,117,0,0,0,0
  2263. Data 116,0,118,0,0,0
  2264. Data 0,0,121,117,0,0
  2265. Data 0,114,0,0,0,0
  2266. Data 0,23,115,0,0,0
  2267. '121
  2268. Data 0,123,122,118,0,0
  2269. Data 0,0,131,121,124,0
  2270. Data 121,127,0,132,0,0
  2271. Data 0,126,0,128,0,122
  2272. Data 126,0,133,134,0,0
  2273. Data 124,125,0,0,0,0
  2274. Data 123,0,0,0,135,0
  2275. Data 0,0,124,129,0,0
  2276. Data 0,0,128,0,0,130
  2277. Data 0,0,0,0,129,0
  2278. '131
  2279. Data 0,0,0,122,0,0
  2280. Data 0,0,123,0,0,0
  2281. Data 0,0,0,125,0,0
  2282. Data 0,0,125,0,0,0
  2283. Data 0,0,0,0,0,127
  2284. Data 0,0,0,0,0,137
  2285. Data 0,0,0,0,136,0
  2286. Data 0,0,139,0,0,0
  2287. Data 0,140,0,138,0,0
  2288. Data 139,0,141,0,0,0
  2289. '141
  2290. Data 0,0,0,140,0,0
  2291. Data 0,0,0,0,0,0
  2292. Data 0,0,0,0,0,0
  2293.  
  2294. Restore labExitData
  2295. For varCO = 1 To (143 * 6)
  2296. Read varExits(varCO)
  2297. Next varCO
  2298. End Sub
  2299.  
  2300. Sub subReadObjectLocations
  2301. labObjectLocations:
  2302. 'Read in the objects into the array. Rearranged into 10's
  2303. 'Seems to be a discrepancy here - loop to 55, yet there's 56 here.
  2304. 'Perhaps because the building (obj56) plays no pickyupy role
  2305. Data 0,13,3,11,3,0,143,49,17,40
  2306. Data 39,38,134,19,51,0,42,0,131,132
  2307. Data 22,34,49,31,20,0,5,15,14,36
  2308. Data 0,30,48,26,29,10,32,21,24,94
  2309. Data 117,111,0,142,110,95,138,92,126,108
  2310. Data 119,96,0,117,15,3
  2311. Restore labObjectLocations
  2312. For j = 1 To 55
  2313. Read varObjectLocations(j)
  2314. Next j
  2315. End Sub
  2316.  
  2317. Sub subPrintHelp
  2318. Print "I can't, you're on your own."
  2319. Print
  2320. Print "To move use directions such as N,S or E. I can understand simple instructions."
  2321. Print "These statements should be in the form <verb> <noun> separated by a space."
  2322. Print
  2323. Print "If you get stuck try something completely different."
  2324. Print
  2325. Print "By the way magic is quite useful!"
  2326. End Sub
  2327.  
  2328. Sub subReadLocationDescriptions
  2329. labdatalocs:
  2330. Data Dummyloc 'This is because the original code data started at line 2 and was RESTORED to by proc call.
  2331. Data "at the end of a road, outside a building. All around is forest."
  2332. Data "in the building, obviously an old blacksmith's forge."
  2333. Data in the forest.
  2334. Data "on the road, a small raised path leads east, the road runs north-south."
  2335. Data on the top of a mountain. In the distance a small building can be seen. All around you is dense forest. A road leads north.
  2336. Data on a narrow path which seems to descend to the east.
  2337. Data in the valley of doom. The path disappears down a small shaft here. Strange echoes can be heard from below.
  2338. Data in the hall of spirits. Ghostly laughs and howls can be heard echoing around the walls. The air is full of dust and cobwebs.
  2339. Data at a cross-roads in the tunnels. A chill wind blows from the north.
  2340. Data in the Sorcerers lair. The walls resound with the sound of long forgotten spells.
  2341. Data at a T-junction.
  2342. Data "in the sword chamber, a large stone sits in the middle of the floor."
  2343. Data in the gardeners store.
  2344. Data by a lake which stretches far away to the horizon. The far side can only be dimly seen.
  2345. Data in the fiery passage.
  2346. Data in the banqueting hall.
  2347. Data "at the edge of a deep crack, it is too wide to jump."
  2348. Data in the smelting room. A large furnace sits in the corner.
  2349. Data "in the oriental room, beside the chasm. The walls are decorated with chinese paintings."
  2350. Data "in a very large room, the floor is covered with straw."
  2351. Data in the old library.
  2352. Data at a T-junction.
  2353. Data in the bank vault. An enormous safe is set into the ceiling. There is no obvious handle.
  2354. Data in a steep passage.
  2355. Data at the troll bridge. A sign says STOP! TROLL OPERATED TOLL BRIDGE
  2356. Data at a fork in the path. Behind you is the troll bridge.
  2357. Data "in a very small, dark room. Full of broken rocks. A sign says DANGER FALLING ROCKS."
  2358. Data in a large cave. It smells of bears.
  2359. Data in a large room full of huge furniture.
  2360. Data in the soft room. The walls resemble warm ice-cream.
  2361. Data "in the slimy passage. A green, sticky slime crawls all around you."
  2362. Data in a very small rocky cavern containing many stalactites.
  2363. Data in a tiny room. On the wall it says Be humble in the eyes of the sphinx and use your brains!
  2364. Data in a narrow tunnel.
  2365. Data in the dragons lair. The bones of many adventurers lie here.
  2366. Data in a narrow steep-sided passage. The roof cant be seen by lamp-light.
  2367. Data at the DEAD-END-DIAMOND-MINE.
  2368. Data in the blue room.
  2369. Data in the oyster room. A very cold draft comes from below.
  2370. Data on the edge of a vast glacier. It is riddled with deep crevasses too wide to jump!
  2371. Data in the green room.
  2372. Data on a high plateau. The bridge leads back across the glacier.
  2373. Data in the catacombs.
  2374. Data in the catacombs.
  2375. Data in the catacombs.
  2376. Data in the catacombs.
  2377. Data in the hall of the mountain king.
  2378. Data in an old pirates hideout. Many seafaring relics lie here
  2379. Data on the edge of the desert. A huge sphinx sits here.
  2380. Data in the safe.
  2381. Data in the desert.
  2382. Data in the desert.
  2383. Data in the desert.
  2384. Data in the desert.
  2385. Data in the desert.
  2386. Data in the desert.
  2387. Data in the desert.
  2388. Data in the desert.
  2389. Data in the desert.
  2390. Data in the desert.
  2391. Data in the desert.
  2392. Data in the desert.
  2393. Data in the desert.
  2394. Data in the desert.
  2395. Data in the desert.
  2396. Data in the desert.
  2397. Data in the desert.
  2398. Data in the desert.
  2399. Data in the desert.
  2400. Data in the desert.
  2401. Data in the red room.
  2402. Data in the red room.
  2403. Data in the white room.
  2404. Data in the orange room.
  2405. Data in the purple room.
  2406. Data at a cross in the tunnels.
  2407. Data at a cross in the tunnels.
  2408. Data at a cross in the tunnels.
  2409. Data at a cross in the tunnels.
  2410. Data at a cross in the tunnels.
  2411. Data wandering about in the iron passages. Your compass directions seem to be rather confused.
  2412. Data wandering about in the iron passages. Your compass directions seem to be rather confused.
  2413. Data wandering about in the iron passages. Your compass directions seem to be rather confused.
  2414. Data wandering about in the iron passages. Your compass directions seem to be rather confused.
  2415. Data wandering about in the iron passages. Your compass directions seem to be rather confused.
  2416. Data wandering about in the iron passages. Your compass directions seem to be rather confused.
  2417. Data wandering about in the iron passages. Your compass directions seem to be rather confused.
  2418. Data wandering about in the iron passages. Your compass directions seem to be rather confused.
  2419. Data wandering about in the iron passages. Your compass directions seem to be rather confused.
  2420. Data wandering about in the iron passages. Your compass directions seem to be rather confused.
  2421. Data at the foot of a hill. A castle can be seen at the top of it.
  2422. Data in the castle gateway. The castle has obviously been left derelict for many years as the walls are begining to crumble away.
  2423. Data in an immense courtyard.
  2424. Data in the ruins of the north tower.
  2425. Data in the dungeons. The air here is very musty. The floor is covered in dust and cobwebs cling to you as you move.
  2426. Data in the Counts dining room. The decorations on the walls here are the blood stains of some of his unfortunate victims!
  2427. Data on a steep staircase.
  2428. Data in the south tower.
  2429. Data in the ballroom. The music of the orchestras which used to play here still lingers on.
  2430. Data at the entrance to the gnomes halls.
  2431. Data in the gnomes kitchen.
  2432. Data in the main hall. The Gnomes are obviously very untidy! They are also very shy and slip silently away as you enter.
  2433. Data at a T-junction.
  2434. Data at the south end of the main hall.
  2435. Data in a low tunnel.
  2436. Data in a low tunnel.
  2437. Data in the dairy. There is a mouth_watering smell here of buttermilk and cheese.
  2438. Data "in the pit. It is small,dark and very unpleasant here."
  2439. Data in the rainbow room. The walls are decorated with all the colours imaginable.
  2440. Data in a large chamber decorated in the style of the Maharajas palace.
  2441. Data in a tiny water-worn pipe.
  2442. Data in a tunnel hewn out of the rock by a giant explosion.
  2443. Data in a room full of bottles of chemicals. This is the alchemists store. The smell of sulphur is overpowering.
  2444. Data in a very tight passageway. A cool damp wind blows from the south.
  2445. Data in a dark damp passageway. The ground is becoming a little soggy here.
  2446. Data in the Everglades. It is rather swampy here and the mosquitoes are real pests!
  2447. Data in a dark damp passageway. The ground is a little soggy here.
  2448. Data in the alchemists laboratory. Theres a powerful sulphurous odour!
  2449. Data "on a small path winding its way through a petrified forest."
  2450. Data at a T-junction.
  2451. Data at a T-junction.
  2452. Data in the music room. Beautiful melodies echo all around.
  2453. Data at a T-junction.
  2454. Data "on the yellow brick road. Well I think it was yellow once upon a time but it has got rather muddy now."
  2455. Data in an immense canyon. The sides reach upwards as far as the eye can see.
  2456. Data in a small shrine obviously devoted to some fairy chief as pictures of him decorate all the walls.
  2457. Data in a small passage. The ground is rather soft underfoot.
  2458. Data in a patch of quicksand. Luckily though some kind previous adventurer has put a plank down so you can go on safely.
  2459. Data at a dead_end. Oh dear you seem to have struggled through that quicksand for nothing.
  2460. Data in the treasury.
  2461. Data at yet another dead_end.
  2462. Data at a dead end. Youll have to follow the yellow brick road once more.
  2463. Data at the end of the yellow brick road. Im afraid you cant go any further in this direction as the rest of the road hasnt been built yet.
  2464. Data in a fairy grotto. It is very beautiful but seems to be deserted.
  2465. Data on the east shore. The mountains rise sharply all around the cove.
  2466. Data in the wizards spell-chamber. When you entered the wizard was here mumbling about some lost spell-books. He saw you grunted something and vanished.
  2467. Data in the west antechamber to the inner sanctum.
  2468. Data in the inner sanctum. Not many have passed this way before. One intrepid adventurer seems to have written some graffiti DAVE KNEW W LANE.
  2469. Data in the east antechamber.
  2470. Data in a room similar to the spell-chamber.
  2471. Data in the serpents stomach. Oh dear you seem to have become the monsters lunch.
  2472. Data at the bottom of the rock slide. It is cramped and airless here. There is no obvious way to get out.
  2473.  
  2474. Restore labdatalocs
  2475.  
  2476. For i% = 1 To 143
  2477. Read varLocationDescription$(i%)
  2478. Next i%
  2479. End Sub
  2480.  
  2481. Sub subReadObjects
  2482. labObjects:
  2483. Data axe,sword,lamp,wand,keys,teeth,jack,chest,food,clam
  2484. Data sapphires,diamond,gold,silver,platinum,rubies,emerald,pearls,coins,opals
  2485. Data books,spices,sceptre,cushion,rug,ring,bottle,water,carrot,dragon
  2486. Data dwarf,ogre,goblins,troll,bear,pirate,orc,rabbit,safe,casket
  2487. Data crocodile,elephant,vampire,serpent,bracelet,amethyst,crown,boat,stake,stilton
  2488. Data matches,mouse,bridge,swamp,lake,building,
  2489.  
  2490. Restore labObjects:
  2491. For i% = 1 To 56
  2492. Read varObjectDesc$(i%)
  2493. NEXT i%
  2494. End Sub
  2495.  
  2496. Sub subReadVerbs
  2497. labVerbs:
  2498. Data get,take,open,wave,throw,drop,kill,eat,cross,feed
  2499. Data rub,light,read,pay,inventory,enter,out,leave,kneel,quit
  2500. Data score,look,in,help,diaxos,north,south,east,west,up
  2501. Data down,fill,go,load,save
  2502.  
  2503. Restore labVerbs:
  2504. For i% = 1 To 35
  2505. Read varVerb$(i%)
  2506. Next i%
  2507. End Sub
  2508.  
  2509.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement