home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 45 / 045.d81 / b (.txt) < prev    next >
Encoding:
Commodore BASIC  |  1988-01-01  |  9.9 KB  |  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"then2170
  252. 2140 ifa$="n"then2245
  253. 2160 goto2120
  254. 2170 print"":fort=0to21:print:next
  255. 2180 print"         your name                    [157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157]";
  256. 2190 sf=1:ln=16:gosub4000:n$=a$:sf=0
  257. 2200 forj=3toi+1step-1
  258. 2210 hs%(r,j)=hs%(r,j-1):na$(r,j)=na$(r,j-1)
  259. 2220 next
  260. 2230 hs%(r,i)=sc:na$(r,i)=n$
  261. 2240 gosub750:gosub660
  262. 2245 gosub222
  263. 2246 poke198,0
  264. 2247 geta$:ifa$=""then2247
  265. 2250 goto1170
  266. 2260 data690,572,568,450,446,454,328,332,336,324
  267. 2270 dataten,nine,eight,seven,six,five,four
  268. 2280 pokecb+1,0:pokecb,0:print"[147]"
  269. 2290 fori=25to0step-1:forj=2to0step-1
  270. 2300 pokes+87+i+j*z,161+i+j*32
  271. 2310 next:next
  272. 2320 fori=0to25:forj=0to2
  273. 2330 pokes+87+i+j*z+c,mh%(j)
  274. 2340 next:next
  275. 2350 print""spc(16)"[154]tenpins"
  276. 2360 printspc(16)"ninepins"
  277. 2370 printspc(16)"eightpins"
  278. 2380 printspc(16)"sevenpins"
  279. 2390 printspc(16)"sixpins"
  280. 2400 printspc(16)"fivepins"
  281. 2410 printspc(16)"fourpins"
  282. 2420 print"[151]     use cursor[146] keys[146] [151]then return"
  283. 2430 y=5:zv=0:a1=0:a2=0
  284. 2440 print"":fori=1toy:print:next
  285. 2450 printspc(13)"?[157][146]";
  286. 2455 poke198,0
  287. 2460 geta$:ifa$=""then2460
  288. 2462 ifa$=chr$(13)then2510
  289. 2465 ifa$<>""then2475
  290. 2470 print" ":y=y+2:ifzvthenify>21theny=19
  291. 2473 ifzv=0thenify>17theny=5
  292. 2475 ifa$<>""then2500
  293. 2480 print" ":y=y-2:ifzvthenify<19theny=21
  294. 2485 ifzv=0thenify<5theny=17
  295. 2500 goto2440
  296. 2510 print"?[146]":ifzvthen2580
  297. 2520 r=11-(y-3)/2
  298. 2530 print"":fori=1to19:print:next
  299. 2540 printspc(16)"[159]play the game"
  300. 2550 printspc(16)"add to the word list"
  301. 2560 zv=1:y=19
  302. 2570 goto2440
  303. 2580 a1=1
  304. 2585 print"":fori=0to22:print:next:print"        loading "r$(r)"-letter words   [145]"
  305. 2590 ify=21thena2=1
  306. 2600 onr-3gosub2610,2620,2630,2640,2650,2660,2670
  307. 2610 load"four",8,1
  308. 2620 load"five",8,1
  309. 2630 load"six",8,1
  310. 2640 load"seven",8,1
  311. 2650 load"eight",8,1
  312. 2660 load"nine",8,1
  313. 2670 load"ten",8,1
  314. 2680 pokecb,15:pokecb+1,15
  315. 2700 print"[147]":fori=0to19:print:next
  316. 2710 printspc(7)"l[146][151]ist      m[146][151]enu      s[146][151]ave"
  317. 2715 printspc(14)"i[146][151]nstructions"
  318. 2720 print"[144]"spc(17);:fori=1tor:print"-";:next:print
  319. 2730 print"[145][145][151]      word "rb+1
  320. 2740 printspc(11)"[145]#"spc(3)"[154]  ";
  321. 2750 b$="":ln=r:gosub4000:b$=a$
  322. 2755 ifb$<>"i"then2760
  323. 2758 gosub5000:goto2700
  324. 2760 ifb$="l"then2830
  325. 2765 ifb$="s"thengosub2990:goto2700
  326. 2770 ifb$<>"m"then2810
  327. 2772 print"":fori=0to21:print:next
  328. 2774 print"do you want to save first? y[151]es or n[151]o[145]"
  329. 2775 poke198,0
  330. 2776 geta$:ifa$<>"y"anda$<>"n"then2776
  331. 2778 ifa$="n"then2280
  332. 2780 gosub2990:goto2280
  333. 2810 fori=1tor:pokebf+(rb)*r+i-1,asc(mid$(b$,i,1)):next
  334. 2815 rb=rb+1
  335. 2820 goto2700
  336. 2830 print"[147]":pokecb,0:pokecb+1,0
  337. 2840 fori=0to21:print:next:printspc(6)"[158]press [159]shift[158][146] to halt listing[155]  ";
  338. 2850 fori=1torb:a$=""
  339. 2860 ifpeek(653)=1then2860
  340. 2870 forj=0tor-1
  341. 2880 a$=a$+chr$(peek(bf+j+(i-1)*r))
  342. 2890 next
  343. 2900 ifpos(0)>37-rthenprint:print"  ";
  344. 2910 ifpeek(214)<22then2940
  345. 2920 print:printsp$:print
  346. 2930 printspc(6)"[158][145]press [159]shift[158][146] to halt listing[155]  [145][145][145]";:goto2950
  347. 2940 print" "a$" ";
  348. 2950 next
  349. 2960 print"":fori=0to21:print:next:printspc(6)"[158] press any key to continue  "
  350. 2965 poke198,0
  351. 2970 geta$:ifa$=""then2970
  352. 2980 goto2680
  353. 2990 pokebf-2,int(rb/256)
  354. 3000 pokebf-1,rb-256*int(rb/256)
  355. 3010 open15,8,15,"i0"
  356. 3020 fr$=r$(r)
  357. 3030 sys57812"@0:"+fr$,8
  358. 3040 poke193,0:poke194,80
  359. 3050 poke174,0:poke175,int((bf+rb*r)/256)+1:sys62954
  360. 3060 input#15,a$,a$
  361. 3070 ifa$="ok"thena$="saved"
  362. 3080 printtab(15)""a$:fort=1to3000:next
  363. 3085 ifa$<>"saved"thenprint#15,"i0"
  364. 3090 close15
  365. 3100 return
  366. 4000 poke198,0:k$=""
  367. 4010 print" [157][146]";
  368. 4020 fort=1to10:next
  369. 4030 print" [157][149]";
  370. 4040 fort=1to10:next
  371. 4050 geta$:ifa$=""then4010
  372. 4060 l=len(k$)
  373. 4070 ifa$=chr$(13)thena$=k$:print:return
  374. 4080 ifa$=chr$(20)andlthenprint" [157][157]";:k$=left$(k$,l-1):goto4010
  375. 4085 ifa$=" "andsfthen4100
  376. 4090 if(a$<"a"ora$>"z")then4010
  377. 4100 ifl>=lnthen4010
  378. 4110 printa$;:k$=k$+a$
  379. 4120 goto4010
  380. 5000 sys828,4,64:sys828,216,68
  381. 5001 poke53281,0:poke53281,0
  382. 5002 print"[147]"tab(12)"w[146] o[146] r[146] d[146]    b[146] o[146] w[146] l"
  383. 5005 print"             [154]playing the game"
  384. 5010 print"   [159]unscramble the letters on  the pins"
  385. 5020 print" and enter the word on the dotted line."
  386. 5030 print" if you are correct, you make the score"
  387. 5040 print" that's in the frame on the scoreboard"
  388. 5050 print" if you're wrong, you lose a pin."
  389. 5070 print"   if you want to reveal a letter,"
  390. 5080 print" position the cursor on the dotted line"
  391. 5090 print" and press f1[159].  it costs you a pin."
  392. 5100 print"   press f3[159] to see the big[146] four[146][159] of"
  393. 5110 print" each level."
  394. 5115 print"   press f7[159] to see these instructions."
  395. 5117 print" press f5[159] to clear the high scores."
  396. 5120 print"   to quit the game, press f8"
  397. 5130 print"        [158]press any key to continue[145]"
  398. 5135 poke198,0
  399. 5140 geta$:ifa$=""then5140
  400. 5150 poke53272,31:poke53281,0:print"[147]"tab(12)"w[146] o[146] r[146] d[146]    b[146] o[146] w[146] l"
  401. 5160 print"         [154]adding to the word list"
  402. 5170 print"   [159]enter your words on the dotted"
  403. 5180 print" line.  try not to enter words that can"
  404. 5190 print" be anagrammed two or more different"
  405. 5195 print" ways."
  406. 5200 print"   when you're through, press return[159]"
  407. 5210 print" without entering anything."
  408. 5220 print"   to see the list, enter l[146][159]."
  409. 5222 print"   to save your list, enter s[146][159]."
  410. 5225 print"   to return to the menu, enter m[146][159]."
  411. 5230 print"   always save your new list before"
  412. 5240 print" returning to the menu."
  413. 5250 print"        [158]press any key to continue[145]"
  414. 5255 poke198,0
  415. 5260 geta$:ifa$=""then5260
  416. 5265 sys828,64,4:sys828,68,216:pokecb,15:pokecb+1,15
  417. 5270 return
  418.