1 WIDTH 255
5 CLEAR 8000:DEFINT A-Z:D=1:CL$=CHR$(11)	'CODE FOR CLEAR  SCREEN
7 CR$=CHR$(10)+CHR$(13)				'CODE FOR LINE FEED + RETURN
8 ON ERROR GOTO 7000
10 PRINT CL$:PRINTTAB(22);"Adventure": PRINT TAB(7); "Creative Computing   Morristown, New Jersey":PRINT:PRINT"Copyright (c) 1978 By Scott Adams and Creative Computing": PRINT "  CP/M Conversion By David Fox - Marin Computer Center"
11 PRINT:PRINT:INPUT "What's your name";SV$:PRINT:PRINT "Adventure number 1 is  -ADVENTURE LAND -":PRINT "Adventure number 2 is -PIRATE ADVENTURE-":PRINT 
15 INPUT "Which adventure number";FP$:IF FP$<>"1" AND FP$<>"2" THEN 15 ELSE OPEN"I",D,"B:ADVENT-"+FP$+".ASC":SV$=LEFT$(SV$,8)+".AD"+FP$
78 X=Y=Z:K=R=V:N=LL=F:TP$=K$:W=IP=P:Z$="I've too much too carry. Try -TAKE INVENTORY-":GOSUB 80:GOSUB 5000:GOTO 192
80 PRINT CL$SPC(11)"*** Welcome to Adventure Land. (#4.6) ***":PRINT:PRINT " Unless told differently you must find *TREASURES*":PRINT "and-return-them-to-their-proper-place!"
85 PRINT:PRINT "I'm your puppet.  Give me English commands that consist of a"
90 PRINT "noun and a verb.  ALWAYS USE UPPER CASE!  Some examples...":PRINT:PRINT "To find out what you're carrying you might say: TAKE INVENTORY":PRINT "To go into a hole you might say: GO HOLE":PRINT "To save current game: SAVE GAME"
100 PRINT:PRINT "You will at times need special items to do things, but I'm":PRINT "sure you'll be a good adventurer and figure these things out.":RETURN
120 PRINT:LINEINPUT "     Happy Adventuring... Press RETURN to start: ";K$:PRINT CL$:RETURN
192 R=AR:LX=LT:DF=0:SF=0:INPUT "Use old 'saved' game";K$:PRINT CL$:IF LEFT$(K$,1)<>"Y" THEN 200
193 CLOSE:OPEN"I",D,SV$
195 INPUT #D,SF,LX,DF,R:FOR X=0 TO IL:INPUT #D,IA(X):NEXT:IF D<>-1 THEN CLOSE
200 GOSUB 1500:GOTO 225
210 LINEINPUT "Tell me what to do: ";TP$:PRINT:GOSUB 1000:IF F THEN PRINT "You use word(s) I don't know.":GOTO 210
215 GOSUB 2000:IF IA(9)=-1 THEN LX=LX-1:IF LX<0 THEN PRINT "Light has run out!":IA(9)=0 ELSE IF LX<25 THEN PRINT "Light runs out in";LX;"turns!"
225 NV(0)=0:GOSUB 2000:GOTO 210
1000 K=0:NT$(0)="":NT$(1)=""
1010 X=INSTR(TP$," "):NT$(0)=LEFT$(TP$,LN+(LN=X)):IF X>1 THEN NT$(1)=MID$(TP$,X+1,LN)
1030 FOR X=0 TO 1:NV(X)=0:IF NT$(X)="" THEN 1070 ELSE FOR Y=0 TO NL:K$=NV$(Y,X):IF LEFT$(K$,1)="*" THEN K$=MID$(K$,2)
1035 IF X=1 THEN IF Y<7 THEN K$=LEFT$(K$,LN)
1040 IF NT$(X)=K$ THEN NV(X)=Y ELSE NEXT Y:GOTO 1070
1060 IF LEFT$(NV$(NV(X),X),1)="*" THEN NV(X)=NV(X)-1:GOTO 1060
1070 NEXT X:F=NV(0)<1 OR LEN(NT$(1))>0 AND NV(1)<1:RETURN
1500 IF DF THEN IF IA(9)<>-1 AND IA(9)<>R THEN PRINT "I can't see, its too dark.":RETURN
1505 K=-1:IF LEFT$(RS$(R),1)="*" THEN PRINT MID$(RS$(R),2); ELSE PRINT "I'm in a ";RS$(R);
1520 FOR Z=0 TO IL:IF K THEN IF IA(Z)=R THEN PRINT ".":PRINT:PRINT "Visible items here:":PRINT:K=0
1524 GOTO 1530
1525 TP$=IA$(Z):IF RIGHT$(TP$,1)="/" THEN W=INSTR(TP$,"/"):IF W>LN THEN TP$=LEFT$(TP$,W-1)
1526 RETURN
1530 IF IA(Z)<>R THEN 1540 ELSE GOSUB 1525:IF POS(0)+LEN(TP$)+3>62 THEN PRINT 
1535 PRINT TP$".   ";
1540 NEXT:PRINT
1550 K=-1:FOR Z=0 TO 5:IF K THEN IF RM(R,Z)<>0 THEN PRINT:PRINT "Obvious exits:  ";:K=0
1560 IF RM(R,Z)<>0 THEN PRINT NV$(Z+1,1);"  ";
1570 NEXT:PRINT:PRINT:RETURN
2000 F2=-1:F=-1:F3=0:IF NV(0)=1 AND NV(1)<7 THEN 2210 ELSE FOR X=0 TO CL:V=CA(X,0)/150:IF NV(0)=0 THEN IF V<>0 THEN RETURN
2005 IF NV(0)<>V THEN NEXT X:GOTO 2901 ELSE N=CA(X,0)-V*150
2010 IF NV(0)=0 THEN F=0:IF INT(100*RND(1)+1)<=N THEN 2030 ELSE NEXT X:GOTO 2901
2020 IF N<>NV(1) AND N<>0 THEN NEXT X:GOTO 2901
2030 F2=-1:F=0:F3=-1:FOR Y=1 TO 5:W=CA(X,Y):LL=W/20:K=W-LL*20:F1=-1:ON K+1 GOTO 2140,2050,2060,2070,2080,2090,2100,2110,2120,2130,2035,2045,2055,2065,2075
2035 F1=-1:FOR Z=0 TO IL:IF IA(Z)=-1 THEN 2140 ELSE NEXT:F1=0:GOTO 2140
2045 F1=0:FOR Z=0 TO IL:IF IA(Z)=-1 THEN 2140 ELSE NEXT:F1=-1:GOTO 2140
2050 F1=IA(LL)=-1:GOTO 2140
2055 F1=IA(LL)<>-1 AND IA(LL)<>R:GOTO 2140
2060 F1=IA(LL)=R:GOTO 2140
2065 F1=IA(LL)<>0:GOTO 2140
2070 F1=IA(LL)=R OR IA(LL)=-1:GOTO 2140
2075 F1=IA(LL)=0:GOTO 2140
2080 F1=R=LL:GOTO 2140
2090 F1=IA(LL)<>R:GOTO 2140
2100 F1=IA(LL)<>-1:GOTO 2140
2110 F1=R<>LL:GOTO 2140
2120 F1=SF AND CINT(2^LL+.5):F1=F1<>0:GOTO 2140
2130 F1=SF AND CINT(2^LL+.5):F1=F1=0:GOTO 2140
2140 F2=F2 AND F1:IF F2 THEN NEXT Y ELSE NEXT X:GOTO 2901
2150 IP=0:FOR Y=1 TO 4:K=(Y-1)/2+6:ON Y GOTO 2160,2170,2160,2170
2160 AC=CA(X,K)/150:GOTO 2200
2170 AC=CA(X,K)-CINT(CA(X,K)/150)*150
2200 IF AC>101 THEN 2205 ELSE IF AC=0 THEN 2600 ELSE IF AC<52 THEN PRINT MS$(AC):GOTO 2600: ELSE ON AC-51 GOTO 2230,2260,2270,2280,2290,2300,2310,2280,2320,2340,2350,2360,2370,2380,2400,2420,2430,2440,2450,2261,2275
2205 PRINT MS$(AC-50):GOTO 2600
2210 L=DF:IF L THEN L=DF AND IA(9)<>R AND IA(9)<>-1:IF L THEN PRINT "It's dangerous to move in the dark!"
2215 IF NV(1)<1 THEN PRINT "Give me a direction too.":GOTO 2930
2220 K=RM(R,NV(1)-1):IF K<1 THEN IF L THEN PRINT "I fell down and broke my neck.":K=RL:DF=0: ELSE PRINT "I can't go in that direction.":GOTO 2930
2222 IF NOT L THEN PRINT CL$;
2225 R=K:GOSUB 1500:GOTO 2930
2230 L=0:FOR Z=1 TO IL:IF IA(Z)=-1 THEN L=L+1
2235 NEXT Z
2240 IF L>=MX THEN PRINT Z$:GOTO 2610
2250 GOSUB 4000:IA(P)=-1:GOTO 2600
2260 GOSUB 4000:IA(P)=R:GOTO 2600
2261 PRINT "SAVING GAME":RESET:OPEN"O",D,SV$
2265 PRINT #D,SF,LX,DF,R:FOR W=0 TO IL:PRINT #D,IA(W):NEXT:CLOSE
2266 GOTO 2600
2270 GOSUB 4000:R=P:GOTO 2600
2275 GOSUB 4000:L=P:GOSUB 4000:SWAP IA(P),IA(L):GOTO 2600
2280 GOSUB 4000:IA(P)=0:GOTO 2600
2290 DF=-1:GOTO 2600
2300 DF=0:GOTO 2600
2310 GOSUB 4000
2315 SF=SF OR CINT(.5+2^P):GOTO 2600
2320 GOSUB 4000
2325 SF=SF AND NOT CINT(.5+2^P):GOTO 2600
2340 PRINT "I'm dead...":R=RL:DF=0:GOTO 2370
2350 GOSUB 4000:L=P:GOSUB 4000:IA(L)=P:GOTO 2600
2360 PRINT "The game is now over.":INPUT "Another game";K$:IF LEFT$(K$,1)="N" THEN PRINT CL$:PRINT:PRINT "Thank you for taking this ADVENTURE with me!  Bye for now.":PRINT:END ELSE FOR X=0 TO IL:IA(X)=I2(X):NEXT:GOTO 192
2370 GOSUB 1500:GOTO 2600
2380 L=0:FOR Z=1 TO IL:IF IA(Z)=TR THEN IF LEFT$(IA$(Z),1)="*" THEN L=L+1
2390 NEXT Z:PRINT "I've stored";L;"treasures.":PRINT "On a scale of 0 to 100 that rates a";CINT(L/TT*100):IF L=TT THEN PRINT "VERY WELL DONE!!!":GOTO 2360 ELSE 2600
2400 PRINT "I'm carrying:":K$="NOTHING":FOR Z=0 TO IL:IF IA(Z)<>-1 THEN 2410 ELSE GOSUB 1525:IF LEN(TP$)+POS(0)>62 THEN PRINT 
2405 PRINT TP$".   ";:K$=""
2410 NEXT:PRINT K$:GOTO 2600
2420 P=0:GOTO 2315
2430 P=0:GOTO 2325
2440 LX=LT:IA(9)=-1:GOTO 2600
2450 PRINT CL$;:GOTO 2600
2600 NEXT Y
2610 IF NV(0)<>0 THEN 2901
2900 NEXT X
2901 '
2905 IF NV(0)=0 THEN 2930
2907 GOSUB 4200
2908 IF F THEN PRINT "I don't understand your command.":GOTO 2930
2910 IF NOT F2 THEN PRINT "I can't do that yet.":GOTO 2930
2930 RETURN
4000 IP=IP+1:W=CA(X,IP):P=W/20:M=W-P*20:IF M<>0 THEN 4000 ELSE RETURN
4200 IF NV(0)<>10 AND NV(0)<>18 OR F3 THEN 4290
4205 IF NV(1)=0 THEN PRINT "WHAT?":GOTO 4280
4206 IF NV(0)<>10 THEN 4210
4207 L=0:FOR Z=0 TO IL:IF IA(Z)=-1 THEN L=L+1
4208 NEXT:IF L>=MX THEN PRINT Z$:GOTO 4280
4210 K=0:FOR X=0 TO IL:Y=INSTR(IA$(X),"/"):IF Y=0 THEN 4285
4220 TP$=LEFT$(IA$(X),LEN(IA$(X))-1):TP$=MID$(TP$,Y+1,LN)
4230 IF TP$<>NV$(NV(1),1) THEN 4285
4240 IF NV(0)=10 THEN 4270
4250 IF IA(X)<>-1 THEN K=1:GOTO 4285 ELSE IA(X)=R:K=3:GOTO 4275
4270 IF IA(X)<>R THEN K=2:GOTO 4285 ELSE IA(X)=-1:K=3
4275 PRINT "OK, ";
4280 F=0:RETURN
4285 NEXT X
4286 IF K=1 THEN PRINT "I'm not carrying it." ELSE IF K=2 THEN PRINT "I don't see it here."
4287 IF K=0 THEN IF NOT F3 THEN PRINT "Its beyond my power to do that.":F=0
4288 IF K<>0 THEN F=0
4290 RETURN
5000 PRINT:PRINT "One moment please...";
5010 INPUT #D,IL,CL,NL,RL,MX,AR,TT,LN,LT,ML,TR
5020 DIM NV(1),CA(CL,7),NV$(NL,1),IA$(IL),IA(IL),RS$(RL),RM(RL,5),MS$(ML),NT$(1),I2(IL)
5030 FOR X=0 TO CL STEP 2:Y=X+1:INPUT #D,CA(X,0),CA(X,1),CA(X,2),CA(X,3),CA(X,4),CA(X,5),CA(X,6),CA(X,7),CA(Y,0),CA(Y,1),CA(Y,2),CA(Y,3),CA(Y,4),CA(Y,5),CA(Y,6),CA(Y,7):NEXT 
5040 FOR X=0 TO NL STEP 10:FOR Y=0 TO 1:INPUT #D,NV$(X,Y),NV$(X+1,Y),NV$(X+2,Y),NV$(X+3,Y),NV$(X+4,Y),NV$(X+5,Y),NV$(X+6,Y),NV$(X+7,Y),NV$(X+8,Y),NV$(X+9,Y):NEXT Y,X
5060 FOR X=0 TO RL:INPUT #D,RM(X,0),RM(X,1),RM(X,2),RM(X,3),RM(X,4),RM(X,5),CK$:GOSUB 6100:RS$(X)=CK$:NEXT 
5070 FOR X=0 TO ML:INPUT #D,CK$:GOSUB 6100:MS$(X)=CK$:NEXT 
5080 FOR X=0 TO IL:INPUT #D,CK$,IA(X):GOSUB 6100:IA$(X)=CK$:I2(X)=IA(X):NEXT 
6000 CLOSE:LINEINPUT "Happy Adventuring. Press RETURN to start: ";K$:PRINT CL$:RETURN
6100 CK=INSTR(CK$,"\"):IF CK=0 THEN RETURN
6110 CK$=LEFT$(CK$,CK-1)+CR$+MID$(CK$,CK+1):GOTO 6100
7000 IF ERR=53 AND ERL=193 THEN PRINT:PRINT "I can't find a file saved under your name for ADVENTURE #"FP$:PRINT: ELSE PRINT "There was an error in line"ERL:END
7010 CLOSE:RESUME 11
 a file saved under your name for ADVENTURE #"FP$:PRINT: ELSE PRINT "There was an err