home *** CD-ROM | disk | FTP | other *** search
/ zzZACK64 / zzZACK64_4_1992_-_de.d64 / heros (.txt) < prev    next >
Commodore BASIC  |  2023-02-26  |  10KB  |  295 lines

  1. 10 rem heros===============c64
  2. 20 rem (p) 7/87 commodore welt
  3. 30 rem =======================
  4. 40 rem (c) peter bergen   v3.5
  5. 50 rem (v) a.mittelmeyer  v2.0
  6. 60 rem
  7. 70 rem basic v2.0
  8. 80 rem c64
  9. 90 rem =======================
  10. 91 at=49152:re=49510:gosub92:goto100
  11. 92 if peek(49154)=174thenreturn
  12. 93 sys57812"sysmc",8,0:poke780,0
  13. 94 poke781,254:poke782,191
  14. 95 sys65493:return
  15. 100 poke53281,1:poke646,0
  16. 105 gosub2060:gosub2080
  17. 110 remgosub 2560:poke65298,0:poke65299,60:printbk$;:goto230
  18. 115 gosub 2560:printbk$;:goto230
  19. 120 l1$=gr$+"[193][195][193][195]"+gr$+"[194][196][194][196]"+bk$+"[197][198][197][198]"+lr$+z6$+z6$+z6$+z6$:goto950
  20. 130 l1$=br$+"  [212] "+br$+"[208][209][210][211]"+br$+"[204][205][206][207]"+lr$+z6$+z6$+z6$+z6$:goto950
  21. 140 l1$=re$+zf$+zr$+zr$+zu$+lg$+"[199][200][200][201]"+lg$+"[199][200][202][203]"+lr$+z6$+z6$+z6$+z6$:goto950
  22. 150 l1$=wh$+"    "+bk$+"[213][214][217] "+bk$+"[215][216]  "+lr$+z6$+z6$+z6$+z6$:goto950
  23. 160 l1$=wh$+"    "+wh$+"    "+wh$+"    "+re$+z1$+z1$+z1$+z1$:goto950
  24. 170 l1$=wh$+"    "+wh$+"    "+wh$+"    "+bl$+z0$+z0$+z0$+z0$:goto950
  25. 180 l1$=wh$+"    "+wh$+"    "+wh$+"    "+ye$+zl$+zl$+zl$+zl$:goto950
  26. 190 l1$=wh$+"    "+wh$+"    "+wh$+"    "+g2$+zl$+zl$+zl$+zl$:goto950
  27. 200 l1$=wh$+"    "+wh$+"    "+wh$+"    "+lr$+z6$+z6$+z6$+z6$:goto950
  28. 210 sysre:data53,10,70,3,103,5,76,5,57,5,90,10,66,5
  29. 220 sysre:data53,60,4,70,10,8,103,40,6,76,90,8,57,180,10,90,30,2,66,30,2,0,30,2
  30. 230 dimf%(20,40),h%(4,20),s%(3,5),d%(9),n$(3),l2$(4),l3$(4),fe%(20),q$(3)
  31. 240 a=rnd(-ti):q$(1)=zg$:q$(2)=zq$:q$(3)=z4$
  32. 250 fora=1to20:fe%(a)=1:next:poke53280,0:poke646,2
  33. 260 printchr$(147);:gosub1980:gosub1960:gosub1440
  34. 270 forsp=1to3:s%(sp,1)=hv:s%(sp,2)=hh:s%(sp,5)=1:s%(sp,3)=75:s%(sp,4)=50:next
  35. 280 ri=1:sp=1:z=600:gosub1850
  36. 290 gosub830:sp=2:s=8:lc=1344:gosub1610:sp=3:s=16:lc=1664:gosub1610:sp=1:s=0:lc=1024
  37. 300 ifri=2thengoto380
  38. 310 gosub450
  39. 320 ifz<1thengosub1610:goto760
  40. 330 poke56322,224:jo=peek(56320):poke56322,255
  41. 335 ifjo=123thens%(sp,1)=s%(sp,1)-1:gosub510:gosub830:goto570
  42. 340 ifjo=119thens%(sp,1)=s%(sp,1)+1:gosub530:gosub830:goto570
  43. 350 ifjo=111thenri=2:goto380
  44. 360 ifjo=109thengosub1390
  45. 370 goto320
  46. 380 gosub470
  47. 390 ifz<1thengosub1610:goto760
  48. 400 poke56322,224:jo=peek(56320):poke56322,255
  49. 405 ifjo=123thens%(sp,2)=s%(sp,2)-1:gosub510:gosub830:goto570
  50. 410 ifjo=119thens%(sp,2)=s%(sp,2)+1:gosub530:gosub830:goto570
  51. 420 ifjo=111thenri=1:goto310
  52. 430 ifjo=109thengosub1390
  53. 440 goto390
  54. 450 gosub490:gosub500:gosub830:gosub550:sysat,0,s:printre$rn$"west-ost"rf$;
  55. 460 gosub750:return
  56. 470 gosub490:gosub500:gosub830:gosub550:sysat,0,s:printre$rn$"sued-nord"rf$;
  57. 480 gosub750:return
  58. 490 sysat,0,s:forii=1to7:print"                            ":next:sysat,0,s:return
  59. 500 sysat,12,s+6:printrn$re$z8$yq$z8$yq$rf$;:return
  60. 510 fora=1to4:l3$(a)=mid$(l2$(a),1,1):next
  61. 520 forb=5to2step-1:gosub560:next:return
  62. 530 fora=1to4:l3$(a)=mid$(l2$(a),6,1):next
  63. 540 forb=6to11:gosub560:next:return
  64. 550 c=1:fora=s+2tos+5:sysat,0,a:printmid$(l2$(c),6,35):c=c+1:next:return
  65. 560 c=1:fora=s+2tos+5:sysat,0,a:printl3$(c);:print;mid$(l2$(c),b,35):c=c+1:next:return
  66. 570 gosub220:v=s%(sp,1):h=s%(sp,2):ifv<1orv>20orh<1orh>40theny=1:goto1770
  67. 580 fora=1to8:readb:readc:readkr:iff%(v,h)=bthenzr=c
  68. 590 next:ifs%(sp,4)<0thengoto610
  69. 600 kr=kr+int(((s%(sp,4)/s%(sp,5))/50)+.5)
  70. 610 iff%(v,h)=53thengosub1040
  71. 620 iff%(v,h)=70andsp<>1theny=3:goto1770
  72. 630 iff%(v,h)=70thenzr=zr*s%(sp,5)
  73. 640 iff%(v,h)=12ands%(sp,5)>1theny=4:goto1770
  74. 650 iff%(v,h)=57andsp=2thenzr=int(zr/3)
  75. 660 iff%(v,h)=10theny=5:goto1770
  76. 670 iff%(v,h)=0thengosub1300
  77. 680 iff%(v,h)=66thengosub1130
  78. 690 s%(sp,3)=s%(sp,3)-kr:ifs%(sp,3)<0thensysat,29,s+5:y=2:goto1770
  79. 700 ifne=1thenne=0:gosub730
  80. 710 z=z-zr:gosub750:gosub810
  81. 720 ifri=1then320
  82. 721 goto390
  83. 730 ifri=1thengosub450:goto740
  84. 731 gosub470
  85. 740 gosub750:return
  86. 750 sysat,12,s:printre$rn$right$("  "+str$(z),3):return
  87. 760 ifsp=1thensp=2:s=8:lc=1344:ri=1:z=600:gosub830:goto300
  88. 770 ifsp=2thensp=3:s=16:lc=1664:ri=1:z=600:gosub830:goto300
  89. 780 gosub1940:gosub1670:gosub1950:gosub1920
  90. 790 sp=1:s=0:lc=1024:gosub1610:sp=2:s=8:lc=1344:gosub1610:sp=3:s=16:lc=1664:gosub1610
  91. 800 sp=1:s=0:lc=1024:ri=1:z=600:gosub830:goto300
  92. 810 sysat,29,s+5:print"          ";:fora=29to29+int(s%(sp,3)/10)
  93. 820 sysat,a,s+5:printre$"*";:next:return
  94. 830 ifri=1thengosub960:goto840
  95. 831 gosub1000
  96. 840 fora=1to4:l2$(a)="":next
  97. 850 fora=1to9
  98. 860 ifd%(a)=53then120
  99. 870 ifd%(a)=57then130
  100. 880 ifd%(a)=66then140
  101. 890 ifd%(a)=0then150
  102. 900 ifd%(a)=10then160
  103. 910 ifd%(a)=70then170
  104. 920 ifd%(a)=103then180
  105. 930 ifd%(a)=12then190
  106. 940 ifd%(a)=13then200
  107. 950 forb=1to4:l2$(b)=l2$(b)+mid$(l1$,5*b-4,5):next:next:return
  108. 960 b=1:fora=s%(sp,1)-4tos%(sp,1)+4
  109. 970 ifa<1ora>20thend%(b)=10:goto990
  110. 980 d%(b)=f%(a,s%(sp,2))
  111. 990 b=b+1:next:return
  112. 1000 b=1:fora=s%(sp,2)-4tos%(sp,2)+4
  113. 1010 ifa<1ora>40thend%(b)=10:goto1030
  114. 1020 d%(b)=f%(s%(sp,1),a)
  115. 1030 b=b+1:next:return
  116. 1040 z1=int(rnd(1)*3):ifz1<>1orsp=3thenreturn
  117. 1050 fora=1to20:next:z2=int(rnd(1)*10)+1
  118. 1060 gosub490:printre$"woelfe greifen sie an!"
  119. 1070 print"waehlen sie zwischen:":print:print"li=kampf":print"re=opfer"
  120. 1080 poke56322,224:jo=peek(56320):poke56322,255
  121. 1085 ifjo=123thens%(sp,3)=s%(sp,3)-z2*2:ne=1:gosub1900:return
  122. 1090 ifjo=119thens%(sp,4)=s%(sp,4)-(z2*10):gosub1110:ne=1:gosub1900:return
  123. 1100 goto1080
  124. 1110 ifs%(sp,4)<1theny=6:goto1770
  125. 1120 return
  126. 1130 rem
  127. 1140 fora=1to20:ifs%(sp,1)=h%(1,a)ands%(sp,2)=h%(2,a)thenhk=a
  128. 1150 next
  129. 1160 gosub490:printre$"im haus finden sie vor:"
  130. 1170 gosub1290:s%(sp,5)=s%(sp,5)+h%(3,hk):pu=pu+h%(3,hk):h%(3,hk)=0
  131. 1180 hb=h%(4,hk)/10:sb=s%(sp,4)/10:j=0:gosub1210
  132. 1190 h%(4,hk)=h%(4,hk)-j*10:s%(sp,4)=s%(sp,4)+j*10:gosub490:gosub1900:gosub1920
  133. 1200 ne=1:return
  134. 1210 sysat,0,s+5:print"re=> / li=< / fire=annahme";:gosub1280
  135. 1220 poke56322,224:jo=peek(56320):poke56322,255
  136. 1225 ifjo=119thenj=j+1:gosub1260
  137. 1230 ifjo=123thenj=j-1:gosub1270
  138. 1240 ifjo=111thengosub1900:return
  139. 1250 goto1220
  140. 1260 ifj>hbthenj=j-1:return
  141. 1270 ifj<-sbthenj=j+1:return
  142. 1280 sysat,11,s+6:printright$("   "+str$(j),4):return
  143. 1290 printh%(3,hk);"personen":printh%(4,hk)/10;"kg nahrungsmittel":return
  144. 1300 fora=1to20:next
  145. 1310 pg=pg+s%(sp,5)-1:pu=pu-s%(sp,5)+1:s%(sp,5)=1:gosub1900:gosub1920
  146. 1320 ifpg=ptthengoto1800
  147. 1330 gosub490:print;"kurs: w/o=";s%(sp,1);"# s/n=";s%(sp,2)
  148. 1340 sysat,0,s+2:print"neuer kurs west/ost:";:sb=-1:hb=20:j=1:gosub1210:fora=1to100:next
  149. 1350 a=j:sysat,0,s+2:print"neuer kurs sued/nord";:hb=40:j=1:gosub1210:b=j
  150. 1360 iff%(a,b)=66orf%(a,b)=10theny=7:goto1770
  151. 1370 f%(s%(sp,1),s%(sp,2))=13:f%(a,b)=0
  152. 1380 ne=1:z=0:return
  153. 1390 rem
  154. 1400 gosub490:print"wieviel nahrung soll":print"verbraucht werden?"c4$
  155. 1410 hb=s%(sp,4)/10:sb=-0:j=0:gosub1210
  156. 1420 s%(sp,3)=s%(sp,3)+int((j*10/s%(sp,5))+.5):ifs%(sp,3)>90thens%(sp,3)=90
  157. 1430 s%(sp,4)=s%(sp,4)-j*10:z=z-30:gosub1900:gosub810:gosub730:gosub750:return
  158. 1440 fora=1to20:forb=1to40:f%(a,b)=13:next:next
  159. 1450 vh=15:l=5:forb=2to40:gosub1540
  160. 1460 fora=z2to(z2+z3):f%(a,b)=z4:next:next
  161. 1470 vh=32:l=8:fora=1to20:gosub1540
  162. 1480 forb=z2to(z2+z3):f%(a,b)=z4:next:next
  163. 1490 f%(hv,hh)=0:fora=1to20
  164. 1500 h%(1,a)=int(rnd(1)*20)+1:h%(2,a)=int(rnd(1)*40)+1
  165. 1510 iff%(h%(1,a),h%(2,a))=0thengoto1500
  166. 1520 f%(h%(1,a),h%(2,a))=66
  167. 1530 h%(3,a)=int(rnd(1)*5)+2:pt=pt+h%(3,a):h%(4,a)=int(rnd(1)*20)*10+100:next:return
  168. 1540 z1=int(rnd(1)*2)+1:ifz1=0thenreturn
  169. 1550 z2=int(rnd(1)*vh)+1:z3=int(rnd(2)*l)+1:z4=int(rnd(1)*7)+1
  170. 1560 ifz4=1orz4=6orz4=7thenz4=53:return
  171. 1570 ifz4=2thenz4=70:return
  172. 1580 ifz4=3thenz4=103:return
  173. 1590 ifz4=4thenz4=12:return
  174. 1600 ifz4=5thenz4=57:return
  175. 1610 gosub490:fora=s%(sp,1)-3tos%(sp,1)+3:forb=s%(sp,2)-10tos%(sp,2)+10
  176. 1620 ifa<1ora>20orb<1orb>40thenpokelc+54272,10:pokelc,160:goto1640
  177. 1630 pokelc+54272,f%(a,b):pokelc,160
  178. 1640 lc=lc+1:next:lc=lc+19:next
  179. 1650 poke646,6:sysat,24,s+1:print"w";:sysat,24,s+2:print"i";:sysat,22,s+3:print"s-*-n";
  180. 1660 sysat,24,s+4:print"i";:sysat,24,s+5:print"o";:sysat,10,s+3:printbk$"*";:return
  181. 1670 fora=1to20:dz=1:forb=1to4:df=fe%(a):gosub210
  182. 1680 ifdf>40thendf=40
  183. 1690 iff%(a,df)=66thengosub1750
  184. 1700 forc=1to3:ifa=s%(c,1)anddf=s%(c,2)theny=8:goto1770
  185. 1710 next:iff%(a,df)=0theny=9:goto1770
  186. 1720 forc=1to7:readda:readdb:iff%(a,df)=dathendz=dz+db
  187. 1730 next:ifdz>9thenfe%(a)=fe%(a)+1:f%(a,df)=10:dz=dz-9
  188. 1740 next:next:return
  189. 1750 fore=1to20:ifa=h%(1,e)anddf=h%(2,e)andh%(3,e)>0theny=10:goto1770
  190. 1760 next:return
  191. 1770 fora=500to10step-20:next
  192. 1780 printchr$(147);:print;c4$c4$c4$c3$c3$re$"leider scheiterte ihr einsatz! (";y;")"
  193. 1790 gosub1920:goto1820
  194. 1800 rem
  195. 1810 printchr$(147);:sysat,8,3:printre$fl$"sie haben es geschafft!"fo$;:gosub1920
  196. 1820 sysat,14,6:print"fire = start";
  197. 1830 poke56322,224:jo=peek(56320):poke56322,255
  198. 1835 ifjo=111thenprintchr$(147);:run
  199. 1840 goto1830
  200. 1850 aa=1063
  201. 1855 fora=0to24:sysat,0,a:printrn$bk$"                                       "rf$;
  202. 1856 pokeaa,160:pokeaa+54272,0:aa=aa+40:next
  203. 1860 forb=0to22step8:fora=btob+6:sysat,0,a:print"                            ";
  204. 1870 printn$+" "+rf$+"          ";:next:next
  205. 1880 poke646,6:b=1:fors=0to22step8:poke646,6:sysat,30,s:printn$(b);:gosub1900
  206. 1890 sysat,29,s+5:printre$"********";:sysat,30,s+6:printq$(b);:b=b+1:next:s=0:gosub1920:return
  207. 1900 sysat,30,s+2:printbl$"p:"right$("   "+str$(s%(sp,5)),4)
  208. 1910 sysat,30,s+3:print"n:"right$("   "+str$(int(s%(sp,4)/10)),4):return
  209. 1920 gosub1950:sysat,0,24:printre$"gesamt:";pt;" gefunden:";pu;" gerettet:";pg;c2$
  210. 1930 return
  211. 1940 sysat,0,24:printre$" in der nacht brennt das feuer weiter!"c2$;:return
  212. 1950 sysat,0,24:print"                                      "c2$;:return
  213. 1960 printchr$(147);:printc4$c4$,c1$c1$c1$"ihr hubschrauber landet.",,c4$c4$fl$c3$c3$;
  214. 1970 print"bitte warten!"fo$:return
  215. 1980 fora=1to3
  216. 1990 printc4$c4$"name des";a;".spielers":gosub2050
  217. 2000 iflen(n$(a))>10thenprintc4$c4$fl$"zu lang!"fo$:goto1990
  218. 2010 next:printc4$c4$"landekoordinaten:"
  219. 2020 printc4$"west / ost (1-20)";:inputhv:printc4$"sued / nord (1-40)";:inputhh
  220. 2030 ifhv<1orhv>20orhh<1orhh>40thengoto2020
  221. 2040 return
  222. 2050 printc2$left$(qr$,20);:inputn$(a):return
  223. 2060 printchr$(147);:sysat,15,5:print"h e r o s";
  224. 2070 sysat,8,8:print"drei gegen das inferno";:return
  225. 2080 gosub2170
  226. 2100 readc:ifc=-1thenreturn
  227. 2110 fora=0to7:readb:pokec*8+2048+a,b:next:goto2100
  228. 2140 sysre:data162,0,189,0,208,157,0,60,189,0
  229. 2150 data209,157,0,61,189,0,210,157,0,62
  230. 2160 data189,0,211,157,0,63,202,208,229,96
  231. 2170 sysre:data65,0,0,3,13,14,53,59,111
  232. 2180 data66,122,87,53,55,74,62,13,3
  233. 2190 data67,0,96,80,222,238,187,173,119
  234. 2200 data68,189,215,181,254,238,184,104,224
  235. 2210 data69,1,5,3,1,1,1,3,3
  236. 2220 data70,224,192,192,192,192,192,224,240
  237. 2230 data71,31,25,25,31,25,25,31,31
  238. 2240 data72,255,57,57,255,57,57,255,255
  239. 2250 data73,248,56,56,248,56,56,248,248
  240. 2260 data74,252,60,60,252,63,60,252,252
  241. 2270 data75,24,24,24,24,24,24,24,24
  242. 2280 data76,21,31,47,59,95,125,175,255
  243. 2290 data77,237,239,247,246,251,251,253,253
  244. 2300 data78,255,255,223,255,255,255,191,255
  245. 2310 data79,224,240,240,248,248,252,254,255
  246. 2320 data80,0,0,0,0,3,5,11,15
  247. 2330 data81,1,2,3,5,7,138,207,215
  248. 2340 data82,254,255,191,255,223,255,255,127
  249. 2350 data83,0,0,0,128,128,192,192,224
  250. 2360 data84,0,0,0,48,120,188,252,222
  251. 2370 data85,63,0,0,3,4,8,8,9
  252. 2380 data86,255,24,24,255,53,53,127,255
  253. 2390 data87,15,15,15,7,1,2,70,63
  254. 2400 data88,255,255,254,252,240,16,25,254
  255. 2410 data89,243,3,7,255,255,255,192,0
  256. 2420 data101,0,0,0,253,254,19,15,3
  257. 2430 data108,64,64,64,64,64,64,64,64
  258. 2440 data97,24,48,120,255,255,255,255,255
  259. 2450 data112,0,1,3,5,15,23,29,127
  260. 2460 data103,85,170,170,255,255,255,255,255
  261. 2470 data113,16,52,118,247,8,255,255,126
  262. 2480 data118,120,255,255,255,255,255,255,255
  263. 2490 data123,60,36,60,36,60,36,60,36
  264. 2500 data121,12,12,140,255,255,140,12,12
  265. 2510 data124,0,255,119,221,255,119,221,255
  266. 2520 data127,0,128,64,224,208,120,220,254
  267. 2530 data98,17,33,48,25,26,113,119,254
  268. 2540 data-1
  269. 2550 rem nachspann ===========
  270. 2560 rem farbcodes/steuercodes
  271. 2570 wh$=chr$(005):c4$=chr$(017)
  272. 2580 rn$=chr$(018):re$=chr$(028)
  273. 2590 c3$=chr$(029):gr$=chr$(030)
  274. 2600 bl$=chr$(031):fl$=chr$(130)
  275. 2610 fo$=chr$(132):bk$=chr$(144)
  276. 2620 c2$=chr$(145):rf$=chr$(146)
  277. 2630 br$=chr$(149):lr$=chr$(153)
  278. 2640 g2$=chr$(152):lg$=chr$(153)
  279. 2650 c1$=chr$(157):ye$=chr$(158)
  280. 2660 rem zeichensatz/graphik
  281. 2670 z0$=chr$(161):z1$=chr$(162)
  282. 2680 z4$=chr$(165):z6$=chr$(167)
  283. 2690 z8$=chr$(169):zf$=chr$(176)
  284. 2700 zg$=chr$(177):zl$=chr$(182)
  285. 2710 zq$=chr$(187):zr$=chr$(188)
  286. 2720 zu$=chr$(191):yq$=chr$(223)
  287. 2730 rem ***** zeichenfolgen
  288. 2740 for q=1 to 40
  289. 2750 qr$=qr$+c3$
  290. 2760 next q
  291. 2770 return
  292. 2780 rem =========================
  293. 2790 rem  p r o g r a m m e n d e
  294. 2800 rem =========================
  295.