-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathspace-hunt.c64basic.txt
258 lines (258 loc) · 10.3 KB
/
space-hunt.c64basic.txt
1
5 POKE53280,0:POKE53281,0:PRINT"ž"10 REM *** SPACE HUNT ***20 REM *** AHOY, APRIL 1985 ***110 PRINTCHR$(142);"“ ÕÃÃÕÃÉÕÃÉÕÃÉ°À ² ²° ®Õɲ°²®"120 PRINT" ÊÃÉ«Ã˫ó «Ã «Ã³Â   "130 PRINT" ÃÃÃ˱ ± ±ÊÃËà ± ±ÊÃ˱ʽ ± "140 PRINT" (C) COPYRIGHT 1984"150 PRINT" ANTHONY WOOD"160 DIMD$(13),N(13),S(13),E(13),W(13),I(13,10),IN(10),N$(20),T(12):NC=0170 ER$="É DON'T SEE ONE HERE!":UN$="É DON'T UNDERSTAND."180 CG$="É CAN'T GET THAT!"190 FORX=0TO13:READD$(X),N(X),S(X),E(X),W(X),K:IFK=0THEN210200 FORY=0TOK-1:READA$:GOSUB2240:I(X,Y)=NC:NEXT210 NEXT220 L=0:I(9,0)=7230 PRINT" PRESS RETURN TO START.";240 GETA$:IFA$<>CHR$(13)THEN240250 PRINT"“";CHR$(14);260 PRINT"“É AM ";D$(L):PRINT270 IFN(L)+S(L)+E(L)+W(L)=-4THEN340280 PRINT"EXITS: ";290 IFN(L)<>-1THENPRINT"NORTH. ";300 IFS(L)<>-1THENPRINT"SOUTH. ";310 IFE(L)<>-1THENPRINT"EAST. ";320 IFW(L)<>-1THENPRINT"WEST.";330 PRINT340 S=0:FORX=0TO10:S=S+I(L,X):NEXT:IFS=0THEN380350 PRINT:PRINT"É CAN SEE:"360 FORX=0TO10:IFI(L,X)<>.THENPRINTN$(I(L,X));". ";370 NEXT:PRINT380 PRINT"ÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀ"390 PRINT"×HAT NOW? ";:GOSUB2020400 IFI$=""THEN390410 IFI$="“"THEN260420 IFV$<>"I"ANDLEFT$(V$,3)<>"INV"THEN460430 S=0:FORX=0TO10:S=S+IN(X):NEXT:IFS=0THENPRINT"É'M NOT CARRYING ANYTHING.":GOTO390440 FORX=0TO10:IFIN(X)=0THENNEXT:GOTO390450 PRINTN$(IN(X)):NEXT:GOTO390460 IFV$="N"ORI$="NORTH"THENEX=N(L):GOTO510470 IFV$="S"ORI$="SOUTH"THENEX=S(L):GOTO510480 IFV$="E"ORI$="EAST"THENEX=E(L):GOTO510490 IFV$<>"W"ANDI$<>"WEST"THEN530500 EX=W(L)510 IFEX=-1THENPRINT"É CAN'T GO THAT WAY!":GOTO390520 L=EX:LD=0:GOTO260530 L$=LEFT$(N$,3):IFL$="TRA"THENL$="PIL":GOTO650540 IFL$="LOC"THENL$="EQU":GOTO650550 IFL$="TRU"THENL$="WOO":GOTO650560 IFL$="SUI"THENL$="PRE":GOTO650570 IFL$="SHI"THENL$="SPA":GOTO650580 IFL$="BUT"THENL$="RED":GOTO650590 IFL$="EQU"THENL$="LOT":GOTO650600 IFL$="BOA"THENL$="CON":GOTO650610 IFL$="TRE"THENL$="FAB":GOTO650620 IFL$="BOU"THENL$="LAR":GOTO650630 IFL$="STA"THENL$="AIR":GOTO650640 IFL$="DOO"AND(L=9ORL=7)THENL$="SPA"650 V$=LEFT$(V$,3):IFL$="321"ORL$="DOW"THENNN=99:GOTO710660 IFV$="LAY"ORV$="LIE"ORV$="SAV"ORV$="LOA"THEN710670 IFV$="LOO"THEN260680 IFV$="QUI"THENPRINT"“TYPE 'GOTO 250' TO RECOVER.":END690 FORNN=1TONC:IFL$=LEFT$(N$(NN),3)THEN710700 NEXT:PRINTUN$:GOTO390710 IFV$<>"EXA"ANDV$<>"SEA"THEN910720 GOSUB 2190:IFF=0THENPRINT"É DON'T SEE A ";N$;" HERE!":GOTO 390730 IFL$="EQU"THENPRINT"ÉT'S A METAL STORAGE LOCKER.":GOTO 390740 IFL$="LAR"THENPRINT"ÔHERE SEEMS TO BE SOMETHING UNDER HERE.":GOTO390750 IFL$="CON"THENPRINT"É SEE A CALCULATOR TYPE KEYBOARD HERE.":GOTO 390760 IFL$<>"PRE"THEN800770 IFCC=1THEN900780 CC=1:PRINT"É FOUND A SCREW DRIVER HERE!":A$="SCREW DRIVER":GOSUB2240790 GOSUB2270:GOTO390800 IFL$="SPA"THENPRINT"É CAN SEE A DOOR.":GOTO390810 IFL$<>"WOO"THEN840820 PRINT"ÉT'S A WOODEN TRUNK.":IFLK=0THENPRINT"ÉT'S LOCKED."830 GOTO390840 IFL$<>"PIL"THEN860850 IFKF=0THENPRINT"É FIND A KEY HERE!":A$="KEY":GOSUB 2240:GOSUB 2270:KF=1:GOTO 390860 IFL$<>"LOT"THEN900870 IFPP=1THEN900880 PRINT"ÔHERE IS AN ACCESS PANEL SCREWED DOWN HERE.":A$="PANEL":GOSUB2240890 GOSUB2270:PP=1:GOTO390900 PRINT"É SEE NOTHING SPECIAL.":GOTO390910 IFV$<>"OPE"THEN1040920 GOSUB2190:IFF=0THENPRINTER$:GOTO 390930 IFL$<>"EQU"THEN990940 IFWS<>0THEN970950 PRINT"ÁÇÇÈÈ!! É'M ELECTROCUTED BY 10,000":PRINT"VOLTS THAT WAS WIRED TO THE LOCKER."960 END970 IFNT=1THENPRINT"ÉT'S EMPTY":GOTO390980 NT=1:PRINT"É FIND A NOTE HERE!":A$="NOTE":GOSUB2240:GOSUB2270:GOTO390990 IFL$<>"WOO"THENPRINTUN$:GOTO3901000 IFLK=0THENPRINT"ÉT'S LOCKED!":GOTO3901010 IFTE=1THENPRINT"ÉT'S EMPTY.":GOTO3901020 TE=1:PRINT"É FOUND A PRESSURE SUIT IN HERE!":A$="PRESSURE SUIT":GOSUB22401030 GOSUB2270:GOTO3901040 IFV$<>"UNL"THEN10901050 GOSUB2190:IFF=0THENPRINTER$:GOTO3901060 IFL$<>"WOO"THENPRINTUN$:GOTO3901070 A$="KEY":GOSUB2430:GOSUB2190:IFF=0THENPRINT"É NEED A KEY.":GOTO3901080 LK=1:PRINT"OK":GOTO3901090 IFV$<>"WEA"THEN11401100 GOSUB 2190:IFF=0THENPRINTER$:GOTO 3901110 IFL$<>"PRE"THENPRINTUN$:GOTO3901120 IFF=1THENGOSUB 2310:GOSUB 23501130 PRINT"OK":WS=1:GOTO 3901140 IFV$<>"REA"THEN 11801150 GOSUB 2190:IFF=0THENPRINTER$:GOTO3901160 IFL$<>"NOT"THENPRINTUN$:GOTO 3901170 PRINT"ÉT SAYS '3212'":GOTO3901180 IFV$<>"PRE"ANDV$<>"PUS"THEN12401190 GOSUB 2190:IFF=0THENPRINTER$:GOTO 3901200 IFL$<>"RED"THENPRINTUN$:GOTO 3901210 IFWS=0THENPRINT"ÁÇÇÈÈ!!! ÔHE AIRLOCK CYCLES OUT. É'M DEAD!":END1220 IFW(L)=0THENW(L)=-1:E(L)=7:GOTO 2601230 W(L)=0:E(L)=-1:GOTO 2601240 IFV$<>"GO"ANDV$<>"ENT"THEN 13001245 IFL$="321"THEN 14301250 GOSUB 2190:IFF=0THENPRINTER$:GOTO 3901260 IFL$="AIR"THENL=4:GOTO 2601270 IFL$="SPA"THENL=6:GOTO 2601280 IFL$="TUN"THENL=12:GOTO 2601290 PRINTUN$:GOTO 3901300 IFV$<>"GET"ANDV$<>"TAK"ANDV$<>"PIC"THEN 13701310 GOSUB2190:IFF=0THENPRINTER$:GOTO 3901320 IFF=2THENPRINT"É'M ALREADY CARRYING IT!":GOTO3901330 IFL$="EQU"ORL$="PIL"ORL$="LOT"ORL$="TUN"ORL$="CON"THENPRINTCG$:GOTO 3901340 IFL$="SPA"ORL$="LAR"ORL$="AIR"THENPRINTCG$:GOTO 3901350 IFL$="FAB"THENPRINT"** ÃONGRATULATIONS ** ÙOU HAVE FOUND THE TREASURE!":END1360 GOSUB 2350:GOSUB 2310:PRINT"OK":GOTO 3901370 IFV$<>"DRO"ANDV$<>"PUT"THEN14201380 GOSUB 2190:IFF<>2THENPRINTER$:GOTO 3901390 IFL$="PRE"ANDL>6THENPRINT"ÁÕÇÇÈÈ!! É'M SPACED!":END1400 IFL$="PRE"THENWS=01410 GOSUB 2390:GOSUB 2270:PRINT"OK":GOTO 3901420 IFV$<>"TYP"THEN 14701430 IFL<>6THENPRINT"É CAN'T DO THAT HERE!":GOTO 3901440 IFL$<>"321"THENPRINT"ÎOTHING HAPPENS.":GOTO 3901450 IFS(L)=9THENPRINT"ÎOTHING HAPPENS.":GOTO 3901460 S(L)=9:PRINT"ÔHE SHIP TAKES OFF, AND WE SOON LAND ELSEWHERE.":GOTO 3901470 IFV$<>"UNS"THEN 15401480 IFL<>5THENPRINT"É CAN'T DO THAT HERE!":GOTO 3901490 A$="SCREW DRIVER":GOSUB 2430:GOSUB 2190:IFF<>0THEN 15101500 PRINT"É NEED A SCREW DRIVER!":GOTO 3901510 IFPA=1THENPRINT"ÉT'S ALREADY UNSCREWED.":GOTO 3901520 PA=1:PRINT"OK":PRINT"É FOUND A BLASTER HERE!":A$="BLASTER":GOSUB 22401530 GOSUB 2270:GOTO 3901540 IFV$<>"BLA"ANDV$<>"SHO"THEN 16101550 GOSUB 2190:IFF=0THENPRINTER$:GOTO 3901555 Z=NN:A$="BLASTER":GOSUB2430:GOSUB2190:IFF=0THENPRINT"É NEED A ";A$:GOTO 3901560 IFL$="BLA"THENPRINT"AT WHAT?":GOTO 3901570 IFL$<>"LAR"THENPRINT"É CAN'T SHOOT THAT!":GOTO 3901580 IFLD=0THENPRINT"ÁÇÇÈÈ! ÓTANDING UP LIKE THIS, I'M HIT BY ROCKS!":END1590 PRINT"ËÁÁÂÏÏÍ!! Á TUNNEL WAS UNDER THE BOULDER!":NN=Z1600 GOSUB2310:A$="TUNNEL":GOSUB 2240:GOSUB 2270:GOTO 3901610 IFV$<>"FIR"THEN 16501620 GOSUB 2190:IFF=0THENPRINTER$:GOTO 3901630 IFL$<>"BLA"THENPRINTUN$:GOTO 3901640 PRINT"TRY SHOOT ....":GOTO 3901650 IFV$<>"LAY"ANDV$<>"LIE"THEN16801660 IFL$<>"DOW"ANDL$<>""THENPRINTUN$:GOTO 3901670 PRINT"OK":LD=1:GOTO 3901680 IFV$<>"SAV"THEN 17801690 F$=N$+".ADV":OPEN15,8,15,"I0":PRINT#15,"S0:"+F$:OPEN2,8,2,F$+",S,W"1700 INPUT#15,E,ER$,Z,Z:IFE<>0THENPRINTER$:CLOSE2:CLOSE15:GOTO 3901710 PRINT#2,NC:FORX=1TONC:PRINT#2,N$(X):NEXT:FORX=0TO13:FORY=0TO101720 PRINT#2,CHR$(I(X,Y));:NEXT:NEXT1730 FORX=0TO10:PRINT#2,CHR$(IN(X));:NEXT:PRINT#2,CHR$(L);CHR$(CC);CHR$(PP);1740 PRINT#2,CHR$(NT);CHR$(TE);CHR$(LK);CHR$(WS);CHR$(PA);CHR$(LD);CHR$(KF);1750 IFW(4)=-1THENPRINT#2,CHR$(1);:GOTO17701760 PRINT#2,CHR$(0);1770 PRINT#2,CHR$(S(6));:CLOSE2:CLOSE15:PRINT"OK":GOTO 3901780 IFV$<>"LOA"THEN 18901790 F$=N$+".ADV":OPEN15,8,15,"I0":OPEN2,8,2,F$+",S,R":INPUT#15,E,ER$,Z,Z1800 IFE<>0THENPRINTER$:CLOSE2:CLOSE15:GOTO 3901810 INPUT#2,NC:FORX=1TONC:INPUT#2,N$(X):NEXT:FORX=0TO13:FORY=0TO101820 GET#2,A$:I(X,Y)=ASC(A$+CHR$(0)):NEXT:NEXT:FORX=0TO10:GET#2,A$1830 IN(X)=ASC(A$+CHR$(0)):NEXT:FORX=0TO11:GET#2,A$:T(X)=ASC(A$+CHR$(0)):NEXT1840 L=T(0)1850 CC=T(1):PP=T(2):NT=T(3):TE=T(4):LK=T(5):WS=T(6):PA=T(7):LD=T(8):KF=T(9)1860 S(6)=T(11):IFT(10)=0THENE(4)=-1:W(4)=0:GOTO 18801870 E(4)=7:W(4)=-11880 CLOSE2:CLOSE15:GOTO 2601890 IFV$<>"USE"THEN 19501900 GOSUB 2190:IFF=0THENPRINTER$:GOTO 3901910 IFL$="BLA"THENPRINT"ÔRY SHOOT ...":GOTO 3901920 IFL$<>"KEY"THENPRINTUN$:GOTO 3901930 A$="WOODEN TRUNK":GOSUB 2430:GOSUB 2190:IFF<>0THEN 10801940 PRINT"É CAN'T DO THAT HERE!":GOTO 3901950 IFV$<>"MOV"ANDV$<>"ROL"THENPRINTUN$:GOTO 3901960 GOSUB2190:IFF=0THENPRINTER$:GOTO 3901970 IFL$<>"LAR"THENPRINT"É'M NOT MAKING MUCH PROGRESS.":GOTO 3901980 PRINT"ÉT'S TOO HEAVY.":GOTO 3901990 REM2000 REM INPUT ROUTINE2010 REM2020 I$=""2030 PRINT"¨";2040 GETA$:IFA$=""THEN 20402050 IFA$="“"THENI$=A$:RETURN2060 PRINT" ";A$;:IFA$=CHR$(13)THEN 20902070 IFA$=CHR$(20)ANDI$<>""THENI$=LEFT$(I$,LEN(I$)-1):GOTO 20302080 I$=I$+A$::GOTO20302090 IFI$=""THENRETURN2100 FORS=1TOLEN(I$):IFMID$(I$,S,1)<>" "THENNEXT:V$=I$:N$="":RETURN2110 V$=LEFT$(I$,S-1):N$=RIGHT$(I$,LEN(I$)-S)2120 RETURN2130 REM2140 REM SEARCH FOR NN2150 REM F=0 IF NOT FOUND2160 REM F=1 IF IN ROOM2170 REM F=2 IF IN INVENTORY2180 REM2190 FORX=0TO10:IFI(L,X)=NNTHENF=1:RETURN2200 IFIN(X)=NNTHENF=2:RETURN2210 NEXT:F=0:RETURN2220 REM2230 REM ADD A$ TO NOUN LIST. NN=POS2240 NC=NC+1:N$(NC)=A$:NN=NC:RETURN2250 REM2260 REM ADD NN TO ROOM2270 FORX=0TO10:IFI(L,X)=0THENI(L,X)=NN:RETURN2280 NEXT:PRINT"ERROR!":RETURN2290 REM2300 REM DELETE NN FROM ROOM2310 FORX=0TO10:IFI(L,X)=NNTHENI(L,X)=0:RETURN2320 NEXT:PRINT"ERROR!":RETURN2330 REM2340 REM ADD NN TO INVENTORY2350 FORX=0TO10:IFIN(X)=0THENIN(X)=NN:RETURN2360 NEXT:PRINT"ERROR!":RETURN2370 REM2380 REM DELETE NN FROM INVE2390 FORX=0TO10:IFIN(X)=NNTHENIN(X)=0:RETURN2400 NEXT:PRINT"ERROR!":RETURN2410 REM2420 REM SET NN TO NO. FOR A$2430 FORNN=1TONC:IFN$(NN)=A$THENRETURN2440 NEXT:NN=99:RETURN2450 DATA "IN THE ENTRANCE CHAMBER OF A LUNARSPACE STATION.",-1,1,4,-1,12460 DATA "EQUIPMENT LOCKER"2470 DATA "IN A NARROW HALLWAY THAT RUNSNORTH-SOUTH.",0,3,2,-1,02480 DATA "IN A LONG DESERTED BUNK ROOM.",-1,-1,-1,1,1,"WOODEN TRUNK"2490 DATA "IN A RECTANGULAR ROOM THAT SMELLSMUSTY AND OLD.",1,-1,-1,-1,12500 DATA "PILE OF TRASH"2510 DATA "IN A SPACE STATION AIRLOCK.",-1,-1,-1,0,1,"RED BUTTON"2520 DATA "IN A SPACE SHIP'S ENGINE ROOM.",-1,-1,6,-1,12530 DATA"LOTS OF COMPLICATED EQUIPMENT"2540 DATA "IN A SPACE SHIP CONTROL ROOM.",-1,7,-1,5,1,"CONTROL BOARD"2550 DATA "ON AN OPEN LUNAR PLAIN.",-1,-1,-1,-1,2,"SPACE SHIP"2560 DATA "AIRLOCK TO SPACE STATION"2570 DATA "IN AN ASTEROID CRATER.",-1,9,-1,11,02580 DATA "ON AN ASTEROID PLAIN.",8,-1,-1,10,02590 DATA "ON AN ASTEROID PLAIN.",11,-1,9,-1,1,"LARGE BOULDER"2600 DATA"IN THE HILLS ON AN ASTEROID.",-1,10,8,-1,02610 DATA "IN A SLOPING TUNNEL.",10,13,-1,-1,02620 DATA "IN THE UNDERGROUND TREASURE ROOM.",-1,-1,-1,-1,12630 DATA "FABULOUS TREASURE"