home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 248 / 248.d81 / c.main (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  17KB  |  376 lines

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