home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 125 / 125.d81 / b.petals (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  6KB  |  231 lines

  1. 1 rem 2/12/93 11:45 am
  2. 3 dv=peek(186):ifdv<8then dv=8
  3. 4 print"[147][159]":poke53280,.:poke53281,.
  4. 5 poke788,52
  5. 10 gosub60000
  6. 60 d1$="[209][209][209][209][209][209][209][209][209]"
  7. 70 d2$="[209][209][209]"
  8. 80 d3$="[209][209][209][209][209][209][209][209][209]"
  9. 90 dimrn(24):dimi$(20)
  10. 100 forl=1to2000:next
  11. 102 print"[147]"
  12. 105 poke53281,15:poke53280,15
  13. 110 i$(0)="[208][197][212][193][204][211] [193][210][207][213][206][196] [212][200][197] [210][207][211][197]"+chr$(13)
  14. 120 i$(1)="[151] [212]his is a game played with six dice."
  15. 130 i$(2)="[212]he computer rolls the dice, assesses"
  16. 140 i$(3)="the outcome, and announces a number. [193]s"
  17. 150 i$(4)="[208][207][212][197][206][212][193][212][197] [207][198] [212][200][197] [210][207][211][197][151], the computer"
  18. 160 i$(5)="knows the secret. [208]layers must"
  19. 170 i$(6)="determine the formula by which the"
  20. 180 i$(7)="[208][207][212][197][206][212][193][212][197][151] derives the number."+chr$(13)
  21. 190 i$(8)="[212]he name of the game is significant!!!"
  22. 200 i$(9)="[151][212]he announced number is always even and"
  23. 210 i$(10)="is indeed a true function of the six"
  24. 220 i$(11)="faces of the dice."+chr$(13)
  25. 230 i$(12)=" [208]ress any key to display four rolls of"
  26. 240 i$(13)="the dice along with the correct"
  27. 250 i$(14)="response that the [208][207][212][197][206][212][193][212][197] [207][198] [212][200][197] [210][207][211][197]"
  28. 260 i$(15)="[151]should give with each."+chr$(13)
  29. 270 i$(16)=" [195]an you figure out what simple system"
  30. 280 i$(17)="is used to come up with each answer?"
  31. 400 fori=0to17:printtab(20-(len(i$(i))/2))i$(i):next
  32. 405 printtab(14)"[208]ress any key"
  33. 410 geta$:ifa$=""then410
  34. 500 print"[147]"chr$(142);:gosub8000
  35. 505 poke646,0
  36. 510 forl=1to4
  37. 520 foraa=1to6
  38. 530 print"[213][192][192][192][201]";
  39. 540 next
  40. 550 print
  41. 560 forbb=1to6
  42. 570 print"[221]   [221]";
  43. 580 nextbb
  44. 590 print
  45. 600 forcc=1to6
  46. 610 print"[221]   [221]";
  47. 620 nextcc
  48. 630 print" = "
  49. 640 fordd=1to6
  50. 650 print"[221]   [221]";
  51. 660 nextdd
  52. 670 print
  53. 680 foree=1to6
  54. 690 print"[202][192][192][192][203]";
  55. 700 nextee
  56. 710 print
  57. 720 nextl
  58. 740 x=rnd(ti)
  59. 750 rem generate dots for dice
  60. 760 forb=1to24
  61. 770 rn(b)=int(rnd(1)*6)+1
  62. 780 nextb
  63. 810 poke214,1:print
  64. 820 p=0:og$="":pp$="[156]"
  65. 830 forb=1to6
  66. 835 cc$="[156]":iffl$="y"thengosub1900
  67. 840 printcc$mid$(d1$,((rn(b)*5)-4),5);
  68. 845 ifrn(b)=3thenp=p+2
  69. 847 ifrn(b)=5thenp=p+4
  70. 848 cc$="[156]"
  71. 860 nextb
  72. 870 print
  73. 880 forb=1to6
  74. 890 printcc$mid$(d2$,((rn(b)*5)-4),5);
  75. 900 nextb
  76. 905 ifz$="s"thent1=p:p=0:print:goto930
  77. 910 print""og$;p;pp$:p=0
  78. 930 forb=1to6
  79. 935 iffl$="y"thengosub1900
  80. 940 printcc$mid$(d3$,((rn(b)*5)-4),5);
  81. 945 cc$="[156]"
  82. 950 nextb
  83. 960 print:print:print
  84. 1000 forb=7to12
  85. 1005 iffl$="y"thengosub1900
  86. 1010 printcc$mid$(d1$,((rn(b)*5)-4),5);
  87. 1015 ifrn(b)=3thenp=p+2
  88. 1017 ifrn(b)=5thenp=p+4
  89. 1018 cc$="[156]"
  90. 1020 nextb
  91. 1030 print
  92. 1040 forb=7to12
  93. 1050 printcc$mid$(d2$,((rn(b)*5)-4),5);
  94. 1060 nextb
  95. 1065 ifz$="s"thent2=p:p=0:print:goto1080
  96. 1070 print""og$;p;pp$:p=0
  97. 1080 forb=7to12
  98. 1085 iffl$="y"thengosub1900
  99. 1090 printcc$mid$(d3$,((rn(b)*5)-4),5);
  100. 1095 cc$="[156]"
  101. 1100 nextb
  102. 1110 print:print:print
  103. 1150 forb=13to18
  104. 1155 iffl$="y"thengosub1900
  105. 1160 printcc$mid$(d1$,((rn(b)*5)-4),5);
  106. 1165 ifrn(b)=3thenp=p+2
  107. 1167 ifrn(b)=5thenp=p+4
  108. 1168 cc$="[156]"
  109. 1170 nextb
  110. 1180 print
  111. 1190 forb=13to18
  112. 1200 printcc$mid$(d2$,((rn(b)*5)-4),5);
  113. 1210 nextb
  114. 1215 ifz$="s"thent3=p:p=0:print:goto1230
  115. 1220 print""og$;p;pp$:p=0
  116. 1230 forb=13to18
  117. 1235 iffl$="y"thengosub1900
  118. 1240 printcc$mid$(d3$,((rn(b)*5)-4),5);
  119. 1245 cc$="[156]"
  120. 1250 nextb
  121. 1260 print:print:print
  122. 1270 forb=19to24
  123. 1275 iffl$="y"thengosub1900
  124. 1280 printcc$mid$(d1$,((rn(b)*5)-4),5);
  125. 1285 ifrn(b)=3thenp=p+2
  126. 1287 ifrn(b)=5thenp=p+4
  127. 1288 cc$="[156]"
  128. 1290 nextb
  129. 1300 print
  130. 1310 forb=19to24
  131. 1320 printcc$mid$(d2$,((rn(b)*5)-4),5);
  132. 1330 nextb
  133. 1335 ifz$="s"thent4=p:p=0:print:goto1350
  134. 1340 print""og$;p;pp$:p=0
  135. 1350 forb=19to24
  136. 1355 iffl$="y"thengosub1900
  137. 1360 printcc$mid$(d3$,((rn(b)*5)-4),5);
  138. 1365 cc$="[156]"
  139. 1370 nextb
  140. 1375 print:print:ifz$="s"then1500
  141. 1380 poke214,21:print:print"[151]    enter [144]m[146][151]ore/[144]s[146][151]olve/[144]h[146][151]int/[144]q[146][151]uit   "
  142. 1400 getz$:ifz$=""then1400
  143. 1410 ifz$="m"thenfl$="n":goto500
  144. 1420 ifz$="s"then500
  145. 1430 ifz$="h"then4000
  146. 1440 ifz$="q"thenfl$="n":goto6000
  147. 1450 goto1400
  148. 1500 poke214,20:print:e$="no":poke19,65:rt$="right":wr$="[144]wrong"
  149. 1510 print"[151] first total should be     [157][157][157][157]";:gosub50000:tt$=q9$:gosub4300
  150. 1515 if v$="n"then1500
  151. 1520 iftt=t1thenpoke214,2:print:poke211,30:printt1;rt$:goto1600
  152. 1530 poke214,2:print:poke211,30:print tt;wr$:gosub4100:goto1600
  153. 1600 poke214,20:print
  154. 1610 print"[151]second total should be     [157][157][157][157]";:gosub50000:tt$=q9$:gosub4300
  155. 1615 if v$="n"then1600
  156. 1620 iftt=t2thenpoke214,7:print:poke211,30:printt2;rt$:goto1700
  157. 1630 poke214,7:print:poke211,30:print tt;wr$:gosub4100:goto1700
  158. 1700 poke214,20:print
  159. 1710 print"[151] third total should be     [157][157][157][157]";:gosub50000:tt$=q9$:gosub4300
  160. 1715 if v$="n"then1700
  161. 1720 iftt=t3thenpoke214,12:print:poke211,30:printt3;rt$:goto1800
  162. 1730 poke214,12:print:poke211,30:print tt;wr$:gosub4100:goto1800
  163. 1800 poke214,20:print
  164. 1810 print"[151]fourth total should be     [157][157][157]";:gosub50000:tt$=q9$:gosub4300
  165. 1815 if v$="n"then1800
  166. 1820 iftt=t4thenpoke214,17:print:poke211,30:printt4;rt$:goto4200
  167. 1830 poke214,17:print:poke211,30:print tt;wr$:gosub4100:goto4200
  168. 1900 ifrn(b)=3orrn(b)=5thencc$="":return
  169. 1910 cc$="[156]":return
  170. 4000 fl$="y":goto500
  171. 4100 e$="yes":return
  172. 4200 ife$="yes"thenprint"[151]  whoops, better try again!":goto5000
  173. 4210 print"[151]  congratulations, you got it!!!":goto5000
  174. 4300 iflen(tt$)=1thentt$=" "+tt$
  175. 4310 tt$=left$(tt$,2)
  176. 4312 iftt$=" 0"then4320
  177. 4320 tt=val(tt$):v$="y":return
  178. 5000 forx=1to3000:next:goto1380
  179. 6000 rem: quit has been entered
  180. 6010 i$(0)="[208][197][212][193][204][211] [193][210][207][213][206][196] [212][200][197] [210][207][211][197]"+chr$(13)
  181. 6020 i$(1)="[151] [193]t this point you have determined the"
  182. 6030 i$(2)=" system by which the [208][207][212][197][206][212][193][212][197][151] derives"
  183. 6040 i$(3)="the numbers -"+chr$(13)
  184. 6050 i$(4)="-[207][210]-"+chr$(13)
  185. 6060 i$(5)="[217]ou have given up on finding the secret"+chr$(13)
  186. 6070 i$(6)="-[207][210]-"+chr$(13)
  187. 6080 i$(7)="[217]ou will try again another time."+chr$(13)
  188. 6090 i$(8)="[212]o find or verify the solution, exit"
  189. 6100 i$(9)="to [204][207][193][196][211][212][193][210] and read the text."+chr$(13)
  190. 6110 i$(10)=""
  191. 6120 i$(11)="     [216][151] = [197]xit to [204][207][193][196][211][212][193][210]"+chr$(13)
  192. 6130 i$(12)="     [210][151] = [210]eturn to instructions"
  193. 6140 poke53272,23:print"[147]"
  194. 6150 fori=0to12:printtab(20-(len(i$(i))/2))i$(i):next
  195. 6160 geta$:ifa$=""then6160
  196. 6170 ifa$="x"then40000
  197. 6180 ifa$="r"then102
  198. 6200 goto6160
  199. 8000 print"[147]"
  200. 8010 print" [150][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184]":poke214,24:print
  201. 8020 print" [150][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][152]"
  202. 8100 return
  203. 9999 goto9999
  204. 10000 open15,8,15,"s0:b.petals":close15:save"b.petals",8:end
  205. 40000 poke788,49
  206. 40002 a$="hello connect":fori=8to12:close2:open2,i,2:close2:ifstthen40020
  207. 40010 close15:open15,i,15,"r0:"+a$+"="+a$:input#15,er:close15:ifer=63then40030
  208. 40020 next:print"[147][146]":poke2048,0:poke44,8:poke53272,23:poke186,8:end
  209. 40030 poke646,peek(53281):print"[147][146]load"chr$(34)a$chr$(34)","i:poke43,1
  210. 40040 print"run":poke44,8:poke2048,0:poke631,13:poke632,13:poke198,2:end
  211. 50000 q9$="":u9=53280:poke198,0
  212. 50010 geta$
  213. 50020 poke646,rnd(1)*15+1:print"[164][157]";:ifa$=""then50010
  214. 50030 ifa$=chr$(13)thenprint" ":return
  215. 50040 if(a$=chr$(20)andlen(q9$))thenq9$=left$(q9$,len(q9$)-1):goto50080
  216. 50050 iflen(q9$)>=2thent9%=peek(u9):pokeu9,1:pokeu9,t9%:goto50010
  217. 50060 ifa$<"0"ora$>"9"then50010
  218. 50070 q9$=q9$+a$
  219. 50080 print""a$;:goto5001