1K Adventure

See all articles from The Plotter v2 n1
Author(s): David Clark
Publication: The Plotter
Pub Details: The Plotter v2 n1 (Volume 2, Issue 1)
Date: January 1984
Pages: 4

NOW-the program:

5 REM "1K ADVENTURE"
10 LET S=VAL "500"
20 LET T=PI-PI
30 LET TU=PI/PI
40 PRINT "TURN ";TU;" TREASURE";T;" STRENGTH ";S
43 IF S<=0 THEN GOTO 5000
45 PRINT "YOU HAVE FOUND-"
50 LET X=INT (RND*VAL "75")
60 LET H=INT (RND*INT PI)+PI/PI
65 GOSUB H*100
70 LET S=S+10
80 CLS
90 LET TU=TU+1
95 GOTO VAL "40"
100 PRINT "A MONSTER.F/B?"
110 INPUT I$
120 IF I$<>"F" AND I$<>"B" OR I$="B" AND T<X THEN GOTO 110
130 IF I$="F" THEN LET S=S-X
140 IF I$="B" THEN LET T=T-X
150 GOSUB 2000
190 RETURN
200 PRINT "A POTION"
210 LET S=S+X
220 GOSUB VAL "2000"
230 RETURN
300 PRINT "TREASURE.IT IS WORTH";X
310 LET T=T+X
350 GOSUB VAL "2000"
400 RETURN
2000 IF INKEY$="" THEN GOTO 2000
2010 RETURN
5000 CLS
5010 PRINT "YOU HAVE DIED.YOU SURVIVED ";TU;" TURNS"

NOTE: As you can see, this program makes good use of the INKEY$ function. That is the reason I decided to run it at this time. In future issues there will be other programs reprinted from magaxines that are not in the club library.

Transcription note: the listing is corrected so it runs. As printed, line 50 reads LET X=INT +RND*VAL “75” (corrected to INT (RND*VAL “75”), a best guess from line 60), and lines 100 and 5010 have no closing quote.

Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.