home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 226 / 226.d81 / countdown (.txt) < prev    next >
Encoding:
Commodore BASIC  |  2003-01-01  |  10.7 KB  |  276 lines

  1. 0 rem**********************************  ****                               ***
  2. 1 rem            jeopardy           ***  ****    designed by   shibley      ***
  3. 2 rem                               ***  **************************************
  4. 3 rem
  5. 4 rem
  6. 5 dv=peek(186):ifdv<8thendv=8
  7. 6 print"[147]"
  8. 7 d=peek(186):sys57812"qs driver c000",d,0:poke780,0:poke781,0:poke782,192:sys65493
  9. 8 sys57812"q.jeapordy",d,0:poke780,0:poke781,0:poke782,202:sys65493
  10. 10 printchr$(142)chr$(8):gosub5000:goto100
  11. 14 z$="":qt=ti+10000:poke198,.
  12. 15 print"[209][157]";:forj=1to40:getx$:ifx$=""thennext:ifti<qtthen18
  13. 16 ifqt<tithenprint" [157]";:return
  14. 17 j=40:next:goto20
  15. 18 print" [157]";:forj=1to40:getx$:ifx$=""thennext:ifti<qtthen15
  16. 19 ifqt<tithenprint" [157]";:return
  17. 20 if(x$="[157]"orx$=chr$(20))andlen(z$)=.then15
  18. 21 ifx$=chr$(13)orti>qtthenprint" [157]";:z1$=z$:return
  19. 22 ifx$="[157]"orx$=chr$(20)thenz$=left$(z$,len(z$)-1):print"[157]  [157][157]";:goto15
  20. 24 ifx$>"z"orx$<" "orx$=chr$(34)orx$=","orx$=":"orx$=";"orlen(z$)=zthen15
  21. 25 print"[152]"x$;:z$=z$+x$:goto15
  22. 30 x1=.:x2=.:x3=.:l=len(ww$):forj=1tol:x$=mid$(ww$,j,1):ifx$<>"\"then35
  23. 31 ifx1=.thenx1=j:goto35
  24. 32 ifx2=.thenx2=j:goto35
  25. 33 ifx3=.thenx3=j
  26. 35 next:an$=left$(ww$,x1-1):tc=val(mid$(ww$,x1+1,1)):p2$=right$(ww$,l-x3)
  27. 37 qu$=mid$(ww$,x1+2,x2-x1-2):p1$=mid$(ww$,x2+1,x3-x2-1):return
  28. 50 rr=.:ifz$=qu$orz$=p1$orz$=p2$thenrr=1:goto79
  29. 52 l=len(qu$):iflen(z$)<4orl<4then79
  30. 54 ifl=len(z$)then68
  31. 56 iflen(z$)>lthen64
  32. 58 x=.:forj=1tol-len(z$)+1:ifz$=mid$(qu$,j,len(z$))thenx=j
  33. 60 next:ifx>.thenrr=1:goto79
  34. 62 goto68
  35. 64 x=.:forj=1tolen(z$)-l+1:ifqu$=mid$(z$,j,l)thenx=j
  36. 66 next:ifx>.thenrr=1:goto79
  37. 68 iftc>1orleft$(z$,1)<>left$(qu$,1)then79
  38. 70 x=.:forj=lto1step-1:ifmid$(qu$,j,1)=" "thenx=j:j=1
  39. 72 next:y=.:forj=len(z$)to1step-1:ifmid$(z$,j,1)=" "theny=j:j=1
  40. 74 next:ifx=.ory=.then79
  41. 76 x$=right$(z$,len(z$)-y):ifx$=p1$orx$=p2$orx$=right$(qu$,l-x)thenrr=1
  42. 79 return
  43. 80 u=54272:pokeu+1,20:pokeu+5,9:pokeu+6,9:pokeu+24,15:pokeu+4,17
  44. 81 fork=1to10:next:pokeu+4,16:return
  45. 84 u=54272:pokeu+1,220:pokeu+5,9:pokeu+6,9:pokeu+24,15:pokeu+4,17
  46. 85 fork=.to4:next:pokeu+4,16:return
  47. 88 u=54272:pokeu+1,6:pokeu+5,9:pokeu+6,9:pokeu+24,15:pokeu+4,3
  48. 89 fork=.to10:next:pokeu+4,16:return
  49. 92 u=54272:pokeu+1,50:pokeu+5,9:pokeu+6,9:pokeu+24,15:pokeu+4,7
  50. 93 fork=.to4:next:pokeu+4,16:return
  51. 100 poke53280,.:poke53265,peek(53265)and139
  52. 101 poke53281,7:print"[147]                                        ";
  53. 105 forj=.to22:print"  ";:next
  54. 110 print"                                       [157][148] "
  55. 115 print"                       "
  56. 116 print"[145] [154]                      "
  57. 118 print" [154]  [157]  question please  [154]  "
  58. 120 print"[145] [154]                      "
  59. 125 print"                       "
  60. 130 printspc(18)"[152]from":print"[144]shibley software"
  61. 133 poke53265,peek(53265)or16:gosub80
  62. 134 gosub20000
  63. 135 print"[152]name of player 1 ? ";:z=8:gosub14:ifz$=""thenz$="player 1"
  64. 136 z$=left$(sp$,8-len(z$))+z$+" ":p$(1)=z$:print
  65. 137 z1$=z1$+"'s choice":s9$=left$(sp$,(20-len(z1$))/2)
  66. 138 pc$(1)=s9$+z1$+s9$
  67. 140 print"[152]name of player 2 ? ";:z=8:gosub14:ifz$=""thenz$="player 2"
  68. 141 z$=left$(sp$,8-len(z$))+z$+" ":p$(2)=z$:print
  69. 142 z1$=z1$+"'s choice":s9$=left$(sp$,(20-len(z1$))/2)
  70. 143 pc$(2)=s9$+z1$+s9$
  71. 145 print"[145][145][145][145][152]"p$(1)"select response key;       [157][157][157][157][157][157]";:z=1:gosub14
  72. 146 print:r$(1)=z$:ifz$=""thenr$(1)="z"
  73. 150 print"[152]"p$(2)"select response key;       [157][157][157][157][157][157]";:gosub14
  74. 151 r$(2)=z$:print:ifz$=""thenr$(2)="/"
  75. 175 poke53280,15:poke53281,15:print"[147]":c$(1)=".":t=62
  76. 180 z=1:open2,dv,2,"0:abc,s,r":input#2,z:close2:open15,dv,15:print#15,"s0:abc"
  77. 181 ifz>t-5thenz=int(rnd(.)*4+1)
  78. 185 close15:open3,dv,3,"0:abc,s,w":print#3,z+6:close3
  79. 190 y=.:forj=ztoz+5:y=y+1
  80. 200 c$(y)=ca$(j):print"loading category"y"- "c$(y)"":gosub80
  81. 210 open2,dv,2,"0:"+c$(y)+",s,r":input#2,t(y):ifst=.then215
  82. 211 close2:print"**** check disk":forl=1to4000:next:goto200
  83. 215 fork=1tot(y):input#2,cb$(y,k):nextk:close2
  84. 220 fork=1to5
  85. 225 x=int(rnd(.)*val(right$(ti$,1))*t(y)):ifx<1orx>t(y)then225
  86. 226 ifcb$(y,x)=""then225
  87. 228 w$(y,k)=cb$(y,x):cb$(y,x)="":nextk
  88. 245 nextj:h=1:hh=h
  89. 249 h=1
  90. 250 gosub4050
  91. 251 gosub4000:th=.:tg=3
  92. 252 rem  printbo$"[146][223]"p$(h)"[157]'s   choice[146][169]":stop
  93. 253 printbo$"[146][223]"pc$(h)"[146]"chr$(169)
  94. 255 printbc$"[146]category = ";:z=1:gosub14:ifz$="c"then250
  95. 257 ifz$="q"thenprint"[147]":goto800
  96. 260 ifz$<"1"orz$>"6"orz$=""then255
  97. 261 ca=val(z$):forj=1to5:ifa$(ca,j)<>"   "thenj=5:goto263: rem   it is ok!
  98. 262 next:goto255:  rem   loadstar code       [not allow wrong category]
  99. 263 :
  100. 265 ca=val(z$):print"[146]"spc(39+ca*6)z$
  101. 285 printbc$spc(18)"question amt. = ";
  102. 290 z=3:gosub14:ifz$<>""then295
  103. 291 forj=1to5:ifa$(ca,j)<>"   "thenz$=right$(str$(j),1)+"00":j=5
  104. 292 next
  105. 295 am=val(z$):ifz$="c"then250
  106. 299 ifam>500oram<100then285
  107. 300 ifam<>val(a$(ca,am/100))then285
  108. 310 print"[146]"spc(37+ca*6);:aa=am/100:forj=1toaa:print"";:next:print"[145][145]";
  109. 315 print"[156]     [157][157][157][157][157] "a$(ca,aa)" [157][157][157][157][157]     ";:forj=1to300:next
  110. 320 print"[157][157][157][157][157][145][145]     [157][157][157][157][157] "a$(ca,aa)" [157][157][157][157][157]     ";:forj=1to300:next
  111. 330 print"[146][157][157][157][157][157][145][145]     [157][157][157][157][157] "a$(ca,aa)" [157][157][157][157][157]     ":ww$=w$(ca,aa)
  112. 335 gosub30:a$(ca,aa)="   "
  113. 350 poke53280,6:print"[147][156]"spc(20-(len(c$(ca))/2))c$(ca)""
  114. 355 printspc(15)"for  "am"":print"[159] [197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][144]"
  115. 375 x=39:iflen(an$)<40thenprintan$"":goto385
  116. 380 x=x-1:ifmid$(an$,x,1)<>" "then380
  117. 381 print" "left$(an$,x):printright$(an$,len(an$)-x)""
  118. 385 qt=ti+(len(an$)*7)+(tg*40):gosub92:poke198,.
  119. 387 getx$:ifx$=r$(1)andth<>1thenhh=1:goto400
  120. 390 ifx$=r$(2)andth<>2thenhh=2:goto400
  121. 392 ifti<qtthen387
  122. 394 forj=1to10:gosub92:next
  123. 395 print"[144]"pr$(tc)": [152]"qu$:forj=1to1000:next:goto575
  124. 400 print""spc(16)p$(hh)""
  125. 405 print"[144]"pr$(tc)": ";:
  126. 420 qt=ti+300+(len(an$)*9):z=25:z$="":poke198,.:gosub15:print
  127. 425 gosub50:ifrr=.then550
  128. 545 gosub84:print"[145]"spc(len(pr$(tc))+3)qu$sp$""
  129. 546 printspc(17)"[150]right":forj=1to2000:next:m(hh)=m(hh)+am:h=hh
  130. 549 goto575
  131. 550 gosub88:m(hh)=m(hh)-am
  132. 560 print:printspc(17)"wrong":forj=1to500:next:tg=.5:ifth>.then570
  133. 565 th=hh:print""sp$""sp$"":printsp$"":goto385
  134. 570 print"[145][145][145][144]"pr$(tc)": [152]"qu$sp$
  135. 575 x=.:forj=1to6:fork=1to5:ifa$(j,k)<>"   "thenx=1
  136. 580 next:next:ifx>.thenforj=1to3000:next:goto251
  137. 585 gosub80:poke53280,15:poke53281,.:print"[147][154]                      "
  138. 590 printspc(9)" [159]  question please!  [154] "
  139. 595 printspc(9)"                      "
  140. 600 print"[158] the final category is : ";
  141. 605 f=int(rnd(.)*val(right$(ti$,1))*t):iff>t orf=.then605
  142. 610 y=.:forj=1to6:ifc$(j)=ca$(f)theny=1
  143. 620 next:ify=1then605
  144. 625 gosub80:printca$(f)"[150]":printp$(1)" has[159]"m(1)"   [150]"p$(2)" has[159]"m(2)""
  145. 630 xx=.:b(1)=.:b(2)=.:ifm(1)<1andm(2)<1then770
  146. 631 ifm(1)<1thenxx=1:goto650
  147. 632 ifm(2)<1thenxx=1:goto640
  148. 635 ifm(1)>m(2)then650
  149. 640 print"[154]"p$(1)" what's your wager ";
  150. 641 sysd9+12:sysd9+15:poked9+40,1:sysd9,202,1
  151. 642 z=len(str$(m(1)))-1:gosub14:print""
  152. 645 b(1)=val(z$):xx=xx+1:ifxx>1then660
  153. 650 print"[154]"p$(2)" what's your wager ";:z=len(str$(m(2)))-1:gosub14:print""
  154. 655 b(2)=val(z$):xx=xx+1:ifxx<2then640
  155. 660 ifb(1)>m(1)thenb(1)=m(1)
  156. 662 ifb(2)>m(2)thenb(2)=m(2)
  157. 663 gosub20010
  158. 665 open2,dv,2,"0:"+ca$(f)+",s,r":input#2,t(7):ifst=.then670
  159. 666 close2:print"[150]check disk";:goto665
  160. 670 x=int(rnd(.)*val(right$(ti$,1))*t(7)):ifx>=t(7)then670
  161. 675 ifx>.thenforj=1tox:input#2,x$:next
  162. 680 input#2,ww$:close2:gosub30
  163. 685 poke53280,4:print"[147][158]"spc(20-(len(ca$(f))/2))ca$(f)"":gosub80
  164. 690 x=39:xx=.:iflen(an$)<40thenprintan$"":goto700
  165. 695 x=x-1:ifmid$(an$,x,1)<>" "then695
  166. 696 print" "left$(an$,x):printright$(an$,len(an$)-x)""
  167. 700 ifm(1)<1then720
  168. 705 gosub20100
  169. 710 print"    [155] "p$(1)" what's your question":z=25:print"[154]"pr$(tc)": ";
  170. 715 gosub14:print"":a1$=z$
  171. 718 ifm(2)<1then730
  172. 720 print"     [155]"p$(2)" what's your question":z=25:print"[154]"pr$(tc)": ";
  173. 725 gosub14:print"":a2$=z$
  174. 730 print"[150]"pr$(tc)":"qu$sp$
  175. 735 print"";:ifm(1)<1thenprint"[145][145][145][145]";:goto750
  176. 740 z$=a1$:gosub50:ifrr=1thenprint"right   ":gosub84:m(1)=m(1)+b(1):goto749
  177. 745 m(1)=m(1)-b(1):gosub88:print"wrong   "
  178. 749 forj=1to600:next
  179. 750 print"";:ifm(2)<1then770
  180. 755 z$=a2$:gosub50:ifrr=1thenm(2)=m(2)+b(2):gosub84:print"right   ":goto770
  181. 760 print"wrong   ":gosub88:m(2)=m(2)-b(2)
  182. 770 print""p$(1)" you have [158]$"m(1)""
  183. 773 printp$(2)" you have [158]$"m(2)
  184. 780 poke198,.:forj=1to4000:getx$:ifx$<>""thenj=4000
  185. 783 next:gosub80:poke53280,4:poke53281,.:z$=p$(1):ifm(1)=m(2)thenz$="  a tie  "
  186. 785 ifm(1)<m(2)thenz$=p$(2)
  187. 790 print"[147][158]                  [157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157] [150] ";
  188. 795 print"the winner  is [158] [157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157] [150]    "z$"   [158] ";
  189. 800 print"[157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157]                  ":printspc(13)"another  (y/n)"
  190. 801 poked9+40,1:sysd9+12:sysd9+15:sysd9,202,1
  191. 805 getx$:ifx$<>""andx$<>"n"andx$<>"y"then805
  192. 806 sysd9+18
  193. 810 ifx$="y"thenrun
  194. 815 forj=1to200:next:gosub80:print"[159]"p$(1)" [153]"m(1)
  195. 816 print"[159]"p$(2)" [153]"m(2)""
  196. 817 print"[144]press key"
  197. 820 poke198,0:wait198,1:poke198,0
  198. 850 goto40000
  199. 3999 stop
  200. 4000 poke53280,14:poke53265,peek(53265)and139:poke53281,15:print"[147]";
  201. 4005 forj=1to3:print"[154]                                        ";:next
  202. 4006 forj=1to5
  203. 4010 fork=1to3:print"[154]   [156]      [156]      [156]      [156]      [156]      [156]       ";
  204. 4015 next:print"[154]                                        ";
  205. 4020 next:print"[154] [157] 123456[156][145]";
  206. 4025 forj=1to5:print"";:fork=1to6:print""a$(k,j);:next:next
  207. 4030 print"";:forj=1to6:printleft$(c$(j),3)"";:next:
  208. 4032 poke53265,peek(53265)or16:gosub80:return
  209. 4050 poke788,52:poke53280,10:poke53265,peek(53265)and139:poke53281,2:print"[147]";
  210. 4055 print"                                        ";
  211. 4060 forj=.to22:print"  ";:next
  212. 4065 print"                                       [157][148] ":forj=1to6
  213. 4070 print"[150]category[144]"j"[150]is  [144]"c$(j)"":next:
  214. 4071 print"[206][205][206][205][206][205][206][205][206][205][206][205][206][205][206][205][206][205][206][205][206][205][206][205][206][205][206][205][206][205][206][205][206][205][206][205][206][205]":print"[150]"spc(13);
  215. 4075 ifm(2)>m(1)thenprintp$(2)"[155]"m(2)"[150]":printspc(13)p$(1)"[155]"m(1):goto4080
  216. 4076 printp$(1)"[155]"m(1)"[150]":printspc(13)p$(2)"[155]"m(2)
  217. 4080 print"[150]"p$(h)" has control of the board[158]":poke53265,peek(53265)or16
  218. 4085 gosub80:gosub4444:ifx$=""then5200
  219. 4086 poke788,49:return
  220. 4444 z$="           touch a key":sysd9+12:sysd9+15:poked9+40,1:sysd9,202,1
  221. 4445 printbo$z$left$(lr$,len(z$));:forj=1to30:getx$:ifx$=""thennext:goto4450
  222. 4447 j=30:next:goto4453
  223. 4450 printleft$(sp$,len(z$))left$(lr$,len(z$));
  224. 4451 forj=1to25:getx$:ifx$=""thennext:goto4445
  225. 4452 j=25:next
  226. 4453 sysd9+6:sysd9+18:return
  227. 5000 dimca$(62),a$(6,5),w$(6,5),cb$(6,20)
  228. 5001 a$(1,1)="100":a$(1,2)="200":a$(1,3)="300":a$(1,4)="400"
  229. 5005 a$(1,5)="500":forj=1to5:fork=2to6:a$(k,j)=a$(1,j):next:next
  230. 5006 sp$="                                      "
  231. 5008 lr$="[157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157]"
  232. 5010 bo$=""
  233. 5012 bc$=""
  234. 5014 ca$(1)="sit-com":ca$(2)="home town":ca$(3)="animals":ca$(42)="authors"
  235. 5016 ca$(5)="oscars":ca$(6)="westerners"
  236. 5018 ca$(7)="50's":ca$(8)="comics":ca$(9)="movies":ca$(12)="star role"
  237. 5020 ca$(10)="cartoons":ca$(11)="mash":ca$(45)="sports":ca$(14)="30's"
  238. 5022 ca$(60)="40's":ca$(49)="60's":ca$(48)="musical":ca$(35)="football"
  239. 5024 ca$(19)="baseball":ca$(13)="acting name":ca$(21)="stage name"
  240. 5026 ca$(58)="academy":ca$(23)="tv hosts":ca$(24)="occupations"
  241. 5028 ca$(51)="superman":ca$(26)="addresses":ca$(27)="70's":ca$(37)="inventors"
  242. 5030 ca$(29)="radio":ca$(30)="nicknames":ca$(31)="tv detectives"
  243. 5032 ca$(32)="acronyms":ca$(33)="backup bands":ca$(4)="boxing"
  244. 5034 ca$(18)="capitals":ca$(36)="countries":ca$(28)="games"
  245. 5036 ca$(53)="hockey":ca$(39)="leaders":ca$(40)="metal/medal"
  246. 5038 ca$(41)="numbers":ca$(34)="numerics":ca$(43)="old testament"
  247. 5040 ca$(44)="big business":ca$(52)="presidents":ca$(46)="relatives"
  248. 5042 ca$(47)="space":ca$(17)="star trek":ca$(16)="states"
  249. 5044 ca$(50)="surname":ca$(61)="tales":ca$(20)="themes"
  250. 5046 ca$(38)="tv nicknames":ca$(54)="war":ca$(62)="water":ca$(55)="numbers"
  251. 5048 ca$(57)="words":ca$(56)="automobiles":ca$(22)="us cities":ca$(25)="math"
  252. 5050 ca$(59)="modern music":ca$(15)="roots of rock":ca$(39)="computers"
  253. 5120 pr$(1)="who is ":pr$(2)="who are ":pr$(3)="what is ":pr$(4)="when is "
  254. 5122 pr$(5)="where is ":return
  255. 5200 gosub80:print"[147]program terminated[144]":poke788,49:end
  256. 6666 gosub5000:dimm$(63):forj=1to62:open2,8,2,"0:"+ca$(j)+",s,r":input#2,x$
  257. 6667 close2:open4,4:print#4,x$" - "ca$(j):close4:next
  258. 10000 d=peek(186):open1,d,15,"i0":close1:n$="countdown"
  259. 10001 open1,d,15,"s0:"+n$:close1:saven$,d:end
  260. 20000 d9=49152:sysd9+12:sysd9+15:sysd9,202,1
  261. 20010 ifpeek(d9+45)<9then20010
  262. 20020 sysd9+18:return
  263. 20100 poked9+40,0:sysd9+12:sysd9+15:sysd9,202,1
  264. 20110 ifpeek(d9+46)then20110
  265. 20120 sysd9,202,1:goto20010
  266. 40000 fori=0to21:poke828+i,8+i:next
  267. 40010 ifdv<8ordv>29ordv=8then40030
  268. 40020 a=peek(828):b=peek(828+dv-8):poke828,b:poke828+dv-8,a
  269. 40030 a$="hello connect":forj=8to29:i=peek(828+j-8):ifi=14thennext
  270. 40040 close2:open2,i,2:close2:ifstthen40060
  271. 40050 close15:open15,i,15,"r0:"+a$+"="+a$:input#15,er:close15:ifer=63then40070
  272. 40060 next:print"[147]":poke53272,23:poke186,8:end
  273. 40070 q$=chr$(34):poke646,peek(53281):print"[147]":poke53272,23
  274. 40080 print"[147]p[207]2048,0:p[207]44,8:p[207]43,1:p[207]56,160:p[207]55,0:clr:l[207]"q$a$q$","i
  275. 40090 print"run:":poke631,13:poke632,13:poke198,2:end
  276.