home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 16 / 016.d81 / miner (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  10KB  |  289 lines

  1. 2 clr:poke53281,0:poke53280,8:print"[147]":miner=1278:bank=500:g=500
  2. 3 buy=0:gosub2000
  3. 4 forl=1344to1983:x=int(2*rnd(1))+1:ifx=1thenx=174
  4. 5 ifx=2thenx=160
  5. 6 pokel,x:pokel+54272,9:next
  6. 7 forl=1304to1343:pokel,102:pokel+54272,12:next
  7. 8 forl=1984to2023:pokel,102:pokel+54272,12:next
  8. 9 forl=1304to1984step40:pokel,102:pokel+39,102:pokel+54272,12:pokel+54311,12
  9. 10 next:print"      [175][175][172][162][162][187][175][175] gold:$         [164][164][164][164][164][164][164]
  10. 11 [153]"      get bank abs you have:     (NULL)  (NULL) (NULL)listspc(spc(
  11. 12 print"      [207][207][207][207][207][207][207][208] $             [163][163] [214] [212][155][166][166]
  12. 13 [153]"      (NULL)usrusrusrusrusrusr(NULL)                 spc(spc(spc(spc(listspc(spc(
  13. 14 print"      [204][175][175][175][175][175][175][186]                   [144]e[166][155][166][166]
  14. 15 [153]"spc(spc(spc(spc(listspc(spc(
  15. 16 forl=1to9:print"[155][166]    [166][166][166][166]":next
  16. 17 print"    "
  17. 18 print"[145][145][145] "
  18. 20 forl=1to17:pokeminer,32:miner=miner+1:pokeminer,88:pokeminer+54272,1
  19. 30 fora=1to25:next:next
  20. 100 print""
  21. 110 forl=1to10
  22. 115 print" [214] [212]"
  23. 120 print"[166][166][166][166]"
  24. 130 print"[216]  [166]"
  25. 140 print"[166][166][166][166]"
  26. 145 print"[145][145][145]";:miner=miner+40
  27. 150 next:miner=miner-40:bank=bank-25:miner=1655:goto300
  28. 160 print"":forl=1to10
  29. 170 print"[166][166][166][166]"
  30. 180 print"  [216][166]"
  31. 190 print"[166][166][166][166]"
  32. 200 print"    "
  33. 210 print"[145][145][145][145][145]";:miner=miner-40:next:miner=miner+40:forl=1to19
  34. 220 pokeminer,32:miner=miner-1:pokeminer,88:pokeminer+54272,1
  35. 230 fora=1to25:next:next
  36. 240 print"you have "ounce"[157] ounces.":bank=bank+(g*ounce):ounce=0
  37. 250 forl=1to1000:next
  38. 255 print"                        "
  39. 260 forl=1to10:print""bank"[157]   "
  40. 265 print""bank"[157]   ":next
  41. 299 bank=bank-25:goto20
  42. 300 rem movement of miner
  43. 310 ifminer=1657 then160
  44. 312 getg$:ifg$<>""then318
  45. 313 a=int(7*rnd(1))+1:ifa=3thengosub1200
  46. 314 ifbank<0 then bank=0:goto1300
  47. 315 print""bank"[157]   "
  48. 316 ifbank>=30000 then 1500
  49. 317 poke56322,0:j=peek(56320):t=jand16:j=15-(jand15):poke56322,255:goto320
  50. 318 ifg$="/"org$="?"then20000
  51. 319 goto326
  52. 320 ifj=1thenmove=-40:goto330
  53. 321 ifj=2thenmove=+40:goto330
  54. 322 ifj=4thenmove=-1:goto330
  55. 323 ifj=8thenmove=+1:goto330
  56. 324 ift=16  goto310
  57. 325 goto900
  58. 326 ifg$="b"then10000
  59. 327 ifg$="p"then1000
  60. 328 ifg$="q"then1300
  61. 329 goto300
  62. 330 ifpeek(miner+move)=230thengoto1000
  63. 331 ifpeek(miner+move)=218thengoto300
  64. 332 ifpeek(miner+move)=233thengoto300
  65. 333 ifpeek(miner+move)=0thengoto300
  66. 334 ifpeek(miner+move)=102thengoto300
  67. 340 ifpeek(miner+move)=160thengoto400
  68. 341 ifpeek(miner+move)=32 thengoto450
  69. 342 ifpeek(miner+move)=174thengoto500
  70. 345 ifpeek(miner+move)=19+128then600
  71. 346 ifpeek(miner+move)=104+128then700
  72. 347 ifpeek(miner+move)=6+128then800
  73. 349 ifpeek(miner+move)=135then1100
  74. 400 forl=1to3:pokeminer+move,30:pokeminer+move+54272,1:poke54296,1
  75. 405 poke54296,0:fora=1to55:next
  76. 410 pokeminer+move,31:pokeminer+move+54272,1:fora=1to55:next:next:bank=bank-5
  77. 450 pokeminer,32:miner=miner+move:pokeminer,88:pokeminer+54272,1
  78. 460 rem identify next block
  79. 500 rem identify next block
  80. 510 ifpeek(miner+move)=160then599
  81. 511 ifpeek(miner+move)=32then599
  82. 513 ifpeek(miner+move)<>174then599
  83. 520 a=int(10*rnd(1))+1:ifa=1thenrock=90 :item$="solid rock ahead":goto540
  84. 521 ifa=2thenrock=19:item$="spring ahead":goto540
  85. 522 ifa=3thenrock=105:item$="shale rock":goto540
  86. 523 ifa=4thenrock=104:item$="sandstone":goto540
  87. 524 ifa=5thenrock=104:item$="sandstone":goto540
  88. 526 ifa=7thenrock=90:item$="solid rock ahead":goto540
  89. 527 ifa=8thenrock=105:item$="shale rock":goto540
  90. 528 ifa=9thenrock=104:goto540
  91. 529 ifa=10thenrock=19:item$="spring ahead":goto540
  92. 530 ifa=6then rock=7:item$="gold nuggets ahead!!"
  93. 540 pokeminer+move,rock+128:pokeminer+move+54272,3
  94. 541 ifpeek(miner+move)=135thenpokeminer+move+54272,7
  95. 545 print""item$:forl=1to600:next:
  96. 550 print"                                    "
  97. 599 goto300
  98. 600 rem flood from spring
  99. 601 forl=54272to54296:pokel,0:next:poke54296,15:poke54277,190:poke54278,200
  100. 602 forl=15to1step-1:poke54273,37:poke54272,160:poke54276,129
  101. 603 poke54273,17:poke54272,230:poke54276,129:next
  102. 605 print"spring-flooding!!!"
  103. 610 forl=miner+1to2023:ifpeek(l)=32thenpokel,0:pokel+54272,14
  104. 620 next
  105. 625 print"                   "
  106. 626 ounce=0
  107. 627 print"lost all your gold!!!":gosub799:gosub799:gosub799:gosub799
  108. 628 print"                        "
  109. 699 poke54296,0:goto300
  110. 700 rem cave in from sandstone
  111. 701 forl=54272to54296:pokel,0:next:poke54296,15:poke54277,190:poke54278,200
  112. 702 forl=15to1step-1:poke54273,37:poke54272,160:poke54276,129:poke54296,l
  113. 703 next:gosub4000
  114. 705 print"sandstone cave-in"
  115. 706 gosub799:gosub799
  116. 710 ifpeek(miner-39)<>102thenpokeminer-39,232:pokeminer-39+54272,3
  117. 720 ifpeek(miner+2)<>102thenpokeminer+2,232:pokeminer+54272+2,3:gosub799
  118. 721 ifpeek(miner-41)<>102thenpokeminer-41,232:pokeminer+54272-41,3:gosub4000
  119. 723 ifpeek(miner+39)<>102thenpokeminer+39,232:pokeminer+54272+39,3:gosub799
  120. 724 ifpeek(miner+3)<>102thenpokeminer+3,232:pokeminer+54272+3,3
  121. 795 ounce=0:poke54276,128:poke54296,0
  122. 796 print"lost all your gold!!!":gosub799:gosub799:gosub799:gosub799
  123. 797 print"                        "
  124. 798 goto300
  125. 799 forl=1to300:next:return
  126. 800 rem found gold nuggets
  127. 899 goto300
  128. 900 rem dynamite blasting
  129. 905 print"dynamite blasting"
  130. 906 ifmove=0thenmove=-1
  131. 907 forl=54272to54296:pokel,0:next:poke54296,15:poke54277,190:poke54278,200
  132. 908 forl=15to1step-1:poke54273,int(255*rnd(1))+1:poke54272,int(255*rnd(1))+1
  133. 909 poke54276,129:next:gosub4000
  134. 910 if(miner+move+move)>1983then913
  135. 911 if(miner+move+move)<1344then913
  136. 912 ifpeek(miner+move+move)<>102thenpokeminer+move+move,32:forl=1to300:next
  137. 913 ifpeek(miner+1)<>102thenpokeminer+1,32
  138. 915 ifpeek(miner-40)<>102thenpokeminer-40,32
  139. 916 ifpeek(miner-1)=102then918
  140. 917 pokeminer-1,32
  141. 918 gosub4000:ifpeek(miner+40)<>102thenpokeminer+40,32
  142. 995 print"                 "
  143. 999 poke54296,0:bank=bank-200:goto300
  144. 1000 rem pumping water
  145. 1005 ifpeek(miner+move)<>0then300
  146. 1010 print"pumping water"
  147. 1020 forl=1to300:next
  148. 1030 print"                "
  149. 1099 bank=bank-100:goto400
  150. 1100 rem found gold
  151. 1110 print"found gold!!!";
  152. 1115 nuggs=int(2*rnd(1))+2:print" "nuggs"[157] ounces!!!":forl=1to500:next
  153. 1120 ounce=ounce+nuggs:print"                               "
  154. 1130 goto450
  155. 1200 rem change price of gold
  156. 1210 a=int(10*rnd(1))+1:ifa=<5thena=a-a-a
  157. 1211 ifa>5thena=a-5
  158. 1215 g=g+(a):ifg<200theng=200
  159. 1220 print"$"g"[157]/ounce"
  160. 1230 return
  161. 1300 rem bust-end of game
  162. 1305 ifbank>0then1380
  163. 1310 print""bank"[157]   "
  164. 1320 print"you ran out of money!!!!  ":gosub799:gosub799:gosub799
  165. 1330 print"time to close the mine.       ":gosub799:gosub799:gosub799
  166. 1340 print"play again? (y/n)           "
  167. 1345 print"                            "
  168. 1346 print"                            "
  169. 1347 print"                            "
  170. 1350 getg$:ifg$="y"thenclr:run
  171. 1360 ifg$<>"n"then1350
  172. 1370 goto1400
  173. 1380 print"you want to quit the game? (y/n)"
  174. 1381 getg$:ifg$="y"thenprint"play again? (y/n)[146]               ":goto1350
  175. 1382 ifg$<>"n"then1381
  176. 1383 print"                                "
  177. 1384 goto300
  178. 1400 rem end statements
  179. 1405 print"[147]"
  180. 1410 goto5000
  181. 1500 rem won game
  182. 1510 print"you reached your goal!!!  ":gosub799:gosub799:gosub799
  183. 1520 print"you made over $30000!!!       ":gosub799:gosub799:gosub799
  184. 1530 print"play again? (y/n)           "
  185. 1545 print"                            "
  186. 1546 print"                            "
  187. 1547 print"                            "
  188. 1550 goto1350
  189. 2000 rem set up and instructions
  190. 2005 p