Star Trader Source Code 2

From TradeWars Museum

Jump to: navigation, search
10 COM S[12,15],T[12,12],T$[72],B[3,12]
20 COM W,D9,K9,X9,D1,X1,P9,T9,S9,Y9,H
30 COM Y1,R9,G9,Q,M[6,3],C[6,3]
35 COM S1,T1,R
40 REM *** STAR TRADERS ***
50 REM MAIN MODULE
120 REM SET UP CALENDAR AND STAR SYSTEM NAMES
130 DIM C$[36],S$[60]
140 LET C$="JANFEBMARAPRMIYJUNJULAUGSEPOCTNOVDEC"
150 LET S$="SOL YORKBOYDIVANREEFHOOKSTANTASKSINKSANDQUINGAOLKIRK"
160 LET S$[53]="KRISFATE"
170 REM S IS THE STAR SYSTEM INFO ARRAY
180 REM T IS THE TRADING SHIP INFO ARRAY
190 REM T$ IS THE TRADING SHIP NAME STRING (6 CHARS PER SHIP)
200 REM P CONTAINS THE FAIR PRICES ON THE LOCAL PLANET
210 REM Q HAS THE FIXED PRICES
220 REM B CONTAINS THE BANK ACCOUNTS
230 DIM P[6],Q[6]
240 DIM A$[6],D$[5],N$[36],G[6]
250 RESTORE 270
260 MAT READ Q
270 DATA 5000,3500,4000,4500,3000,3000
280 LET N$=" UR MET HE MED SOFT GEMS"
290 REM FNZ COMPUTES THE PRICE WINDOW THROUGH WHICH A BID IS
300 REM ACCEPTABLE FOR FURTHER HAGGLING
310 DEF FNZ(X)=(FNY(X)*.5+( NOT FNY(X))*X/(2*ABS(S[I1,S1])))/K1
320 DEF FNY(X)=X >= ABS(S[I1,S1])
330 REM R9 IS THE SPEED OF A SHIP IN LIGHTYEARS PER DAY
340 REM D9 IS THE MINIMUM DISTANCE ALLOWED BETWEEN STARS
350 REM Q IS THE PROBABILITY OF A DELAY
360 REM K9 IS THE MAX NUMBER OF BIDDING ROUNDS
370 REM W IS THE MAX WEIGHT OF A TRADING SHIP'S CARGO
380 REM X9 CONTROLS THE PROFIT MARGIN; HIGH X9 LIMITS THE %
390 REM G9 IS THE STELLAR DEVELOPEMENT # INCREMENT 1<=G9<=5
400 REM *** BLOCK #5
402 IF R=0 THEN 430
404 GOSUB 3860
406 GOSUB 5190
408 FOR T2=1 TO T9
410 IF T2=T1 THEN 420
412 L=(T2-1)*6+1
414 PRINT T$[L,L+5];" IS ENROUTE TO ";S$[T[8,T2],T[8,T2]+3]
420 NEXT T2
424 L=(T1-1)*6+1
426 PRINT " AND ";T$[L,L+5];" IS ABOUT TO LEAVE ";S$[T[8,T1],T[8,T1]+3]
428 GOTO 2040
430 GOSUB 5190
432 GOSUB 3190
434 S1=T1=L1=1
440 PRINT
450 PRINT "ALL SHIPS START AT SOL"
460 PRINT "ADVICE; VISIT THE CLASS III AND IV SYSTEMS -"
470 PRINT "SOL AND THE CLASS II STARS PRODUCE ALOT OF HE,MED AND"
480 PRINT "SOFT, WHICH THE POORER STAR SYSTEMS (CLASS III AND"
490 PRINT "IV) NEED. ALSO, THE POOR STARS PRODUCE THE RAW GOODS -"
500 PRINT "UR,MET,GEMS THAT YOU CAN BRING BACK TO SOL AND"
510 PRINT "THE CLASS II SYSTEMS IN TRADE"
520 PRINT
530 PRINT "STUDY THE MAP AND CURRENT PRICE CHARTS CAREFULLY -"
540 PRINT "CLASS I AND II STARS MAKE EXCELLENT TRADING PARTNERS"
550 PRINT "WITH CLASS III OR IV STARS."
560 FOR I1=1 TO T9/P9
570 FOR P1=1 TO P9
580 PRINT
590 PRINT "PLAYER";P1;", WHICH STAR WILL ";T$[L1,L1+5];" TRAVEL TO";
600 GOSUB 2770
610 L1=L1+6
620 T1=T1+1
630 NEXT P1
640 NEXT I1
650 REM *** BLOCK #6
660 D=T[9,1]
670 Y=T[10,1]
680 T1=1
690 FOR I=2 TO T9
700 IF T[10,I]<Y THEN 740
710 IF T[10,I]>Y THEN 770
720 IF T[9,I]>D THEN 770
730 IF T[9,I]=D AND RND(0)>.5 THEN 770
740 D=T[9,I]
750 Y=T[10,I]
760 T1=I
770 NEXT I
780 IF Y1=Y THEN 900
790 D1=1
800 Y1=Y
810 T2=T1
820 GOSUB 3190
822 IF Y1 <> 2071 THEN 830
824 GOSUB 4500
826 PRINT "THE LAST YEAR OF THIS GAME IS ";Y9;" BUT IF YOU"
828 PRINT "WANT TO QUIT BEFORE THEN, YOU CAN TYPE 'SAVE' AS"
829 PRINT "YOUR NEXT PORT OF CALL - THIS WILL PUNCH A TAPE"
830 PRINT "SO YOU CAN CONTINUE THE GAME LATER"
831 T1=T2
840 IF Y1<Y9 THEN 900
850 GOSUB 4500
860 PRINT "NEW GAME";
870 INPUT A$
880 IF A$[1,1]="N" THEN 5500
890 CHAIN "$TRADER"
900 D1=D
910 M=INT((D1-1)/30)
920 L=3*M+1
930 PRINT
940 PRINT
950 PRINT "*****************"
960 PRINT "* ";C$[L,L+2];D1-30*M;",";Y1
970 L=(T1-1)*6+1
980 S1=T[8,T1]
990 M=S[8,S1]
1000 PRINT "* ";T$[L,L+5];" HAS LANDED ON ";S$[M,M+3]
1010 GOTO T[12,T1]+1 OF 1080,1060,1040,1020
1020 PRINT "3 WEEKS LATE - PIRATES ATTACKED MIDVOYAGE"
1030 GOTO 1080
1040 PRINT "2 WEEKS LATE - 'WE GOT LOST.SORRY'"
1050 GOTO 1080
1060 PRINT "1 WEEK LATE - 'OUR COMPUTER MADE A MISTAKE'"
1070 REM *** PRINT CARGO STATUS FOR CURRENT SHIP
1080 PRINT
1090 PRINT "$ ON BOARD";N$;" NET WT"
1100 PRINT USING 1110;T[11,T1],T[1,T1],T[2,T1],T[3,T1],T[4,T1],T[5,T1],T[6,T1],T[7,T1]
1110 IMAGE DDXDDDXDDD,7(4X,2D)
1120 REM *** BLOCK #7
1130 GOSUB 3870
1140 PRINT
1150 PRINT "WE ARE BUYING:"
1160 J1=1
1170 FOR I1=1 TO 6
1180 IF S[I1,S1] >= 0 OR T[I1,T1]<.5 THEN 1480
1190 PRINT TAB(5);N$[J1,J1+5];" WE NEED ";-INT(S[I1,S1]);" UNITS.";
1200 PRINT "HOW MANY ARE YOU SELLING";
1210 GOSUB 4430
1220 IF X=0 THEN 1480
1230 IF X <= T[I1,T1] THEN 1270
1240 PRINT TAB(5);"YOU ONLY HAVE ";T[I1,T1];" UNITS IN YOUR HOLD"
1250 PRINT TAB(5);
1260 GOTO 1200
1270 IF X <= 2*-INT(S[I1,S1]) THEN 1300
1280 X=2*-INT(S[I1,S1])
1290 PRINT TAB(5);"WE'LL BID ON ";X;" UNITS."
1300 FOR K1=1 TO K9
1310 IF K1#K9 MAX 2 THEN 1340
1320 PRINT TAB(5);"OUR FINAL OFFER:";
1330 GOTO 1350
1340 PRINT TAB(5);"WE OFFER ";
1342 Y2=(L1+1)*10/3
1350 PRINT 100*INT(.009*P[I1]*X+.5);" WHAT DO YOU BID";
1360 INPUT Y
1362 IF Y>P[I1]*X/10 AND Y<P[I1]*X*10 THEN 1370
1364 PRINT TAB(5);"WATCH YOUR TYPING -- TRY AGAIN"
1366 GOTO 1340
1370 IF Y <= P[I1]*X THEN 1430
1380 IF Y>(1+FNZ(X))*P[I1]*X THEN 1410
1390 P[I1]=.8*P[I1]+.2*Y/X
1400 NEXT K1
1410 PRINT TAB(5);"WE'LL PASS THIS ONE"
1420 GOTO 1480
1430 PRINT TAB(5);"WE'LL BUY!"
1440 T[I1,T1]=T[I1,T1]-X
1450 T[7,T1]=T[7,T1]-X*(I1<5)
1460 T[11,T1]=T[11,T1]+Y
1470 S[I1,S1]=S[I1,S1]+X
1480 J1=J1+6
1490 NEXT I1
1500 PRINT
1510 REM *** BLOCK #8
1520 PRINT "WE ARE SELLING:"
1530 J1=1
1540 FOR I1=1 TO 6
1550 IF G[I1] <= 0 OR S[I1,S1]<1 THEN 1960
1555 IF I1 <= 4 AND T[7,T1] >= W THEN 1960
1560 PRINT TAB(5);N$[J1,J1+5];" UP TO ";INT(S[I1,S1]);" UNITS.";
1570 PRINT "HOW MANY ARE YOU BUYING";
1580 GOSUB 4430
1590 IF X=0 THEN 1960
1600 IF I1>4 OR X+T[7,T1] <= W THEN 1660
1610 PRINT TAB(5);"YOU HAVE ";T[7,T1];" TONS ABOARD, SO ";X;
1620 PRINT " TONS PUTS YOU OVER"
1630 PRINT TAB(5);"THE ";W;" TON LIMIT."
1640 PRINT TAB(5);
1650 GOTO 1570
1660 IF X <= S[I1,S1] THEN 1700
1670 PRINT TAB(5);"WE ONLY HAVE ";INT(S[I1,S1]);" UNITS"
1680 PRINT TAB(5);
1690 GOTO 1570
1700 FOR K1=1 TO K9
1710 IF K1#K9 MAX 2 THEN 1740
1720 PRINT TAB(5);"OUR FINAL OFFER:";
1730 GOTO 1750
1740 PRINT TAB(5);"WE WANT ABOUT ";
1750 PRINT 100*INT(.011*P[I1]*X+.5);
1760 PRINT "YOUR OFFER";
1770 INPUT Y
1772 IF Y>P[I1]*X/10 AND Y<P[I1]*X*10 THEN 1780
1774 PRINT TAB(5);"WATCH YOUR TYPING -- TRY AGAIN"
1776 GOTO 1740
1780 IF Y >= P[I1]*X THEN 1840
1790 IF Y<(1-FNZ(X))*P[I1]*X THEN 1820
1800 P[I1]=.8*P[I1]+.2*Y/X
1810 NEXT K1
1820 PRINT TAB(5);"THAT'S TOO LOW"
1830 GOTO 1960
1840 IF Y <= T[11,T1] THEN 1910
1850 PRINT TAB(5);"YOU BID $";Y;" BUT YOU HAVE ONLY $";T[11,T1]
1860 GOSUB 4310
1870 IF S[7,S1]<10 OR T[11,T1]+B[1,B1]<Y THEN 1820
1880 PRINT TAB(5);
1890 GOSUB 4020
1900 IF Y>T[11,T1] THEN 1820
1910 PRINT TAB(5);"SOLD!"
1920 T[I1,T1]=T[I1,T1]+X
1930 T[7,T1]=T[7,T1]+X*(I1<5)
1940 S[I1,S1]=S[I1,S1]-X
1950 T[11,T1]=T[11,T1]-Y
1960 J1=J1+6
1970 NEXT I1
1980 REM *** BLOCK #9
1990 GOSUB 4310
2000 IF S[7,S1]<10 OR T[11,T1]+B[1,B1]=0 THEN 2040
2010 PRINT
2020 GOSUB 4020
2030 PRINT
2040 PRINT "WHAT IS YOUR NEXT PORT OF CALL";
2050 GOSUB 2770
2060 REM *** BLOCK #10.1
2070 J=0
2080 FOR I=1 TO 6
2090 IF S[I,S1] >= 0 THEN 2120
2100 IF S[I,S1]<G[I] THEN 660
2110 J=J+1
2120 NEXT I
2130 IF J>1 THEN 660
2140 REM *** BLOCK #10.2
2150 S[7,S1]=S[7,S1]+G9
2160 G0=S[7,S1]
2162 IF G0#5 AND G0#10 AND G0#15 THEN 2220
2170 GOSUB 4580
2180 GOSUB 4500
2190 PRINT "STAR SYSTEM ";S$[S[8,S1],S[8,S1]+3];" IS NOW A CLASS";
2200 PRINT D$;" SYSTEM"
2210 REM *** BLOCK #10.3
2220 IF S9=15 THEN 660
2230 J=0
2240 FOR I=1 TO S9
2250 J=J+S[7,I]
2260 NEXT I
2270 IF J/S9<10 THEN 660
2280 REM A NEW STAR IS BORN!
2290 S1=S9=S9+1
2300 GOSUB 4680
2310 GOSUB 2450
2320 S[9,S1]=D1
2330 S[10,S1]=Y1
2340 FOR J=1 TO 6
2350 S[J,S1]=0
2360 NEXT J
2370 GOSUB 4500
2380 PRINT "A NEW STAR SYSTEM HAS BEEN DISCOVERED! IT IS A CLASS IV"
2390 PRINT "AND ITS NAME IS";S$[S[8,S1],S[8,S1]+3]
2400 GOSUB 5190
2410 GOTO 660
2420 STOP
2430 REM *** GOSUBS FOLLOW ***
2440 REM <FRONTIER> GOSUB
2450 X=(RND(0)-.5)*100
2460 Y=50*RND(0)
2470 IF (ABS(X)<25) AND (Y<25) THEN 2450
2480 F=1
2490 GOSUB 2550
2500 IF F=0 THEN 2450
2510 S[7,S1]=0
2520 RETURN
2530 REM *** <TEST STAR CO-ORDS> GOSUB
2540 REM FIRST CONVERT CO-ORDS TO NEXT HALF-BOARD
2550 GOTO H OF 2660,2620,2600,2560
2560 Z=X
2570 X=-Y
2580 Y=Z
2590 GOTO 2660
2600 Y=-Y
2610 GOTO 2660
2620 Z=X
2630 X=Y
2640 Y=Z
2650 REM SECOND TEST PROXIMITY
2660 FOR J=1 TO S1-1
2670 IF SQR((X-S[11,J])^2+(Y-S[12,J])^2) >= D9 THEN 2700
2680 F=0
2690 RETURN
2700 NEXT J
2710 REM FINALLY ENTER CO-ORDS AND INCREMENT HALF-BOARD COUNTER
2720 S[11,S1]=INT(X)
2730 S[12,S1]=INT(Y)
2740 H=1+(H <= 3)*H
2750 RETURN
2760 REM *** <NEXT ETA> GOSUB
2770 INPUT A$
2780 FOR I=1 TO S9
2790 J=S[8,I]
2800 IF A$[1,4]=S$[J,J+3] THEN 2870
2810 NEXT I
2820 IF A$[1,4] <> "SAVE" THEN 2832
2830 GOSUB 4770
2832 IF A$[1,3] <> "MAP" THEN 2840
2833 S2=S1
2834 GOSUB 5190
2835 S1=S2
2836 GOTO 2850
2840 IF A$[1,6] <> "REPORT" THEN 2848
2842 GOSUB 3180
2846 GOTO 2850
2848 PRINT A$[1,4];" IS NOT A STAR NAME IN THIS GAME"
2850 PRINT "NEXT STAR";
2860 GOTO 2770
2870 T[8,T1]=I
2880 IF I#S1 THEN 2910
2890 PRINT "CHOOSE A DIFFERENT STAR SYSTEM TO VISIT"
2900 GOTO 2850
2910 D2=SQR((S[11,S1]-S[11,I])^2+(S[12,S1]-S[12,I])^2)/R9
2920 D2=INT(D2)
2930 IF RND(0)>(Q/2) THEN 3030
2940 I=1+INT(RND(0)*3)
2950 GOTO I OF 3000,2980,2960
2960 PRINT "SHIP DOES NOT PASS INSPECTION";
2970 GOTO 3010
2980 PRINT "CREWMEN DEMAND A VACATION";
2990 GOTO 3010
3000 PRINT "LOCAL HOLIDAY SOON";
3010 PRINT " - ";I;" WEEK DELAY."
3020 D2=D2+7*I
3030 T[9,T1]=T[9,T1]+D2
3040 IF T[9,T1] <= 360 THEN 3070
3050 T[9,T1]=T[9,T1]-360
3060 T[10,T1]=T[10,T1]+1
3070 M=INT((T[9,T1]-1)/30)
3080 L=3*M+1
3090 PRINT "THE ETA AT ";S$[J,J+3];" IS ";C$[L,L+2];" ";T[9,T1]-30*M;","T[10,T1]
3100 REM UPDATE ETA PLUS RANOM DELAY FACTOR (0,1,2 OR 3 WEEKS)
3110 I=(INT(RND(0)*3)+1)*(RND(0)>(Q/2))
3120 T[9,T1]=T[9,T1]+7*I
3130 IF T[9,T1] <= 360 THEN 3160
3140 T[9,T1]=T[9,T1]-360
3150 T[10,T1]=T[10,T1]+1
3160 T[12,T1]=I
3170 RETURN
3180 REM *** <REPORT> GOSUB
3190 GOSUB 4500
3200 PRINT TAB(10);"JAN 1, ";Y1;TAB(35);"YEARLY REPORT #";Y1-2069
3210 PRINT
3220 PRINT
3230 IF Y1>2070 THEN 3450
3240 PRINT "STAR SYSTEM CLASSES:"
3250 PRINT " I COSMOPOLITAN"
3260 PRINT " II DEVELOPED"
3270 PRINT " III UNDERDEVELOPED"
3280 PRINT " IV FRONTIER"
3290 PRINT
3300 PRINT
3310 PRINT "MERCHANDISE:"
3320 PRINT " UR URANIUM"
3330 PRINT " MET METALS"
3340 PRINT " HE HEAVY EQUIPMENT"
3350 PRINT " MED MEDICINE"
3360 PRINT " SOFT COMPUTER SOFTWARE"
3370 PRINT " GEMS STAR GEMS"
3380 PRINT
3390 PRINT
3400 PRINT TAB(5);"EACH TRADING SHIP CAN CARRY MAX ";W;" TONS CARGO."
3410 PRINT "STAR GEMS AND COMPUTER SOFTWARE, WHICH AREN'T SOLD BY THE"
3420 PRINT "TON, DON'T COUNT."
3430 PRINT
3440 PRINT
3450 PRINT TAB(20);"CURRENT PRICES"
3460 PRINT
3470 PRINT
3480 PRINT "NAME CLASS";N$
3490 PRINT
3500 FOR S1=1 TO S9
3510 GOSUB 3870
3520 FOR I=1 TO 6
3530 P[I]=SGN(S[I,S1])*P[I]
3540 NEXT I
3550 GOSUB 4580
3560 PRINT USING "#,4A,2X";S$[S[8,S1],S[8,S1]+3]
3570 PRINT USING "5A,6(S5D)";D$,P[1],P[2],P[3],P[4],P[5],P[6]
3580 IF S1/2 <> INT(S1/2) THEN 3600
3590 PRINT
3600 NEXT S1
3610 PRINT
3620 PRINT "('+' MEANS SELLING AND '-' MEANS BUYING)"
3630 PRINT
3640 PRINT
3650 PRINT TAB(22);"CAPTAINS"
3660 PRINT
3670 PRINT
3680 PRINT "NUMBER $ ON SHIPS $ IN BANK CARGOES TOTALS"
3690 FOR B1=1 TO P9
3700 GOSUB 4380
3710 NEXT B1
3720 FOR P1=1 TO P9
3730 PRINT
3740 M1=M2=0
3750 FOR I1=0 TO T9/P9-1
3760 M1=M1+T[11,P9*I1+P1]
3770 FOR K=1 TO 6
3780 M2=M2+T[K,P9*I1+P1]*Q[K]
3790 NEXT K
3800 NEXT I1
3810 M3=M2+M1+B[1,P1]
3820 PRINT USING 3830;P1,M1,B[1,P1],M2,M3
3830 IMAGE 2X,2D,2X,4(2X,DDXDDDXDDD)
3840 NEXT P1
3850 RETURN
3860 REM *** <PRICES> GOSUB
3870 R1=1+(S[7,S1] >= 5)+(S[7,S1] >= 10)
3880 D2=12*(Y1-S[10,S1])+(D1-S[9,S1])/30
3890 FOR I=1 TO 6
3900 G[I]=(1+S[7,S1]/15)*(M[I,R1]*S[7,S1]+C[I,R1])
3910 IF ABS(G[I])>.01 THEN 3940
3920 P[I]=0
3930 GOTO 3970
3940 S[I,S1]=SGN(G[I])*(ABS(G[I]*12) MIN ABS(S[I,S1]+D2*G[I]))
3950 P[I]=Q[I]*(1-SGN(S[I,S1])*ABS(S[I,S1]/(G[I]*X9)))
3960 P[I]=100*INT(P[I]/100+.5)
3970 NEXT I
3980 S[9,S1]=D1
3990 S[10,S1]=Y1
4000 RETURN
4010 REM *** <BANK CALL> GOSUB
4020 PRINT "DO YOU WISH TO VISIT THE LOCAL BANK";
4030 INPUT A$
4040 IF A$[1,1]="Y" THEN 4060
4050 RETURN
4060 GOSUB 4310
4070 GOSUB 4380
4080 PRINT TAB(5);"YOU HAVE $";B[1,B1];" IN THE BANK"
4082 PRINT TAB(5);"AND $";T[11,T1];" ON YOUR SHIP"
4090 IF B[1,B1]=0 THEN 4190
4100 PRINT TAB(5);"HOW MUCH DO YOU WISH TO WITHDRAW";
4110 INPUT Z
4120 IF Z <= B[1,B1] THEN 4150
4130 PRINT TAB(5);"TOO MUCH; ";
4140 GOTO 4100
4150 IF Z <= 0 THEN 4190
4160 B[1,B1]=B[1,B1]-Z
4170 T[11,T1]=T[11,T1]+Z
4180 RETURN
4190 PRINT TAB(5);"HOW MUCH DO YOU WISH TO DEPOSIT";
4200 INPUT Z
4210 IF Z >= 0 THEN 4240
4220 PRINT TAB(5);"YOU CAN'T DEPOSIT A NEGATIVE NUMBER"
4230 GOTO 4190
4240 IF Z <= T[11,T1] THEN 4270
4250 PRINT TAB(5);"YOU HAVE $";T[11,T1];" ON YOUR SHIP"
4260 GOTO 4190
4270 T[11,T1]=T[11,T1]-Z
4280 B[1,B1]=B[1,B1]+Z
4290 RETURN
4300 REM *** <B1> GOSUB
4310 B1=T1
4320 FOR I=1 TO S9/P9
4330 IF B1 <= P9 THEN 4360
4340 B1=B1-P9
4350 NEXT I
4360 RETURN
4370 REM ***<BANK UPDATE> GOSUB
4380 B[1,B1]=B[1,B1]*(1+.05*(Y1-B[3,B1]+(D1-B[2,B1])/360))
4390 B[2,B1]=D1
4400 B[3,B1]=Y1
4410 RETURN
4420 REM *** <INPUT> GOSUB
4430 INPUT X
4440 IF INT(X)=X AND X >= 0 THEN 4480
4450 PRINT TAB(5);"TYPE A ZERO IF YOU WANT TO PASS THIS ONE,"
4460 PRINT TAB(5);"BUT NO NEGATIVES OR DECIMALS"
4470 GOTO 4430
4480 RETURN
4490 REM *** <GA> GOSUB
4500 PRINT
4520 PRINT
4530 PRINT TAB(20),"*** GENERAL ANNOUNCEMENT ***"
4540 PRINT
4550 PRINT
4560 RETURN
4570 REM *** <D$> GOSUB
4580 GOTO S[7,S1]/5+1 OF 4650,4630,4610,4590
4590 D$=" I"
4600 RETURN
4610 D$=" II"
4620 RETURN
4630 D$=" III"
4640 RETURN
4650 D$=" IV"
4660 RETURN
4670 REM *** <STAR NAME> GOSUB
4680 IF S1>1 THEN 4710
4690 I=1
4700 GOTO 4750
4710 I=4*INT(14*RND(0))+5
4720 FOR J=2 TO S1-1
4730 IF I=S[8,J] THEN 4710
4740 NEXT J
4750 S[8,S1]=I
4760 RETURN
4770 REM *** <SAVE GAME ON TAPE> GOSUB
4780 PRINT "WHEN I TYPE '?' THIS IS WHAT YOU SHOULD DO:"
4790 PRINT
4800 PRINT " 1. PUSH THE 'ON' BUTTON ON THE TAPE PUNCHER"
4810 PRINT " 2. PRESS THE 'HERE IS' KEY (UPPER RIGHT) 3 TIMES"
4820 PRINT " 3. PUSH THE 'OFF' BUTTON ON THE TAPE PUNCHER"
4830 PRINT " 4. TYPE ANY NUMBER"
4840 PRINT " 5. PRESS THE 'RETURN' KEY"
4850 PRINT
4860 PRINT "WHEN I TYPE '!!!' THAT MEANS I'LL START PUNCHING"
4870 PRINT "THE TAPE IN ABOUT 10 SECONDS, SO:"
4880 PRINT
4890 PRINT " *** DON'T FORGET TO TURN THE PUNCHER BACK ON ***"
4900 PRINT LIN(3)
4910 INPUT X
4920 PRINT "!!!"
4930 FOR I=1 TO 10000
4940 X=X+1
4950 NEXT I
4960 PRINT T$;""
4970 PRINT W;",";D9;",";K9;",";X9;",";D1;",";Y1;""
4980 PRINT P9;",";T9;",";S9;",";Y9;",";T1;",";S1;""
4990 FOR J=1 TO S9
5000 FOR I=1 TO 9 STEP 4
5010 PRINT S[I,J];",";S[I+1,J];",";S[I+2,J];",";S[I+3,J];""
5040 NEXT I
5060 NEXT J
5070 FOR J=1 TO T9
5080 FOR I=1 TO 9 STEP 4
5090 PRINT T[I,J];",";T[I+1,J];",";T[I+2,J];",";T[I+3,J];""
5120 NEXT I
5140 NEXT J
5150 FOR I=1 TO P9
5160 PRINT B[1,I];",";B[2,I];",";B[3,I];""
5170 NEXT I
5172 FOR I=1 TO 50
5174 PRINT " ";
5176 NEXT I
5180 STOP
5190 REM *** <PRINT STAR MAP> GOSUB
5200 PRINT LIN(3)
5210 PRINT TAB(22);"STAR MAP"
5220 PRINT TAB(20);"************"
5230 PRINT
5240 DIM L$[55]
5250 FOR L1=15 TO -15 STEP -1
5260 IF L1 <> 0 THEN 5290
5270 L$="1----1----1----1----1----*SOL-1----1----1----1----1 "
5280 GOTO 5340
5290 L$=" "
5300 IF ABS(L1)/3=INT(ABS(L1)/3) THEN 5330
5310 L$[26,26]="1"
5320 GOTO 5340
5330 L$[26,26]="-"
5340 Y=L1*10/3
5342 Y0=(L1+1)*10/3
5350 FOR S1=2 TO S9
5360 IF S[12,S1] >= Y0 OR S[12,S1]<Y THEN 5400
5370 X1=INT(26+S[11,S1]/2)
5380 L$[X1,X1]="*"
5390 L$[X1+1,X1+4]=S$[S[8,S1],S[8,S1]+3]
5400 NEXT S1
5410 FOR I=55 TO 26 STEP -1
5420 IF L$[I,I] <> " " THEN 5440
5430 NEXT I
5440 PRINT L$[1,I]
5450 NEXT L1
5460 PRINT
5470 PRINT "THE MAP IS 100 LIGHT-YEARS BY 100 LIGHT-YEARS,"
5480 PRINT "SO THE CROSS-LINES MARK 10 LIGHT-YEAR DISTANCES"
5490 RETURN
5500 END
Personal tools
current TWGS Activity
Servers: 241
Players:
this month: 154
this year: 903
last year: 3,546
since 2011: 45,059