This file is part of Miscellaneous Programs
. Download the collection to get this file.
One day while walking thru the woods you come across a cave enterance covered with brush. People say that many years ago a pirate hid his treasure somewhere in these woods, but no one has ever found it.
Content
Source Code
100 REM SETUP
120 PRINT TAB 13;"QUEST"
140 PRINT '"One day while walking thru the woods you come across a cave enterance covered with brush."
180 PRINT '"People say that many years ago apirate hid his treasure some- where in these woods, but no onehas ever found it."
210 PRINT '"For all I know it may still be here."
300 READ V1,V0,V2,V3,M9,T1,T2,SITE
310 DATA SGN PI,NOT PI,2,INT PI,42,23,12,8400
500 DIM w(m9): DIM m(6,m9)
520 FOR i=V1 TO m9: READ m
540 IF i<>m THEN GO SUB 9500
570 FOR j=V1 TO 6: READ m(j,i): NEXT j: NEXT i
900 PRINT '"Only the first letter of any answer is looked at. You can still type the whole word"
920 GO SUB 7500
1000 REM RESET
1010 LET n=5: LET m0=V0
1030 LET t=t1: LET m6=m0
1060 LET p=m0: LET p1=p
1070 DIM w(m9)
1090 PRINT
1120 GO SUB 8000
1400 REM MAIN LOOP
1420 LET m0=m0+V1
1440 GO SUB 6000
1460 GO SUB 2000
1480 GO SUB 4000
1500 IF T>V0 THEN GO TO 1400
1510 IF n<>5 THEN GO TO 1400
1700 REM FINAL SCORE
1710 GO SUB 3000
1720 PRINT '"Congratulations! You got the Treasure out in ";m0;
1750 PRINT " moves"'"and you got ";
1760 PRINT s+10;" points!"
1765 INPUT "Want to hunt again? ";q$
1770 LET a$="YNyn"
1780 GO SUB 5000
1785 IF a1>V2 THEN LET a1=a1-V2
1790 IF a1=V1 THEN GO TO 1000
1791 IF a1=V2 THEN STOP
1792 IF a1=V3 THEN GO TO 1760
2000 REM FOUND?
2100 IF t<>n THEN RETURN
2110 IF t<V0 THEN RETURN
2120 IF m6+5>m0 THEN RETURN
2200 INPUT "Do you want to take it with you? ";q$
2210 LET a$="YNyn"
2230 GO SUB 5000
2233 IF a1>V2 THEN LET a1=a1-V2
2235 IF a1=V1 THEN GO TO 2300
2240 IF a1=V2 THEN GO TO 2400
2250 PRINT "Well...."
2260 GO TO 2200
2300 LET t=-V1
2320 PRINT '"OK, lets get out of here!": RETURN
2400 PRINT '"We'll leave it here and you can explore some more."
2430 LET m6=m0: RETURN
3000 REM SCORE
3020 LET s=V0
3030 IF T=-V1 THEN LET s=s+5
3040 IF p=V1 THEN LET s=s+10
3050 FOR j=V2 TO m9: LET s=s+w(j): NEXT j: RETURN
4000 REM BAD GUY
4020 IF n=T2 THEN RETURN
4030 IF p=V1 THEN RETURN
4040 IF T1=T2 THEN RETURN
4050 IF T<>-V1 THEN RETURN
4070 IF n=16 THEN LET p=160
4090 IF p1>V0 THEN LET p1=p1+V1
4100 IF n=V3 THEN LET p1=p1+V1
4120 IF p1<15 THEN RETURN
4130 PRINT '"Suddenly the Pirate leaps out ofthe dark and grabs the treasure from you!"
4140 PRINT "AVAST You RAT!, he shouts, you found my treasure did you?"
4150 PRINT "Well, I'll hide it better this time! and he disapears into the darkness with the treasure"
4210 LET p=V1: LET t=t2: RETURN
5000 REM INPUT SORT
5002 IF q$="" THEN LET q$="i"
5005 FOR A=V1 TO LEN a$
5010 IF q$(V1)=a$(a) THEN LET a1=a: RETURN
5030 NEXT a
5040 LET a1=LEN a$+V1
5145 RETURN
6000 REM MOVES
6030 LET n9=n: LET n8=V0
6070 GO SUB 7000
6090 IF n=V1 THEN GO TO 6120
6100 LET n0=n
6110 LET a0=a1
6120 PRINT
6130 LET i=m(a1,n)
6200 IF i=-V2 THEN LET i=n9
6220 IF i<500 THEN GO TO 6300
6240 LET i=i-500
6250 PAUSE 100
6270 GO TO 6200
6300 IF INT (i/100)=V1 THEN GO TO 6340
6310 IF INT (i/100)=V2 THEN GO TO 6370
6320 LET n=i
6330 GO TO 6400
6350 LET n=i-100
6355 IF t=-V1 THEN LET n=n+V1
6360 GO TO 6400
6380 LET n=i-200
6390 IF t=-V1 THEN LET n=n+p
6400 IF n<>V1 THEN GO TO 6500
6420 FOR j=V1 TO 6: LET m(j,n)=V2: NEXT j
6450 LET m(7-a0,n)=n0
6510 IF n8<>V2 THEN GO SUB 8000
6530 LET w(n)=V1
6540 LET n8=n
6600 IF m(V1,n)<>-V2 THEN RETURN
6660 LET i=m(6,n)
6670 LET j=-V1
6680 IF m(4,n)>INT (100*RND) THEN LET i=m(5,n)
6700 IF m(V2,n)>INT (100*RND) THEN LET i=m(V3,n)
6730 GO TO 6200
6800 RETURN
7000 REM DIRECTION
7110 INPUT "WHICH WAY SHALL I GO? ";q$
7120 LET a$="NEUDWSPneudwsp"
7140 GO SUB 5000
7145 IF a1>7 THEN LET a1=a1-7
7150 IF a1>=8 THEN GO TO 9600
7300 IF a1<7 THEN RETURN
7320 GO SUB 3000
7330 PRINT "Your score = ";s;" points"
7350 GO TO 7100
7400 RETURN
7500 PRINT '"TYPE N,S,E,W,U OR D FOR NORTH, SOUTH, EAST, WEST ,UP OR DOWN. TYPE P FOR YOUR SCORE": RETURN
8000 REM LOCATION
8020 POKE 23692,9
8050 LET i=INT (n/5)
8060 LET j=n-5*i+V1
8100 GO TO 8200+((ABS i)*10)
8200 GO TO 9000+(j*10)
8210 GO TO 9050+(j*10)
8220 GO TO 9100+(j*10)
8230 GO TO 9150+(j*10)
8240 GO TO 9200+(j*10)
8250 GO TO 9250+(j*10)
8260 GO TO 9300+(j*10)
8270 GO TO 9350+(j*10)
8280 GO TO 9400+(j*10)
8290 GO TO 9450+(j*10)
8400 IF t<>n THEN GO TO 8500
8410 PRINT '"The treasure is here!"
8500 IF t<>t2 THEN RETURN
8510 IF t1=t2 THEN RETURN
8520 IF t1<>n THEN RETURN
8530 PRINT '"A note on the wall says that","Pirates never leave their","treasure twice in the same place"
8600 RETURN
9011 PRINT "This is a dead end.": GO TO site
9021 PRINT "That direction goes nowhere.": GO TO site
9031 PRINT "A tunnel goes North-South."'"There is an opening to the West.": GO TO site
9041 PRINT "You're totterring on the brink of a pit.": GO TO site
9051 PRINT "You've found the cave enterance.Go South to enter.": GO TO site
9061 PRINT "This is the home of the Gnome- King. Fortunately, he's gone forthe day.": GO TO site
9071 PRINT "Run the Gnome-King is here.","You'd better get out right now.": GO TO site
9081 PRINT "You are lost in the woods.": GO TO site
9091 PRINT "Where am I, it's gotten dark here?": GO TO site
9101 PRINT "You're not going to get far, that is rock you are trying to dig thro.": GO TO site
9111 PRINT "You're at the bottom of a pit. A little stream flows over the the rocks here.": GO TO site
9121 PRINT "This is a dead end.": GO TO site
9131 PRINT "This is a wide spot. There is a sooty patch where somebody has rested a torch against the wall.There are Jagged rocks above you": GO TO site
9141 PRINT "High on the canyon wall above you is scratched the message 'Kilroy was here'": GO TO site
9151 PRINT "You're not a bird. you can't fly": GO TO site
9161 PRINT "A small tunnel in this low","chamber goes east, and you can walk to the South or the West. There is light to the North.": GO TO site
9171 PRINT "It's a tight squeese. You can't get past the treasure.": GO TO site
9181 PRINT "I don't think you can find the cave.": GO TO site
9191 PRINT "You're at the top of a climb. Below you a message says","Kilroy was here": GO TO site
9201 PRINT "You're at the North side of a chasm too wide to jump over.","Ringing echoes from below are the only indication of it's","depth.": GO TO site
9211 PRINT "Ahead a sign says";TAB 8;"WELCOME TO XANADU","Below you, Alph, the sacred","river flows through caverns measureless to man, down to a sunless sea.": GO TO site
9221 GO TO site
9231 PRINT "This ledge overlooks the","guillotine room.": GO TO site
9241 PRINT "QUITE! I here the Giant there! You had better go back fast.": GO TO site
9251 PRINT "Now you've done it, this is the giant's cavern. You better not be here when he returns.": GO TO site
9261 PRINT "This is the QUEST RESEARCH and DEVELOPMENT AREA."''"NO VISITORS ALLOWED. You must leave now.": GO TO site
9271 PRINT "You've found the Crystal Palace.The walls resonate with awesume music.": GO TO site
9281 GO TO site
9291 PRINT "You're stuck at the top of a giant stalactite. You could","slide down but you cann't climb back up.": GO TO site
9301 PRINT "There is a book in this little grotto called Jane's Fighting Ships, dated 1763.": GO TO site
9311 PRINT "You're in the Guillotine room. A sharp rock balances","precariously on the ledge above you": GO TO site
9321 PRINT "You're in a chute, scrambling down the rocks! No way to stop! Hang On!": GO TO site
9331 PRINT "The tight tunnel turns a corner.": GO TO site
9341 PRINT "You're in a little twisty maze.": GO TO site
9351 PRINT "You're in a little twisting maze": GO TO site
9361 PRINT "You're in a twist1ng little maze": GO TO site
9371 PRINT "You're in a twisty little maze.": GO TO site
9381 PRINT "This is a prehistoric dwelling. The walls have drawings of","bison done in red clay. The","floor is strewn with the remainsof some rituals (bones).","A small tunnel goes thru the floor.": GO TO site
9391 PRINT "You're in a black hole. The force of gravity is overwhelming.": GO TO site
9401 PRINT "You're in the Labyrinthe.": GO TO site
9411 PRINT "It's very dark in the Labyrinthe": GO TO site
9421 PRINT "You're in the Ashram. Incense isheavy in the air, and all","directions seem the same.": GO TO site
9450 DATA V1,V0,V0,V0,V0,V0,V0,V2,-V2,101,-V2,V0,V0,V0
9452 DATA V3,33,V2,V1,10,106,4,4,V3,30,V2,11,V2,V1
9454 DATA 5,8,8,15,10,8,16,6,16,V3,V2,10,V2,V2
9456 DATA 7,-V2,101,-V2,V0,V0,V0,8,18,18,15,10,18,9
9458 DATA 9,-V2,33,5,V1,V0,-V2,10,-V2,101,-V2,V0,V0,V0
9460 DATA 11,V1,13,4,V2,V1,V2,12,36,V2,V1,V2,V1,V2
9462 DATA 13,V2,37,V2,V1,11,14,14,13,V1,19,V2,31,31
9464 DATA 15,-V2,101,-V2,V0,V0,V0,16,5,33,V2,10,V1,106
9466 DATA 17,-V2,101,-V2,V0,V0,V0,18,-V2,101,8,V0,V0,V0
9468 DATA 19,224,V2,V2,14,V1,42,20,226,V1,V2,V2,25,V2
9470 DATA 21,V1,226,V2,V2,38,25,22,-V2,33,13,50,29,30
9472 DATA 23,V2,V1,V2,31,V2,V2,24,-V2,101,19,V0,V0,V0
9474 DATA 25,21,20,V2,V2,V1,19,26,-V2,65,-V2,50,11,14
9476 DATA 27,V2,40,V2,V2,21,20,28,-V2,60,221,50,14,19
9478 DATA 29,V2,42,V2,13,V1,V1,30,34,34,V2,V1,4,V2
9480 DATA 31,14,14,23,V2,V1,V2,32,-V2,101,516,V0,V0,V0
9482 DATA 33,V2,V1,V2,V1,116,3,34,V1,35,V2,V1,30,30
9484 DATA 35,V2,V1,V2,37,34,36,36,35,V2,V1,37,34,12
9486 DATA 37,V2,V1,35,V2,13,V2,38,V2,21,V2,116,V1,V2
9488 DATA 39,V2,40,V2,32,21,26,40,40,40,V2,V2,40,41
9490 DATA 41,40,40,40,V2,40,39,42,28,28,28,28,28,28
9500 PRINT '"DATABASE PROBLEM ";i,n: STOP
9600 PRINT '"WHICH WAY DO YOU WANT TO GO?"
9605 GO SUB 7500: GO SUB 8000
9610 GO TO 7100
9700 SAVE "Quest" LINE PI
Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.
