Compucolor.org – Virtual Media

Listing of file='DND.BAS;01' on disk='vmedia/chip_21-sector.ccvf'

0 GOSUB 65000
1 X0= 27:Y0= 15:H0= 16:W0= 37:C= 1:GOSUB 64000:GOTO 10
2 GOSUB 60000:RETURN
10 DIM L(20,20),C(40)
11 DEF FN R(I9)= INT (I9* RND (1)+ 1)
12 DEF FN C(I8)= FN R(6)+ FN R(6)+ FN R(6)
15 FOR I= 1TO PEEK (33209):J= RND (1):NEXT I
100 GOSUB 2000:GOSUB 3000:GOSUB 1000:GOSUB 4000:GOSUB 4500:GOSUB 9300
500 I$= "ETRHMA":GOSUB 4000:GOSUB 2:PRINT "OPTION (ETRHMA)? ";:GOSUB 4700
700 ON IGOSUB 5000,6000,7000,8000,9000,9299
800 GOTO 500
1000 REM
 	MAKE LEVEL
1101 IF C(11)= 1THEN LOAD "L.ARY;1
1102 IF C(11)= 2THEN LOAD "L.ARY;2
1103 IF C(11)= 3THEN LOAD "L.ARY;3
1104 IF C(11)= 4THEN LOAD "L.ARY;4
1105 IF C(11)= 5THEN LOAD "L.ARY;5
1106 IF C(11)= 6THEN LOAD "L.ARY;6
1109 IF L(C(10),C(9))= 20THEN C(10)= FN R(20):C(9)= FN R(20):GOTO 1109
1110 RETURN
2000 REM
	PRINT SCREEN
2005 PLOT 15,30,16,12,8
2010 PLOT 27,24,29,20,30,16:FOR I= 5TO 46:PLOT 2,I,120,242,I,39,255:NEXT I
2020 PLOT 3,3,0,15:PRINT "12345678901234567890
2030 FOR I= 1TO 20:PLOT 3,0,I+ 1:PRINT RIGHT$ (STR$ (I),2):NEXT
2100 PLOT 15,29,18,3,27,2:PRINT "WEAPON:"
2110 PLOT 3,27,3:PRINT "ARMOR:":PLOT 3,27,4:PRINT "SHIELD:":PLOT 3,27,5:PRINT "MAXIMUM HIT POINTS:
2140 PLOT 3,27,6:PRINT "CURRENT HIT POINTS:":PLOT 3,27,7:PRINT "EXPERIENCE POINTS:
2160 PLOT 3,27,8:PRINT "EXPERIENCE LEVEL:":PLOT 3,27,9:PRINT "GOLD:":PLOT 3,27,10:PRINT "POSITION:
2190 PLOT 3,27,11:PRINT "DUNGEON LEVEL:":PLOT 3,27,12:PRINT "TURNS TO REST:
2210 PLOT 3,55,2,29,5:PRINT "STR:"
2220 PLOT 3,55,3:PRINT "DEX:":PLOT 3,55,4:PRINT "CON:":PLOT 3,51,5:PRINT "ESP:
2250 PLOT 3,51,6:PRINT "TELEPORT:":PLOT 3,51,7:PRINT "REPULSION:":PLOT 3,51,8:PRINT "FIREBALL:
2280 PLOT 3,51,9:PRINT "LIGHTNING:":PLOT 3,51,10:PRINT "TRAP IMMUNE:
2300 PLOT 3,51,11:PRINT "HEALING:":RETURN
2310 RETURN
3000 REM
	MAKE CHARACTER
3005 PLOT 29,23
3021 GOSUB 2:PRINT "DND COPYRIGHT (C) 1979":GOSUB 2:PRINT "BY STEVEN FRAM  DO NOT COPY"
3022 GOSUB 2:GOSUB 2:PRINT "NEW OR OLD ?";:I$= "NO":GOSUB 4700
3023 ON IGOTO 3030,3026
3024 GOTO 3021
3026 PRINT "LD":C= 1
3027 IF C= 1THEN LOAD "C.ARY;1
3029 RETURN
3030 PRINT "EW":FOR I= 3TO 4:C(I)= FN C(1):NEXT I
3031 FOR I= 3TO 5:C(I)= FN C(1):NEXT I
3040 GOSUB 2:PRINT "STR:";C(4);" CON:";C(3);" DEX:";C(5);"? ";
3041 I$= "YN":GOSUB 4700:ON IGOTO 3049,3042
3042 PRINT "O":GOTO 3031
3049 PRINT "ES
3050 GOSUB 2:INPUT "WHAT IS YOUR NAME? ";N$:GOSUB 2:PRINT :P= FN C(1):GOSUB 2:PRINT "YOU HAVE ";P;" POINTS
3055 IF LEN (N$)> 8THEN N$= LEFT$ (N$,8)
3057 FOR I= 32TO LEN (N$)+ 31:C(I)= ASC (MID$ (N$,I- 31,1)):NEXT I
3070 GOSUB 2:PRINT :GOSUB 2:PRINT "WHAT WEAPON  0)NONE  1)DAGGER":GOSUB 2:INPUT "2)MACE OR  3)SWORD? ";A
3085 IF A> 3OR A< 0THEN 3070:IF P- A< 0THEN 3070
3087 C(6)= A:P= P- A
3100 GOSUB 2:PRINT :GOSUB 2:PRINT "WHAT ARMOR  0)NONE  1)LEATHER
3120 GOSUB 2:INPUT "2)SCALE 3)CHAIN OR 4)PLATE? ";A
3130 IF A> 4OR A< 0OR P- A< 0THEN 3100
3149 C(7)= A:P= P- A
3150 GOSUB 2:PRINT :GOSUB 2:PRINT "WHAT SHIELD  0)NONE  1)SMALL
3180 GOSUB 2:INPUT "2)MEDIUM OR 3)LARGE? ";AV$:A= VAL (AV$)
3190 IF A> 3OR A< 0OR P- A< 0THEN 3150
3200 C(8)= A:P= P- A
3210 C(9)= FN R(20):C(10)= FN R(20):C(11)= 1:C(12)= 1:C(30)= 5
3220 C(27)= 1:C(28)= 1
3300 C(25)= FN R(4)+ 12+ (P* 2)+ INT (C(3)/ 2.5):C(26)= C(25):RETURN
4000 IF NE> 0THEN 4010
4005 PLOT 14,29,21:FOR I= 32TO 40:PLOT 3,34+ (I- 32)* 2,0:PRINT CHR$ (C(I));" ":NEXT
4010 NE= 1:PRINT "
4020 PLOT 3,34,2:IF C(6)> 3THEN 4040
4030 S$= MID$ ("NONE  DAGGERMACE  SWORD  ",C(6)* 6+ 1,6):GOTO 4045
4040 S$= MID$ ("BASTARD SWORD 2-HANDED SWORDSWORD OF SHARPHOLY SWORD    ",(C(6)- 4)* 14+ 1,14)
4045 PRINT S$;SPC( 14- LEN (S$))
4050 PLOT 3,34,3:IF C(7)> 4THEN 4070
4060 S$= MID$ ("NONE   LEATHERSCALE  CHAIN  PLATE  ",C(7)* 7+ 1,7):GOTO 4075
4070 S$= MID$ ("MITHIRIL  ADAMANTITE",(C(7)- 5)* 10+ 1,10)
4075 PRINT S$;SPC( 10- LEN (S$))
4080 PLOT 3,34,4
4090 S$= MID$ ("NONE      SMALL     MEDIUM    LARGE     MITHIRIL  ADAMANTITE",C(8)* 10+ 1,10)
4095 PRINT S$;SPC( 10- LEN (S$))
4100 PLOT 3,46,5:PRINT C(25);"  ":PLOT 3,46,6:PRINT C(26);"  "
4110 PLOT 3,45,7:PRINT C(1);" ":PLOT 3,44,8:PRINT C(12);"
4120 PLOT 3,32,9:PRINT C(2):PLOT 3,36,10:PRINT C(9);",";C(10);"
4130 PLOT 3,41,11:PRINT C(11):PLOT 3,41,12:PRINT C(30)
4150 PLOT 3,59,2:PRINT C(4):PLOT 3,59,3:PRINT C(5)
4160 PLOT 3,59,4:PRINT C(3)
4170 PLOT 29,21,3,55,5,32:IF C(13)> 0THEN PLOT 3,55,5:PRINT "+
4180 PLOT 3,60,6,32:IF C(14)> 0THEN PLOT 3,60,6:PRINT "+
4190 PLOT 3,61,7,32:IF C(15)> 0THEN PLOT 3,61,7:PRINT "+
4200 PLOT 3,60,8,32:IF C(16)> 0THEN PLOT 3,60,8:PRINT "+
4210 PLOT 3,61,9,32:IF C(17)> 0THEN PLOT 3,61,9:PRINT "+
4220 PLOT 3,63,10,32:IF C(18)> 0THEN PLOT 3,63,10:PRINT "+
4230 PLOT 3,59,11,32:IF C(19)> 0THEN PLOT 3,59,11:PRINT "+
4240 RETURN
4500 REM
	PRINT CHAR.
4505 IF TP= 1THEN RETURN
4510 PLOT 3,C(9)+ 2,C(10)+ 1,6,2,15,31,42,15
4520 RETURN
4700 REM
 	INPUT ROUTILE
4710 POKE 33278,0
4720 IF PEEK (33278)= 0THEN 4720
4730 I1$= CHR$ (PEEK (33278))
4740 FOR I= 1TO LEN (I$)
4750 IF MID$ (I$,I,1)= I1$THEN RETURN
4760 NEXT I
4770 I= 100:RETURN
4800 REM
	UPDATE SCREEN SUBROUTINE
4802 IF TP= 1THEN RETURN
4805 IF X< 1OR Y< 1OR X> 20OR Y> 20THEN RETURN
4810 IF L(Y,X)< 99THEN L(Y,X)= L(Y,X)+ 100
4820 PLOT 3,X+ 2,Y+ 1
4825 IF L(Y,X)= 100THEN PRINT " ":RETURN
4835 T= L(Y,X):IF T> 99THEN T= T- 100
4836 PLOT 15
4840 ON TGOTO 4850,4855,4860,4865,4865,4865,4865,4865,4870,4875,4880
4845 ON T- 11GOTO 4885,4885,4885,4885,4885,4885,4885,4890,4890,4890,4890,4890,4890
4847 ON T- 24GOTO 4885,4885,4885,4885,4885,4885,4885,4885,4885,4885,4885,4885,4885,4885,4885,4885
4850 PLOT 31,29,17:PRINT "M":PLOT 15:RETURN
4855 PLOT 29,19:PRINT "$":RETURN
4860 PLOT 29,21:PRINT "M":RETURN
4865 PLOT 29,17:PRINT "T":RETURN
4870 PLOT 29,20:PRINT "E":RETURN
4880 PLOT 31,29,19:PRINT "E":PLOT 15:RETURN
4885 PLOT 29,22:PRINT "W":RETURN
4890 PRINT " ":RETURN
4895 RETURN
5000 REM
	ESP
5002 NT= 0:IF C(13)< 1THEN PRINT "SP NOT AVAILABLE":NT= 1:RETURN
5005 PRINT "SP":RESTORE 5050:FOR I= 1TO 8:READ I1,I2:X= C(9)+ I1:Y= C(10)+ I2:GOSUB 4800:NEXT I
5046 C(13)= C(13)- 1
5047 RETURN
5050 DATA 1,1,1,-1,-1,1,-1,-1,1,0,0,1,-1,0,0,-1
6000 REM SCROLL
6010 NT= 0:IF C(14)< 1THEN PRINT "ELEPORT NOT ALLOWED":NT= 1:RETURN
6015 PRINT "ELEPORT!":C(14)= C(14)- 1
6040 GOSUB 2:INPUT "X-COORDINATE:";EX
6050 IF EX< 1OR EX> 20THEN 6040
6060 GOSUB 2:INPUT "Y-COORDINATE:";WHY
6070 IF WHY< 1OR WHY> 20THEN 6060
6073 X= C(9):Y= C(10):GOSUB 4800:C(9)= EX:C(10)= WHY
6080 GOSUB 4500:RETURN
7000 REM
	REST
7005 NT= 0:IF C(30)< > 0THEN PRINT "EST NOT AVAILABLE":NT= 1:RETURN
7010 C(30)= 5:PRINT "EST
7015 GOSUB 9300:REM  WAND MON
7020 C(26)= C(26)+ 2:IF C(26)> C(25)THEN C(26)= C(25)
7030 RETURN
8000 REM
	HEALING
8010 IF C(19)< 1THEN PRINT "EALING NOT AVAILABLE":RETURN
8020 PRINT "EAL
8025 C(26)= C(26)+ FN R(4)+ FN R(4):IF C(26)> C(25)THEN C(26)= C(25)
8050 C(19)= C(19)- 1:RETURN
9000 REM
9005 PRINT "OVE   ";
9013 C(30)= C(30)- 1:IF C(30)< 0THEN C(30)= 0
9015 FL= 0:REM  WALL FLAG VAR.
9020 I$= "NSEW":GOSUB 4700
9030 ON IGOTO 9050,9080,9100,9130
9040 GOSUB 2:PRINT "(NSEW) PLEASE   MOVE   ";:GOTO 9015
9050 PRINT "ORTH":X= 0:Y= - 1
9060 IF C(10)= 1THEN 9200
9065 GOSUB 9160:IF FL= 1THEN RETURN
9070 X= C(9):Y= C(10):C(10)= C(10)- 1:GOSUB 4800:GOTO 9300
9080 PRINT "OUTH":X= 0:Y= 1
9090 IF C(10)= 20THEN 9200
9092 GOSUB 9160:IF FL= 1THEN RETURN
9094 X= C(9):Y= C(10):C(10)= C(10)+ 1:GOSUB 4800:GOTO 9300
9100 PRINT "AST":X= 1:Y= 0
9110 IF C(9)= 20THEN 9200
9115 GOSUB 9160:IF FL= 1THEN RETURN
9117 X= C(9):Y= C(10):C(9)= C(9)+ 1:GOSUB 4800:GOTO 9300
9130 PRINT "EST":X= - 1:Y= 0
9140 IF C(9)= 1THEN 9200
9145 GOSUB 9160:IF FL= 1THEN RETURN
9150 X= C(9):Y= C(10):C(9)= C(9)- 1:GOSUB 4800:GOTO 9300
9160 REM  CHELEFT$ K FOR WALLS
9161 FL= 0
9163 IF L(C(10)+ Y,C(9)+ X)< > 20AND L(C(10)+ Y,C(9)+ X)< > 120THEN RETURN
9165 X= X+ C(9):Y= Y+ C(10):GOSUB 4800
9170 FL= 1:GOSUB 2:PRINT "BLOCKED BY WALL":IF C(30)< > 0THEN C(30)= C(30)+ 1
9171 RETURN
9200 GOSUB 2:PRINT "BLOCKED BY EDGE OF DUNGEON":C(30)= C(30)+ 1:GOSUB 2:PRINT "M";:GOTO 9000
9299 PRINT "CTIVATE":REM  OTHER ENTRY POINT
9300 T= L(C(10),C(9))
9305 GOSUB 4500
9310 IF T> 99THEN T= T- 100
9313 IF T< > 20THEN C(26)= C(26)+ 1:IF C(26)> C(25)THEN C(26)= C(25)
9316 IF C(30)= 5THEN 9317:IF C(30)< 0THEN C(30)= 0
9317 IF FN R(10)< 3THEN WN= 1:GOSUB 9500
9320 ON T+ 1GOTO 9400,9500,11000,12000,13000,14000,15000,16000,17000,18000,9400,19000,20000
9321 ON T- 12GOTO 20000,20000,20000,20000,20000,20000,9400,30000,9400,9400,9400,9400
9322 ON T- 24GOTO 21000,21000,21000,21000,21000,21000,9400,9400,22000,22000,22000,22000,22000
9400 REM  BLANK
9410 RETURN
9500 M1= C(11)
9501 IF RND (1)> .8THEN M1= M1- 1:GOTO 9501
9502 IF M1< C(11)THEN 9504
9503 IF RND (1)> .73THEN M1= M1+ 1:GOTO 9503
9504 IF M1< 1THEN M1= 1
9505 IF M1> 7THEN M1= 7
9506 M2= FN R(5):DE= 0:M3= 0:FOR I= 1TO M1:M3= M3+ FN R(6):NEXT :M3= M3+ M2:RESTORE 9520
9507 M4= M3
9510 FOR I= 1TO 5* (M1- 1)+ M2:READ M$:NEXT I
9520 DATA "KOBOLD","GOBLIN","ORC","SKELETON","GIANT RAT"
9530 DATA "GNOLL","GHOUL","ZOMBIE","HOBGOBLIN","GIANT SPIDER"
9540 DATA "WERAT","BUGBEAR","OCHRE JELLY","WIGHT","HARPIE
9550 DATA "WRAITH","OGRE","SHADOW","DOPPLEGANGER","GARGOYLE"
9560 DATA "MUMMY","SPECTRE","TROLL","MINOTOUR","MANTICORE"
9570 DATA "GOLEM","VAMPIRE","HYDRA","DRAGON","GIANT"
9580 DATA "DEMON","DEVIL","BALROG","RINDAR","BINGAR"
9585 PLOT 29,18:GOSUB 2:PRINT "YOU HAVE ENCOUNTERED A ";M$
9590 IF RND (1)> .4THEN 9710
9600 H= C(12)+ (C(7)* 1.2)+ C(8)+ C(5)/ 6
9603 H= H+ (FN R(4)- 2)
9610 H1= FN R(15)+ M1
9620 IF H> H1THEN GOSUB 2:PRINT "THE ";M$;" MISSED":GOTO 9710
9630 D= (M1* FN R(4))+ ((M2/ 3+ M1)* FN R(2))- ((C(5)/ 6* (C(12)/ 2))* FN R(2))+ ((C(7)/ 2.2)+ (C(8)/ 2.4)* C(12))
9631 D= D/ 1.9
9633 D= INT (D)
9635 IF D< 1THEN D= 1
9640 GOSUB 2:PRINT "THE ";M$;" HIT FOR ";D
9650 C(26)= C(26)- D:IF C(26)< 1THEN 9960
9700 REM
9710 GOSUB 4000:GOSUB 2:PRINT "FIGHT OPTION (CDERTLF)? ";
9720 I$= "CDERTLF":GOSUB 4700
9730 ON IGOTO 9810,10000,10100,10200,10300,10400,10500
9810 PRINT "HARGE!"
9815 DE= 0
9820 H= C(6)+ INT (1.5* C(12))+ INT (C(4)/ 6)- (M1* 3)+ INT (M2/ 2)
9830 IF FN R(15)> H1THEN 9950
9840 GOSUB 2:PRINT "YOU HIT THE ";M$;" FOR ";
9850 D= INT (FN R(C(12)* 1.3+ C(6)* 1.2))
9860 PRINT D
9870 M3= M3- D:IF M3> = 1THEN 9600
9875 GOSUB 2:PRINT "THE ";M$;" CROAKED"
9880 IF WN= 0THEN L(C(10),C(9))= 100
9881 IF WN= 1THEN WN= 0
9890 EX= M4* 10:C(1)= C(1)+ EX:GOSUB 2:PRINT "YOU GAIN ";EX;" EXPERIENCE
9895 GOSUB 4000
9900 EX= 0:FOR I= 1TO C(12):EX= EX+ 2000+ (1000* (I- 1)):NEXT I
9904 IF C(1)< EXTHEN RETURN
9910 GOSUB 2:PRINT "YOU WENT UP A LEVEL!!":C(12)= C(12)+ 1
9920 H= FN R(4):GOSUB 2:PRINT "YOU GAIN ";H;" HIT POINTS":C(25)= C(25)+ H:C(26)= C(26)+ H
9930 GOSUB 4000
9940 RETURN
9950 GOSUB 2:PRINT "YOU MISSED":GOTO 9600
9960 GOSUB 2:PRINT "YOU BIT THE BIG ONE!!":PLOT 27,4:PRINT "DEL C.ARY;1":PLOT 27,27
9962 PLOT 30,20,14,12,3,10,15:PRINT "DO YOU WANT TO PLAY AGAIN? ";
9963 I$= "YN":GOSUB 4700
9965 ON IGOTO 9970,9966
9966 PRINT "O":END
9970 PRINT "ES":RUN
10000 PRINT "EFEND":DE= 1:GOTO 9600
10070 L(C(10),C(9))= 111+ C(6):C(6)= W:RETURN
10100 PRINT "VADE":IF DE< > 1THEN GOSUB 2:PRINT "YOU MUST DEFEND FIRST!":GOTO 9700
10120 IF RND (1)> .6THEN GOSUB 2:PRINT "YOU MADE IT!!!":L(C(10),C(9))= 101:RETURN
10130 GOSUB 2:PRINT "YOU'RE ROOTED TO THE SPOT":GOTO 9600
10200 PRINT "EPULSION!!":IF C(15)< 1THEN GOSUB 2:PRINT "YOU DON'T HAVE REPULSION":GOTO 9700
10210 IF M1> 4AND RND (1)> .1THEN C(15)= C(15)- 1:GOSUB 2:PRINT "THE ";M$;" LAUGHS IN YOUR FACE!!":GOTO 9600
10220 C(15)= C(15)- 1:L(C(10),C(9))= 100:GOSUB 4000:RETURN
10300 PRINT "ELEPORT!!":IF C(14)< 1THEN GOSUB 2:PRINT "YOU DON'T HAVE TELEPORT":GOTO 9700
10320 C(14)= C(14)- 1:GOTO 6040
10400 PRINT "LIGHTNING!":IF C(17)< 1THEN GOSUB 2:PRINT "NOT ALLOWED":GOTO 9700
10410 D= 0:FOR I= 1TO C(12):D= D+ FN R(5):NEXT :GOSUB 2:PRINT "YOU HIT FOR ";D:C(17)= C(17)- 1
10411 GOTO 9870
10500 PRINT "IREBALL!":IF C(16)< 1THEN GOSUB 2:PRINT "NOT ALLOWED":GOTO 9700
10520 D= 0:FOR I= 1TO C(12):D= D+ FN R(7):NEXT :GOSUB 2:PRINT "YOU HIT FOR ";D:C(16)= C(16)- 1:GOTO 9870
11000 REM
	TREASURE
11010 T= FN R(100)* C(11)+ FN R(50):GOSUB 2:PRINT "YOU HAVE FOUND ";T;" GOLD"
11015 L(C(10),C(9))= 100
11020 C(2)= C(2)+ T:RETURN
12000 REM
	SCROLL
12100 S= FN R(7)
12105 GOSUB 2:PRINT "YOU HAVE FOUND A
12110 IF S> 4THEN 12130
12120 S$= MID$ ("ESP      TELEPORT REPULSIONFIREBALL ",(S- 1)* 9+ 1,9):GOTO 12140
12130 S$= MID$ ("LIGHTNING  TRAP IMMUNEHEALING    ",(S- 5)* 11+ 1,11)
12140 L(C(10),C(9))= 100:GOSUB 2:PRINT "SCROLL OF ";S$:C(12+ S)= C(12+ S)+ FN R(4):RETURN
13000 REM
	TELEPORT
13005 GOSUB 17200:IF I= 1THEN RETURN
13010 GOSUB 2:PRINT "YOU ARE WHERE YOU WERE NOT"
13020 C(9)= FN R(20):C(10)= FN R(20):TP= 1:RETURN
14000 REM
	AMNESIA
14010 GOSUB 17200:IF I= 1THEN RETURN
14020 GOSUB 2:PRINT "AMNESIA!!":C(1)= INT (C(1)/ (FN R(2)+ 1)):C(12)= INT (C(1)/ 2000)+ 1
14050 RETURN
15000 REM
	POISON GAS
15010 GOSUB 17200:IF I= 1THEN RETURN
15020 GOSUB 2:PRINT "SUDDENLY, YOU ARE ENGULFED":GOSUB 2:PRINT "IN GREEN GAS":C(26)= C(26)- FN R(C(11)* 4)
15040 IF C(26)< 1THEN 9960
15050 RETURN
16000 REM
	ACID PIT
16010 GOSUB 17200:IF I= 1THEN RETURN
16020 GOSUB 2:PRINT "ACID PIT!!!":GOSUB 2:PRINT "YOU LOSE ";:D= FN R(7* C(11)):PRINT D;" HIT POINTS
16025 C(26)= C(26)- D:IF C(26)< 1THEN END
16050 RETURN
17000 REM

17010 GOSUB 17200:IF I= 1THEN RETURN
17020 GOSUB 2:PRINT "RUST MONSTER":GOSUB 2:IF C(8)> 0THEN PRINT "YOU LOSE YOUR SHIELD":C(8)= 0:RETURN
17040 IF C(7)> 0THEN PRINT "YOU LOSE YOUR WEAPON":C(6)= 0:RETURN
17050 IF C(6)> 0THEN PRINT "YOU LOSE YOUR ARMOR":C(7)= 0:RETURN
17060 PRINT "YOU LOST YOUR GOLD":C(2)= 0:RETURN
17200 I= 0:IF C(18)< = 0THEN RETURN
17210 GOSUB 2:PRINT "DO YOU WANT TO AVOID? ";
17220 I$= "YN":GOSUB 4700:ON IGOTO 17240,17250
17230 GOTO 17210
17240 PRINT "ES":C(18)= C(18)- 1:FL= 1:RETURN
17250 PRINT "O":RETURN
18000 REM
18010 GOSUB 2:PRINT "YOU ARE ON A BLUE PLATFORM":GOSUB 2:PRINT "NEXT TO YOU IS A GREEN BUTTON
18030 GOSUB 2:PRINT "DO YOU WANT TO PRESS IT ?";:I$= "YN":GOSUB 4700
18031 ON IGOTO 18040,18080
18032 GOTO 18030
18040 I1= C(11):C(11)= C(11)+ 1:PRINT "ES":GOSUB 2:PRINT "THE PLATFORM FALLS!!
18042 GOSUB 2:PRINT "WOULD YOU LIKE TO SUSPEND":GOSUB 2:PRINT "YOUR ADVENTURE? ";
18044 GOSUB 4700:ON IGOTO 18046,18068
18046 PRINT "ES
18052 PLOT 27,4:PRINT "DEL C.ARY;1":PLOT 27,27
18054 SAVE "C.ARY;1":END
18060 END
18068 PRINT "O
18071 IF I1= 2THEN LOAD "L.ARY;3
18072 IF I1= 3THEN LOAD "L.ARY;4
18073 IF I1= 4THEN LOAD "L.ARY;5
18074 IF I1= 5THEN LOAD "L.ARY;6
18077 IF I1= 1THEN LOAD "L.ARY;2
18078 FOR I= 3TO 22:FOR J= 2TO 21:PLOT 3,I,J:PRINT " ";:NEXT J:PRINT :NEXT I:TP= 0:RETURN
18080 PRINT "O":RETURN
18200 GOSUB 4500:RETURN
19000 REM
	EXIT
19010 GOSUB 2:PRINT "YOU HAVE STUMBLED UPON TIAMAT,
19020 GOSUB 2:PRINT "THE QUEEN OF ALL DRAGONS
19024 GOSUB 2:PRINT "BENEATH HER YOU SEE
19030 FOR I= 1TO 700:NEXT
19040 GOSUB 2:PRINT "ORB OF RULERSHIP, THE GOAL
19050 GOSUB 2:PRINT "OF YOUR QUEST
19060 FOR I= 1TO 700:NEXT
19070 GOSUB 2:PRINT "DO YOU WISH TO TRY TO BRIBE HER? ";
19080 I$= "YN":GOSUB 4700:ON IGOTO 19100,19200
19100 PRINT "ES":GOSUB 2:INPUT "HOW MUCH? ";X
19105 IF X> C(2)THEN 19100
19110 IF X< FN R(4000)+ 10000THEN 19200
19120 GOSUB 2:PRINT "SHE ACCEPTS YOUR BRIBE
19130 GOSUB 2:PRINT "SHE HAS GIVEN YOU THE ORB
19140 GOSUB 2:PRINT "AND SHOWN YOU THE EXIT WHICH
19150 GOSUB 2:PRINT "WAS CLEVERLY HIDDEN WITHIN HER
19160 GOSUB 2:PRINT "LIAR.
19170 GOSUB 2:PRINT "CONGRADULATIONS, YOU HAVE BEEN
19180 GOSUB 2:PRINT "DECLARED A HERO AND HAVE  ESCAPED
19190 GOSUB 2:PRINT "WITH YOUR LIFE":END
19200 M1= 11:M2= 5:M3= 170:M4= 170
19210 M$= "DRAGON":GOSUB 9710
19220 GOSUB 2:PRINT "CONGRADULATIONS, YOU HAVE
19230 GOSUB 2:PRINT "DEFEATED TIAMAT.
19240 GOSUB 2:PRINT "YOU FOUND THE EXIT AND HAVE
19250 GOSUB 2:PRINT "BEEN DECLARED A HERO!!
19260 END
20000 IF T= 11THEN RETURN
20001 W= T- 11:GOSUB 2:PRINT "YOU HAVE FOUND A ";:IF W> 4THEN 20050
20040 S$= MID$ ("DAGGER       MACE         SWORD        BASTARD SWORD ",(W- 1)* 13+ 1,13):GOTO 20060
20050 S$= MID$ ("2 HANDED SWORD   SWORD OF SHARPNESSHOLY SWORD       ",(W- 5)* 17+ 1,17)
20060 IF W< = C(6)THEN PRINT S$:GOSUB 2:PRINT "YOU ALREADY HAVE ONE":RETURN
20065 PRINT S$:IF C(6)= 0THEN C(6)= W:L(C(10),C(9))= 0:RETURN
20070 L(C(10),C(9))= 111+ C(6):C(6)= W:RETURN
21000 REM
	ARMOR
21010 W= T- 24:GOSUB 2:PRINT "YOU HAVE FOUND A ";
21020 S$= MID$ ("LEATHER   SCALE     CHAIN     PLATE     MITHIRIL  ADAMANTITE",(W- 1)* 10+ 1,10)
21030 PRINT S$;" ";"ARMOR
21040 IF W< = C(7)THEN GOSUB 2:PRINT "YOU ALREADY HAVE ONE":RETURN
21050 IF C(7)= 0THEN C(7)= W:L(C(10),C(9))= 0:RETURN
21060 L(C(10),C(9))= 124+ C(7):C(7)= W:RETURN
22000 REM
	SHIELD
22010 W= T- 32:IF W= 0THEN RETURN
22011 GOSUB 2:PRINT "YOU HAVE FOUND A ";
22020 S$= MID$ ("SMALL     MEDIUM    LARGE     MITHIRIL  ADAMANTITE",(W- 1)* 10+ 1,10)
22030 PRINT S$;" ";"SHIELD
22040 IF W< = C(8)THEN GOSUB 2:PRINT "YOU ALREADY HAVE ONE":RETURN
22050 IF C(8)= 0THEN C(8)= W:L(C(10),C(9))= 0:RETURN
22060 L(C(10),C(9))= 132+ C(8):C(8)= W:RETURN
30000 RETURN
60000 REM  *** SUBROUTINE FOR SCROLLING ***
60100 A= CALL (0)
60110 PLOT 3,X0,Y0+ H0- 1:PRINT SPC( W0)""
60120 PLOT 3,X0,Y0+ H0- 1
60999 RETURN
64000 GOSUB 65410
64010 Z= 28672+ 128* Y0+ X0+ X0:AD= TM+ 2:GOSUB 65400
64015 Z= 128- W0- W0:AD= TM+ 25:GOSUB 65400
64020 POKE TM+ 5,H0- 1:POKE TM+ 7,W0* (C+ 1):POKE TM+ 19,35* (1- C)
64030 RETURN
64040 REM
65000 GOSUB 65410:RESTORE 65030
65030 DATA 33,-1,-1,6,-1,14,-1,17,128,0,25,126
65040 DATA 17,128,255,25,119,35,-1,13,194,-1,-1
65050 DATA 17,-1,-1,25,5,194,-1,-1,201
65055 IF TM> 65503THEN TM= TM- 32:GOTO 65080
65060 FOR I= 1TO 32:READ A
65065 IF A> = 0AND A< > PEEK (TM+ I)THEN I= 32:TM= TM- 32
65070 NEXT
65080 RESTORE 65030
65090 FOR I= 1TO 32:READ A:POKE TM+ I,A- (A< 0):NEXT
65100 Z= TM+ 1:AD= 33283:GOSUB 65400
65110 Z= TM:AD= ER:GOSUB 65400
65120 Z= TM+ 6:AD= TM+ 30:GOSUB 65400
65130 Z= TM+ 8:AD= TM+ 22:GOSUB 65400
65190 CLEAR 100:GOTO 1
65400 ZZ= INT (Z/ 256):POKE AD,Z- 256* ZZ:POKE AD+ 1,ZZ:RETURN
65410 ER= 32940:TM= 256* PEEK (ER+ 1)+ PEEK (ER):RETURN
65500 END