home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 45 / 045.d81 / b (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  10KB  |  418 lines

  1. 1 q=q+1:onqgoto3,4,5
  2. 2 goto10
  3. 3 load"wb.fnt",8,1
  4. 4 load"utl",8,1
  5. 5 poke53281,14:print"[147]":ifpeek(53265)<>27thensys51459
  6. 10 ifa3=0thenpoke20480,0:poke20481,0
  7. 20 rb=256*peek(20480)+peek(20481)
  8. 30 ifa2thenrb=rb+1:goto2680
  9. 40 ifa1then1170
  10. 50 poke52,56:poke56,56:poke55,0:poke51,0
  11. 60 goto1080
  12. 62 print"":poke646,cl
  13. 63 printtab(26)"[176][192][192][192][192][192][192][192][174]"
  14. 64 printtab(26)"[221]w[146] o[146] r[146] d[146][221]"
  15. 65 printtab(26)"[221]       [221]"
  16. 66 printtab(26)"[221]b[146] o[146] w[146] l[146][221]"
  17. 67 printtab(26)"[173][192][192][192][192][192][192][192][189]"
  18. 68 return
  19. 70 :
  20. 80 :rem         ===ending===
  21. 90 :
  22. 100 print"[147][149]"spc(13)"do you want to:"
  23. 110 printspc(10)"p[151][146]lay another game?"
  24. 120 printspc(10)"r[151][146]eturn to first menu?"
  25. 130 printspc(10)"e[151][146]xit to loadstar?"
  26. 135 poke198,0
  27. 140 geta$
  28. 150 ifa$="p"then1170
  29. 160 ifa$="r"then2280
  30. 170 ifa$<>"e"then140
  31. 180 print"[147]"spc(10)"[149]returning to loadstar"
  32. 190 poke55,0:poke56,160:poke53272,21
  33. 200 load"hello connect",8
  34. 222 print"":fort=0to20:print:next
  35. 224 print"  press any key to play another game  "
  36. 226 print"                                      [145]"
  37. 228 return
  38. 230 :
  39. 240 :rem         ===screen===
  40. 250 :
  41. 260 ifd=0thenpp%(fr)=221:return
  42. 270 ifd=1thenpp%(fr)=220:return
  43. 280 pp%(fr)=48+(11-d):return
  44. 290 print"[144]":fori=1to19:print:next
  45. 300 printspc(15);:fori=1tor:print"-";:next:print:print
  46. 310 print"   f1 [151]reveal a letter      f3 [151]scores"
  47. 320 print"  f7 [151]instructions    f8 [151]new game/quit [145]"
  48. 325 cl=6:gosub62
  49. 330 return
  50. 340 :
  51. 350 :rem         ===triangle===
  52. 360 :
  53. 370 fori=0tor-1:q%(i)=0:next
  54. 380 fori=0tor-1
  55. 390 f=int(rnd(1)*r)
  56. 400 ifq%(f)then390
  57. 410 f$(i)=mid$(g$(fr),f+1,1)
  58. 420 q%(f)=1
  59. 430 next:return
  60. 440 :
  61. 450 :rem       ===score sheet===
  62. 460 :
  63. 470 print"";
  64. 480 print"  [144][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175]"
  65. 490 print"  [180] [219][146][180] [219][146][180] [219][146][180] [219][146][180] [219][146][180] [219][146][180] [219][146][180] [219][146][180] [219][146][180] [219][146][180]    [170]"
  66. 500 print"  [180]  [180]  [180]  [180]  [180]  [180]  [180]  [180]  [180]  [180]  [180]    [170]"
  67. 510 print"  [204][175][175][204][175][175][204][175][175][204][175][175][204][175][175][204][175][175][204][175][175][204][175][175][204][175][175][204][175][175][204][175][175][175][175][186][151]"
  68. 520 return
  69. 530 :
  70. 540 :rem         ===get word===
  71. 550 :
  72. 560 fori=1to10:g$(i)="":cj=cj+1
  73. 570 ra=int(rnd(1)*rb):ifcj<rb-10thenifrq%(ra)then570
  74. 580 forj=0tor-1
  75. 590 g$(i)=g$(i)+chr$(peek(bf+j+ra*r))
  76. 600 ifcj<rb-10thenrq%(ra)=1
  77. 610 next:next
  78. 620 return
  79. 630 :
  80. 640 :rem        ===load scores===
  81. 650 :
  82. 660 open15,8,15
  83. 665 open2,8,2,"0:sco,p,r"
  84. 670 fori=10to4step-1:forj=0to3
  85. 680 input#2,hs%(i,j)
  86. 690 input#2,na$(i,j)
  87. 700 next:next:close2
  88. 710 gosub792:return
  89. 720 :
  90. 730 :rem        ===save scores===
  91. 740 :
  92. 750 open15,8,15
  93. 755 open2,8,2,"@0:sco,p,w"
  94. 760 fori=10to4step-1:forj=0to3
  95. 765 ifbqthenhs%(i,j)=10:na$(i,j)="------"
  96. 770 print#2,hs%(i,j)
  97. 780 print#2,na$(i,j)
  98. 790 next:next:close2:gosub792:return
  99. 792 input#15,er,er$
  100. 794 ifer$<>"ok"thenprint"[145][145]"er$
  101. 796 print#15,"i0"
  102. 800 close15:return
  103. 810 :
  104. 820 :rem        ===show words===
  105. 830 :
  106. 840 cl=15:gosub62:print"":fori=1to10
  107. 850 l=25:ifi=10thenl=24
  108. 860 printtab(l)""i" [151]"g$(i)
  109. 870 next
  110. 880 ifflthenfl=0:return
  111. 885 poke198,0
  112. 890 geta$:ifa$=""then890
  113. 900 return
  114. 910 :
  115. 920 :rem        ===big four===
  116. 930 :
  117. 940 sys828,4,64:sys828,216,68
  118. 950 pokecb,0:pokecb+1,0
  119. 960 print"[147]"tab(14)"the big[146] four"
  120. 970 fori=10to4step-1
  121. 975 print"[152]      "r$(i)"pins[146]"
  122. 978 forj=0to3
  123. 980 print"[154]"tab(25-len(na$(i,j)))na$(i,j)
  124. 990 print"[145][159]"tab(28)hs%(i,j)
  125. 992 next
  126. 995 ifi<>7then1005
  127. 1000 print"   [158]press any key for more scores[145]"
  128. 1002 poke198,0
  129. 1003 geta$:ifa$=""then1003
  130. 1004 print"[147]"tab(14)"the big[146] four"
  131. 1005 next
  132. 1010 print"  [158]press any key to return to the game"
  133. 1015 poke198,0
  134. 1020 geta$:ifa$=""then1020
  135. 1030 pokecb,15:pokecb+1,15
  136. 1040 sys828,64:sys828,68,216:return
  137. 1050 :
  138. 1060 :rem    ===initialization===
  139. 1070 :
  140. 1080 cb=53280:poke53272,31
  141. 1090 printchr$(8)
  142. 1100 dimrq%(308),m%(11),f$(11),g$(11),p%(11),pp%(13),y%(11),u%(11)
  143. 1105 dimhs%(11,4),na$(11,4),mh%(3)
  144. 1110 s=1024:c=54272:w=775:z=40:t=rnd(-ti):bf=20482:rb=0:a3=1
  145. 1115 mh%(0)=10:mh%(1)=2:mh%(2)=9
  146. 1118 sp$="                                       "
  147. 1120 fori=0to9:readm%(i):next
  148. 1130 fori=10to4step-1:readr$(i):next
  149. 1140 fori=1to10:p%(i)=s+121+i*3:u%(i)=p%(i)+39:next
  150. 1150 gosub660
  151. 1160 goto2280
  152. 1170 print"[147]"
  153. 1180 pokecb+1,15:pokecb,15
  154. 1190 fr=0:sc=0
  155. 1200 gosub560:gosub470
  156. 1210 fori=1to10:pokep%(i)+c,0:next
  157. 1220 fr=fr+1:qz=0:d=0
  158. 1230 fori=0tor-1:pokes+w+i,32:pokes+w+i+c,9:next
  159. 1240 gosub290:gosub370
  160. 1250 fori=0tor-1:pokes+m%(i),asc(f$(i))+64
  161. 1260 pokes+m%(i)+c,6:next
  162. 1270 print"  ";
  163. 1280 fori=1to10
  164. 1290 ifi=frandfr=10thenprinti;"[157][157][157][157]>[146]"spc(2)"?[146]";:goto1320
  165. 1300 ifi=frthenprinti;"[157][157][157]>[146]"spc(1)"?[146]";:goto1320
  166. 1310 printi;"[157] ";
  167. 1320 next:print"total"
  168. 1330 k=0
  169. 1340 ifk<0thenk=0
  170. 1350 ifk>r-1thenk=r-1
  171. 1360 v2=peek(s+w+k+c)and15
  172. 1370 v=s+w+k:v1=peek(v):gosub260:pokeu%(fr),pp%(fr):pokeu%(fr)+c,1
  173. 1380 ifpp%(fr)=220thenpokeu%(fr)-z,100:pokeu%(fr)-z+c,1
  174. 1390 ifv1>128thenv1=v1-128:pokev+c,v2:goto1410
  175. 1400 ifv1<128thenv1=v1+128:pokev+c,1
  176. 1410 pokev,v1:pokes+825+c,15
  177. 1420 geta$:ifa$=""then1370
  178. 1430 ifv1>128thenv1=v1-128:pokev,v1:pokev+c,v2
  179. 1440 ifa$<>chr$(133)then1530
  180. 1450 ifv2<>1andv2<>9then1420
  181. 1460 pokev,asc(mid$(g$(fr),v-(s+w-1),1))-64:pokes+w-1+v-(s+w-1)+c,6:v2=6
  182. 1500 d=d+1:ifr-d<0thend=d-1
  183. 1510 pokeu%(fr),32:ifpeek(u%(fr)-z)=100thenpokeu%(fr)-z,32
  184. 1520 goto1420
  185. 1530 ifa$=chr$(13)then1710
  186. 1540 ifa$=chr$(140)then100
  187. 1550 ifa$=chr$(134)thengosub940:goto1420
  188. 1551 ifa$<>chr$(135)then1560
  189. 1552 sys828,4,64:sys828,216,68:print"":fori=0to21:print:next
  190. 1553 print"[145]  [149]do you really want to clear the    "
  191. 1554 print"      high scores?  y[151]es or n[151]o        ":poke198,0
  192. 1555 geta$:ifa$<>"y"anda$<>"n"then1555
  193. 1556 ifa$="n"then1558
  194. 1557 bq=1:gosub750:bq=0
  195. 1558 sys828,64,4:sys828,68,216
  196. 1559 goto1420
  197. 1560 ifa$<>chr$(136)then1620
  198. 1580 gosub5000
  199. 1610 goto1420
  200. 1620 ifa$="[157]"thenpokev,v1:k=k-1:goto1340
  201. 1630 ifa$=""thenpokev,v1:k=k+1:goto1340
  202. 1640 ifa$=chr$(20)thenif(peek(v+c)and15)<>6thenpokev,32:k=k-1:goto1340
  203. 1650 ifa$=chr$(20)thenk=k-1:goto1340
  204. 1660 ifa$<"a"ora$>"z"then1420
  205. 1670 ifv1<>32andv2=6then1690
  206. 1680 pokev,asc(a$)-64
  207. 1690 k=k+1
  208. 1700 goto1340
  209. 1710 e$="":fori=0tor-1:ifpeek(s+w+i)>128thenpokes+w+i,peek(s+w+i)-128
  210. 1720 e$=e$+chr$(peek(s+w+i)+64):next
  211. 1730 pokeu%(fr),32:ifpeek(u%(fr)-z)=100thenpokeu%(fr)-z,32
  212. 1733 qw=0
  213. 1735 cl=1:gosub62:cl=6:gosub62:qw=qw+1:ifqw<3then1735
  214. 1740 ife$<>g$(fr)then1800
  215. 1750 pokep%(fr),pp%(fr)
  216. 1770 printspc(27)"[145][145][145][145]       [157][157][157][157][157][157]right[157][157][157][157][157][157]       "
  217. 1772 fort=1to2000:next:cl=6:gosub62
  218. 1780 iffr=10then1840
  219. 1790 goto1220
  220. 1800 d=d+1:ifr-d<0thend=d-1
  221. 1810 printspc(27)"[145][145][145][145]       [157][157][157][157][157][157]sorry[157][157][157][157][157][157]       "
  222. 1820 fort=1to2000:next:cl=6:gosub62
  223. 1830 goto1270
  224. 1840 sc=0:pp%(11)=221:pp%(12)=221
  225. 1850 fori=1to10
  226. 1860 ifpp%(i)<>221then1930
  227. 1870 ifpp%(i+1)<>221then1910
  228. 1880 ifpp%(i+2)=221thensc=sc+30:goto1980
  229. 1890 ifpp%(i+2)=220thensc=sc+29:goto1980
  230. 1900 sc=sc+20+pp%(i+2)-48:goto1980
  231. 1910 ifpp%(i+1)=220thensc=sc+20:goto1980
  232. 1920 sc=sc+10+pp%(i+1)-48:goto1980
  233. 1930 ifpp%(i)<>220then1970
  234. 1940 ifpp%(i+1)=221thensc=sc+20:goto1980
  235. 1950 ifpp%(i+1)=220thensc=sc+19:goto1980
  236. 1960 sc=sc+10+pp%(i+1)-48:goto1980
  237. 1970 sc=sc+pp%(i)-48
  238. 1980 next
  239. 1990 fl=1:gosub840
  240. 2000 fori=0to9:ifsc>hs%(r,i)then2020
  241. 2010 next
  242. 2015 gosub222:goto2247
  243. 2020 print"":fort=0to20:print:next
  244. 2030 print"  [149]do you want to register your score?  "
  245. 2040 print"              y[151]es  or  n[151]o            ":poke198,0
  246. 2080 print""tab(33)sc
  247. 2090 fort=1to50:next
  248. 2100 print"[149]"tab(33)sc
  249. 2110 fort=1to50:next
  250. 2120 geta$:ifa$=""then2080
  251. 2130 ifa$="y"t