home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 16
/
016.d81
/
miner
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-26
|
10KB
|
289 lines
2 clr:poke53281,0:poke53280,8:print"[147]":miner=1278:bank=500:g=500
3 buy=0:gosub2000
4 forl=1344to1983:x=int(2*rnd(1))+1:ifx=1thenx=174
5 ifx=2thenx=160
6 pokel,x:pokel+54272,9:next
7 forl=1304to1343:pokel,102:pokel+54272,12:next
8 forl=1984to2023:pokel,102:pokel+54272,12:next
9 forl=1304to1984step40:pokel,102:pokel+39,102:pokel+54272,12:pokel+54311,12
10 next:print" [175][175][172][162][162][187][175][175] gold:$ [164][164][164][164][164][164][164]
11 [153]" get bank abs you have: (NULL) (NULL) (NULL)listspc(spc(
12 print" [207][207][207][207][207][207][207][208] $ [163][163] [214] [212][155][166][166]
13 [153]" (NULL)usrusrusrusrusrusr(NULL) spc(spc(spc(spc(listspc(spc(
14 print" [204][175][175][175][175][175][175][186] [144]e[166][155][166][166]
15 [153]"spc(spc(spc(spc(listspc(spc(
16 forl=1to9:print"[155][166] [166][166][166][166]":next
17 print" "
18 print"[145][145][145] "
20 forl=1to17:pokeminer,32:miner=miner+1:pokeminer,88:pokeminer+54272,1
30 fora=1to25:next:next
100 print""
110 forl=1to10
115 print" [214] [212]"
120 print"[166][166][166][166]"
130 print"[216] [166]"
140 print"[166][166][166][166]"
145 print"[145][145][145]";:miner=miner+40
150 next:miner=miner-40:bank=bank-25:miner=1655:goto300
160 print"":forl=1to10
170 print"[166][166][166][166]"
180 print" [216][166]"
190 print"[166][166][166][166]"
200 print" "
210 print"[145][145][145][145][145]";:miner=miner-40:next:miner=miner+40:forl=1to19
220 pokeminer,32:miner=miner-1:pokeminer,88:pokeminer+54272,1
230 fora=1to25:next:next
240 print"you have "ounce"[157] ounces.":bank=bank+(g*ounce):ounce=0
250 forl=1to1000:next
255 print" "
260 forl=1to10:print""bank"[157] "
265 print""bank"[157] ":next
299 bank=bank-25:goto20
300 rem movement of miner
310 ifminer=1657 then160
312 getg$:ifg$<>""then318
313 a=int(7*rnd(1))+1:ifa=3thengosub1200
314 ifbank<0 then bank=0:goto1300
315 print""bank"[157] "
316 ifbank>=30000 then 1500
317 poke56322,0:j=peek(56320):t=jand16:j=15-(jand15):poke56322,255:goto320
318 ifg$="/"org$="?"then20000
319 goto326
320 ifj=1thenmove=-40:goto330
321 ifj=2thenmove=+40:goto330
322 ifj=4thenmove=-1:goto330
323 ifj=8thenmove=+1:goto330
324 ift=16 goto310
325 goto900
326 ifg$="b"then10000
327 ifg$="p"then1000
328 ifg$="q"then1300
329 goto300
330 ifpeek(miner+move)=230thengoto1000
331 ifpeek(miner+move)=218thengoto300
332 ifpeek(miner+move)=233thengoto300
333 ifpeek(miner+move)=0thengoto300
334 ifpeek(miner+move)=102thengoto300
340 ifpeek(miner+move)=160thengoto400
341 ifpeek(miner+move)=32 thengoto450
342 ifpeek(miner+move)=174thengoto500
345 ifpeek(miner+move)=19+128then600
346 ifpeek(miner+move)=104+128then700
347 ifpeek(miner+move)=6+128then800
349 ifpeek(miner+move)=135then1100
400 forl=1to3:pokeminer+move,30:pokeminer+move+54272,1:poke54296,1
405 poke54296,0:fora=1to55:next
410 pokeminer+move,31:pokeminer+move+54272,1:fora=1to55:next:next:bank=bank-5
450 pokeminer,32:miner=miner+move:pokeminer,88:pokeminer+54272,1
460 rem identify next block
500 rem identify next block
510 ifpeek(miner+move)=160then599
511 ifpeek(miner+move)=32then599
513 ifpeek(miner+move)<>174then599
520 a=int(10*rnd(1))+1:ifa=1thenrock=90 :item$="solid rock ahead":goto540
521 ifa=2thenrock=19:item$="spring ahead":goto540
522 ifa=3thenrock=105:item$="shale rock":goto540
523 ifa=4thenrock=104:item$="sandstone":goto540
524 ifa=5thenrock=104:item$="sandstone":goto540
526 ifa=7thenrock=90:item$="solid rock ahead":goto540
527 ifa=8thenrock=105:item$="shale rock":goto540
528 ifa=9thenrock=104:goto540
529 ifa=10thenrock=19:item$="spring ahead":goto540
530 ifa=6then rock=7:item$="gold nuggets ahead!!"
540 pokeminer+move,rock+128:pokeminer+move+54272,3
541 ifpeek(miner+move)=135thenpokeminer+move+54272,7
545 print""item$:forl=1to600:next:
550 print" "
599 goto300
600 rem flood from spring
601 forl=54272to54296:pokel,0:next:poke54296,15:poke54277,190:poke54278,200
602 forl=15to1step-1:poke54273,37:poke54272,160:poke54276,129
603 poke54273,17:poke54272,230:poke54276,129:next
605 print"spring-flooding!!!"
610 forl=miner+1to2023:ifpeek(l)=32thenpokel,0:pokel+54272,14
620 next
625 print" "
626 ounce=0
627 print"lost all your gold!!!":gosub799:gosub799:gosub799:gosub799
628 print" "
699 poke54296,0:goto300
700 rem cave in from sandstone
701 forl=54272to54296:pokel,0:next:poke54296,15:poke54277,190:poke54278,200
702 forl=15to1step-1:poke54273,37:poke54272,160:poke54276,129:poke54296,l
703 next:gosub4000
705 print"sandstone cave-in"
706 gosub799:gosub799
710 ifpeek(miner-39)<>102thenpokeminer-39,232:pokeminer-39+54272,3
720 ifpeek(miner+2)<>102thenpokeminer+2,232:pokeminer+54272+2,3:gosub799
721 ifpeek(miner-41)<>102thenpokeminer-41,232:pokeminer+54272-41,3:gosub4000
723 ifpeek(miner+39)<>102thenpokeminer+39,232:pokeminer+54272+39,3:gosub799
724 ifpeek(miner+3)<>102thenpokeminer+3,232:pokeminer+54272+3,3
795 ounce=0:poke54276,128:poke54296,0
796 print"lost all your gold!!!":gosub799:gosub799:gosub799:gosub799
797 print" "
798 goto300
799 forl=1to300:next:return
800 rem found gold nuggets
899 goto300
900 rem dynamite blasting
905 print"dynamite blasting"
906 ifmove=0thenmove=-1
907 forl=54272to54296:pokel,0:next:poke54296,15:poke54277,190:poke54278,200
908 forl=15to1step-1:poke54273,int(255*rnd(1))+1:poke54272,int(255*rnd(1))+1
909 poke54276,129:next:gosub4000
910 if(miner+move+move)>1983then913
911 if(miner+move+move)<1344then913
912 ifpeek(miner+move+move)<>102thenpokeminer+move+move,32:forl=1to300:next
913 ifpeek(miner+1)<>102thenpokeminer+1,32
915 ifpeek(miner-40)<>102thenpokeminer-40,32
916 ifpeek(miner-1)=102then918
917 pokeminer-1,32
918 gosub4000:ifpeek(miner+40)<>102thenpokeminer+40,32
995 print" "
999 poke54296,0:bank=bank-200:goto300
1000 rem pumping water
1005 ifpeek(miner+move)<>0then300
1010 print"pumping water"
1020 forl=1to300:next
1030 print" "
1099 bank=bank-100:goto400
1100 rem found gold
1110 print"found gold!!!";
1115 nuggs=int(2*rnd(1))+2:print" "nuggs"[157] ounces!!!":forl=1to500:next
1120 ounce=ounce+nuggs:print" "
1130 goto450
1200 rem change price of gold
1210 a=int(10*rnd(1))+1:ifa=<5thena=a-a-a
1211 ifa>5thena=a-5
1215 g=g+(a):ifg<200theng=200
1220 print"$"g"[157]/ounce"
1230 return
1300 rem bust-end of game
1305 ifbank>0then1380
1310 print""bank"[157] "
1320 print"you ran out of money!!!! ":gosub799:gosub799:gosub799
1330 print"time to close the mine. ":gosub799:gosub799:gosub799
1340 print"play again? (y/n) "
1345 print" "
1346 print" "
1347 print" "
1350 getg$:ifg$="y"thenclr:run
1360 ifg$<>"n"then1350
1370 goto1400
1380 print"you want to quit the game? (y/n)"
1381 getg$:ifg$="y"thenprint"play again? (y/n)[146] ":goto1350
1382 ifg$<>"n"then1381
1383 print" "
1384 goto300
1400 rem end statements
1405 print"[147]"
1410 goto5000
1500 rem won game
1510 print"you reached your goal!!! ":gosub799:gosub799:gosub799
1520 print"you made over $30000!!! ":gosub799:gosub799:gosub799
1530 print"play again? (y/n) "
1545 print" "
1546 print" "
1547 print" "
1550 goto1350
2000 rem set up and instructions
2005 p