Advertisement
sphinxadventures

Early VAX BASIC port

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