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 >
Wrap
Commodore BASIC
|
2022-10-26
|
9KB
|
244 lines
0 rem pirates v4
1 rem martin walter, clemensstr.50, 8 mue 40
10 a$="":a=0:t$="":p=0:v$="":aw$="":i=0:j=0:c0$=chr$(0)
20 dimtw$(42):dima(12)
30 i=-1:xx=1:cr$=chr$(13):c0$=chr$(0):k$=":"
40 x$="----------------------------------------"
50 ye=1660
90 gosub3000
95 open1,8,15,"i":close1
100 poke53280,0:poke53281,0:print"[147][158]"
110 print" pirates-knacker"
120 print"wollen sie ..."
130 print" 1[146] nur die staedte"
140 print" 2[146] alles bekannte"
150 print" 3[146] alles"
160 print" 4[146] directory lesen"
170 print" 5[146] hall of fame"
180 print" 6[146] ende"
190 input" eingabe: ";eg:eg=int(eg)
200 ifeg<1oreg>6thenprint"[145] [145][145][145]":goto190
210 oneggoto220,220,220,2800,2900,3200
220 input"nummer des spielstandes (1-4) ";nr:nr=int(nr):ifnr=0thenend
230 ifnr<1ornr>4thenprint"[145] [145][145]":goto220
240 t$="savegame"+str$(nr)+",p,r"
250 poke768,61:open3,4:print#3:close3:poke768,139:ifst=-128thendx=1:goto300
260 input"ausdruck ";dr$:ifdr$<>"j"thendx=1
270 open3,4,9
300 open4,8,4,t$:close4:gosub2000:print"[147]":open4,8,4,t$
310 a=0:b=257:gosub2200
315 ifeg=3thenprint:ifdx=0thenprint#3,""
320 printx$;
400 fors=0to40
410 fori=1to12:get#4,a$:a(i)=asc(a$+c0$):next:t$=""
420 fori=1to12:get#4,a$:t$=t$+a$:next:tw$(s)=t$:t$=t$+":"
430 ifs>38thenifeg<3then570
440 getaw$:ifaw$<>""thengosub2100
450 ifeg=3thenfori=1to3:t$=t$+right$(" "+str$(a(i)),3)+k$:next
460 t$=t$+mid$(c2$,a(4)*2+1,2)+right$(str$(a(5)),1)+k$
470 t$=t$+right$(" "+str$(a(6)*10),3)+k$+right$(" "+str$(a(7)*100+100),4)+k$
480 t$=t$+right$(" "+str$(a(8)*1000),6)+k$+right$(" "+str$(a(9)),3)+" ("
490 a=a(9):l$="struggl.":ifa>63thenl$="survivg."
500 ifa>127thenl$="prosper.":ifa>191thenl$="wealthy "
505 t$=t$+l$+"):"
510 ifeg=3thent$=t$+right$(" "+str$(a(10)),3)+k$+right$(" "+str$(a(11)),3)+k$
520 a=a(12):a$="":ifa>63thena$="v":ifa>127thena$="i"
530 t$=t$+right$(" "+a$+right$(str$(aand15),2),3)+k$
550 printt$;cr$;x$;
560 ifdx=0thenprint#3,t$
570 nexts:ifeg=1then1770
580 ifeg=3thenprint:ifdx=0thenprint#3,""
600 a=1242:b=1281:gosub2200
605 print:ifdx=0thenprint#3,""
610 get#4,a$:j=asc(a$+c0$)
620 fori=1toj:gosub2500:tx$=""
630 ifc>13thenc=c-13:goto650
640 oncgoto700,710,740,750,790,800,995,810,820,850,860,870,880
650 oncgoto890,900,910,920,930,940,950,960,995,995,970,980,990
700 : tx$=" visited "+tw$(d):goto1000
710 : tx$=" titled as a ":x1=dand240:x2=dand15
720 y=1:ifx1>63theny=8:ifx1>127theny=15:ifx1>191theny=22
730 tx$=tx$+mid$(c3$,y,7)+" "+mid$(rg$,x2*7+1,7):goto1000
740 : tx$=" plundered "+tw$(d):goto1000
750 : tx$=" captured a "
760 x1=dand112:x2=dand15
770 y=1:ifx1>15theny=8:ifx1>31theny=15:ifx1>47theny=22:ifx1>63theny=29
780 tx$=tx$+mid$(c3$,y,7)+" "+mid$(ts$,x2*12+1,12):goto1000
790 : tx$=" sunk a ":goto760
800 : tx$=" engaged a ":goto760
810 : tx$=" found buried treasure":goto1000
820 : x=dand192:tx$="colonel alvarado":ifx=64thentx$="captain de loyola"
830 ifx>127thentx$="count sanchez":ifx=192thentx$="major de loyola"
840 x=dand63:tx$=" "+tx$+" in "+tw$(x):goto1000
850 : tx$=" "+mid$(c1$,d*7+1,7)+" offers pirate amnesty":goto1000
860 : tx$=" * indians attack "+tw$(d):goto1000
870 : tx$=" * new gold mine at "+tw$(d):goto1000
880 : tx$=" * malaria strikes "+tw$(d):goto1000
890 : tx$=" * new governor in "+tw$(d):goto1000
900 : tx$=" * pirates plunder "+tw$(d):goto1000
910 : ty$=" at war with ":gosub2600:goto 1000
920 : ty$=" makes peace with ":gosub2600:goto1000
930 : ty$=" allies with ":gosub2600:goto1000
940 : tx$=" land captures "+tw$(dand63)+" ("+str$(d)+")":goto1000
950 : tx$=" treasure fleet in "+tw$(d):goto1000
960 : tx$=" silver train in "+tw$(d):goto1000
970 : tx$=" captured the treasure fleet":goto1000
980 : tx$=" captured the silver train":goto1000
990 : tx$=" found my lost "+mid$(fm$,d*6+1,6):goto1000
995 : tx$=" "+str$(c)+str$(d)
1000 tx$=dt$+tx$:printtx$:ifdx=0thenprint#3,tx$
1010 getaw$:ifaw$<>""thengosub2100
1020 next
1030 get#4,a$,b$,c$,d$:ifa$+b$+c$+d$<>""then1030
1040 get#4,a$,b$,c$,d$:ifa$+b$+c$+d$=""then1040
1100 ifeg<>3then1110
1105 t$=cr$+"byte 1535:"+str$(asc(a$+c0$)):printt$:ifdx=0thenprint#3,t$
1110 a(1)=asc(b$+c0$):a(2)=asc(c$+c0$)
1120 tx$=cr$+"silver train in ":ifa(1)=255thentx$=tx$+"peru":goto1140
1130 tx$=tx$+tw$(a(1))
1140 tx$=tx$+cr$+"treasure fleet in "
1145 ifa(2)=255thentx$=tx$+"spain"+cr$:goto1160
1150 tx$=tx$+tw$(a(2))+cr$
1160 gosub2700:getaw$:ifaw$<>""thengosub 2100
1162 ifeg<>3then1170
1165 t$="byte 1538:"+str$(asc(d$+c0$)):printt$:ifdx=0thenprint#3,t$
1170 a=1539:b=1539:gosub2200
1175 ifeg=3thenprint:ifdx=0thenprint#3,""
1180 get#4,a$,b$:a=asc(a$+c0$):b=asc(b$+c0$)
1190 tx$="vermoegen :"+str$((a+b*256)*10)+" goldstuecke"+cr$
1200 get#4,a$,b$,c$,d$:tx$=tx$+"reputation :"+str$(asc(a$+c0$))+cr$
1210 tx$=tx$+"grundbesitz:"+str$(50*asc(b$+c0$))+" morgen"+cr$:gosub2700
1220 getaw$:ifaw$<>""thengosub2100
1230 tx$="gerettete verwandte:"+str$(asc(c$+c0$))+cr$+cr$
1240 fori=1to4:get#4,a$:a=asc(a$+c0$):a(i)=a
1250 an$="no title":ifa>1thenan$="letter of marque"
1260 ifa>127thenan$="hostile":ifa>252thenan$="wary"
1270 a$(i)=" "+an$:next
1280 tx$=tx$+"stimmung der crew:"+str$(asc(d$+c0$))+cr$+cr$
1290 tx$=tx$+"ansehen:"+cr$:bd$=" bei den "
1300 tx$=tx$+bd$+"spaniern : "+right$(" "+str$(a(1)),3)+a$(1)+cr$
1310 tx$=tx$+bd$+"englaendern: "+right$(" "+str$(a(2)),3)+a$(2)+cr$
1320 tx$=tx$+bd$+"franzosen : "+right$(" "+str$(a(3)),3)+a$(3)+cr$
1330 tx$=tx$+bd$+"hollaendern: "+right$(" "+str$(a(4)),3)+a$(4)+cr$
1340 gosub2700:getaw$:ifaw$<>""thengosub 2100
1350 get#4,x$:tx$="dienstgrade:"+cr$
1360 forj=0to3
1370 get#4,a$:a=asc(a$+c0$):ifa=0then1390
1380 tx$=tx$+" "+mid$(c3$,j*7+1,7)+" "+mid$(rg$,a*7+1,7)+cr$
1390 next:gosub2700
1395 ifeg=3thent$="byte 1550:"+str$(asc(a$+c0$)):printt$:ifdx=0thenprint#3,t$
1400 a=1555:b=1557:gosub2200
1410 get#4,a$:a=asc(a$+c0$)
1420 tx$="familienstand : ":ifa=0thentx$=tx$+"ledig":goto1440
1430 tx$=tx$+"verheiratet ("+str$(a)+")"
1440 a=1559:b=1560:gosub2200
1450 get#4,a$,b$:a=asc(a$+c0$)-1
1460 tx$=tx$+cr$+cr$+"special ability : "+mid$(sk$,a*19+1,19)+cr$
1470 tx$=tx$+"schwierigkeitsstufe: "+mid$(ss$,asc(b$+c0$)*12+1,12)
1480 a=1563:b=1572:gosub2200:tx$=tx$+cr$+cr$
1485 ifeg=3thenprint:ifdx=0thenprint#3,""
1490 getaw$:ifaw$<>""thengosub2100
1500 get#4,a$,b$,c$
1510 tx$=tx$+"mannschaft:"+str$(asc(a$+c0$)+asc(b$+c0$)*256)+" mann "+cr$
1520 tx$=tx$+"kanonen :"+str$(asc(c$+c0$)):gosub2700
1530 get#4,a$,b$,c$:a=asc(a$+c0$)
1540 tx$=cr$+"nationalitaet: "+mid$(sj$,a*17+1,17)+cr$+cr$
1550 tx$=tx$+"beute:"+str$((asc(b$+c0$)+asc(c$+c0$)*256)*10)+" golstuecke"
1560 gosub2700:getaw$:ifaw$<>""thengosub2100
1570 get#4,a$,b$,c$
1580 tx$="food : "+right$(" "+str$(asc(a$+c0$)),3)+" tonnen"+cr$
1590 tx$=tx$+"goods: "+right$(" "+str$(asc(b$+c0$)),3)+" tonnen"+cr$
1600 tx$=tx$+"sugar: "+right$(" "+str$(asc(c$+c0$)),3)+" tonnen":gosub2700
1605 ifeg=3thenprint:ifdx=0thenprint#3,""
1610 a=1582:b=1583:gosub2200
1620 get#4,a$,b$:tx$="laderaum insg. :"+str$(asc(a$+c0$)*10)+" tonnen"+cr$+cr$
1630 y=asc(b$+c0$):tx$=tx$+"anzahl schiffe :"+str$(y)+cr$
1640 a=1586:b=1589:gosub2200
1645 ifeg=3thenprint:ifdx=0thenprint#3,""
1650 fori=1toy:get#4,a$:a=asc(a$+c0$):l$=""
1660 tx$=tx$+" "+mid$(ts$,(aand7)*12+1,12):ifa<8then1700
1670 a=aand248:ifa>7thenl$="sail damage":ifa>15thenl$="lost a mast"
1680 ifa=32thenl$="hull leaking"
1690 l$=" ("+l$+")"
1700 tx$=tx$+l$+cr$:next:gosub2700
1710 a=1590+y:b=1617:gosub2200
1720 getaw$:ifaw$<>""thengosub2100
1730 na$=""
1740 fori=1to10:get#4,a$:na$=na$+a$:next
1750 tx$=cr$+"name: "+na$+cr$+"savegame"+str$(nr):gosub2700
1755 ifeg=3thenprint:ifdx=0thenprint#3,""
1760 a=1627:b=1792:gosub2200
1770 poke198,0:gosub2100
1780 close3:close4:run
2000 open1,8,15:input#1,a,b$:close1:ifa=0thenreturn
2010 print"[147]fehler: ";a,b$:end
2100 getaw$:ifaw$=""then2100
2110 ifaw$="m"then1780
2120 ifaw$="d"thenifdx=1thendx=0:goto2100
2130 ifaw$="d"thenifdx=0thendx=1:goto2100
2140 ifaw$="n"thenpoke198,1:poke631,8
2150 return
2200 ifeg=3thengoto2300
2210 forp=atob:get#4,a$:next:return
2300 xx=1:lb=256:forp=atob:get#4,a$:a$=a$+c0$:x=asc(a$)
2310 ifx=lbthenxx=xx+1:goto2420
2320 getaw$:ifaw$<>""thengosub2100
2340 lb=x:t$="byte"+str$(p)+":"+str$(x)
2350 t$=left$(t$+" ",17)
2355 ifx>32andx<91thent$=t$+"("+chr$(x)+")"
2357 t$=left$(t$+" ",23):ifa=pthen2400
2360 ifxx=1thenv$="":goto2380
2370 v$="(*"+mid$(str$(xx),2,3)+")"
2380 printv$;:ifdx=0thenprint#3,v$;
2390 print:ifdx=0thenprint#3,""
2400 printt$;:ifdx=0thenprint#3,t$;
2410 xx=1
2420 next:ifxx=1then2440
2425 v$="(*"+mid$(str$(xx),2,3)+")"
2430 printv$;:ifdx=0thenprint#3,v$;
2440 print"":ifdx=0thenprint#3,""
2450 return
2500 get#4,a$:a=asc(a$+c0$)
2510 get#4,a$:b=asc(a$+c0$)
2520 get#4,a$:c=asc(a$+c0$)
2530 get#4,a$:d=asc(a$+c0$)
2540 tx=a+b*256:ja=int(tx/360):ta=tx-ja*360:mo=int(ta/30):ta=ta-mo*30+1
2550 dt$=right$(str$(ta),2)+"."+mid$(mx$,mo*3+1,3)+str$(ja+ye):return
2600 x1=dand3:x2=dand12
2610 y=1:ifx1>0theny=8:ifx1>1theny=15:ifx1>2theny=22
2620 z=1:ifx2>3thenz=8:ifx2>7thenz=15:ifx2>11thenz=22
2630 tx$=" "+mid$(c1$,y,7)+ty$+mid$(c1$,z,7):return
2700 printtx$:ifdx=0thenprint#3,tx$
2710 return
2800 open1,8,0,"$":get#1,a$,a$:print"[147]"
2810 get#1,a$,a$:ifst=64thenclose1:goto1770
2820 getaw$:ifaw$<>""thengosub2100
2830 get#1,a$,b$:printasc(a$+c0$)+256*asc(b$+c0$);
2840 get#1,a$:printa$;:ifa$<>""then2840
2850 print:goto2810
2900 open4,8,4,"fame,s,r":close4:gosub2000
2910 open4,8,4,"fame,s,r":print"[147] hall of fame"
2920 get#4,a$:a=asc(a$+c0$):ifa$=""thena$=chr$(0)
2930 ifst<>0then2990
2940 ifa<>13thenprinta$;:goto2920
2950 ift=0thent=12:goto2980
2960 ift=12thent=35:goto2980
2970 ift=35thent=0:print
2980 printtab(t);:goto2920
2990 close4:gosub2100:run
3000 mx$="janfebmaraprmayjunjulaugsepoctnovdec"
3010 rg$=" ensign captainmajor coloneladmiralbaron count marquis"
3020 rg$=rg$+"duke "
3030 ts$="pinnace sloop barque cargo fluyt merchantman "
3040 ts$=ts$+"frigate war galleon galleon fast galleon"
3050 c1$="spain englandfrance holland"
3060 c2$="s:e:f:d:"
3070 c3$="spanishenglishfrench dutch pirate"
3080 fm$="sisterfathermotheruncle"
3090 ss$="apprentice journeyman adventurer swashbuckler"
3100 sk$="skill at fencing skill at navigationskill at gunnery "
3110 sk$=sk$+"wit and charm skill at medicine"
3120 sj$="spanish renegade english buccaneerfrench buccaneer dutch adventurer "
3130 return
3200 end