Advertisement
sphinxadventures

Sphinx Original BBC BASIC

Oct 27th, 2021
214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 31.10 KB | None | 0 0
  1. 0 REM /// Sphinx Adventure /// V1
  2. 1 REM Copyright (C) Acornsoft 1982
  3. 2 DATA ,"at the end of a road, outside a building. All around is forest.",
  4. 3 DATA ,"in the building, obviously an old blacksmith's forge.",
  5. 4 DATA ,in the forest.,
  6. 5 DATA ,"on the road, a small raised path leads east, the road runs north-south.",
  7. 6 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.,
  8. 7 DATA ,on a narrow path which seems to descend to the east.,
  9. 8 DATA ,in the valley of doom. The path disappears down a small shaft here. Strange echoes can be heard from below.,
  10. 9 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.,
  11. 10 DATA ,at a cross-roads in the tunnels. A chill wind blows from the north.,
  12. 11 DATA ,in the Sorcerer's lair. The walls resound with the sound of long forgotten spells.,
  13. 12 DATA ,at a T-junction.,
  14. 13 DATA ,"in the sword chamber, a large stone sits in the middle of the floor.",
  15. 14 DATA ,in the gardener's store.,
  16. 15 DATA ,by a lake which stretches far away to the horizon. The far side can only be dimly seen.,
  17. 16 DATA ,in the fiery passage.,
  18. 17 DATA ,in the banqueting hall.,
  19. 18 DATA ,"at the edge of a deep crack, it is too wide to jump.",
  20. 19 DATA ,in the smelting room. A large furnace sits in the corner.,
  21. 20 DATA ,"in the oriental room, beside the chasm. The walls are decorated with chinese paintings.",
  22. 21 DATA ,"in a very large room, the floor is covered with straw.",
  23. 22 DATA ,in the old library.,
  24. 23 DATA ,at a T-junction.,
  25. 24 DATA ,in the bank vault. An enormous safe is set into the ceiling. There is no obvious handle.,
  26. 25 DATA ,in a steep passage.,
  27. 26 DATA ,at the troll bridge. A sign says 'STOP! TROLL OPERATED TOLL BRIDGE',
  28. 27 DATA ,at a fork in the path. Behind you is the troll bridge.,
  29. 28 DATA ,"in a very small, dark room. Full of broken rocks. A sign says DANGER FALLING ROCKS.",
  30. 29 DATA ,in a large cave. It smells of bears.,
  31. 30 DATA ,in a large room full of huge furniture.,
  32. 31 DATA ,in the soft room. The walls resemble warm ice-cream.,
  33. 32 DATA ,"in the slimy passage. A green, sticky slime crawls all around you.",
  34. 33 DATA ,in a very small rocky cavern containing many stalactites.,
  35. 34 DATA ,in a tiny room. On the wall it says 'Be humble in the eyes of the sphinx and use your brains!',
  36. 35 DATA ,in a narrow tunnel.,
  37. 36 DATA ,in the dragon's lair. The bones of many adventurers lie here.,
  38. 37 DATA ,in a narrow steep-sided passage. The roof can't be seen by lamp-light.,
  39. 38 DATA ,at the DEAD-END-DIAMOND-MINE.,
  40. 39 DATA ,in the blue room.,
  41. 40 DATA ,in the oyster room. A very cold draft comes from below.,
  42. 41 DATA ,on the edge of a vast glacier. It is riddled with deep crevasses too wide to jump!,
  43. 42 DATA ,in the green room.,
  44. 43 DATA ,on a high plateau. The bridge leads back across the glacier.,
  45. 44 D$="nsewud"
  46. 45 KN=0:MS=0:S=0:WA=0
  47. 46 O=&C00:EX=&70:VDU15:GOSUB249
  48. 47 DATA ,in the catacombs.,
  49. 48 DATA ,in the hall of the mountain king.,
  50. 49 DATA ,in an old pirates hideout. Many seafaring relics lie here.,
  51. 50 DATA ,on the edge of the desert. A huge sphinx sits here.,
  52. 51 DATA ,in the safe.,
  53. 52 REM
  54. 53 REM
  55. 54 REM
  56. 55 REM
  57. 56 REM
  58. 57 REM
  59. 58 REM
  60. 59 REM
  61. 60 REM
  62. 61 REM
  63. 62 REM
  64. 63 REM
  65. 64 REM
  66. 65 REM
  67. 66 REM
  68. 67 REM
  69. 68 REM
  70. 69 REM
  71. 70 LF=150
  72. 71 DATA ,in the desert.,
  73. 72 REM
  74. 73 DATA ,in the red room.,
  75. 74 DATA ,in the white room.,
  76. 75 DATA ,in the orange room.,
  77. 76 DATA ,in the purple room.,
  78. 77 K=0:W1=0
  79. 78 B2$=" "
  80. 79 I=0:X=0:T=0:CH=0:VO=0:KL=0:CF=0
  81. 80 D=0:SA=0:FL=1:LI=0:SC=0:C=-3:V=0:G=0:BE=0:RA=0
  82. 81 DATA ,at a cross in the tunnels.,
  83. 82 REM
  84. 83 REM
  85. 84 REM
  86. 85 REM
  87. 86 REM
  88. 87 REM
  89. 88 REM
  90. 89 REM
  91. 90 REM
  92. 91 DATA ,wandering about in the iron passages. Your compass directions seem to be rather confused.,
  93. 92 DATA ,at the foot of a hill. A castle can be seen at the top of it.,
  94. 93 DATA ,in the castle gateway. The castle has obviously been left derelict for many years as the walls are begining to crumble away.,
  95. 94 DATA ,in an immense courtyard.,
  96. 95 DATA ,in the ruins of the north tower.,
  97. 96 DATA ,in the dungeons. The air here is very musty. The floor is covered in dust and cobwebs cling to you as you move.,
  98. 97 DATA ,in the Count's dining room. The decorations on the walls here are the blood stains of some of his unfortunate victims!,
  99. 98 DATA ,on a steep staircase.,
  100. 99 DATA ,in the south tower.,
  101. 100 DATA ,in the ballroom. The music of the orchestras which used to play here still lingers on.,
  102. 101 DATA ,at the entrance to the gnomes' halls.,
  103. 102 DATA ,in the gnomes' kitchen.,
  104. 103 DATA ,in the main hall. The Gnomes are obviously very untidy! They are also very shy and slip silently away as you enter.,
  105. 104 DATA ,at a T-junction.,
  106. 105 DATA ,at the south end of the main hall.,
  107. 106 REM
  108. 107 DATA ,in a low tunnel.,
  109. 108 DATA ,in the dairy. There is a mouth_watering smell here of buttermilk and cheese.,
  110. 109 DATA ,"in the pit. It is small,dark and very unpleasant here.",
  111. 110 DATA ,in the rainbow room. The walls are decorated with all the colours imaginable.,
  112. 111 DATA ,in a large chamber decorated in the style of the maharaja's palace.,
  113. 112 DATA ,in a tiny water-worn pipe.,
  114. 113 DATA ,in a tunnel hewn out of the rock by a giant explosion.,
  115. 114 DATA ,in a room full of bottles of chemicals. This is the alchemist's store. The smell of sulphur is overpowering.,
  116. 115 DATA ,in a very tight passageway. A cool damp wind blows from the south.,
  117. 116 DATA ,in a dark damp passageway. The ground is becoming a little soggy here.,
  118. 117 DATA ,in the Everglades. It is rather swampy here and the mosquitoes are real pests!,
  119. 118 DATA ,in a dark damp passageway. The ground is a little soggy here.,
  120. 119 DATA ,in the alchemist's laboratory. There's a powerful sulphurous odour!,
  121. 120 DATA ,on a small path winding its way through a petrified forest.,#
  122. 121 REM
  123. 122 DATA ,at a T-junction.,
  124. 123 DATA ,in the music room. Beautiful melodies echo all around.,
  125. 124 DATA ,at a T-junction.,
  126. 125 DATA ,on the yellow brick road. Well I think it was yellow once upon a time but it has got rather muddy now.,
  127. 126 DATA ,in an immense canyon. The sides reach upwards as far as the eye can see.,
  128. 127 DATA ,in a small shrine obviously devoted to some fairy chief as pictures of him decorate all the walls.,
  129. 128 DATA ,in a small passage. The ground is rather soft underfoot.,
  130. 129 DATA ,in a patch of quicksand. Luckily though some kind previous adventurer has put a plank down so you can go on safely.,
  131. 130 DATA ,at a dead_end. Oh dear you seem to have struggled through that quicksand for nothing.,
  132. 131 DATA ,in the treasury.,
  133. 132 DATA ,at yet another dead_end.,
  134. 133 DATA ,at a dead end. You'll have to follow the yellow brick road once more.,
  135. 134 DATA ,at the end of the yellow brick road. I'm afraid you can't go any further in this direction as the rest of the road hasn't been built yet.,
  136. 135 DATA ,in a fairy grotto. It is very beautiful but seems to be deserted.,
  137. 136 DATA ,on the east shore. The mountains rise sharply all around the cove.,
  138. 137 DATA ,in the wizard's spell-chamber. When you entered the wizard was here mumbling about some lost spell-books. He saw you grunted something and vanished.,
  139. 138 DATA ,in the west antechamber to the inner sanctum.,
  140. 139 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''.,
  141. 140 DATA ,in the east antechamber.,
  142. 141 DATA ,in a room similar to the spell-chamber.,
  143. 142 DATA ,in the serpent's stomach. Oh dear you seem to have become the monster's lunch.,
  144. 143 DATA ,at the bottom of the rock slide. It is cramped and airless here. There is no obvious way to get out.,
  145. 144 DATA0,13,3,11,3,0,143,49,17,40,39,38,134,19,51,0,42,0,131,132,22,34,49,31,20,0,5,15,14,36,0,30,48,26,29,10,32,21,24,94,117,111,0,142,110,95,138,92,126,108,119,96,0,117,15,3
  146. 145 DATA0,0,0,0,0,0,4,5,4,4,0,0,0,0,0,0,0,0
  147. 146 DATA4,4,4,4,0,0,2,6,7,4,0,0,5,4,4,4,0,0
  148. 147 DATA4,4,8,5,0,0,4,4,4,7,0,9,0,14,10,0,8,0
  149. 148 DATA15,11,16,9,0,0,10,0,12,0,0,0,0,13,14,11,0,0
  150. 149 DATA12,0,0,0,0,17,9,0,0,12,0,0,0,10,17,0,0,0
  151. 150 DATA0,17,18,10,0,0,16,0,0,15,13,0,19,0,0,16,0,0
  152. 151 DATA0,18,0,0,0,0,21,0,22,0,0,0,0,20,23,0,0,0
  153. 152 DATA0,25,0,20,24,0,120,0,24,21,0,0,0,0,0,23,51,22
  154. 153 DATA22,26,0,0,0,0,25,0,0,0,0,0,0,0,30,28,0,0
  155. 154 DATA0,29,27,0,0,143,28,39,0,0,0,0,31,0,0,27,33,0
  156. 155 DATA0,30,32,0,0,0,40,0,0,31,0,0,0,34,35,0,0,30
  157. 156 DATA33,0,0,73,0,0,0,36,0,33,0,0,35,0,0,0,0,37
  158. 157 DATA0,0,0,38,36,0,0,0,37,0,0,0,29,72,0,0,0,0
  159. 158 DATA0,32,0,0,42,41,0,0,0,0,40,0,0,0,0,0,0,40
  160. 159 DATA44,0,0,46,47,0,45,43,47,46,0,0,0,44,111,0,46,47
  161. 160 DATA45,43,44,48,46,47,45,43,44,0,0,0,0,0,46,49,0,101
  162. 161 DATA52,0,48,0,0,0,0,71,0,0,0,0,0,0,0,0,0,24
  163. 162 DATA0,0,53,49,0,0,54,52,52,52,0,0,53,55,53,53,0,0,54,54,56,54,0,0,55,55,55,57,0,0,56,56,58,56,0,0,57,59,57,57,0,0,60,58,58,58,0,0,59,61,59,59,0,0,60,60,62,60,0,0,61,61,61,63,0,0,62,62,64,62,0,0,63,65,63,63,0,0,66,64,64,64,0,0
  164. 163 DATA65,67,65,65,0,0,52,66,68,66,0,0,67,67,67,69,0,0,68,68,70,68,0,0,69,71,69,69,0,0,50,70,70,70,0,0
  165. 164 DATA73,39,0,74,0,81,81,0,86,72,74,0,0,72,73,75,0,79,74,0,76,0,76,77,75,77,0,0,78,75,78,79,0,0,75,76,76,0,79,77,0,82,0,74,78,77,80,0,0,81,82,86,79,0,72,0,73,80,0,82,80,78,0,0,81,83,84,87,0,0,85,82,87,0,85,83,0,88
  166. 165 DATA0,87,84,83,86,0,73,0,80,87,0,85,83,84,0,0,85,86,84,0,89,90,0,91,90,0,90,88,0,91,89,89,0,0,88,91,88,89,0,0,92,90,0,91,0,93,0,0,0,0,92,0,94,0,98,99,97,0,95,93,0,100,0,0,0,94,0,0,0,0,100,0,0,0,100,94,0,0,0,94,0,100,0,0,94,0,0,0
  167. 166 DATA0,100,95,0,98,97,99,96,102,0,103,0,48,0,0,101,0,108,0,107,0,105,0,101,0,109,0,106,107,0,110,0,103,0,0,0,0,106,104,0,0,0,105,0,0,0,0,104,102,0,0,0,0,102,0,0,0,0,0,0,103,0,0,0,104,0,0,0,112,0,0,45,0,0,0,111,0,0,113,0,0,0,114,0,0,112
  168. 167 DATA119,0,0,113,0,0,0,116,0,120,0,0,115,117,0,0,0,0,116,0,118,0,0,0,0,0,121,117,0,0,0,114,0,0,0,0,0,23,115,0,0,0,0,123,122,118,0,0,0,0,131,121,124,0,121,127,0,132,0,0,0,126,0,128,0,122,126,0,133,134,0,0,124,125,0,0,0,0,123,0,0,0,135,0
  169. 168 DATA0,0,124,129,0,0,0,0,128,0,0,130,0,0,0,0,129,0,0,0,0,122,0,0,0,0,123,0,0,0,0,0,0,125,0,0,0,0,125,0,0,0,0,0,0,0,0,127,0,0,0,0,0,137,0,0,0,0,136,0,0,0,139,0,0,0,0,140,0,138,0,0,139,0,141,0,0,0,0,0,0,140,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  170. 169 RESTORE144:FORJ=1TO55:READO?J:NEXTJ
  171. 170 REM :DATA,axe,sword,lamp,wand,keys,teeth,jack,chest,food,clam,sapphires,diamond,gold,silver,platinum,rubies,emerald,pearls,coins,opals,books,spices,sceptre
  172. 171 DATAcushion,rug,ring,bottle,water,carrot,dragon,dwarf,ogre,goblins,troll,bear,pirate,orc,rabbit,safe,casket,crocodile,elephant,vampire,serpent,bracelet,amethyst,crown,boat,stake,stilton,matches,mouse,bridge,swamp,lake,building, [0x0C]
  173. 172 DATAget,take,open,wave,throw,drop,kill,eat,cross,feed,rub,light,read,pay
  174. 173 DATAinventory,enter,out,leave,kneel,quit,score,look,in,help,diaxos,north,south,east,west,up,down,fill,go
  175. 174 DATA ,You're not carrying anything.,I don't understand the word ,You're currently holding ,There is ,There is no way to go that direction!,You're joking!
  176. 175 DATAI see no ,You're not carrying the ,You killed a little dwarf!,That made the goblins really mad!,The bear is confused. He only wants to be your friend!
  177. 176 DATAThe pirate dodges smartly away into the tunnels!,The orc dodges and then growls ominously at you! ,The rabbit hops aside and says NEEERH WHAT'S UP DOC ?
  178. 177 DATANothing obvious happens!,Well done! You vanquished a dragon with your bare hands!,The chest opens easily with the keys revealing many rubies.,"You can't with no keys! "
  179. 178 DATAYou open up the clam with the jack and many pearls roll out.,You can't do that at the moment.,I can't apply that.,A bridge now spans the ,Strange your lamp is brighter now!
  180. 179 DATAThanks it was delicious! ,You can't! It's too wide to jump.,Arrgh the bridge collapsed.,The troll won't let you get by.,You have nothing it wants.
  181. 180 DATA"There is a dwarf here. He throws an axe at you,",You fell in a pit.,"You can't! The safe door is shut."
  182. 181 DATAARRRGH! CRASH!! The rocks gave way and you rolled to the bottom of the rock slide.
  183. 182 DATAThe crocodile snaps its jaws neatly biting your leg off.You bleed to death!,The elephant is blocking the way.,Your matches flare up making a lot of smoke.
  184. 183 DATAThe serpent starts to cough violently and you get thrown out.,It's too wide to swim.,You set off in the boat.Suddenly a sea-serpent leaps from beneath the waves and swallows you!
  185. 184 DATA"The fairy king appears, hands you a mithril ring, bows and slips away.",The mouse eats the stilton and allows itself to be caught.,The mouse runs around refusing to be caught.
  186. 185 DATAThe sword kills the dragon. Then both sword and dragon fade away until only the dragon's teeth remain.
  187. 186 DATAThe stake pierces the vampire's chest he screams and is dispersed on the wind.,The vampire leaps on you and drains your blood.
  188. 187 DATASuddenly a huge bird swoops down snatches the food and carries you across the swamp.,I can't apply that without a noun.
  189. 188 DATAWhat do you want to do to the ,
  190. 190 PRINT'"PRESS ANY KEY TO CONTINUE":REPEAT:UNTILGET<>0:CLS:PRINT''':PROCL(L)
  191. 191 PRINT:A$=" ":X=0:A2$=" ":A1$=" ":M=0:K=0:T=T+1:IFLI=1THENLF=LF-1:W1=0:W2=0
  192. 192 IFRND(1)>0.97ANDT-S>25THENO?31=L:S=T
  193. 193 IFL<>O?31THEN195ELSED=D+1:PROCR(29):IFO?1<>1THENO?1=L ELSEPRINTCHR$(127);"."'"The axe vanishes after";
  194. 194 IFD>6ORRND(1)>0.95THENPRINT" it gets you!":GOTO449ELSEPRINT" it misses."
  195. 195 R$=" ":IFL=48ANDL=O?33THENG=G+1:IFG>=5THENPRINTFNS("The goblins suddenly leap upon you and tear you limb-from-limb!",40):GOTO449:R$=" "
  196. 196 IFL=O?43THENV=V+1:IFV>=2THENPROCR(44):GOTO449
  197. 197 IFL>8ANDO?3<>1ANDL<>O?3THENPRINT'"IT'S VERY DARK."'"IF YOU MOVE YOU MAY FALL INTO A PIT.":GOTO200
  198. 198 IFLF<=0ANDLI=1ANDO?3=1THENPRINT'"Your lamp has run out.":LI=0ELSEIFLF<10ANDLI=1ANDO?3=1THENPRINT'"Your lamp is getting dim."
  199. 199 IFLI=0ANDL>8THENPRINT'"IT'S VERY DARK."'"IF YOU MOVE YOU MAY FALL INTO A PIT."
  200. 200 PRINT:INPUTA$
  201. 201 IFLEN(A$)=0THENPRINT"What?":GOTO200
  202. 202 A$=FNCV(A$):IFLEFT$(A$,3)="inv"THENPROCL(1):GOTO191
  203. 203 IFLEN(A$)=1THENPROCM(A$,L):GOTO191
  204. 204 SP=INSTR(A$," "):IFINSTR(FNC(RIGHT$(A$,LEN(A$)-SP))," ")<>0THENPRINT"I'm sorry. I can't understand more than"'"two words at a time.":GOTO191
  205. 205 IFSP=0THENPROCV(A$):GOTO211ELSEA1$=FNC(LEFT$(A$,SP-1)):A2$=FNC(RIGHT$(A$,LEN(A$)-SP)):PROCV(A1$):PROCN(A2$)
  206. 206 IFA1$="go"ORA1$="exit"ORA1$="leave"THEN244
  207. 207 IFA1$="drink"THENPROCE(W2,2):GOTO191
  208. 208 IFW1=-1THENPROCR(2):PRINTA1$:IFW2<>-1THEN191
  209. 209 IFW2=-1THENPROCR(2):PRINTA2$:GOTO191ELSEIFW1>14THEN211
  210. 210 ONW1 GOTO213,213,214,215,216,217,218,220,221,224,225,226,227,228
  211. 211 IFA$="exit"THENPROCO(L):GOTO191ELSEIFW1<>-1THENK=W1-14ELSEPROCN(A$):IFW2=-1THENPROCR(2):PRINTA$:GOTO191ELSEPROCR(47):PRINTA$:GOTO191
  212. 212 ONK GOTO237,229,230,230,231,232,235,236,229,238,240,243,243,243,243,243,243,219,244ELSEPROCR(46):GOTO191
  213. 213 PROCG(W2,L,1):IFX=0THENC=C+1:GOTO191ELSEGOTO191
  214. 214 PROCOP(W2):GOTO191
  215. 215 PROCWV(W2):GOTO191
  216. 216 PROCT(W2):IFX=0THENC=C-1:GOTO191ELSEGOTO191
  217. 217 PROCG(W2,1,L):IFX=0THENC=C-1:GOTO191ELSEGOTO191
  218. 218 PROCK(W2):GOTO191
  219. 219 PROCF(W2):GOTO191
  220. 220 PROCE(W2,1):GOTO191
  221. 221 PROCC(W2):GOTO191
  222. 222 IFW2=53THENPROCC(W2):GOTO191
  223. 223 IFW2=56THENIFL<>3ANDL<9THENL=3:PROCL(L):GOTO191ELSEIFL=3THENL=2:PROCL(L):GOTO191ELSEPROCR(21):GOTO191
  224. 224 PROCFE(W2):GOTO191
  225. 225 PROCRU(W2):GOTO191
  226. 226 PROCLI(W2):GOTO191
  227. 227 PROCRE(W2):GOTO191
  228. 228 PROCP(W2):GOTO191
  229. 229 PROCI(L):GOTO191
  230. 230 PROCO(L):GOTO191
  231. 231 R$="“":KN=1:PRINT"You are kneeling down.":GOTO191
  232. 232 PRINT"You dont want to quit already do you?"
  233. 233 INPUT"yes or no",A$:A$=LEFT$(FNCV(A$),1):IFA$="n"THEN191
  234. 234 IFA$="y"THENPRINT"OK":PROCS(L):END ELSEGOTO233
  235. 235 PROCS(L):GOTO191
  236. 236 PROCL(L):GOTO191
  237. 237 PROCL(1):GOTO191
  238. 238 PRINT"I can't, you're on your own."
  239. 239 GOSUB251:GOTO191
  240. 240 SA=SA EOR1
  241. 241 PRINT"There was a very loud creaking sound then!":IFL=137THENL=138ELSEIFL=141THENL=11
  242. 242 PROCL(L):GOTO191
  243. 243 A1$=LEFT$(A1$,1):PROCM(A1$,L):GOTO191
  244. 244 A2$=FNC(A2$):PROCV(A2$):IFW1>25ANDW1<32THENPROCM(LEFT$(A2$,1),L):GOTO191ELSEIFLEN(A2$)=1THENPROCM(A2$,L):GOTO191ELSEIFW1<>-1THENK=W1-14:GOTO212
  245. 245 PROCN(A2$):IFW2=-1THENPROCR(21):GOTO191
  246. 246 IFW2=53THENPROCC(W2):GOTO191
  247. 247 IFW2<>56THENPROCR(21):GOTO191ELSEIFL<>3ANDL<9THENL=3:PROCL(L):GOTO191ELSEIFL=3THENL=2:PROCL(L):GOTO191
  248. 248 PROCR(21):GOTO191
  249. 249 MODE7:L=6:PRINT''':FORN=1TO2:PRINTCHR$&8D" WELCOME TO THE SPHINX ADVENTURE":NEXTN:PRINT:FORN=1TO2:PRINTCHR$&8D" GOOD LUCK IN YOUR EXPLORATIONS HERE!!":NEXTN:PRINT''
  250. 250 PRINT"Try to find all the treasure and take itto the sphinx.":RETURN
  251. 251 PRINT"To move use directions such as N,S or E.I can understand simple instructions."
  252. 252 PRINT"These statements should be in the form <verb> <noun> separated by a space.If you get stuck try something completely different."'"By the way magic is quite useful!":RETURN
  253. 253 DEFPROCW(N):LOCALJ:RESTORE170:FORJ=1TON:READR$:IFASC(R$)<32THENREADR$:NEXTJ:ENDPROC ELSE NEXTJ:ENDPROC
  254. 254 DEFPROCN(B2$)
  255. 255 LOCALI%:RESTORE170:REPEAT:I%=I%+1:READR$:UNTILB2$=R$ORI%>=57
  256. 256 IFI%>=57THENX=1:W2=-1ELSEW2=I%:A2$=R$
  257. 257 ENDPROC
  258. 258 DEFPROCV(B1$)
  259. 259 LOCALI%:RESTORE172:REPEAT:I%=I%+1:READR$:UNTILB1$=R$ORI%>=38
  260. 260 IFI%=38THENX=1:W1=-1ELSEW1=I%:A1$=R$
  261. 261 ENDPROC
  262. 262 DEFPROCR(N)
  263. 263 LOCALJ:CO=0:CN=0:RESTORE174:READR$:FORJ=1TON:READR$:NEXTJ
  264. 264 IFPOS+LEN(R$)>CO-CN+39THENR$=FNS(R$,39+CO-CN):CO=CO+39:GOTO264
  265. 265 PRINTR$;:ENDPROC
  266. 266 DEFPROCL(L)
  267. 267 LOCALI,J:CO=0:CN=0
  268. 268 IFL=1THEN278
  269. 269 PRINT':RESTORE L:IFO?31<>0THENO?31=0:DW=1
  270. 270 READR$,R$:R$="You are "+R$
  271. 271 IFLEN(R$)+POS>CO-CN+39THENR$=FNS(R$,39+CO-CN):CO=CO+39:GOTO271
  272. 272 PRINTR$:IFL=136ORL=15THENO?56=L
  273. 273 IFL=16ANDFL=1THENPRINT"The walls are very hot!"ELSEIFL=16THENPRINT"The walls are steaming!"
  274. 274 IFL<>3ANDL<>142ANDL<>143THENPROCEX(L):IFABS(L-19)=1ANDCH=1THENPRINTELSEIFABS(L-42)=1ANDVO=1THENPRINT
  275. 275 IFCH=1ANDABS(L-19)=1THENPROCR(22):PRINT"chasm.":O?53=L
  276. 276 IFVO=1ANDABS(L-42)=1THENPROCR(22):PRINT"glacier.":O?53=L
  277. 277 IFL=26ORL=27THENO?53=L
  278. 278 J=0:I=0:CO=0
  279. 279 REPEAT:J=J+1:IFO?J=L THENCO=CO+1
  280. 280 UNTILJ=52:IFCO=0ANDL=1THENPROCR(L):GOTO284ELSEIFCO=0ANDL<>1THEN284ELSEPRINT:MAX=CO
  281. 281 IFL=1THENPROCR(3)ELSEPROCR(4)
  282. 282 CN=0:CO=MAX:REPEATI=I+1:IFO?I=L THENPROCOT(I,CO):CO=CO-1
  283. 283 UNTILI=52
  284. 284 IFD<>0THENO?31=L
  285. 285 IFCF=1ANDL=94THENPRINT'"The casket is open."
  286. 286 IFL=24ANDSA=1THENPRINT'"The safe door is open."
  287. 287 PRINT:ENDPROC
  288. 288 DEFPROCEX(L):LOCALI,J,CO:RESTORE145:I=L*6-6:FORJ=1TOI:READMAP:NEXTJ:FORJ=1TO6:READMAP:IFMAP>0THENCO=CO+1:EX?J=1ELSEEX?J=0
  289. 289 NEXTJ:IFCO>1THENO$="There are exits to the "ELSEIFCO=1THENO$="There is an exit "
  290. 290 FORJ=1TO6:PROCW(81+J)
  291. 291 IFCO=0OREX?J=0THEN296
  292. 292 IFCO>2THENO$=O$+R$+", "
  293. 293 IFCO=2THENO$=O$+R$+" and "
  294. 294 IFCO=1THENO$=O$+R$+"."
  295. 295 CO=CO-1
  296. 296 NEXTJ:PRINTFNS(O$,40)
  297. 297 ENDPROC:REM PMF
  298. 298 DEF PROCOP(W2)
  299. 299 IFO?W2<>L ANDO?W2<>1ANDW2<>28THENPROCR(7):PRINTA2$;" here.":GOTO306
  300. 300 IFW2=40ANDL=94ANDCF=0THENO?43=94:CF=1:PROCL(L):GOTO306
  301. 301 IFW2=39THENPROCR(20)
  302. 302 IFW2=8ANDO?5=1THENPROCR(17):O?16=L ELSEIFW2=8THENPROCR(18)
  303. 303 IFW2=10ANDO?7=1THENPROCR(19):O?18=L ELSEIFW2=10THENPROCR(20)
  304. 304 IFW2=8ORW2=10ORW2=39THEN306
  305. 305 PROCR(21)
  306. 306 ENDPROC
  307. 307 DEFPROCM(A$,N)
  308. 308 M=INSTR(D$,A$):X=0
  309. 309 IFM=0THENPROCR(2):PRINTA$:GOTO318
  310. 310 PROCTR(N,M):RESTORE 145:IFX=1THEN314
  311. 311 IFLI=0THENIFN>8THENIFRND(1)>0.5THENPROCR(30):GOTO449
  312. 312 FORJ=1TON*6-6:READMAP:NEXTJ
  313. 313 FORJ=1TOM:READMAP:NEXTJ:IFMAP=0THENPROCR(5)ELSEL=MAP
  314. 314 IFL=4THENIFRND(1)>0.75THENL=2
  315. 315 IFBE=1THENO?35=L
  316. 316 IFRA=1THENO?38=L
  317. 317 PROCL(L):IFL=33ANDRND(1)>0.5PRINT"A hollow voice whispers diaxos."
  318. 318 ENDPROC
  319. 319 DEFPROCG(W2,N,K)
  320. 320 IFNOT(W2=8ORW2=10ORABS(W2-37)<=7ORW2>=53)THEN321ELSEX=1:IFO?W2<>N THENPROCR(8-SGN(N-1)):PRINTA2$;" here":GOTO332ELSEPROCR(6):GOTO332
  321. 321 R$="’":IFK=1ANDW2=28ANDO?27<>1ANDL=15THENPRINT"You have nothing to put it in, so"'"it runs away through your fingers.":GOTO332
  322. 322 IFW2=28ANDWA=1THENO?28=1ELSEIFW2=28THENO?28=15ELSEIFW2=52ANDK=1PROCR(41):ENDPROC
  323. 323 R$=" ":IFW2=52ANDN=1ANDK=111ANDO?42=111THENO?42=0:A1$="drop":A2$="mouse."+CHR$(10)+CHR$(13)+"The elephant sees it and runs away"
  324. 324 R$=" "
  325. 325 IFC=15ANDK=1THENPRINTFNS("You can't carry anything more, you'll have to drop something first.",39):X=1:GOTO332
  326. 326 IFK=1ANDO?27=1ANDO?28=1ANDW2=28THENPRINT"Your bottle is already full.":X=1:GOTO330
  327. 327 IFN=1ANDW2=27ANDWA=1THENWA=0:PRINT"You drop the bottle and all the water leaks away!":C=C-1:A1$="will have to get some more from":A2$="lake"
  328. 328 IFW2=28ANDK=1ANDO?28=N THENA1$="fill":A2$="bottle with the water"
  329. 329 IFO?W2=N THENO?W2=K:PRINT"You ";A1$;" the ";A2$;"."ELSEIFK=1THENPROCR(7):PRINTA2$;" here.":X=1ELSEPROCR(8):PRINTA2$;" here.":X=1
  330. 330 IFO?28=1ANDW2=28THENO?28=15:WA=1ELSEIFW2=28THENO?28=15:WA=0
  331. 331 IFL=117ANDN=1ANDW2<>9THENO?W2=0:PRINT"Oh dear the ";A2$;" sank into the swamp."
  332. 332 ENDPROC
  333. 333 DEF PROCTR(L,N)
  334. 334 IFL=O?36THENI=11:REPEAT:I=I+1:UNTILO?I=1ORI=30:IFI<30THENO?I=51:PROCW(I):PRINT"The pirate snatches your ";R$:C%=C%-1:IFI=27ANDWA=1THENWA=0
  335. 335 IFL=O?35THENBE=1:PRINT"There is a brown bear following you. ";
  336. 336 IFL=O?38THENRA=1:PRINT"The giant rabbit is still with you! ";
  337. 337 IFL=16ANDFL=1ANDN=3THENX=1:PRINT"The flame's heat drives you back."
  338. 338 IFL=117ANDN=3ANDO?41=117THENPROCR(33):GOTO449
  339. 339 IFL=94ANDN<>6ANDCF=0THENO?43=94:CF=1:GOTO349
  340. 340 IFL=111ANDN=1ANDL=O?42THENPROCR(34):X=1:GOTO349
  341. 341 IFL=48ANDL=O?33ANDN=4THENX=1:PRINT"The goblins crowd around and stop you."
  342. 342 IFL=30ANDN=1ANDL=O?32THENX=1:PRINT"The ogre is blocking the way."
  343. 343 IFL=36ANDN=6ANDL=O?30THENX=1:PRINT"The dragon is blocking the way."
  344. 344 IFL=32ANDL=O?37ANDL=O?35THENPRINT"The bear growls and chases the orc away.":O?35=0:O?37=0:BE=0
  345. 345 IFL=32ANDL=O?37ANDN=1THENX=1:PRINT"The orc won't let you get by."
  346. 346 IF(L=24ANDN=5)OR(L=51ANDN=6)THENIFSA=0THENX=1:PROCR(31):PRINT
  347. 347 IFL=51ANDN=6THENIFSA=0THENX=1:PROCR(31):PRINT
  348. 348 IFL=28ANDN=6THENPROCR(32):PRINT
  349. 349 ENDPROC
  350. 350 DEFPROCK(W):IFO?W<>L THENPROCR(7):PRINTA2$;" here.":GOTO354ELSEIFW<30ORW=39ORW=40ORABS(W-48)<4ORW>52THENPROCR(6):GOTO354
  351. 351 INPUT"What with? Your bare hands",B$:B$=FNCV(B$)
  352. 352 IFB$<>"no"THEN353ELSEINPUT"What with then",A2$:PROCN(FNCV(A2$)):IFX=1THEN354ELSEA1$="throw":PROCT(W2):IFX=1THEN354ELSEC=C-1:GOTO354
  353. 353 IFB$<>"yes"THENPRINT"yes or no":GOTO351ELSEIFW=30THENPROCR(16):O?30=0:O?6=L ELSEPRINT"Your blows are useless."
  354. 354 ENDPROC
  355. 355 DEFPROCWV(W2)
  356. 356 IFO?W2<>1ANDW2<>28THENPROCR(8):PRINTA2$;".":GOTO362ELSEIFW2=28THENPROCR(21):GOTO362
  357. 357 IFW2<>4THENPRINT"OK":GOTO362
  358. 358 IFL=18ANDCH=0THENPROCR(22):PRINT"chasm.":CH=1:O?53=L:GOTO362ELSEIFL=135ANDO?26=0THENPROCR(39):O?26=1:GOTO362
  359. 359 IFL=41ANDVO=0THENPROCR(22):PRINT"glacier.":VO=1:O?53=L:GOTO362
  360. 360 IFL=50ANDKN=1THENMS=1:GOTO446
  361. 361 PROCR(15)
  362. 362 ENDPROC
  363. 363 DEFPROCE(W2,N)
  364. 364 IFW2=28ANDN=2AND(WA=1ORL=15)THENPROCR(24):WA=0:GOTO369
  365. 365 IFW2=28THENPROCR(21):GOTO369
  366. 366 IFO?W2<>1THENPROCR(8):PRINTA2$;" here.":GOTO369
  367. 367 IFN=1THENIFW2=9ORW2=29ORW2=50THENPROCR(24):O?W2=0:GOTO369
  368. 368 PROCR(6)
  369. 369 ENDPROC
  370. 370 DEFPROCC(W2):IFO?W2<>1ANDO?W2<>L ANDW2<>28THENPROCR(7):PRINTA2$;" here.":GOTO378ELSEIFW2=28THENPROCR(21):GOTO378
  371. 371 IFL<>18THEN372ELSEIFCH=1THENL=20:PROCL(L):GOTO378ELSEPROCR(25):GOTO378
  372. 372 IFL<>20THEN373ELSEIFCH=1THENL=18:PROCL(L):GOTO378ELSEPROCR(25):GOTO378
  373. 373 IFABS(L-42)<>1THEN374ELSEIFVO=0THENPROCR(25):GOTO378ELSEIFO?26=1THENL=L-2*SGN(L-42):PROCL(L):GOTO378ELSEPROCR(26):GOTO449
  374. 374 IFABS(L-26.5)<1ANDO?34=26THENPROCR(27):GOTO378
  375. 375 IFL<>27ANDL<>26THEN376ELSEIFRA=1ORBE=1THENPROCR(26):GOTO449ELSEL=27+(L=27):PROCL(L):GOTO378
  376. 376 IFL=15ANDW2=55ANDO?48=1THENL=142:PROCR(38):PROCL(L):O?48=0:GOTO378ELSEIFL=15ANDW2=55THENPROCR(37):GOTO378
  377. 377 PROCR(21)
  378. 378 ENDPROC
  379. 379 DEF PROCT(W2)
  380. 380 PROCG(W2,1,L)
  381. 381 IFX=1THEN407
  382. 382 R$=" ":IFW2>1THEN393
  383. 383 IFL=O?31ANDRND(1)<0.6THENO?31=0:D=0:PROCR(9):GOTO407ELSEIFL=O?31THENPRINT"The dwarf dodges neatly aside.":GOTO407
  384. 384 IFL=O?32THENPRINT"The ogre catches the axe and slices you in two with it.":GOTO449
  385. 385 IFL=O?30THENPRINT"The axe bounces harmlessly off the dragon.":GOTO407
  386. 386 IFL=O?33THENPROCR(10):GOTO407
  387. 387 IFL=O?34THENPRINTFNS("The troll ducks, picks up the fallen axe and kills you with a single blow.",40):GOTO449
  388. 388 IFL=O?35THENPROCR(11):GOTO407
  389. 389 IFL=O?36THENPROCR(12):O?36=20+INT(RND(10)):GOTO407
  390. 390 IFL=O?37THENPROCR(13):GOTO407
  391. 391 IFL=O?38THENPROCR(14)
  392. 392 GOTO407
  393. 393 IFW2>2THEN403
  394. 394 IFL=O?31THENPROCR(9):D=0:O?31=0:GOTO407
  395. 395 IFL=O?32THENPRINT"The sword kills the ogre but then melts away.":O?32=0:O?2=0:GOTO407
  396. 396 IFL=O?30THENPROCR(42):O?30=0:O?2=0:O?6=L:GOTO407
  397. 397 IFL=O?33THENPROCR(10):GOTO407
  398. 398 IFL=O?34THENPRINTFNS("The troll catches the sword and kills you with a single stroke.",40):GOTO449
  399. 399 IFL=O?35THENPROCR(11):GOTO407
  400. 400 IFL=O?36THENPROCR(12):O?36=20+INT(RND(10)):GOTO407
  401. 401 IFL=O?37THENPROCR(13):GOTO407
  402. 402 IFL=O?38THENPROCR(14):GOTO407
  403. 403 IFW2=28ANDL=16ANDFL=1THENFL=0:PRINT"The flame dies in a cloud of steam."
  404. 404 IFW2=6ANDL=O?33THENPRINTFNS("The teeth become skeleton warriors and drive the goblins away.",40):O?33=0:O?6=0ELSEIFL=O?41ANDW2=47THENPROCR(40):O?41=0:O?47=0
  405. 405 R$=" ":IFL=117ANDW2=9THENPROCR(45):L=118:O?9=0:PROCL(L)
  406. 406 IFL=O?43ANDW2=49THENPROCR(43):O?43=0:O?49=0
  407. 407 ENDPROC
  408. 408 DEFPROCFE(W2)
  409. 409 IFO?W2<>L ANDO?W2<>1ANDW2<>28THENPROCR(7):PRINTA2$;" here.":GOTO414ELSEIFW2=28THENPROCR(21):GOTO414
  410. 410 IFW2=30ORW2=32ORW2=33ORW2=37THENPRINTFNS("The only thing it wants to eat is, possibly, YOU!",40):GOTO414ELSEIFW2<>38ANDW2<>35ANDW2<>41ANDW2<>52THENPROCR(6):GOTO414
  411. 411 IFW2=41ANDO?9=1THENPRINT"You throw the food to the crocodile.":PROCR(45):L=118:PROCL(L):O?9=0:GOTO414ELSEIFW2=41THENPROCR(28):GOTO414
  412. 412 IFW2=52ANDO?50=1THENPROCR(40):O?52=1:O?50=0:GOTO414ELSEIFW2=52THENPROCR(28):GOTO414
  413. 413 IFW2=35ORW2=38THENPRINT"What with":K=W2:O$=A2$:INPUTA$:PROCN(FNCV(A$)):IFW2<>29ANDW2<>9THENPROCR(6)ELSEGOSUB489:O?W2=0:O?K=0:C=C-2:IFK=35THENBE=0:ELSEIFK=38THENRA=0
  414. 414 ENDPROC
  415. 415 DEFPROCRU(W2)
  416. 416 IFO?W2<>L ANDO?W2<>1ANDW2<>28THENPROCR(7):PRINTA2$;" here.":GOTO420ELSEIFW2=28THENPROCR(21):GOTO420
  417. 417 IFW2=3ANDLI=1ANDLF<=10THENLF=150:PROCR(23):GOTO420ELSEIFW2=3ANDLF<=0THENLF=150:PROCR(15):GOTO420ELSEIFW2=3ANDLF>0THENPROCR(15):GOTO420
  418. 418 IFW2=26THENL=11:PROCL(L):GOTO420
  419. 419 PROCR(6)
  420. 420 ENDPROC
  421. 421 DEFPROCLI(W2)
  422. 422 IFO?W2<>L ANDO?W2<>1ANDW2<>28THENPROCR(7):PRINTA2$;" here.":GOTO426ELSEIFW2=28THENPROCR(21):GOTO426
  423. 423 IFW2=51THENO?51=0:PROCR(35):IFL=142THENPROCR(36):L=136:PROCL(L):GOTO426ELSEIFW2=51THEN426
  424. 424 IFW2=3ANDLI=0ANDLF>0THENLI=1:PRINT"Your lamp is now on.":GOTO426ELSEIFW2=3ANDLI=0THENPRINT" Your lamp has run out.":GOTO426ELSEIFW2=3THENPRINT"Your lamp is already lit!":GOTO426
  425. 425 PROCR(21)
  426. 426 ENDPROC
  427. 427 DEFPROCRE(W2)IFW2=28THENPROCR(21):GOTO430
  428. 428 IFO?W2<>L ANDO?W2<>1THENPROCR(7):PRINTA2$;" here":GOTO430
  429. 429 IFW2=21THENPRINTFNS("The books tell of a land across the water.",40)ELSEPROCR(21)
  430. 430 ENDPROC
  431. 431 DEFPROCP(W2):IFW2=28THENPROCR(21):GOTO435
  432. 432 I=11
  433. 433 IFO?W2<>L ANDO?W2<>1THENPROCR(7):PRINTA2$;" here.":GOTO435
  434. 434 IFW2=34THENREPEAT:I=I+1:UNTILI=26ORO?I=1:IFI<26THENO?I=51:PROCW(I):GOSUB490:O?34=0:C=C-1ELSEPROCR(28)
  435. 435 ENDPROC
  436. 436 DEFPROCI(N):IFN=2THENL=3:PROCL(L)ELSEIFN=8THENL=9:PROCL(L)ELSEPROCR(21)
  437. 437 ENDPROC
  438. 438 DEFPROCO(N):IFN=3THENL=2:PROCL(L)ELSEIFN=9THENL=8:PROCL(L)ELSEPROCR(21)
  439. 439 ENDPROC
  440. 440 DEFPROCS(L)
  441. 441 SC=0:FORJ=11TO29:IFO?J=1ORO?J=50THENSC=SC+30
  442. 442 NEXTJ:FORJ=45TO48:IFO?J=1ORO?J=50THENSC=SC+30
  443. 443 NEXTJ:IFMS=1THENIFL=50THENSC=SC+170
  444. 444 IFSC+KL<0THENPRINT"You have scored 0 out of a possible 800."ELSEPRINT"You have scored ";SC+KL;" out of 800."
  445. 445 ENDPROC
  446. 446 PRINT"Well done ,You've solved the puzzle."
  447. 447 PROCS(L):PRINT"You had ";T;" turns."
  448. 448 END
  449. 449 PRINT'"Oh dear you seem to have been killed !":KL=KL-100:PROCS(L):PRINT"You had ";T;" turns."
  450. 450 PRINT"Do you want to be reincarnated":INPUTA$:A$=LEFT$(FNCV(A$),1):IFA$<>"y"ANDA$<>"n"THEN450
  451. 451 IFA$="y"THENL=2+INT(RND(5)):O?31=0:D=0:PROCL(L):GOTO191ELSEIFA$="n"THEN END
  452. 452 DEFFNC(Z$)
  453. 453 IFASC(Z$)=32THENZ$=RIGHT$(Z$,LEN(Z$)-1):GOTO453
  454. 454 IFRIGHT$(Z$,1)=" "THENZ$=LEFT$(Z$,LEN(Z$)-1):GOTO454
  455. 455 =Z$
  456. 456 DEFFNCV(Z$)
  457. 457 B$=""
  458. 458 FORJ=1TOLEN(Z$)
  459. 459 Q=ASC(MID$(Z$,J,1)):IFQ>64ANDQ<91THENQ=Q+32
  460. 460 B$=B$+CHR$(Q):NEXTJ
  461. 461 =FNC(B$)
  462. 462 DEFPROCF(W):IFW=28THENPROCR(21):GOTO465
  463. 463 IFO?W<>L ANDO?W<>1THENPROCR(7):PRINTA2$;" here.":GOTO465ELSEIFO?W2<>1THENPROCR(8):PRINTA2$;".":GOTO465
  464. 464 IFW=27ANDL=O?28ANDWA=0THENPRINT"Your bottle is now full of water.":WA=1ELSEIFW=27ANDL=O?28THENPRINT"your bottle is already full."ELSEPROCR(21)
  465. 465 ENDPROC
  466. 466 DEFPROCOT(W,N)
  467. 467 R$="":K=0
  468. 468 IFN=1ANDMAX<>1THENR$=R$+" and "
  469. 469 IFW=5THENR$=R$+"a set of keys,":GOTO478ELSEIFW=6THENR$=R$+"a set of dragon's teeth,":GOTO478ELSEIFW=26THENR$=R$+"a mithril ":GOTO477
  470. 470 IFW=1ORW=42ORW=17ORW=46THENR$=R$+"an ":GOTO477ELSEIFW=50THENR$=R$+"a piece of stilton,":GOTO478ELSEIFW=9THEN477ELSEIFW=7THENR$=R$+"a hydraulic ":GOTO477ELSEIFW=48ORW=49THENR$=R$+"a wooden ":GOTO477
  471. 471 IFW=11ORW=20THENR$=R$+"a cluster of ":GOTO477ELSEIFW=16ORW=18THENR$=R$+"a small fortune in ":GOTO477ELSEIFW=51THENR$=R$+"a box of ":GOTO477ELSEIFW=33THENR$=R$+"a gang of ":GOTO477
  472. 472 IFW=22THENR$=R$+"a small jar of ":GOTO477ELSEIFW=21THENR$=R$+"a collection of library ":GOTO477ELSEIFW=19THENR$=R$+"a set of ":GOTO477ELSEIFW=43THENR$=R$+"an evil ":GOTO477ELSEIFW=36THENR$=R$+"a bearded ":GOTO477
  473. 473 IFABS(W-14)<2THENR$=R$+"a bar of ":GOTO477ELSEIFW=44THENR$=R$+"a bad smell,":GOTO478ELSEIFW=32ORW=37ORW=41THENR$=R$+"a mean looking ":GOTO477ELSEIFW=30ORW=42THENR$=R$+"a large ":GOTO477ELSEIFW=35ORW=38THENR$=R$+"a friendly ":GOTO477
  474. 474 IFW<>27THEN475ELSEIFWA=0THENR$=R$+"a bottle,":GOTO478ELSER$=R$+"a bottle of water,":GOTO478
  475. 475 IFW=28ANDWA=1ANDLEFT$(A$,3)="inv"THENGOTO478ELSEIFW=28THEN477
  476. 476 R$=R$+"a "
  477. 477 O$=R$:PROCW(W):R$=O$+R$+",":IFINSTR(R$," ")=0THENR$=" "+R$:K=1
  478. 478 IFN<=2THENR$=LEFT$(R$,LEN(R$)-1)
  479. 479 IFL<>1ANDN=1THENR$=R$+" here"
  480. 480 IFN=1THENR$=R$+"."
  481. 481 IFPOS+LEN(R$)>38THENR$=FNS(R$,39)
  482. 482 IFK=1ANDASC(R$)=32THENR$=RIGHT$(R$,LEN(R$)-1)
  483. 483 CN=0:PRINTR$;:ENDPROC
  484. 484 DEFFNS(Z$,N)
  485. 485 LOCALI
  486. 486 I=N-POS
  487. 487 REPEAT:I=I-1:CN=CN+1:UNTILMID$(Z$,I,1)=" "ORI<=0
  488. 488 IFI>0THEN =LEFT$(Z$,I-1)+CHR$(10)+CHR$(13)+RIGHT$(Z$,LEN(Z$)-I)ELSE =CHR$(10)+CHR$(13)+Z$
  489. 489 PRINTFNS("The "+O$+" eats the "+A2$+" and runs away.",40):RETURN
  490. 490 PRINTFNS("The troll snatches your "+R$+" and runs away.",40):RETURN
  491. 491 END
  492.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement