0REM Version IV 29.1.91
1REM Inca Treasure By C.J.Richardson
1985
2*FX200,3
3E%=0
4ONERROR:IF ERR=254:E%=1:GOTO10 ELSE
IF ERR=9 GOTO 20 ELSE CLS:REPORT:PRINTE
RL:R%=1:GOTO20
5MODE7:*$.SPEECH
10PROCTI
20REPEAT:PROCGO:PROCAT:PROCVO:UNTILF%
=1:PROCKI:PROCEN
30DEFPROCTI:PRINT:FORL%=1TO2:PRINTTAB
(9);:VDU132,157,131,141:PRINT"INCA TREAS
URE ";:VDU156:NEXT:PRINT':FORL%=1TO2:PR
INTTAB(6);:VDU132,157,131,141:PRINT"By C
.J.Richardson. ";:VDU156:NEXT
40PRINT''" You are dropped in the
Jungle."''" You have to Find the Inca
Treasure."''" You must then fly the a
ircraft home."''" The Computer will u
nderstand single"''" or double w
ord inputs"''
50PRINT" PLEASE WAIT FOR DATA TO L
OAD"'':PROCSET:PRINT" GOOD LUCK!!! PRES
S SPACE TO CONTINUE":REPEATUNTILGET$=" "
:CLS:ENDPROC
60DEFPROCSET:RESTORE:DIMA%(155,4),A$(
155),B%(40),B$(40),C$(40):S%=0:R%=1:F%=0
:DIM SPK% 200:U%=OPENIN("INCASTA")
70FORL%=0TO155:INPUT#U%,A$(L%),A%(L%,
0),A%(L%,1),A%(L%,2),A%(L%,3),A%(L%,4):N
EXT:FORL%=0TO40:INPUT#U%,B$(L%),B%(L%),C
$(L%):NEXT:CLOSE#U%:V%=1:ENDPROC
80DEFPROCWI:PRINT"CONGRATULATIONS. YO
U WON."'"SCORE "+STR$(S%)+" out of 41":E
NDPROC
90DEFPROCGO:PRINT" You are ";A$(R%)'"
There are exits ";:TEMP%=0:IFA%(R%,1)<>
0PRINT"North ";:TEMP%=1
100IFA%(R%,2)<>0PRINT"South ";:TEMP%=1
110IFA%(R%,3)<>0PRINT"East ";:TEMP%=1
120IFA%(R%,4)<>0PRINT"West ";:TEMP%=1
130IFR%=20ORR%=21ORR%=104PRINT"U ";:TE
MP%=1
140IFR%=17ORR%=20PRINT"D ":TEMP%=1
150IF TEMP%=0 PRINT"NOWHERE (YET!)"
160PROCSAYIT("YOU ARE "+A$(R%))
170I%=0:PRINT:SA$="You can see,":PRINT
" "+SA$;:L%=0:REPEAT:L%=L%+1:IFB%(L%)=R%
PRINTB$(L%);" ":I%=1:SA$=SA$+" "+B$(L%)
180UNTILL%=40:IF I%=0 PRINT" nothing h
ere"
190IF I%=1:IF INSTR(A$(R%),"lake",4)OR
INSTR(A$(R%),"iver",4)ORINSTR(A$(R%),"re
am",4)HOP$="Floating on the surface":SA$
=SA$+HOP$:PRINT" "+HOP$
200IFI%<>0 THEN PROCSAYIT(SA$)
210I%=0:PRINT':IFR%=26ORR%=29ORR%=78OR
R%=79F%=1:R$="You shouldn't have come he
re!":ENDPROC
220ENDPROC
230DEFPROCAT:REPEAT INPUT" I am waitin
g: "Q$:IFQ$="N"Q$="NOR"ELSEIFQ$="S"Q$="S
OU"ELSEIFQ$="E"Q$="EAS"ELSEIFQ$="W"Q$="W
ES"
232IFQ$="U"Q$="UPP"ELSEIFQ$="UP"Q$="UP
P"ELSEIFQ$="D"Q$="DOW"
235UNTILLENQ$>2:ENDPROC
240DEFPROCKI:PRINT" YOU'RE DEAD! "'"
";R$'" SCORE:";S%;" out of 41":PROCSAYIT
("OUTCH. YOU ARE DED. "):ENDPROC
245DEFPROCVO:Z%=-1:L%=0:REPEAT:IFINSTR
(C$(L%)," ")IFQ$=C$(L%):Z%=1
250IFINSTR(C$(L%)," ")=0:IFLEFT$(C$(L%
),3)=LEFT$(Q$,3)Z%=1
255L%=L%+1:UNTILL%=41ORZ%=1:IFL%=41PRI
NT"I don't understand "Q$:ENDPROC ELSE L
%=L%-1:PROCCO(L%):ENDPROC
270DEFPROCEN:PRINT"ANOTHER GO Y/N":IF
GET$="N"CALL!-4 ELSE RUN
280DEFPROCCO(C%):L%=41:GOTO (290+(C%*1
0))
290ENDPROC:REM DEBUG
300PRINT" That way isn't clear yet":EN
DPROC
310PRINT"QUIT. SURE Y/N?":IF GET$="Y"R
$=Q$:F%=1:ENDPROC ELSE ENDPROC
320R$="YOU DROWNED (NO DINGY)":F%=1:EN
DPROC
330PRINT"The animal leaps into your wa
y!":ENDPROC
340FORL%=0TO40:IFB%(L%)=R%R$=B$(L%) EL
SE NEXT:ENDPROC
345F%=1:NEXT:ENDPROC
350PRINT"SCORE=";S%;" out of 41":ENDPR
OC
360Q%=0:IFB%(1)<>0 PRINT" You cannot d
o that yet!":ENDPROC
361IF INSTR(A$(R%),"jungle",6)=0 PRINT
" You are wasting energy!":ENDPROC
362Q$=MID$(Q$,6,1):IFQ$="N"Q%=1ELSEIFQ
$="S"Q%=2ELSEIFQ$="E"Q%=3ELSEIFQ$="W"Q%=
4
363IFQ%=0 OR A%(R%,Q%)=0 PRINT" You ha
ck away madly":ENDPROC
367A%(R%,Q%)=ABS A%(R%,Q%):RI%=R%:R%=A
%(R%,Q%):FOR LO%=1 TO 4:IF ABS(A%(R%,LO%
))=RI% THEN A%(R%,LO%)=ABS(A%(R%,LO%)):N
EXT:ELSE NEXT
368ENDPROC
370Q$=MID$(Q$,5,(LENQ$)):IF Q$=""INPUT
"Get what? "Q$
372MA%=0:FORL%=0TO34:IFL%=6ORL%=9ORL%=
12ORL%=14ORL%=18 THEN NEXTELSE IF B$(L%)
=Q$ ANDB%(L%)<>R% PRINT"That is'nt here.
"
373IFB$(L%)=Q$ ANDB%(L%)=R% B%(L%)=0:S
%=S%+1:MA%=1
374NEXT:IF MA%=0 PRINT" That is not re
ally possible you know.":ENDPROC
375IFQ$="INFLATABLE DINGY"PROCBO
376IFQ$="MAGIC BAT"FORI%=140TO150:FOR
L%=1TO4:A%(I%,L%)=ABSA%(I%,L%):NEXT,
379ENDPROC
380Q$=MID$(Q$,6,(LENQ$)):IFQ$="" INPUT
"DROP WHAT?"Q$
382MA%=0:FOR L%=0 TO 40:IFL%=2ORL%=6OR
L%=9ORL%=12ORL%=14ORL%=18ORL%=19 THEN NE
XT ELSE IF B$(L%)=Q$ AND B%(L%)=0 B%(L%)
=R%:S=S-1:MA%=1
388NEXT:IF MA%=0 PRINT" That is'nt pos
sible.":ENDPROC
389S%=S%-1:ENDPROC
390IFB%(4)<>0PRINT" You cannot do that
as you have no gun.":ENDPROC
392L%=0:Q$=MID$(Q$,6,(LENQ$)):IFQ$=""I
NPUT"Kill what?"Q$
393IFQ$="ANIMAL" AND R%=23 L%=6ELSE IF
Q$="SERPENT" AND R%=35 L%=9
394IFQ$="BABOONS" AND R%=64 L%=35ELSE
IF Q$="VIPERS" AND R%=20 L%=36
398IFL%=0ORB$(L%)="A PILE OF BONES"PRI
NT"That is not possible":ENDPROC
399A%(R%,0)=0:B$(L%)="A PILE OF BONES"
:S%=S%+1:FORIL%=1 TO 4:A%(R%,IL%)=ABS A%
(R%,IL%):NEXT:ENDPROC
400IFR%<>36 PRINT"NOT YET. You're stab
bing in the dark!":ENDPROC ELSE R%=35:EN
DPROC
410IFR%<>38 AND R%<>39 ENDPROC
412IFQ$<>"WADE" THEN PRINT "NO. How do
you move through deep mud?":ENDPROC
416INPUT"WHICH WAY?"Q$:IF R%=39 IF Q$=
"N"ORQ$="W"ORQ$="E"R%=R%-1 ELSE IF R%=38
IF Q$="S"ORQ$="W"ORQ$="E"R%=R%+1
418ENDPROC
420IF R%<>55 AND R%<>54 AND R%<>48 THE
N ENDPROC ELSE A$(R%)="ON A THIRD OF A R
UNWAY":ENDPROC
430IFB%(11)<>0 PRINT"Maybe having some
keys would help!":ENDPROC:ELSE IF B%(12
)<>55 AND B%(12)<>54 AND B%(12)<>48 PRIN
T"AIRCRAFT IN WRONG PLACE":ENDPROC
432IF R%<>54 AND R%<>55 AND R%<>48 OR
B%(12)<>R% PRINT"YOU ARE IN THE WRONG PL
ACE":ENDPROC
434IF A$(55)="on undergrowth" OR A$(54
)="on undergrowth" OR A$(48)="on undergr
owth" THEN PRINT"RUNWAY NOT YET CLEAR":E
NDPROC
436IFR%=54 R$="CRASH ON TAKEOFF (NOT E
NOUGH RUNWAY)":F%=1:ENDPROC
438S%=S%+6:PROCWI:PROCEN
440IFR%<>49 AND R%<>57 AND R%<>41 PRIN
T"What are you trying to do?" ELSE IFR%=
49 R$="BRIDGE SNAPS":F%=1:ENDPROC
441IFR%=57R%=41 ELSE IFR%=41 R%=57
442ENDPROC
450IFR%<>56 OR B%(11)<>0 PRINT "That i
s not possible.":ENDPROC
452INPUT"WHICH WAY? N. E. W."Q$:IFQ$="
N"R%=54:B%(12)=54
453IFQ$="E"R%=48:B%(12)=48
454IFQ$="W"R%=55:B%(12)=55
455ENDPROC
460IFR%<>60 PRINT"No!":ENDPROC ELSE IF
B%(13)<>0 PRINT"You could if you had som
e food." ELSE PRINT"The bird flys off ha
ppy":B%(14)=-1:A%(60,3)=67:A%(60,4)=61:S
%=S%+1:ENDPROC
461R$="As you had no birdseed the bird
ate you!":F%=1:ENDPROC
470IFR%<>89 AND R%<>67 PRINT"Silly try
there!":ENDPROC
471IFB%(15)=0 OR B%(10)=0 THEN472 ELSE
F%=1:R$="YOU FALL TO YOUR DEATH(NO ROPE
)":ENDPROC
472IFR%=89R%=67 ELSE R%=89
473ENDPROC
480IFB%(5)<>0 PRINT"Well if you had a
spade that would help!" ELSE IFR%<>103 P
RINT"Its no use doing that." ELSEB%(18)=
103
481ENDPROC
490IFB%(17)<>0 PRINT"No!" ELSE B$(17)=
"LIT TORCH":FORL%=104 TO 119:A%(L%,0)=0:
FOR IL%=1 TO 4:A%(L%,IL%)=ABS(A%(L%,IL%)
):NEXT,
491ENDPROC
500IFR%<>20 AND R%<>21 AND R%<>104 PRI
NT"Where are you trying to go?" ELSE IFR
%=20 R%=19
501IFR%=21R%=20
502IFR%=104R%=103
503ENDPROC
510IFR%=17R%=21:ENDPROC
511IFR%=20R%=21:ENDPROC
512IFR%=103 ANDB%(18)=103R%=104:ENDPRO
C
513PRINT"NO WAY":ENDPROC
520PRINT"You cannot move as it has gon
e dark.":ENDPROC
530IFR%<>120 PRINT"WHY?":ENDPROC
531IFA%(120,0)<>0:INPUT"YOU ARE TRAPPE
D BY A ROPE WHAT ARE YOU GOING TO DO N
OW? "Q$:IFQ$="CUT ROPE":IF B%(21)=0:A%(1
20,0)=0:A%(120,1)=121:ENDPROC
532IFA%(120,0)=0 ENDPROC ELSE IF B%(21
)<>0 PRINT"HARD LUCK: YOU HAVE NO KNIFE"
:ENDPROC
533ENDPROC
540PRINT"YOU HAVE'NT GOT THE MAGIC BAT
!":ENDPROC
550PRINT"YOU HAVE:";:FORL%=0TO40:IFB%(
L%)=0 PRINTB$(L%);",";
551NEXT:PRINT:ENDPROC
560PRINT"You can see nothing special."
:ENDPROC
570REM
580REM
590REM
600D%=C%-27:IFA%(R%,D%)=0PRINT"NO WAY"
ELSE IFA%(R%,D%)<0 GOTO(290+A%(R%,0)*10
) ELSE R%=A%(R%,D%)
605ENDPROC
610PRINT"Either make a map or grovel a
bit!":ENDPROC
620INPUT"NAME TO SAVE, RETURN=INCADAT
"FF$:IF FF$="" FF$="INCADAT"
621U%=OPENOUTFF$:FORL%=0TO155:PRINT#U%
,A$(L%),A%(L%,0),A%(L%,1),A%(L%,2),A%(L%
,3),A%(L%,4):NEXT:FORL%=0TO40:PRINT#U%,B
$(L%),B%(L%),C$(L%):NEXT:PRINT#U%,S%,R%,
F%:CLOSE#U%:ENDPROC
630INPUT"NAME TO LOAD, RETURN=INCADAT
"FF$:IF FF$="" FF$="INCADAT"
631U%=OPENINFF$:FORL%=0TO155:INPUT#U%,
A$(L%),A%(L%,0),A%(L%,1),A%(L%,2),A%(L%,
3),A%(L%,4):NEXT:FORL%=0TO40:INPUT#U%,B$
(L%),B%(L%),C$(L%):NEXT:INPUT#U%,S%,R%,F
%:CLOSE#U%:ENDPROC
640V%=1:PRINT"O.K.":ENDPROC
650V%=0:PRINT"Be like that then":ENDPR
OC
660PRINT"O.K. S.A.E. to"'"C.J.R. 17 La
mbert Park Road"'"Hedon. Hull HU12 8HF":
ENDPROC
700DEFPROCBO:FORL%=0TO94:IFA%(L%,0)=3
FOR I%=1TO4:A%(L%,I%)=ABS A%(L%,I%):NEXT
710NEXT:ENDPROC
730DEFPROCSAYIT(SAY$):IF E%=1 OR V%=0
ENDPROC ELSE X%=SPK% MOD 256:Y%=SPK% DIV
256:$SPK%="*SAY "+SAY$:CALL&FFF7:ENDPRO
C