-
Notifications
You must be signed in to change notification settings - Fork 1
/
tomb.bas.txt
179 lines (179 loc) · 12 KB
/
tomb.bas.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
1 :REM' WILL WORK WITH LEVEL II BASIC, 16K
10 CLEAR2000:CLS:PRINTCHR$(23);" **********************"
20 PRINT" ** THE ENDLESS TOMB **"
30 PRINT" **********************"
40 PRINT:PRINT:PRINT" BY ANTHONY WOOD":DEFINTA-Z
50 R=1:DIM D$(31),I(31),I$(31,12),N(31),S(31),E(31),W(31)
55 DIM IN$(12)
60 M$="CHOP! SPLAT! YUCK!, I THINK YOU GOT IT.":M1$="IT'S BODY FADES INTO A PILE OF DUST."
65 FM$="**-CONGRADULATIONS-** YOU HAVE SOLVED ALL THE PUZZLES!"
70 FORT=1TO31:READ D$(T),I(T):IFI(T)=0THEN90
80 FORI=1TOI(T):READI$(T,I):NEXT
90 READ N(T),S(T),E(T),W(T):NEXT:CLS
95 PRINT"WELCOME TO THE ENDLESS TOMB. TYPE 'SCORE' TO SEE YOUR CURRENT SCORE, A PERFECT SCORE IS 170.":PRINT
100 PRINT"YOU'RE IN "D$(R):PRINT"THERE ARE EXITS ON THE FOLLOWING WALLS: ";:IFN(R)<>0PRINT"NORTH. ";
110 IFS(R)<>0PRINT"SOUTH. ";
120 IFE(R)<>0PRINT"EAST. ";
130 IFW(R)<>0PRINT"WEST.";
140 PRINT:IFI(R)=0THEN150 :ELSEFORP=1TOI(R):PRINTI$(R,P):NEXT
150 INPUTH$:IFH$="LOOK"THEN100
160 IFH$="SCORE"PRINT"YOUR CURRENT SCORE IS:";SC:GOTO150
165 LF$=LEFT$(H$,3)
170 IF LF$<>"INV" THEN 180
175 IF IN=0 THEN PRINT"YOUR NOT CARYING ANYTHING." :ELSE FOR T=1 TO IN:PRINT IN$(T):NEXT T:GOTO 150
180 IFH$="S"ORH$="SOUTH"THENRR=S(R):GOTO1040
190 IFH$="N"ORH$="NORTH"THENRR=N(R):GOTO1040
200 IFH$="E"ORH$="EAST"THENRR=E(R):GOTO1040
210 IFH$="W"ORH$="WEST"THENRR=W(R):GOTO1040
220 IFLF$<>"ZIG"THEN240 :ELSEB$="PILLAR":GOSUB1180 :IFF=0PRINT"NOTHING HAPPENS.":GOTO150
230 PRINT"THE PILLAR MAGICLY DISAPPEARS INTO THE FLOOR.":GOSUB1140 :B$="HORSE":GOSUB1140 :I(R)=I(R)+1:I$(R,I(R))="THERE'S A GOLDEN HORSE ON THE FLOOR":GOTO150
240 G$=H$:B$=" ":GOSUB1060 :IFS=0PRINT"WHAT?":GOTO150
250 L$=LEFT$(H$,3):RR$=RIGHT$(H$,LEN(H$)-S):R$=LEFT$(RR$,3)
255 IFL$="SAY"ANDR$="ZIG"THENH$=R$:GOTO220
260 IFR$="PRI" RR$="PLATINUM PRINCE"
270 IFR$="NEC" RR$="JEWELED NECKLESS"
275 IFR$="STA" RR$="FROG STATUE"
280 IFR$="HOR" RR$="GOLDEN HORSE"
285 IFR$="SWO" RR$="JEWELED SWORD"
290 IFR$="BIR"ORR$="CAG" RR$="BIRD CAGE"
300 IFL$="GET"ORL$="PUL"ORL$="TAK"THEN310 :ELSE440
310 IF IN>6THENPRINT"YOU'RE CARRYING TOO MANY THINGS, YOUWILL HAVE TO DROP SOMETHING FIRST.":GOTO150
320 B$=R$:GOSUB1180:IFF<>2PRINT"I DON'T SEE ANY ";RR$:GOTO150
330 IFR$="WAL"ORR$="BOU"ORR$="PIL"ORR$="ROC" PRINT"IT'S TO HEAVY.":GOTO150
340 IFR$="COB"PRINT"ARE YOU CRAZY??":GOTO150
350 IF R$="CAG" B$="MONGOOSE IN CAGE":GOSUB1180 :IFF=2 IN=IN+1:IN$(IN)=B$:B$="MONGOOSE":GOSUB1140
360 IFR$="MON" B$="CAG":GOSUB1180 :IFF<>1PRINT"YOU PICK IT UP, BUT HE SOON SQUIRMS OUT OF YOUR GRIP":GOTO150 :ELSEPRINT"HE IS RESTING PEACEFULLY IN THE CAGE.":RR$="MONGOOSE IN CAGE":GOTO430
370 IFR$="HOR" B$="PILLAR":GOSUB1180 :IFF=2PRINT"THE PILLAR IS TO HIGH, YOU CAN NOT REACH THE HORSE.":GOTO150
380 IFR$="GOB" PRINT"AS YOU REACH FOR THE MONSTER, HE LETS OUT A BLOOD CURTULINGYELL AND STEPS OUT OF YOUR WAY.":GOTO150
382 IFR<>1THEN390
384 IFR$="PEA"ORR$="SAP"THEN SC=SC-10:GOTO430
386 IFR$="EME"ORR$="HOR"ORR$="PRI"ORR$="RUB"ORR$="SWO"ORR$="NEC"THENSC=SC-20:GOTO430
390 IFR$<>"SWO"THEN420
400 B$="BOOK":GOSUB1170 :IFF<>1PRINT"THE SWORD IS FIRMLY STUCK.":GOTO150
410 PRINT"YOU FEEL A SURGE OF STRENTH, AND THE SWORD EASILY SLIDES OUT OFTHE ROCK":IN=IN+1:IN$(IN)=RR$:B$="SWORD":GOSUB1130:GOTO150
420 IFR$="NEC" B$="GOBLIN":GOSUB1180 :IFF<>0 R$="GOB":GOTO380
430 B$=R$:GOSUB1140 :IN=IN+1:IN$(IN)=RR$:GOTO150
440 IFL$="BRE"ORL$="CRA"THEN450 :ELSE490
450 B$=R$:GOSUB1180 :IFF=0PRINT"I DON'T SEE A(N) ";RR$;".":GOTO150
460 IFR$<>"PYR" THEN470 :ELSEPRINT"YOU ARE SUDDENLY BLINDED BY AN INTENSE LIGHT.":B$="PYR":GOSUB1100
465 IFR=3PRINT"WHEN YOU CAN SEE AGAIN, YOU NOTICE THE EAST EXIT IS UNBLOCKED":E(R)=4:B$="WAL":GOSUB1130:GOTO150:ELSEPRINT"BUT, NOTHING SEEMS AFFECTED.":GOTO150
470 IFR$<>"SKU"THEN480:ELSEPRINT"AS THE SKULL SHATTERS YOU SEE A RUBY, IT MUST HAVE BEEN INSIDETHE SKULL!!":B$="SKU":GOSUB1100
472 B$="RUBY":GOSUB1210:I(R)=I(R)+1:I$(R,I(R))="THERE ARE PIECES OF BONE HERE.":IFR=1 SC=SC+20
475 GOTO150
480 PRINT"YOU CAN'T DO THAT.":GOTO150
490 IFL$<>"DRO"ANDL$<>"PLA"ANDL$<>"PUT"THEN590
500 B$=R$:GOSUB1180 :IFF<>1PRINT"YOU'RE NOT CARRYING THE ";RR$:GOTO150
505 B$="MONG":GOSUB1170:IF F<>1THEN520
510 IF R$="CAG" GOSUB1100:B$="CAGE":GOSUB1100 :I(R)=I(R)+1:I$(R,I(R))=RR$:I(R)=I(R)+1:I$(R,I(R))="MONGOOSE IN CAGE":PRINT"OK":GOTO150
520 IF(R$="NEC"ORR$="RUB"ORR$="SWO"ORR$="EME"ORR$="HOR"ORR$="PRI")ANDR=1THENSC=SC+20:IFSC=170 PRINTFM$:END
530 IF(R$="SAP"ORR$="PEA")ANDR=1THENSC=SC+10:IFSC=170PRINTFM$:END
540 IFR$="MON" B$="COB":GOSUB1180 :IFF<>0PRINT"THE MONGOOSE CIRCLES THE SNAKE.... HE POUNCES ANDEATS THE SNAKE WHOLE!":B$="COB":GOSUB1140 :N(R)=8:S(R)=9:B$="MON":RR$="FAT MONGOOSE"
550 IFR<>23ORR$<>"CRO"ORA=1THEN580 :ELSEPRINT"A GLOWING GHOST SLOWLY RISES OUT OF THE GRAVE AND BOOMS,' FOR THE GOOD DEED OF NAMING MY POOR SOUL I WILL REWARD YOUWITH SOME POINTS IF YOU ANSWER THIS RIDDLE CORRECTLY (1 GUESS):"
560 PRINT" WHAT CAN SLAY THE MIGHTYIST DRAGON, CAN CHANGE THE COURSE OF RIVERS,"
565 PRINT" YET CAN NOT BE SEEN NOR SLAIN?'":INPUTA$:IFA$="TIME"THEN PRINT"YES!!":SC=SC+30 :ELSE PRINT"SORRY"
570 PRINT"BOOMS THE GHOST, THEN FLOATS AWAY.":A=1
580 B$=RR$:GOSUB1205:B$=R$:GOSUB1100:PRINT"OK":GOTO150
590 IFL$<>"KIS"THEN650
600 IFR$<>"FRO"ANDR$<>"STA"THENPRINT"FUNNY, NOTHING HAPPENED.":GOTO150
610 B$="FROG":GOSUB1180 :IFF=0THENPRINT"THERE ISN'T A FROG HERE.":GOTO150
620 PRINT"WOW!!, THE FROG TURNED TO A PLATINUM PRINCE!!!":GOSUB1100
630 IFF=1 IN=IN+1:IN$(IN)="PLATINUM PRINCE":GOTO150
640 B$="PLATINUM PRINCE":GOSUB1210::IFR=1THENSC=SC+20:IFSC=170THENPRINTFM$:END
645 GOTO150
650 IFL$="MOV"ORL$="SLI"ORL$="ROL"ORL$="PUS"THEN660:ELSE700
660 IFR$="WAL"THENPRINT"THE WALL IS VERY STRONG, YOU CAN'T MOVE IT"
670 IF(R$="BOU"ORR$="ROC")AND(R=15)ANDKY=0 PRINT"THERE'S A KEY UNDER HERE!":KY=1:B$="KEY":GOSUB1210:GOTO150
680 B$=R$:GOSUB1180 :IFF<>0PRINT"OK":ELSEPRINT"I DON'T SEE ANY ROCK"
690 GOTO150
700 IFL$<>"OPE"THEN760
710 IFR$="DOO"PRINT"OK":GOTO150
720 B$=R$:GOSUB1180 :IFF=0PRINT"I DON'T SEE A ";RR$:GOTO150
730 IFR$<>"CHE" PRINT"WHAT?":GOTO150
740 B$="KEY":GOSUB1180 :IFF<>1PRINT"THE CHEST IS LOCKED, YOU WILL NEED A KEY.":GOTO100
742 IFOC=1 PRINT"OK":GOTO150
745 IF F=1THENB$="CHEST":GOSUB1100:GOSUB1210
750 OC=1:PRINT"INSIDE THE CHEST THERE'S AN EMERALD":I(R)=I(R)+1:I$(R,I(R))="THE CHEST IS OPEN, INSIDE YOU SEE AN EMERALD!":GOTO150
760 IFL$="KIL"ORL$="STA"ORL$="CHO"THEN770 :ELSE830
770 B$="SWORD":GOSUB1180 :IFF<>1PRINT"SORRY - YOU CAN'T KILL IT WITHOUT A WEAPON.":GOTO150
780 B$=R$:GOSUB1180 :IFF=0PRINT"I DON'T SEE ONE.":GOTO150
800 IFR$="GOB" PRINTM$:PRINTM1$:B$="DIAMOND STUDED NECKLESS":GOSUB1210:B$=R$:GOSUB1140:GOTO150
810 IFR$="MON" PRINTM$:PRINTM1$:B$=R$:GOSUB1140 :GOTO150
820 GOTO1030
830 IFL$<>"EXA"ANDL$<>"REA"THEN930
835 IFR$="BOU"ANDR=15PRINT"THERE SEEMS TO BE SOMETHING UNDER IT.":GOTO150
840 IFR$="GOB"PRINT"THE GOBLIN IS AN UGLY, MEAN LOOKING MONSTER.":GOTO150
850 IFR$="BOO"PRINT"IT'S A BOOK OF THE KING ARTHUR LEGENDS.":GOTO150
860 IFR$="CHE"PRINT"IT'S JUST A COMMON OAK CHEST":GOTO150
870 IFR$="SKU"PRINT"THERE SEEMS TO BE SOMETHING INSIDE THE SKULL.":GOTO150
880 IFR$="WAL"PRINT"IT'S A STRONG BRICK WALL":GOTO150
890 IFR$="PYR"PRINT"IT'S A SMALL (ABOUT 3 INCH SIDES), GLOWING PYRAMID. THE PYRAMIDSEEMS TO CONTAIN A GREAT ENERGY SOURCE.":GOTO150
900 IFR$="HOR"THENPRINT"IT APPEARS TO BE A REPLICA OF THE TROJAN HORSE.":GOTO150
910 IFR$="GRA"PRINT"IT'S JUST AN OLD GRAVE, BUT THERE DOESN'T APPEAR TOBE A TOMB STONE.":GOTO150
920 PRINT"THERE'S NOTHING SPECIAL ABOUT IT.":GOTO150
930 IFL$<>"KIC"THEN980
940 IFR$="WAL"PRINT"YOU STUBBED YOUR TOE, BUT DID NOTHING TO THE WALL":GOTO150
950 IFR$="GOB" IFRND(2)=1PRINT"YOU SLIPPED ON A BANANA PEAL.":GOTO150 :ELSEPRINT"THE GOBLIN KICKED YOU BACK!!!":GOTO150
960 IFR$="CHE"PRINT"THE CHEST SLIDES ACROSS THE FLOOR AND STOPES UNDAMAGED.":GOTO150
965 IFR$="MON" PRINT"YOU MISS AND FALL FLAT ON YOUR BACK.":GOTO150
970 PRINT"HUH?":GOTO150
980 GOSUB1180:IFF=0PRINT"I DONT SEE ANY.":GOTO150
985 IFL$="RUB"PRINT"NOTHING EXCITING HAPPENS.":GOTO150
990 IFL$="BUR"PRINT"YOU DON'T HAVE ANY MATCHES.":GOTO150
1000 IFL$="EAT"PRINT"YUCK... I JUST LOST MY APPETITE":GOTO150
1010 IFL$="CLI"ANDR$="PIL" PRINT"THE PILLAR IS TOO HIGH AND SLIPPERY.":GOTO150
1020 IFL$="DIG"ANDR$="GRA" PRINT"THE GROUND IS TOO HARD TO DIG WITH YOUR HANDS, BESIDESI HEAR THAT THE MASTER OF THE TOMB IS UNFAVORABLE TO GRAVEROBBERS.":GOTO150
1030 PRINT"I DON'T UNDERSTAND.":GOTO150
1040 IFRR=0PRINT"YOU CAN'T GO IN THAT DIRECTION":GOTO150 :ELSER=RR:GOTO100
1050 :REM'INSTR SUB
1055 :REM'S = POSITION OF B$ IN G$
1060 S=INSTR(0,G$,B$):RETURN
1090 :REM' SUB TO DELETE B$ FROM INVENTORY
1100 FORT=1TOIN:G$=IN$(T):GOSUB1060 :IFS=0THEN NEXT:GOTO1130
1110 IN$(T)=""
1120 FORTT=TTOIN:IN$(TT)=IN$(TT+1):NEXT:IN=IN-1:RETURN
1130 :REM'DELETE B$ FROM ROOM INVENTORY
1140 FORSL=1TOI(R):G$=I$(R,SL):GOSUB1060 :IFS=0NEXT:RETURN
1150 I$(R,SL)="":I(R)=I(R)-1
1160 FORLL=SLTOI(R):I$(R,LL)=I$(R,LL+1):NEXT:RETURN
1170 :REM'SUB TO SEE IF YOU ARE CARRYING B$ OR IT'S IN THE ROOM
1175 :REM' IF F=0 NOT CARRYING IT OR IN ROOM
1176 :REM' IF F=1 CARRYING IT
1177 :REM' IF F=2 IN THE ROOM
1180 FORTB=1TOIN:G$=IN$(TB):GOSUB1060 :IFS<>0F=1:RETURN
1190 NEXT:FORTB=1TOI(R):G$=I$(R,TB):GOSUB1060 :IFS<>0F=2:RETURN
1200 NEXT:F=0:RETURN
1205 :REM'ADD B$ TO ROOM INVENTORY
1210 IF I(R)=11 PRINT"THE ROOMS FULL.":RETURN :REM'FIX IT!!
1220 I(R)=I(R)+1:I$(R,I(R))="THERE'S A "+B$+" HERE.":RETURN
3000 :REM'DATA - WHEN THE TEXT SUDDENLY GOES DOWN LIKE THIS, IT'S A LINEFEED.
3010 DATA"AN ENTRANCE CAVE LEADING TO THE NORTH.A NOTE ON THE WALL SAYS 'BRING YOUR TREASURES HERE'",0,2,0,0,0
3020 DATA"A RECTANGLE SHAPED ROOM.",1,"THERE IS A GLOWING GLASS PYRAMID HERE.",17,1,3,0
3030 DATA "A ROOM PAINTED FIREY RED.",1,"AN EAST DOOR IS BLOCKED BY A STONE WALL ",0,0,0,2
3040 DATA "AN EAST-WEST HALL",0,0,0,5,3
3050 DATA "A SMALL SQUARE ROOM.",1,"ON THE FLOOR IS A BIRD CAGE.",16,0,6,4
3060 DATA "A E/W PASSAGE",0,0,0,7,5
3070 DATA "THE SNAKE ROOM. PAINTED ON THE WALL IS A COBRAFIGHTING A RAT.",1,"A GIANT COBRA HISSES MENACINGLY, BLOCKING YOUR PATH TO THENORTH AND SOUTH EXITS.",0,0,0,6
3080 DATA"A MOSSY N/S TUNNEL.",0,10,7,0,0,"A SLOPING CORRIDOR, RUNNING N/S.",0,7,15,0,0
3090 DATA"A SQUARE ROOM.",1,"THERE IS A STURDY OAK CHEST HERE.",11,8,0,0
3100 DATA"A SHORT N/S TUNNEL.",0,12,10,0,0
3110 DATA"A ROOM WITH GREEK LOOKING PAINTINGS PAINTED ON THE WALLS.",2,"AN IVORY WHITE PILLAR RISES MAJESTICLY OUT OF THE FLOOR.","ON TOP OF THE PILLAR IS A GOLDEN HORSE.",0,11,13,0
3120 DATA"A SHORT E/W PASSAGE.",0,0,0,14,12
3130 DATA"AN OLD LIBRARY, BUT THERE IS DUST ON THESHELVES INSTEAD OF BOOKS.",1,"THERE IS ONE BOOK LEFT IN THE CORNER.",0,0,0,13
3140 DATA"AN OCTAGINAL SHAPED ROOM.",1,"THERE IS A BOULDER HERE.",9,0,0,0
3150 DATA"THE ROUND ROOM, PAINTED ON THE WALL IS APRINCE. HE LOOKS A LITTLE GREEN.",1,"THERE IS A GLOWING SAPHIRE HERE.",0,5,0,0
3160 DATA"A N/S HALL",0,18,2,0,0
3170 DATA"A LARGE ROOM WITH AN ARCHED CEILING.",1,"A MONGOOSE IS SLEEPING IN THE CORNER.",0,17,19,20
3180 DATA"A E/W HALL.",0,0,0,23,18
3190 DATA"AN E/W CORRIDOR WITH A SIDE ROOM.",0,21,0,18,29
3200 DATA"A DANK, SQUARE ROOM.",1,"THERE'S A SMALL FROG STATUE HERE",0,20,22,0
3210 DATA"A SMALL CLOSET.",1,"THERE'S A PEARL ON THE FLOOR!",0,0,0,21
3220 DATA"A LARGE NATURAL CAVERN. A GRAVE LIES INTHE MIDDLE OF THE FLOOR.",0,24,0,0,19
3230 DATA"A LONG N/S TUNNEL",0,25,23,0,0
3240 DATA"A CHAMBER THAT APPEARS TO BE A PLACE OF WORSHIP.A STATUE, THE LOCAL DIETY, IS CARVED INTO THE WALL.",1,"THERE IS A CROSS HERE THAT SAYS 'SKINNY JONES'",0,24,0,0
3250 DATA"A ROOM FULL OF GARBAGE; THE STENCH DOESN'T APPEALWITH YOUR LUNCH. IN FACT, THE GROUND SHOWES EVIDENCE THAT IT DIDN'T APPEAL TOO MANY PEOPLE'S LUNCH.",1
3260 DATA"THERE IS AN UGLY GOBLIN IN THE CORNER WEARING A DIAMOND STUDDEDNECKLESS.",0,27,0,0
3270 DATA"A LARGE ROOM WITH A HUGE BOULDER IN THE MIDDLE OFTHE FLOOR.",1,"A JEWELED SWORD IS STUCK IN THE ROCK.",26,28,0,0
3280 DATA"A N/S PASSAGE",0,27,29,0,0
3290 DATA"A SMALL ROOM.",1,"THERE'S A RAT SKULL HERE.",28,30,20,0
3295 DATA"A TWISTING N/S HALL.",0,29,31,0,0
3300 DATA"A ROUND ROOM, PAINTED ON THE WALL IS A PICTURE OF APILLAR. SOMEONE HAS SCRIBLED 'ZIGAL' ON IT.",0,30,0,0,0