home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 74
/
074.d81
/
pd
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-26
|
6KB
|
159 lines
10 open15,8,15:print#15,"i":close15:print"[147]":poke53265,peek(53265)or16:poke198,0
15 open8,8,8,"disk,s,r":input#8,xi:close8:poke832,xi
20 poke53280,6:poke53281,6
23 ifxi=0thenux=1:gosub44
25 ifde=0andxi=9thende=1:goto100
26 print"[147]insert data disk. [return]":gosub99
30 geta$:ifa$<>""then30
35 geta$
40 ifa$="_"then44
42 ifa$<>chr$(13)andpeek(56320)<>111then35
43 goto100
44 poke53280,0:poke53281,0:ifde=0andxi=9thende=1:goto900
45 print"[147]insert 'dungeon' disk. [return]":gosub99
46 geta$
47 ifa$="_"thenprint"[147]":run
48 ifa$<>chr$(13)andpeek(56320)<>111then46
49 goto900
50 rem
55 forg=1toz:printa$(g);:nextg:e=1
57 print "";a$(e);"[146]"
60 a=peek(56320):ifa<>127thenforg=1to10:nextg:goto70
65 geta$:ifa$="" then 60
70 ifa=126ora$="[145]"thenk=-1:goto90
75 ifa=125ora$=""thenk=1:goto90
80 ifa=111ora$=chr$(13) then return
88 goto60
90 printa$(e);:e=e+k:ife=0thene=z
95 ife=z+1thene=1
98 goto57
99 print"press [_] to escape.":return
100 xi=peek(832)
102 a=0:print"[147]":open8,xi,8,"master disk,s,r":input#8,a:close8:ifa<>1then20
103 open8,xi,8,"treasure,s,r":input#8,tw,tm,tp,tt:close8:de=0
105 poke53280,12:poke53281,0:f$=" "
110 print"[147][152] ";
115 print" print directories ";
120 print" ";:print"[146]"
130 print"[193][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][211]"
135 forg=1to9:print"[180][170]":nextg
140 print"[218][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][216]"
150 a$(1)=" characters "
152 a$(2)=" monsters "
154 a$(3)=" magic items "
156 a$(4)=" weapons "
158 a$(5)=" armor "
160 a$(6)=" traps "
162 a$(7)=" dungeons "
168 a$(8)=" change disk "
170 a$(9)=" finished "
175 z=9:gosub50
180 ife=8thenrun100
183 ife=9then44
185 onegoto200,300,400,500,600,700,800
200 print"[147][print characters]"
220 open8,8,8,"@0:cha. data,s,r":input#8,x:ifx=0thenclose8:goto290
225 dimpl$(x),na$(x),sr$(x),in$(x),de$(x),lu$(x),hp$(x),hd$(x),ra$(x),le$(x)
230 dimac$(x),td$(x):forg=1tox
235 input#8,pl$(g),na$(g),sr$(g),in$(g),de$(g),lu$(g),hp$(g),hd$(g),ra$(g)
240 input#8,le$(g),ac$(g),td$(g),a,a$:nextg:close8
245 open4,4,0
247 a$="character player race st in de lu hp lv died "
248 a$=a$+"points":print#4,a$
249 d$="----------------------------------------------------------------------"
250 d$=d$+"---":print#4,d$
255 forg=1tox
260 a$=na$(g)+left$(f$,17-len(na$(g)))+pl$(g)+left$(f$,17-len(pl$(g)))
265 b$=hd$(g)+left$(f$,3-len(hd$(g)))
267 c$=ra$(g)+left$(f$,10-len(ra$(g)))
268 e$=td$(g)+left$(f$,5-len(td$(g)))
270 print#4,a$;c$;sr$(g);in$(g);de$(g);lu$(g);hp$(g);b$;e$;le$(g)
275 nextg
280 print#4,d$:close4:run100
290 print"there are no charcters here!"
295 forg=1to2000:nextg:goto110
300 print"[147][print monsters]"
310 open8,xi,8,"monster,s,r":input#8,x:ifx=0then350
312 dimd$(x),b$(x):forg=1tox
315 input#8,d$(g),b$(g):nextg:close8
317 open4,4,0:print#4,"# monster name x.p"
318 print#4,"----------------------------"
320 forg=1tox:a$=str$(g):a$=right$(a$,len(a$)-1):a$=a$+left$(f$,4-len(a$))
330 a$=a$+d$(g)+left$(f$,19-len(d$(g)))
335 a$=a$+b$(g):print#4,a$:nextg
340 print#4,"----------------------------":close4:run100
350 close8:print"there is no data here!":forg=1to2000:nextg:goto110
400 print"[147][print magic items]":iftm=0then350
410 x=tm:dimna$(x),fc$(x):open3,xi,3,"magic":open15,xi,15:forg=1tox
420 print#15,"p"chr$(3)chr$(g)chr$(0)chr$(1):input#3,na$(g)
425 print#15,"p"chr$(3)chr$(g)chr$(0)chr$(19):input#3,fc$(g):nextg
430 close15:close3:open4,4,0
435 print#4,"# name of item spells"
440 print#4,"--------------------------------------------------------"
445 forg=1tox:a$=str$(g+199):a$=right$(a$,len(a$)-1)
450 a$=a$+" "+na$(g)+left$(f$,19-len(na$(g)))+fc$(g)
455 print#4,a$:nextg
460 print#4,"--------------------------------------------------------"
465 close4:run100
500 print"[147][print weapons]":iftw=0then350
510 open3,xi,3,"weapons":open15,xi,15:x=tw:dimwe$(x),re$(x)
515 forg=1tox:print#15,"p"chr$(3)chr$(g)chr$(0)chr$(1):input#3,we$(g)
520 print#15,"p"chr$(3)chr$(g)chr$(0)chr$(23):input#3,re$(g):nextg
525 close3:close15:open4,4,0
530 print#4,"# weapon damage rate"
535 print#4,"-------------------------------"
540 forg=1tox:b=1:c=1:d=1:y$=we$(g)
545 a$=mid$(y$,b,1):ifa$="[166]"thena$(c)=mid$(y$,d,b-d):c=c+1:d=b+1:ifc=3then555
550 b=b+1:goto545
555 a$=str$(g):a$=right$(a$,len(a$)-1):a$=a$+left$(f$,4-len(a$))
560 a$=a$+a$(1)+left$(f$,16-len(a$(1)))
565 a$=a$+"1-"+a$(2)+left$(f$,5-len(a$(2)))+re$(g)
570 print#4,a$:nextg
575 print#4,"-------------------------------":close4:run100
600 print"[147][print armor]":iftp=0then350
610 open3,xi,3,"armor":open15,xi,15:x=tp:dimwe$(x),re$(x)
615 forg=1tox:print#15,"p"chr$(3)chr$(g)chr$(0)chr$(1):input#3,we$(g)
620 print#15,"p"chr$(3)chr$(g)chr$(0)chr$(22):input#3,re$(g):nextg
625 close3:close15:open4,4,0
630 print#4,"# item rate type"
635 print#4,"-----------------------------"
640 forg=1tox:b=1:c=1:d=1:y$=we$(g)
645 a$=mid$(y$,b,1):ifa$="[166]"thena$(c)=mid$(y$,d,b-d):c=c+1:d=b+1
650 ifc=3then660
655 b=b+1:goto645
660 a$(3)=right$(we$(g),len(we$(g))-b):a$=str$(g+699):a$=right$(a$,len(a$)-1)
665 ifa$(3)="a"thenl$="arm":goto675
670 l$="shd"
675 a$=a$+" "+a$(1)+left$(f$,16-len(a$(1)))
680 a$=a$+re$(g)+left$(f$,5-len(re$(g)))+l$:print#4,a$:nextg
685 print#4,"-----------------------------"
690 close4:run100
700 print"[147][print traps]":iftt=0then350
720 x=tt:dimtr$(x):open3,xi,3,"traps":open15,xi,15:forg=1tox
730 print#15,"p"chr$(3)chr$(g)chr$(0)chr$(1):input#3,tr$(g):nextg:close3
735 close15:open4,4,0
737 print#4,"# trap effect"
738 print#4,"--------------------------":forg=1tox
740 b$=right$(tr$(g),2):ifval(b$)<>0then755
745 ifb$="bk"thenb$="block":goto760
750 b$="tele":goto760
755 b=val(b$):b$=str$(b):b$=right$(b$,len(b$)-1):b$="1-"+b$
760 c$=left$(tr$(g),len(tr$(g))-2):c$=c$+left$(f$,16-len(c$))
765 a$=str$(g):a$=right$(a$,len(a$)-1):a$=a$+left$(f$,4-len(a$))
770 a$=a$+c$+b$:print#4,a$:nextg
775 print#4,"--------------------------":close4:run100
800 print"[147][list dungeons]"
820 open8,xi,8,"list,s,r":input#8,x:ifx=0then870
825 dimdu$(x),cr$(x):forg=1tox:input#8,du$(g),cr$(g):nextg:close8
830 open4,4,0:print#4,"dungeons on this disk:"
835 print#4,"---------------------------------------":f$=".................."
840 forg=1tox:a$=du$(g)+left$(f$,19-len(du$(g)))+"by "+cr$(g)
845 print#4,a$:nextg
850 print#4,"---------------------------------------":close4:run100
870 print"there are no dungeons on this disk!":forg=1to2000:nextg:goto110
900 print"[147]":a1=0:open8,8,8,"master disk,s,r":input#8,a1:close8:ifa1<>7then44
905 ifux=1thenux=0:return
910 poke53280,0:poke53265,peek(53265)and239
915 clr:forg=631to634:pokeg,13:nextg:poke198,4
920 print"[147]load";chr$(34);"me";chr$(34);",8":print"run":end