home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 248
/
248.d81
/
c.main
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-26
|
17KB
|
376 lines
1 dv=peek(186):ifdv<8thendv=8
2 i=rnd(-ti):goto558
4 j=peek(u):f=-((jandw)=.):j=v-(jandv):return
6 a$=str$(c):a$=right$(a$,len(a$)-o):print"[147][156][215]ealth: \"a$"":return
8 j=peek(u):if(jandw)=.then8
10 forj=.to9:next:j=peek(u):if(jandw)then10
12 return
14 poke53265,11:poke56576,197:poke648,140:poke53272,63:poke53270,200
16 print"[147]":poke53265,27:return
18 poke54278,o:poke54273,60:poke54276,17:poke54276,w:return
20 poke54278,48:poke54273,30:poke54276,17:fora=.to99:next:poke54276,w:return
22 poke54278,9:poke54273,80:poke54276,17:poke54276,w:return
24 print" \";
26 print"0[157]";:b=.
28 gosub4:if(f)thenprint:goto22
30 j=y(j):ifj=.then28
32 b=b+j:ifb<.thenb=.:gosub20:goto28
34 ifb>mthenb=m:gosub20:goto28
36 a$=str$(b):a$=right$(a$,len(a$)-o)+" ":printa$;:fora=otolen(a$):print"[157]";
38 next:gosub18:goto28
40 k=201:i=.:a=.
42 k=k+o:ifk>205thenk=202
44 pokep+i*40,k:gosub4:ifj=othena=i-o:ifa<.thena=m
46 ifj=tthena=i+o:ifa>mthena=.
48 ifi<>athenpokep+i*40,32:i=a:gosub18
50 if(f)thenpokep+i*40,42:goto22
52 goto42
54 j=int(d(i)/13):i=d(i)-13*j:print"[144]";:ifj<2thenprint"";
56 print" "n$(i)s$(j);:gosub18:fori=oto200:next:return
58 q$="":i=.:k=202
60 k=k+o:ifk>205thenk=202
62 print"[159]"chr$(k)"[146][155][157]";:geta$:ifa$=""then74
64 a=asc(a$):ifa=20andi>.thenprint" [157][157] [157]";:i=i-o:q$=left$(q$,i):goto60
66 ifa=13andi>.thenprint" ":goto22
68 ifi=mor(a<45anda<>32)ora>218thengosub20:goto60
70 if(a>57anda<65)or(a>90anda<193)thengosub20:goto60
72 q$=q$+a$:printa$;:i=i+o:gosub18
74 forj=.to20:next:goto60
76 a=o:print"[217]es[157][157][157]";
78 gosub4:if(f)thenprint:goto22
80 ifj<>.thena=o-a:gosub18:print"[217]es[157][157][157]";:ifa=.thenprint"[206]o [157][157][157]";
82 goto78
84 poke53269,.:poke53280,.:poke53281,.:gosub14
86 print"[147]"tab(13)"[155]23456789:;<=67":printtab(13)"[151]>?[192][193][194][195][196][197][198][199][200][201][194][195]"
88 printtab(13)"[150]by [202]on [205]attson":printtab(6)"[156]******** [155][200][201] [211][195][207][210][197][211] [156]********"
90 printtab(6)"*"tab(33)"*":fori=.to4:printtab(6)"[156]* [159]"t$(i)tab(27)"";
92 a$=str$(s(i)):j=len(a$):a$=left$("00000",6-j)+right$(a$,j-o):printa$"[156] *"
94 next:printtab(6)"*"tab(33)"*":printtab(6)"****************************"
96 printtab(11)"[154][202]oystick in [208]ort 2":printtab(8)"[150][198]ire to [208]lay - [209] to [209]uit"
98 poke53265,27
100 gosub4:iff=1then108
102 geta$:ifa$<>"q"anda$<>"[209]"then100
104 print"[147][150][209]uit? [154][193]re you sure? ";:gosub76:ifa=.then84
106 goto544
108 gosub22:print"[147][154][217]our name, please: ";:m=16:gosub58:n$=q$:gosub632
110 w(.)=172:w(1)=156
112 poke53265,11:poke56576,198:poke648,92:poke53272,120:poke53270,216:sys33981
114 fori=1to11:poke53248+i,w(i):next:poke53276,.:poke53287,3:poke24568,109
116 ifw(.)<256thenpoke53248,w(.):poke53264,32:goto120
118 poke53248,w(.)-256:poke53264,33
120 fori=1to5:poke53287+i,.:next:poke53271,.:poke53275,.:poke53277,.:k=.
122 poke53280,.:poke53281,.:poke53269,63:poke53265,59:poke54285,3:j=peek(53278)
124 gosub4:w(o)=w(o)+8*y(j):ifw(o)<140thenw(o)=140
126 ifw(o)>236thenw(o)=236
128 w(.)=w(.)+8*x(j):ifw(.)<(254-w(o))thenw(.)=254-w(o)
130 ifw(.)>(w(o)+86)thenw(.)=w(o)+86
132 poke53249,w(o):ifw(.)<256thenpoke53248,w(.):poke53264,32:goto136
134 poke53248,w(.)-256:poke53264,33
136 ifx(j)+y(j)<>.thenk=o-k:poke54280,3+k:poke54283,129:poke54283,128
138 poke24568,z(j)+k:geta$:ifa$=chr$(13)then534
140 j=peek(53278):ifj=.then124
142 b=.:fori=oto5:if(t^iandj)thenb=i
144 next:w(.)=w(.)-16*(b<3)+16*(b>3):w(o)=w(o)-16*(b=3)
146 poke53269,.:j=peek(53278):gosub14:ifb<>3then248
148 poke53270,216:poke53282,9:poke53283,5
150 print"":fori=.to10:printtab(14)m$(i):next:d=l:poke36856,223:poke53287,1
152 print"[156] [208]lease set course for your next port of call...";:poke53269,1
154 poke53248,143+8*q(d,.):poke53249,89+8*q(d,o)
156 print""tab(9)"[156][196]estination: [159]"c$(d)" ";
158 gosub4:k=(k+o)andv:poke53287,k:if(f)thengosub22:goto164
160 i=d+y(j):i=-i*(i<5)-5*(i<.):ifi=dthen158
162 d=i:gosub18:goto154
164 poke53269,.:ifd=lthenprint"[147][211]taying put...":fori=1to1000:next:goto112
166 print"[147][211]etting course...":x=q(l,.):y=q(l,o):a=q(d,.):b=q(d,o)
168 a=a-x:b=b-y:j=int((a^2+b^2)^.5+.5):a=a/j:b=b/j:fori=jto1step-1
170 x=x+a:y=y+b:v(i+8)=l(int(y+.5),int(x+.5)):next:v(8)=j:fori=.to22
172 pokep(i),v(i):next:l=d:poke53265,3:fori=.to25:poke53269+i,u(i):next
174 poke53264,.:pc=.
176 sys49152:fori=.to22:v(i)=peek(p(i)):next:q=v(18)+256*v(19):v(18)=.:v(19)=.
178 s=s+q*3:r=r+o+q:poke54276,.:poke54283,.:poke53280,.:ifv(22)=.then222
180 poke53281,t:poke53269,peek(53269)and86
182 ifpeek(36858)<214thenpoke53269,peek(53269)and251
184 ifpeek(36862)<214thenpoke53269,peek(53269)and191
186 poke54278,96:poke53281,.:ifv(6)=.then194
188 if(peek(53269)and16)>.then206
190 k=.:poke54276,129:fori=9to.step-o:k=o-k:poke36857,196+k:poke54273,i:next
192 goto208
194 if(peek(53269)and16)>.then202
196 poke36857,178:poke54276,129:fori=100to52step-2:poke54273,i
198 poke53251,peek(53251)-2:next
200 poke36860,184:poke53257,peek(53251):poke53269,(peek(53269)and84)or16
202 poke54276,129:fori=50to10step-2:poke54273,i:poke53257,peek(53257)-2:next
204 poke54276,128
206 k=.:poke54276,129:fori=9to.step-o:k=o-k:poke36860,198+k:poke54273,i:next
208 poke54276,128:poke53269,peek(53269)and68:fori=1to750:next:poke53269,.
210 print"[147]"tab(11)"[212]ough luck, pal...":fori=.to999:next:s=int((s+pr-75)/2)
212 print""tab(11)"[156][198]inal [211]core:[159]"s:i=fre(.):gosub8:ifs<s(4)then84
214 j=4:fori=4to.step-o:ifs=>s(i)thenj=i
216 next:ifj=4then220
218 fori=4toj+ostep-o:s(i)=s(i-o):t$(i)=t$(i-o):next
220 s(j)=s:t$(j)=n$:goto84
222 poke53269,.:print"[147][159]";:a$="[215]elcome to "+c$(l)+".":a=int(20-len(a$)/2)
224 printtab(a)a$:fori=.to11:ifint(rnd(o)*20)>o(i,o)then232
226 j=o+int(rnd(o)*3)+int(rnd(o)*3):ifrnd(o)>.5thenj=-j
228 m(l,i)=m(l,i)+j/100:ifm(l,i)<.5thenm(l,i)=.5
230 ifm(l,i)>2thenm(l,i)=2
232 o(i,4)=int(.5+o(i,.)*m(l,i)):o(i,5)=int(rnd(o)*5)+o(i,3)
234 ifm(l,i)>1theno(i,3)=o(i,3)-int(10*m(l,i)-10):ifo(i,3)<otheno(i,3)=.
236 o(i,3)=o(i,3)-(m(l,i)<.9)-(m(l,i)<.75):next
238 n=int(rnd(o)*3)-(r>25)-(r>99):ifq=.then246
240 print" [212]he authorities award you a bounty for"
242 print" the enemy vehicles you destroyed:[159] \";:j=.:fori=1toq
244 j=j+int(rnd(o)*3+o):next:q=.:c=c+j:a$=str$(j):printright$(a$,len(a$)-o)
246 gosub8:goto110
248 onbgosub250,374,,426,460:goto112
250 print"[155] [217]ou are stopped at the door by a tough -looking bouncer, who is";
252 print" expecting a \1 cover charge...":fori=1to1500:next
254 ifc>.thenc=c-o:print" [217]ou toss him a credit and wander in.":goto266
256 ifr>99then260
258 print" [217]ou show empty pockets - he shows you the door...":goto8
260 print" [200]e sees that you're broke and suddenly starts looking the other ";
262 print"way, all very casually. [193]s you slip by, he mumbles, '[194]last a ";
264 print"few of'em suckers for me next time you're up there, pal!'"
266 gosub8:poke53280,5:poke53281,15
268 print"[147]"tab(14)"[144][193]ce of [144][195]lubs":printtab(13)l$
270 printtab(12)" [144] [208]lay [199]emini":printtab(12)" [144] [196]rink & [199]ossip"
272 printtab(12)" [151] [204]eave":m=t:p=36092:gosub40:ifi=tthenreturn
274 ifi=othen348
276 print"[147] [215]elcome, my friend! [210]eady to win some money, [201] trust?"
278 print" [204]et's begin...":e=51
280 gosub8:ife<39then288
282 print"[147][211]huffling...":e=.:bc=51:fori=.to51:k(i)=.:next:fori=.to51
284 j=int(rnd(o)*52):ifk(j)>.then284
286 k(j)=o:c(i)=j:next
288 gosub6:printtab(14)" [144] [208]lace [194]et":printtab(14)" [144] [209]uit":m=1:p=36014
290 gosub40:ifi=othen268
292 gosub6:print"[144] [200]ow much ([200]ouse [204]imit is 50[144])?";:m=50:gosub24
294 ifb=.then268
296 ifb>50thengosub20:goto292
298 ifb>cthenprinttab(15)"[206]o credit!":gosub20:fori=1to1000:next:goto292
300 c=c-b:z=b:gosub6:d(.)=c(e):d(o)=c(e+o):d(t)=.:d(3)=c(e+t):d(4)=c(e+3)
302 d(5)=.:e=e+4:fori=.to5:t(i)=1+d(i)-13*int(d(i)/13):next
304 ift(o)>t(.)theni=t(.):t(.)=t(o):t(o)=i:i=d(.):d(.)=d(o):d(o)=i
306 ift(4)>t(3)theni=t(3):t(3)=t(4):t(4)=i:i=d(3):d(3)=