8-Bit Software Online Conversion

Trading Simulation - Listing

10ONERRORRUN 20*K.10PA.=&1900|MO.|MRUN|M 30DEFFNS="TRADE" 40MODE7:VDU23;8202;0;0;0;0; 50DIMO$(2,20),P%(20,1),G$(20),G%(5,20 ),E$(20),E%(5,20) 60PRINT'':PROCc(" Seafarer. V2",1):PR INT':PROCc(" By C.J.Richardson.",1):PRIN T':PROCc(" Instructions? Y/N",1):PROCm:R EPEAT:A$=GET$:UNTIL A$="Y"ORA$="N":IFA$= "Y"PROCi 70ONERROR:IFERR=17:PROCq ELSE IFERR=2 0:CLS:PROCc(" You broke the bank! Start again.",1):PROCw:PROCq ELSE REPORT:PRINT ERL:END 80REPEAT:PROCt:CLS 90IFZ%=1PROCf 100IFZ%=2PROCk 110IFZ%=3PROCl 120IFZ%=4PROCe 130IFZ%=5PROCs:U%=U%+1 140IFZ%=6F%=OPENOUT"TRADATA":FORL%=0TO 20:PRINT#F%,E%(2,L%),G%(0,L%),G%(2,L%),G %(3,L%),G%(4,L%),G%(5,L%):NEXT:PRINT#F%, N%,M%,U%,V%:CLOSE#F% 150IF Z%=7 F%=OPENIN"TRADATA":FORL%=0T O20:INPUT#F%,E%(2,L%),G%(0,L%),G%(2,L%), G%(3,L%),G%(4,L%),G%(5,L%):NEXT:INPUT#F% ,N%,M%,U%,V%:CLOSE#F% 160UNTILE%(2,0)<1000 AND G%(2,0)-E%(2, 1)<1:M%=0 170PROCq:END 180DEFPROCq 190S%=0:FORL%=1TO20:S%=S%+G%(2,L%)*G%( 0,L%):NEXT 200CLS:PRINT''':IFM%=0 PROCc(" You wen t bankrupt. TERRIBLE!",1) 210PROCc(" You made £"+STR$E%(2,0)+" i n "+STR$U%+" turns",1) 220PROCc(" Your cargo value £"+STR$S%, 1) 230IF U%<>0:PROCc(" You scored "+STR$I NT((S%+E%(2,0))/U%),1) 240PROCc(" Press A to play again.",1): PROCc(" Press C to claim reward",1):PROC c(" Press E to END.",1):PROCc(" Any othe r key to continue",1):A$=GET$:IFA$="A"OR M%=0:RUN 250IFA$="C":IFE%(2,14)=1:IFG%(2,0)=M%: IFE%(2,0)>600000 PROCc(" You earned the reward!",1):PROCo ELSE IFA$="C"PROCc(" Y ou haven't made enough yet!",1):PROCc(" Is your hold full?",1):PROCw 260IF A$="E"END 270ENDPROC 280DEFPROCs 290CLS:PROCc(" Sail from "+O$(0,N%)+". Fuel:",1) 300FORL%=1TO20:PRINTTAB(3);" ";O$(0,L% );TAB(17);" ";O$(1,L%);TAB(30);" ";(ABS( P%(N%,0)-P%(L%,0))+ABS(P%(N%,1)-P%(L%,1) ))*V%:NEXT:PROCh 310K%=(ABS(P%(N%,0)-P%(A%,0))+ABS(P%(N %,1)-P%(A%,1)))*V% 320CLS:PRINT''':PROCc(" You need: "+ST R$K%+" fuel/service units.",1):IF E%(2,1 )<K% PROCg(" And you only have: "+STR$E% (2,1)+"!"):ENDPROC 330IFK%=0:CLS:PROCg(" You are already there!"):ENDPROC 340PROCc(" You are on your way!",1):PR OCw 350E%(2,1)=E%(2,1)-K%:G%(2,0)=G%(2,0)- K% 360J%=RND(20):IF J%=1PROCj("Damage due to collision") 370IFJ%=2PROCj("Damage due to storm") 380IFJ%=3 OR J%=4:FORL%=1TO20:IFG%(2,L %)>0 F%=G%(2,L%)/10:G%(2,L%)=G%(2,L%)-F% :G%(2,0)=G%(2,0)-F%:NEXT ELSE IF J%=3 OR J%=4 NEXT 390IFJ%=3PROCj("Loss of goods by theft ") 400IFJ%=4PROCj("Goods washed overboard ") 410N%=A% 420PROCp 430ENDPROC 440DEFPROCj(A$):CLS:PROCc(" "+A$,1) 450IFJ%=1A$="Charged £20000 for repair s!":E%(2,0)=E%(2,0)-20000 460IFJ%=2A$="Charged £10000 for repair s!":E%(2,0)=E%(2,0)-10000 470IFJ%=3A$="Charged £1000 extra insur ance!":E%(2,0)=E%(2,0)-1000 480IFJ%=4A$="Charged £2000 extra insur ance!":E%(2,0)=E%(2,0)-2000 490PROCc(" "+A$,1):PROCw:ENDPROC 500DEFPROCk:CLS:PROCc(" Buy Goods. Price £ Ave £ ",1):FORL%=1TO20:PR INTTAB(3);" ";G$(L%);:IFG%(2,L%)>0 PRINT TAB(26);"*"; 510IFG%(0,L%)<>0 PRINTTAB(27);G%(0,L%) ;TAB(33);G%(1,L%) 520NEXT:PROCh 530IF G%(0,A%)=0 ENDPROC 540PROCa("Buy"):B%=VAL F$*G%(0,A%):IF B%>E%(2,0):PROCg(" Not enough money"):EN DPROC 550IF G%(2,0)+VALF$>M%PROCg(" You have n't got enough space!"):ENDPROC 560E%(2,0)=E%(2,0)-B%:G%(2,A%)=G%(2,A% )+VALF$ 570G%(2,0)=G%(2,0)+VALF$ 580ENDPROC 590DEFPROCg(A$):PROCc(A$,1):PRINT:PROC c(" Press a key",1):REPEATUNTILGET:ENDPR OC 600DEFPROCl:CLS:PROCc(" Sell Goods. Offer £ Ave £ ",1):FORL%=1TO20:PR INTTAB(3);" ";G$(L%);:IFG%(2,L%)>0 PRINT TAB(26);"*"; 610IFG%(0,L%)<>0 PRINTTAB(27);G%(0,L%) ;TAB(33);G%(1,L%) 620NEXT:PROCh 630PROCa("Sell"):B%=VAL F$:IF B%>G%(2, A%):PROCg(" You haven't got that many!") :ENDPROC 640IF A%=19:IF RND(10)<>1 PROCg(" They don't want it."):ENDPROC 650E%(2,0)=E%(2,0)+(G%(0,A%)*B%):G%(2, A%)=G%(2,A%)-B% 660G%(2,0)=G%(2,0)-B% 670ENDPROC 680DEFPROCa(A$):CLS:PROCc(" "+A$+" "+G $(A%),1) 690PROCc(" Price at "+O$(0,N%),1):PROC c(" £"+STR$G%(0,A%)+" per unit/ton",1) 700PROCd:ENDPROC 710DEFPROCd:IF A$<>"":PROCc(" You have "+STR$G%(2,A%)+" units/tons",1) ELSE PR OCc(" You have "+STR$E%(2,A%)+" units/to ns",1) 720PRINT:PROCc(" You have £"+STR$E%(2, 0),1) 730IFA%<>19:IFA$="Buy" PROCc(" You can afford "+STR$(INT(E%(2,0)/G%(0,A%))),1) 740PRINT:PROCc(" "+A$+" how many?",1) 750F$="":REPEATP$=GET$:IFASCP$=127F$=L EFT$(F$,LEN(F$)-1):P$="" 760IFASCP$>47IFASCP$<58 F$=F$+P$ 770PRINTTAB(0,16):PROCc(" "+F$+" ",1): UNTIL ASCP$=13 780ENDPROC 790DEFPROCi:CLS:RESTORE2030:C%=0:REPEA T:C%=C%+1:READA$:PROCc(" "+A$,1):IFC%MOD 11=0PROCc(" "+"Press a key.",1):REPEATUN TILGET 800UNTILA$="":PROCw:RESTORE:ENDPROC 810DEFPROCp:A$=O$(2,N%):Q%=0:FORL%=3TO 5:IFG%(L%,0)=N%Q%=L%:NEXT ELSE NEXT 820IFQ%>0IF RND(6)=1:FORL%=1TO20:F%=VA L(MID$(A$,L%,1)):G%(Q%,L%)=FNn(G%(1,L%)) :NEXT 830IF Q%>0:FORL%=1TO20:G%(0,L%)=G%(Q%, L%):NEXT 840IFQ%=0:FORL%=0TO20:G%(5,L%)=G%(4,L% ):G%(4,L%)=G%(3,L%):NEXT:FORL%=1TO20:F%= VAL(MID$(A$,L%,1)):G%(0,L%)=FNn(G%(1,L%) ):G%(3,L%)=G%(0,L%):NEXT:G%(3,0)=N% 850FORL%=1TO20 860F%=VAL(MID$(A$,L%+20,1)):E%(0,L%)=F Nn(E%(1,L%)) 870NEXT:G%(0,19)=-9024-RND(1000) 880ENDPROC 890DEFFNn(C%):IF F%=0:=0 900IF C%<2:=C% 910IFF%<9 IF RND(F%+2)=1:=0 920D%=C%/10:C%=C%-(D%/2):C%=C%+(RND(D% +2)):=C% 930DEFPROCe:CLS:PROCc(" Buy Equipment. Price:",1):FORL%=1TO20:PRINTTAB( 3);" ";E$(L%);:IF E%(0,L%)>0 PRINTTAB(26 );"£";E%(0,L%) 940NEXT:PROCh 950CLS:PROCc(" "+E$(A%),1) 960PROCc(" Price at "+O$(0,N%),1):PROC c(" £"+STR$E%(0,A%)+" per unit/ton",1) 970A$="":PROCd:R%=VALF$:IF R%=0:ENDPRO C 980IFE%(0,A%)=0 PROCg(" Not available! "):ENDPROC 990IFE%(2,0)<E%(0,A%) PROCg(" Not enou gh money!"):ENDPROC 1000IFA%>1IF G%(2,19)>0:PROCg(" You hav e toxic waste on board!"):ENDPROC 1010IFA%>1R%=1 1020IF A%>1:FORL%=2TO20:E%(2,L%)=0:NEXT :E%(2,A%)=1:M%=VAL LEFT$(E$(A%),5):FORL% =0TO20:G%(2,L%)=0:NEXT:E%(2,1)=0 1030IFA%=1:IF G%(2,0)+R%>M%:PROCg(" Not enough space for all that!"):ENDPROC E LSE IF A%=1:E%(2,1)=E%(2,1)+R%:G%(2,0)=G %(2,0)+R% 1040E%(2,0)=E%(2,0)-(E%(0,A%)*R%) 1050V%=M%/1000 1060ENDPROC 1070DEFPROCh 1080PROCc(" Use SPACE and RETURN to cho ose",1) 1090A%=1:L%=0:REPEAT:PRINTTAB(0,A%+1);" ";TAB(0,A%+1);" " 1100IFL%=32A%=A%+1:IFA%=21A%=1 1110PRINTTAB(0,A%+1);" " ":L%=GET:UNTILL%=13 1120ENDPROC 1130DEFPROCm:FORL%=1TO20:READO$(0,L%),O $(1,L%),O$(2,L%),P%(L%,0),P%(L%,1):NEXT 1140FORL%=1TO20:READG$(L%),G%(1,L%):NEX T 1150FORL%=1TO20:READE$(L%),E%(1,L%):NEX T 1160N%=15:E%(2,0)=600000:M%=1000:E%(2,2 )=1:V%=M%/1000:U%=0 1170PROCp 1180ENDPROC 1190DEFPROCt:CLS:PROCc(" Docked in: "+O $(0,N%)+" "+O$(1,N%),1):PRINT 1200PROCc(" You have £"+STR$E%(2,0)+" o n "+STR$U%+" voyages",1) 1210PROCc(" You can:",1) 1220PROCc(" See information",1) 1230PROCc(" Buy goods",1) 1240PROCc(" Sell goods",1) 1250PROCc(" Buy equipment",1) 1260PROCc(" Set sail",1) 1270PROCc(" Save game",1) 1280PROCc(" Load game",1) 1290PRINT:PROCc(" Use SPACE and RETURN to choose",1) 1300Z%=1:L%=0:REPEAT 1310PRINTTAB(0,(Z%*2)+5);" ";TAB(0,(Z% *2)+6);" " 1320IFL%=32Z%=Z%+1:IFZ%=8Z%=1 1330PRINTTAB(0,(Z%*2)+5);" %*2)+5);" "'" " 1340L%=GET 1350UNTILL%=13 1360ENDPROC 1370DEFPROCw:PRINT:PROCc(" PRESS A KEY ",0):REPEATUNTILGET:CLS:ENDPROC 1380DEFPROCf:CLS:PROCc(" Goods. Averag e price. Carried.",1):FORL%=1TO20:PRINT " ";G$(L%);TAB(23);" £";G%(1,L%);TAB(30) ;" ";G%(2,L%):NEXT:PROCw 1390PROCc(" Equipment. Average price. Owned.",1):FORL%=1TO20:PRINT" ";E$(L%); TAB(17);" £";E%(1,L%);TAB(29);" ";E%(2,L %):NEXT:PROCw 1400PROCc(" Ports To Visit. Fuel ne eded:",1):FORL%=1TO20:PRINT" ";O$(0,L%); TAB(18);" ";O$(1,L%);TAB(33);" ";(ABS(P% (N%,0)-P%(L%,0))+ABS(P%(N%,1)-P%(L%,1))) *V%:NEXT:PROCw:ENDPROC 1410DEFPROCc(P$,H%):IFH%=1P$="  :NEXT:ENDPROC 1430DATARotterdam,Netherlands,825863908 9996977992799988777666555000000,7,2 1440DATAKobe,Japan,59998997898799989827 99988776655555000000,14,6 1450DATANew Orleans,USA,877693994497688 9982699887765554322000000,2,3 1460DATASingapore,Singapore,84647392497 77887982899887766554442000000,10,7 1470DATAYokohama,Japan,7793629289886786 972799998877666555000000,12,6 1480DATAMarseille,France,66547997849986 77972699988776655554000000,7,4 1490DATAAntwerp,Belgium,865478928954558 8872799876543333220000000,7,3 1500DATAKawasaki,Japan,8564329289656787 872899877665542220000000,13,6 1510DATAHong Kong,Hong Kong,78752392497 87558862799877665422220000000,11,6 1520DATATubarao,Brazil,6849439244436759 862699876554332220000000,2,6 1530DATAKaohsiung,Taiwan,87946292894556 48762599776544332220000000,11,7 1540DATAVancouver,Canada,87987986787989 78982799776543222220000000,1,1 1550DATAHamburg,West Germany,6474359289 475496762699775433322220000000,8,1 1560DATALos Angeles,USA,824486928978766 5762799766433222200000000,2,2 1570DATALondon,England,4479879589577465 677899775432222000000000,6,4 1580DATARichard's Bay,S.Africa,52259792 89444567637999754322222000000000,1,7 1590DATALe Havre,France,603348778934377 8632799754322220000000000,7,5 1600DATAGenoa,Italy,3334566249334336532 899643222200000000000,9,4 1610DATATampa,USA,285965928942244542249 9663222000000000000,2,4 1620DATAPort Headland,Australia,8589784 967222924422599742222000000000000,11,8 1630DATAIron ore,942 1640DATACoal,985 1650DATALight Machinery,4251 1660DATAGrain,245 1670DATAFruit,224 1680DATAMeat,2196 1690DATAOther food items,3145 1700DATALivestock,998 1710DATAChemicals,1245 1720DATALight Electrical,12679 1730DATAClothing,5398 1740DATASteel,4962 1750DATAFurnishings,6298 1760DATAFarm machinery,9639 1770DATAIndustrial Machinery,9458 1780DATAConstruction materials,452 1790DATALeisure goods,1928 1800DATAMedical equipment,5462 1810DATAIndustrial waste,-9547 1820DATATimber,7324 1830DATA"Fuel and service",342 1840DATA1000 Ton vessel,12000000 1850DATA3000 Ton vessel,14000000 1860DATA6000 Ton vessel,17000000 1870DATA9000 Ton vessel,20000000 1880DATA12000 Ton vessel,24000000 1890DATA15000 Ton vessel,29000000 1900DATA20000 Ton vessel,31000000 1910DATA24000 Ton vessel,35000000 1920DATA30000 Ton vessel,40000000 1930DATA33000 Ton vessel,45000000 1940DATA40000 Ton vessel,48000000 1950DATA45000 Ton vessel,52000000 1960DATA49000 Ton vessel,58000000 1970DATA,0 1980DATA,0 1990DATA,0 2000DATA,0 2010DATA,0 2020DATA,0 2030DATAThe aim of this sea trading 2040DATAsimulation is to make as 2050DATAmuch money as you can by 2060DATAsailing between the major 2070DATAports of the world trading 2080DATAgoods between them. 2090DATAYou can buy larger vessels 2100DATAto carry more goods if you 2110DATAhave enough money. 2120DATAThe simulation offers you a num ber 2130DATAof options which can be selecte d 2140DATAby using the space bar and RETU RN 2150DATAThe options are: 2160DATA1. See information about all th e 2170DATAgoods and equipment that you ca n 2180DATAbuy and sell, also you will see 2190DATAa list of all the ports that yo u 2200DATAcan visit. 2210DATA2. Buy goods to trade. Use 2220DATAthe space bar and RETURN to 2230DATAselect the item that you wish 2240DATAto buy. Then enter the amount. 2250DATAif you see a * next to the 2260DATA"price, this means that you" 2270DATAhave some of those goods 2280DATAin your cargo. 2290DATA3. Sell goods. Use the space 2300DATAbar and return to select the 2310DATA"item that you wish to sell, th en" 2320DATAenter the amount. 2330DATA4. Buy fuel or a new vessel. 2340DATA"When you buy a new vessel," 2350DATAmake sure that you have used up 2360DATAall the fuel and sold all the 2370DATAgoods from your old vessel beca use 2380DATAyou cannot transfer any of it t o 2390DATAyour new one. 2400DATA5. Sail to another port. 2410DATA The amount 2420DATAof fuel that you will need is 2430DATAshown after the name of the por t. 2440DATAOnce on the way there are a num ber 2450DATA"of things that can happen, bad " 2460DATAweather for instance. The progr am 2470DATAwill tell you if anything happe ns. 2480DATA6. Save a game 2490DATAYou can save the game to play 2500DATAanother time. 2510DATAYou will then be 2520DATAable to load the game 2530DATAand continue where you left off . 2540DATA7. Load a game. 2550DATAYou can load a game that you sa ved 2560DATApreviously using the above opti on. 2570DATAyou can then 2580DATAcontinue from where you left of f. 2590DATAYou start with a small ship. 2600DATAYou will need to buy goods 2610DATAcheaply and sell them for more 2620DATAthan you paid for them. So chec k 2630DATAthe average prices and buy when 2640DATAthe price of the goods for sale in 2650DATAthe port are lower. Sell when t he 2660DATAprice at another port is higher . 2665DATAThe average price is shown in t he 2666DATAend column when you buy or sell . 2670DATAWhen you have made enough money 2680DATA"trading like this, you will be " 2690DATAable to buy a larger vessel and 2700DATAtherefore deal in larger amount s 2710DATAof goods. You will also be able to 2720DATAcarry more fuel and travel 2730DATAfurther. When you buy a new shi p 2740DATAyou will get nothing for the ol d 2750DATA"one, so be very careful when" 2760DATAdeciding whether to buy a new s hip. 2770DATAOne of the items is shown as a 2780DATAnegative amount. This means tha t 2790DATA"you are paid to take it, but h ave" 2800DATA to pay to get rid of it. 2810DATA"If you are short of cash, don' t" 2820DATA"worry, you are allowed to go" 2830DATAoverdrawn for fuel and crew. 2840DATAIf you run out of money or 2850DATAPress ESCAPE you will be 2860DATAshown a summary of your 2870DATAgame so far. You can then 2880DATAchoose to continue or restart 2890DATA"" 2900DEFPROCo:RESTORE2950 2910ENVELOPE1,1,0,0,0,1,1,1,60,-4,-1,-1 ,120,90:B$="C D EF G A Bc d ef":C$="5555 1111555511555566661154321155":E$="888877 77888877888899997A88357A88":D$="123475.A .86...9":T%=9:O%=6:READA$,Q%:I%=TIME:W%= 0:X%=FALSE:Y%=O%+4*INSTR(D$,LEFT$(C$,1)) 2920REPEAT 2930IFW%<=0W%=W%+3:IFLENC$SOUND&11,1,Y% -(S%-Y%)*X%,-1:SOUND&12,1ANDX%,S%+12,-1: X%=NOTX%:Y%=O%+4*INSTR(D$,LEFT$(C$,1)):S %=O%+4*INSTR(D$,LEFT$(E$,1)):C$=RIGHT$(C $,LENC$+X%):E$=RIGHT$(E$,LENE$+X%) 2940W%=W%-Q%:C%=C%-Q%:SOUND&13,1,O%+4*( INSTR(B$,LEFT$(A$,1))-(INSTR(A$,"#")>0)+ 12),-1:I%=I%+Q%*T%:REPEATUNTILTIME>I%:RE AD A$,Q%:UNTILA$="dne":ENDPROC 2950DATAF,1,F,1,F,1,F,3,F,1,F,1,F,1,F,2 ,c,1,A,2,F,1,A,2,c,1,f,2,c,1,A,2,F,1,C,1 ,C,1,C,1,C,3,C,1,C,1,C,1,C,2,G,1,E,2,C,1 ,E,2,G,1,A#,2,G,1,E,2,C,1 2960DATAF,1,F,1,F,1,F,3,F,1,F,1,F,1,F,2 ,c,1,A,2,F,1,A,2,c,1,f,3,F,3,C,2,f,1,e,2 ,d,1,c,2,A#,1,A,2,G,1,F,3,A,3,F,3,A,2,A# ,1 2970DATAc,1,c,1,c,1,c,3,c,1,c,1,c,1,c,3 ,d,2,e,1,f,2,e,1,d,2,c,1,A#,2,A,1,A#,2,c ,1,d,2,c,1,A#,2,A,1,G,2,F,1,E,2,F,1,G,2, F,1,E,2,C,1,D,2,E,1 2980DATAF,1,F,1,F,1,F,3,F,1,F,1,F,1,F,3 ,F,1,F,1,F,1,F,3,F,1,F,1,F,1,F,3,C,2,f,1 ,e,2,d,1,c,2,A#,1,A,2,G,1,F,3,A,3,F,6,dn e,0