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