home *** CD-ROM | disk | FTP | other *** search
/ 64'er 1991 May / 64er_Magazin_91-05_1991_Markt__Technik_de.d64 / pirates-knacker (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  9KB  |  244 lines

  1. 0 rem pirates v4
  2. 1 rem martin walter, clemensstr.50,                            8 mue 40
  3. 10 a$="":a=0:t$="":p=0:v$="":aw$="":i=0:j=0:c0$=chr$(0)
  4. 20 dimtw$(42):dima(12)
  5. 30 i=-1:xx=1:cr$=chr$(13):c0$=chr$(0):k$=":"
  6. 40 x$="----------------------------------------"
  7. 50 ye=1660
  8. 90 gosub3000
  9. 95 open1,8,15,"i":close1
  10. 100 poke53280,0:poke53281,0:print"[147][158]"
  11. 110 print"             pirates-knacker"
  12. 120 print"wollen sie ..."
  13. 130 print" 1[146]  nur die staedte"
  14. 140 print" 2[146]  alles bekannte"
  15. 150 print" 3[146]  alles"
  16. 160 print" 4[146]  directory lesen"
  17. 170 print" 5[146]  hall of fame"
  18. 180 print" 6[146]  ende"
  19. 190 input" eingabe: ";eg:eg=int(eg)
  20. 200 ifeg<1oreg>6thenprint"[145]        [145][145][145]":goto190
  21. 210 oneggoto220,220,220,2800,2900,3200
  22. 220 input"nummer des spielstandes (1-4) ";nr:nr=int(nr):ifnr=0thenend
  23. 230 ifnr<1ornr>4thenprint"[145]                      [145][145]":goto220
  24. 240 t$="savegame"+str$(nr)+",p,r"
  25. 250 poke768,61:open3,4:print#3:close3:poke768,139:ifst=-128thendx=1:goto300
  26. 260 input"ausdruck ";dr$:ifdr$<>"j"thendx=1
  27. 270 open3,4,9
  28. 300 open4,8,4,t$:close4:gosub2000:print"[147]":open4,8,4,t$
  29. 310 a=0:b=257:gosub2200
  30. 315 ifeg=3thenprint:ifdx=0thenprint#3,""
  31. 320 printx$;
  32. 400 fors=0to40
  33. 410 fori=1to12:get#4,a$:a(i)=asc(a$+c0$):next:t$=""
  34. 420 fori=1to12:get#4,a$:t$=t$+a$:next:tw$(s)=t$:t$=t$+":"
  35. 430 ifs>38thenifeg<3then570
  36. 440 getaw$:ifaw$<>""thengosub2100
  37. 450 ifeg=3thenfori=1to3:t$=t$+right$(" "+str$(a(i)),3)+k$:next
  38. 460 t$=t$+mid$(c2$,a(4)*2+1,2)+right$(str$(a(5)),1)+k$
  39. 470 t$=t$+right$(" "+str$(a(6)*10),3)+k$+right$(" "+str$(a(7)*100+100),4)+k$
  40. 480 t$=t$+right$("    "+str$(a(8)*1000),6)+k$+right$(" "+str$(a(9)),3)+" ("
  41. 490 a=a(9):l$="struggl.":ifa>63thenl$="survivg."
  42. 500 ifa>127thenl$="prosper.":ifa>191thenl$="wealthy "
  43. 505 t$=t$+l$+"):"
  44. 510 ifeg=3thent$=t$+right$(" "+str$(a(10)),3)+k$+right$(" "+str$(a(11)),3)+k$
  45. 520 a=a(12):a$="":ifa>63thena$="v":ifa>127thena$="i"
  46. 530 t$=t$+right$(" "+a$+right$(str$(aand15),2),3)+k$
  47. 550 printt$;cr$;x$;
  48. 560 ifdx=0thenprint#3,t$
  49. 570 nexts:ifeg=1then1770
  50. 580 ifeg=3thenprint:ifdx=0thenprint#3,""
  51. 600 a=1242:b=1281:gosub2200
  52. 605 print:ifdx=0thenprint#3,""
  53. 610 get#4,a$:j=asc(a$+c0$)
  54. 620 fori=1toj:gosub2500:tx$=""
  55. 630 ifc>13thenc=c-13:goto650
  56. 640 oncgoto700,710,740,750,790,800,995,810,820,850,860,870,880
  57. 650 oncgoto890,900,910,920,930,940,950,960,995,995,970,980,990
  58. 700 : tx$="   visited "+tw$(d):goto1000
  59. 710 : tx$="   titled as a ":x1=dand240:x2=dand15
  60. 720 y=1:ifx1>63theny=8:ifx1>127theny=15:ifx1>191theny=22
  61. 730 tx$=tx$+mid$(c3$,y,7)+" "+mid$(rg$,x2*7+1,7):goto1000
  62. 740 : tx$="   plundered "+tw$(d):goto1000
  63. 750 : tx$="   captured a "
  64. 760 x1=dand112:x2=dand15
  65. 770 y=1:ifx1>15theny=8:ifx1>31theny=15:ifx1>47theny=22:ifx1>63theny=29
  66. 780 tx$=tx$+mid$(c3$,y,7)+" "+mid$(ts$,x2*12+1,12):goto1000
  67. 790 : tx$="   sunk a ":goto760
  68. 800 : tx$="   engaged a ":goto760
  69. 810 : tx$="   found buried treasure":goto1000
  70. 820 : x=dand192:tx$="colonel alvarado":ifx=64thentx$="captain de loyola"
  71. 830 ifx>127thentx$="count sanchez":ifx=192thentx$="major de loyola"
  72. 840 x=dand63:tx$="   "+tx$+" in "+tw$(x):goto1000
  73. 850 : tx$="   "+mid$(c1$,d*7+1,7)+" offers pirate amnesty":goto1000
  74. 860 : tx$="   * indians attack "+tw$(d):goto1000
  75. 870 : tx$="   * new gold mine at "+tw$(d):goto1000
  76. 880 : tx$="   * malaria strikes "+tw$(d):goto1000
  77. 890 : tx$="   * new governor in "+tw$(d):goto1000
  78. 900 : tx$="   * pirates plunder "+tw$(d):goto1000
  79. 910 : ty$=" at war with ":gosub2600:goto 1000
  80. 920 : ty$=" makes peace with ":gosub2600:goto1000
  81. 930 : ty$=" allies with ":gosub2600:goto1000
  82. 940 : tx$="   land captures "+tw$(dand63)+" ("+str$(d)+")":goto1000
  83. 950 : tx$="   treasure fleet in "+tw$(d):goto1000
  84. 960 : tx$="   silver train in "+tw$(d):goto1000
  85. 970 : tx$="   captured the treasure fleet":goto1000
  86. 980 : tx$="   captured the silver train":goto1000
  87. 990 : tx$="   found my lost "+mid$(fm$,d*6+1,6):goto1000
  88. 995 : tx$="     "+str$(c)+str$(d)
  89. 1000 tx$=dt$+tx$:printtx$:ifdx=0thenprint#3,tx$
  90. 1010 getaw$:ifaw$<>""thengosub2100
  91. 1020 next
  92. 1030 get#4,a$,b$,c$,d$:ifa$+b$+c$+d$<>""then1030
  93. 1040 get#4,a$,b$,c$,d$:ifa$+b$+c$+d$=""then1040
  94. 1100 ifeg<>3then1110
  95. 1105 t$=cr$+"byte 1535:"+str$(asc(a$+c0$)):printt$:ifdx=0thenprint#3,t$
  96. 1110 a(1)=asc(b$+c0$):a(2)=asc(c$+c0$)
  97. 1120 tx$=cr$+"silver train in   ":ifa(1)=255thentx$=tx$+"peru":goto1140
  98. 1130 tx$=tx$+tw$(a(1))
  99. 1140 tx$=tx$+cr$+"treasure fleet in "
  100. 1145 ifa(2)=255thentx$=tx$+"spain"+cr$:goto1160
  101. 1150 tx$=tx$+tw$(a(2))+cr$
  102. 1160 gosub2700:getaw$:ifaw$<>""thengosub 2100
  103. 1162 ifeg<>3then1170
  104. 1165 t$="byte 1538:"+str$(asc(d$+c0$)):printt$:ifdx=0thenprint#3,t$
  105. 1170 a=1539:b=1539:gosub2200
  106. 1175 ifeg=3thenprint:ifdx=0thenprint#3,""
  107. 1180 get#4,a$,b$:a=asc(a$+c0$):b=asc(b$+c0$)
  108. 1190 tx$="vermoegen  :"+str$((a+b*256)*10)+" goldstuecke"+cr$
  109. 1200 get#4,a$,b$,c$,d$:tx$=tx$+"reputation :"+str$(asc(a$+c0$))+cr$
  110. 1210 tx$=tx$+"grundbesitz:"+str$(50*asc(b$+c0$))+" morgen"+cr$:gosub2700
  111. 1220 getaw$:ifaw$<>""thengosub2100
  112. 1230 tx$="gerettete verwandte:"+str$(asc(c$+c0$))+cr$+cr$
  113. 1240 fori=1to4:get#4,a$:a=asc(a$+c0$):a(i)=a
  114. 1250 an$="no title":ifa>1thenan$="letter of marque"
  115. 1260 ifa>127thenan$="hostile":ifa>252thenan$="wary"
  116. 1270 a$(i)="  "+an$:next
  117. 1280 tx$=tx$+"stimmung der crew:"+str$(asc(d$+c0$))+cr$+cr$
  118. 1290 tx$=tx$+"ansehen:"+cr$:bd$="   bei den "
  119. 1300 tx$=tx$+bd$+"spaniern   : "+right$(" "+str$(a(1)),3)+a$(1)+cr$
  120. 1310 tx$=tx$+bd$+"englaendern: "+right$(" "+str$(a(2)),3)+a$(2)+cr$
  121. 1320 tx$=tx$+bd$+"franzosen  : "+right$(" "+str$(a(3)),3)+a$(3)+cr$
  122. 1330 tx$=tx$+bd$+"hollaendern: "+right$(" "+str$(a(4)),3)+a$(4)+cr$
  123. 1340 gosub2700:getaw$:ifaw$<>""thengosub 2100
  124. 1350 get#4,x$:tx$="dienstgrade:"+cr$
  125. 1360 forj=0to3
  126. 1370 get#4,a$:a=asc(a$+c0$):ifa=0then1390
  127. 1380 tx$=tx$+"   "+mid$(c3$,j*7+1,7)+" "+mid$(rg$,a*7+1,7)+cr$
  128. 1390 next:gosub2700
  129. 1395 ifeg=3thent$="byte 1550:"+str$(asc(a$+c0$)):printt$:ifdx=0thenprint#3,t$
  130. 1400 a=1555:b=1557:gosub2200
  131. 1410 get#4,a$:a=asc(a$+c0$)
  132. 1420 tx$="familienstand : ":ifa=0thentx$=tx$+"ledig":goto1440
  133. 1430 tx$=tx$+"verheiratet ("+str$(a)+")"
  134. 1440 a=1559:b=1560:gosub2200
  135. 1450 get#4,a$,b$:a=asc(a$+c0$)-1
  136. 1460 tx$=tx$+cr$+cr$+"special ability    : "+mid$(sk$,a*19+1,19)+cr$
  137. 1470 tx$=tx$+"schwierigkeitsstufe: "+mid$(ss$,asc(b$+c0$)*12+1,12)
  138. 1480 a=1563:b=1572:gosub2200:tx$=tx$+cr$+cr$
  139. 1485 ifeg=3thenprint:ifdx=0thenprint#3,""
  140. 1490 getaw$:ifaw$<>""thengosub2100
  141. 1500 get#4,a$,b$,c$
  142. 1510 tx$=tx$+"mannschaft:"+str$(asc(a$+c0$)+asc(b$+c0$)*256)+" mann "+cr$
  143. 1520 tx$=tx$+"kanonen   :"+str$(asc(c$+c0$)):gosub2700
  144. 1530 get#4,a$,b$,c$:a=asc(a$+c0$)
  145. 1540 tx$=cr$+"nationalitaet: "+mid$(sj$,a*17+1,17)+cr$+cr$
  146. 1550 tx$=tx$+"beute:"+str$((asc(b$+c0$)+asc(c$+c0$)*256)*10)+" golstuecke"
  147. 1560 gosub2700:getaw$:ifaw$<>""thengosub2100
  148. 1570 get#4,a$,b$,c$
  149. 1580 tx$="food : "+right$(" "+str$(asc(a$+c0$)),3)+" tonnen"+cr$
  150. 1590 tx$=tx$+"goods: "+right$(" "+str$(asc(b$+c0$)),3)+" tonnen"+cr$
  151. 1600 tx$=tx$+"sugar: "+right$(" "+str$(asc(c$+c0$)),3)+" tonnen":gosub2700
  152. 1605 ifeg=3thenprint:ifdx=0thenprint#3,""
  153. 1610 a=1582:b=1583:gosub2200
  154. 1620 get#4,a$,b$:tx$="laderaum insg. :"+str$(asc(a$+c0$)*10)+" tonnen"+cr$+cr$
  155. 1630 y=asc(b$+c0$):tx$=tx$+"anzahl schiffe :"+str$(y)+cr$
  156. 1640 a=1586:b=1589:gosub2200
  157. 1645 ifeg=3thenprint:ifdx=0thenprint#3,""
  158. 1650 fori=1toy:get#4,a$:a=asc(a$+c0$):l$=""
  159. 1660 tx$=tx$+"  "+mid$(ts$,(aand7)*12+1,12):ifa<8then1700
  160. 1670 a=aand248:ifa>7thenl$="sail damage":ifa>15thenl$="lost a mast"
  161. 1680 ifa=32thenl$="hull leaking"
  162. 1690 l$=" ("+l$+")"
  163. 1700 tx$=tx$+l$+cr$:next:gosub2700
  164. 1710 a=1590+y:b=1617:gosub2200
  165. 1720 getaw$:ifaw$<>""thengosub2100
  166. 1730 na$=""
  167. 1740 fori=1to10:get#4,a$:na$=na$+a$:next
  168. 1750 tx$=cr$+"name: "+na$+cr$+"savegame"+str$(nr):gosub2700
  169. 1755 ifeg=3thenprint:ifdx=0thenprint#3,""
  170. 1760 a=1627:b=1792:gosub2200
  171. 1770 poke198,0:gosub2100
  172. 1780 close3:close4:run
  173. 2000 open1,8,15:input#1,a,b$:close1:ifa=0thenreturn
  174. 2010 print"[147]fehler: ";a,b$:end
  175. 2100 getaw$:ifaw$=""then2100
  176. 2110 ifaw$="m"then1780
  177. 2120 ifaw$="d"thenifdx=1thendx=0:goto2100
  178. 2130 ifaw$="d"thenifdx=0thendx=1:goto2100
  179. 2140 ifaw$="n"thenpoke198,1:poke631,8
  180. 2150 return
  181. 2200 ifeg=3thengoto2300
  182. 2210 forp=atob:get#4,a$:next:return
  183. 2300 xx=1:lb=256:forp=atob:get#4,a$:a$=a$+c0$:x=asc(a$)
  184. 2310 ifx=lbthenxx=xx+1:goto2420
  185. 2320 getaw$:ifaw$<>""thengosub2100
  186. 2340 lb=x:t$="byte"+str$(p)+":"+str$(x)
  187. 2350 t$=left$(t$+"          ",17)
  188. 2355 ifx>32andx<91thent$=t$+"("+chr$(x)+")"
  189. 2357 t$=left$(t$+"          ",23):ifa=pthen2400
  190. 2360 ifxx=1thenv$="":goto2380
  191. 2370 v$="(*"+mid$(str$(xx),2,3)+")"
  192. 2380 printv$;:ifdx=0thenprint#3,v$;
  193. 2390 print:ifdx=0thenprint#3,""
  194. 2400 printt$;:ifdx=0thenprint#3,t$;
  195. 2410 xx=1
  196. 2420 next:ifxx=1then2440
  197. 2425 v$="(*"+mid$(str$(xx),2,3)+")"
  198. 2430 printv$;:ifdx=0thenprint#3,v$;
  199. 2440 print"":ifdx=0thenprint#3,""
  200. 2450 return
  201. 2500 get#4,a$:a=asc(a$+c0$)
  202. 2510 get#4,a$:b=asc(a$+c0$)
  203. 2520 get#4,a$:c=asc(a$+c0$)
  204. 2530 get#4,a$:d=asc(a$+c0$)
  205. 2540 tx=a+b*256:ja=int(tx/360):ta=tx-ja*360:mo=int(ta/30):ta=ta-mo*30+1
  206. 2550 dt$=right$(str$(ta),2)+"."+mid$(mx$,mo*3+1,3)+str$(ja+ye):return
  207. 2600 x1=dand3:x2=dand12
  208. 2610 y=1:ifx1>0theny=8:ifx1>1theny=15:ifx1>2theny=22
  209. 2620 z=1:ifx2>3thenz=8:ifx2>7thenz=15:ifx2>11thenz=22
  210. 2630 tx$="   "+mid$(c1$,y,7)+ty$+mid$(c1$,z,7):return
  211. 2700 printtx$:ifdx=0thenprint#3,tx$
  212. 2710 return
  213. 2800 open1,8,0,"$":get#1,a$,a$:print"[147]"
  214. 2810 get#1,a$,a$:ifst=64thenclose1:goto1770
  215. 2820 getaw$:ifaw$<>""thengosub2100
  216. 2830 get#1,a$,b$:printasc(a$+c0$)+256*asc(b$+c0$);
  217. 2840 get#1,a$:printa$;:ifa$<>""then2840
  218. 2850 print:goto2810
  219. 2900 open4,8,4,"fame,s,r":close4:gosub2000
  220. 2910 open4,8,4,"fame,s,r":print"[147]          hall of fame"
  221. 2920 get#4,a$:a=asc(a$+c0$):ifa$=""thena$=chr$(0)
  222. 2930 ifst<>0then2990
  223. 2940 ifa<>13thenprinta$;:goto2920
  224. 2950 ift=0thent=12:goto2980
  225. 2960 ift=12thent=35:goto2980
  226. 2970 ift=35thent=0:print
  227. 2980 printtab(t);:goto2920
  228. 2990 close4:gosub2100:run
  229. 3000 mx$="janfebmaraprmayjunjulaugsepoctnovdec"
  230. 3010 rg$="       ensign captainmajor  coloneladmiralbaron  count  marquis"
  231. 3020 rg$=rg$+"duke   "
  232. 3030 ts$="pinnace     sloop       barque      cargo fluyt merchantman "
  233. 3040 ts$=ts$+"frigate     war galleon galleon     fast galleon"
  234. 3050 c1$="spain  englandfrance holland"
  235. 3060 c2$="s:e:f:d:"
  236. 3070 c3$="spanishenglishfrench dutch  pirate"
  237. 3080 fm$="sisterfathermotheruncle"
  238. 3090 ss$="apprentice  journeyman  adventurer  swashbuckler"
  239. 3100 sk$="skill at fencing   skill at navigationskill at gunnery   "
  240. 3110 sk$=sk$+"wit and charm      skill at medicine"
  241. 3120 sj$="spanish renegade english buccaneerfrench buccaneer dutch adventurer "
  242. 3130 return
  243. 3200 end
  244.