Nail the aliens in outer space. Warp, photons, starbases, smart K-ons.
Star Trip
5 REM (C)1981 BUG-BYTE
10 REM **STARTRIP**
11 LET T=0
12 GOSUB 9300
14 FAST
16 GOSUB 9200
18 LET PE=0
19 LET TE=(RA+1)*8000
20 LET K=0
30 LET T=INT (RND*200)+201
40 LET E=3000
50 LET O=15
60 LET S=0
90 LET L=T
100 DIM A(8,8)
125 REM **SET UP SECTORS**
130 FOR I=1 TO 8
140 FOR J=1 TO 8
150 LET Y=0
160 LET X=INT (RND*RA)+1
170 IF RND>.88 THEN LET Y=1
180 LET Z=INT (RND*5)+1
190 LET A(I,J)=100*X+10*Y+Z
200 LET K=K+X
210 NEXT J
212 NEXT I
214 LET KL=K
220 LET P=INT (RND*8)+1
225 LET Q=INT (RND*8)+1
228 SLOW
230 REM **SET UP CURRENT SECTOR
232 LET V=0
240 LET P=P-8*(P>8)+8*(P<1)
250 LET Q=Q-8*(Q>8)+8*(Q<1)
255 LET A=INT (RND*8)
258 LET B=INT (RND*8)
260 LET Z=A(P,Q)
270 LET X=INT (Z/100)
280 LET Z=Z-X*100
290 LET Y=INT (Z/10)
300 LET Z=Z-Y*10
302 DIM G(RA)
304 DIM H(RA)
306 DIM K(RA)
308 PRINT AT 0,0;
310 FOR I=1 TO 8
312 PRINT "% % % % % % % % "
314 NEXT I
316 PRINT AT A,B;"%$"
320 FOR I=1 TO X
321 LET K(I)=-200
322 LET G(I)=INT (RND*8)
324 LET H(I)=INT (RND*8)
326 PRINT AT G(I),H(I);
327 GOSUB 9000
328 IF CH<>128 THEN GOTO 322
330 PRINT "%K"
332 NEXT I
334 IF Y=0 THEN GOTO 344
336 PRINT AT INT (RND*8),INT (RND*8);
338 GOSUB 9000
340 IF CH<>128 THEN GOTO 336
342 PRINT "\''"
344 FOR I=1 TO Z
346 PRINT AT INT (RND*8),INT (RND*8);
348 GOSUB 9000
350 IF CH<>128 THEN GOTO 346
352 PRINT "%*"
354 NEXT I
400 LET C$="GREEN"
402 IF E<=0 THEN GOTO 9800
410 IF X<>0 THEN LET C$="RED"
420 PRINT AT A,B-1+(B=0);
430 GOSUB 9000
440 IF CH=3 THEN LET C$="DOCKED"
442 PRINT AT A,B+1-(B=7);
444 GOSUB 9000
446 IF CH=3 THEN LET C$="DOCKED"
448 IF V=1 OR C$<>"DOCKED" THEN GOTO 550
450 LET TE=TE+E-3000
452 LET E=3000
453 IF TE>=0 THEN GOTO 458
454 PRINT "STARFLEET""S ENERGY BANKS EXHAUSTED."
456 GOTO 9900
458 LET O=15
460 LET V=1
550 PRINT AT 1,10;"STARDATE ";T
560 PRINT AT 2,10;"CONDITION ";C$;" "
570 PRINT AT 3,10;"ENERGY ";E;" "
580 PRINT AT 4,10;"TORPEDOES ";O;" "
590 PRINT AT 5,10;"SHIELDS ";S;" "
600 PRINT AT 6,10;"KLINGONS ";K;" "
610 GOSUB 9100
630 IF L=T OR C$="DOCKED" OR C$="GREEN" THEN GOTO 640
635 IF RND>.3 THEN GOTO 4152
640 IF K=0 THEN PRINT "WELL DONE,CAPTAIN-THE FEDERATION HAS BEEN SAVED"
645 IF K=0 THEN GOTO 9900
648 LET L=T-1
650 PRINT "WHAT ARE YOUR ORDERS, CAPTAIN? (1-7)"
655 INPUT C
658 IF C<0 OR C>7 OR C<>INT C THEN GOTO 655
659 IF RND>.75 THEN PRINT "SPOCK: ";A$(RND*3+10.5)
660 GOTO C*1000
995 REM **HELM CONTROL**
1000 GOSUB 8500
1010 PRINT "SULU: WARP FACTOR,CAPTAIN?(1-63)"
1020 INPUT W
1022 IF W>E THEN PRINT "SCOTTIE:YE OVERLOADIN"" THE ENERGY BANKS,CAP""N."
1030 IF W>E OR W<1 OR W>63 OR W<>INT W THEN GOTO 1010
1040 PRINT AT A,B;"% "
1050 LET E=E-W
1060 LET T=T+W
1070 FOR I=1 TO W
1080 LET U=1
1090 LET A=A+M
1100 LET B=B+N
1110 IF A<0 OR A>7 OR B<0 OR B>7 THEN GOTO 1120
1112 LET U=0
1113 PRINT AT A,B;
1114 GOSUB 9000
1115 IF CH=128 THEN GOTO 1120
1116 LET A=A-M
1117 LET B=B-N
1120 NEXT I
1130 IF U=0 THEN GOTO 1140
1132 LET Q=Q+INT (A/8)
1134 LET P=P+INT (B/8)
1136 GOTO 230
1140 PRINT AT A,B;"%$"
1150 GOTO 400
1995 REM **LONG RANGE SCAN**
2000 PRINT "SHORT RANGE SCAN"
2002 PRINT "%K\''%* %K\''%* %K\''%*"
2005 FOR J=Q-1 TO Q+1
2010 FOR I=P-1 TO P+1
2012 LET G=I-8*(I>8)+8*(I<1)
2014 LET H=J-8*(J>8)+8*(J<1)
2020 LET U=A(G,H)
2030 IF INT (U/100)=0 THEN PRINT "0";
2040 IF INT (U/10)=0 THEN PRINT "0";
2050 PRINT U;" ";
2090 NEXT I
2100 PRINT
2110 NEXT J
2120 FOR D=1 TO 35
2130 NEXT D
2140 GOTO 610
2995 REM **PHASER CONTROL**
3000 PRINT "CHEKOV: PHASER ENERGY?"
3020 INPUT F
3030 IF E<F OR F<>INT F THEN GOTO 3000
3032 LET E=E-F
3035 IF X=0 THEN GOTO 3150
3040 LET F=F/X
3050 FOR I=1 TO RA
3060 IF K(I)=0 THEN GOTO 3140
3070 GOSUB 8000
3080 LET G=K(I)
3090 LET G=G+2*INT (F/D)
3100 IF G>=0 THEN GOSUB 8230
3110 IF G>=0 THEN GOTO 3140
3120 LET K(I)=G
3130 IF C$="DOCKED" THEN GOTO 3140
3131 LET G=-INT (G/D)
3132 LET S=S-G
3133 PRINT G;" HIT ON SHIELDS."
3134 IF G<100 THEN GOTO 3140
3135 PRINT "SCOTTIE: ";A$(RND*3+3.5);"CAP""N."
3136 LET E=E-INT (RND*G)*2
3140 NEXT I
3145 IF S<0 THEN GOTO 8100
3150 LET L=T
3160 LET A(P,Q)=A(P,Q)-(INT (A(P,Q)/100)-X)*100
3170 GOTO 400
3995 REM **TORPEDO CONTROL**
4000 IF O<1 THEN PRINT "SULU: NO TORPEDOES LEFT, SIR"
4002 IF O<1 THEN GOTO 650
4010 GOSUB 8500
4020 LET O=O-1
4030 LET G=A
4040 LET H=B
4050 FOR I=1 TO 7
4060 LET G=G+M
4070 LET H=H+N
4082 PRINT AT G,H;
4084 GOSUB 9000
4090 IF CH<>128 THEN GOTO 4110
4100 NEXT I
4110 IF CH<>3 THEN GOTO 4116
4111 PRINT AT G,H;"% "
4112 GOSUB 9100
4113 PRINT "SPOCK: WE HAVE DESTROYED A STAR BASE, CAPTAIN"
4114 LET PE=-200
4115 GOTO 9900
4116 IF CH<>151 THEN GOTO 4130
4118 PRINT AT G,H;"% "
4120 GOSUB 9100
4121 LET R=INT (RND*10)
4122 PRINT "STAR HAS GONE ";
4123 IF R<9 THEN GOTO 4127
4124 PRINT "SUPERNOVA"
4125 LET PE=-100
4126 GOTO 9900
4127 PRINT "NOVA"
4128 LET S=S-100
4129 GOTO 4152
4130 IF CH<>176 THEN GOTO 4150
4140 GOSUB 8200
4142 GOTO 4152
4150 GOSUB 9100
4152 LET F=0
4155 IF RND>.75 THEN PRINT "KLINGON MESSAGE:";A$(RND*4+6.5)
4160 GOTO 3032
4995 REM **SHIELD CONTROL**
5000 LET E=E+S
5020 PRINT "CHEKOV: SHIELD ENERGY, SIR?"
5030 INPUT S
5040 LET E=E-S
5050 IF E<1 THEN PRINT "SCOTTIE:THE ENERGY BANKS CANNO"" TAKE IT, CAP""N."
5052 IF E<1 THEN GOTO 5000
5060 GOTO 400
5995 REM **INSTRUCTIONS**
6000 CLS
6010 PRINT " YOU ARE CAPTAIN KIRK OF THE STARSHIP ENTERPRISE(%$). YOUR MISSION IS TO DESTROY ALL THE KLINGON SHIPS(%K)IN THE GALAXY."
6012 PRINT
6015 PRINT " THERE ARE 64 SECTORS OF THE GALAXY,WHICH ARE EACH 8 PARSECS SQUARE."
6017 PRINT
6020 PRINT " YOU ARE GIVEN 15 PHOTON TORPEDOES,AND 3000 ENERGY UNITS."
6021 PRINT
6022 PRINT " YOU MAY DOCK BESIDE A STAR BASE(\''),WHICH REPLENISHES YOUR ENERGY AND TORPEDOES AND PROTECTS YOU FROM ATTACK."
6023 PRINT
6024 PRINT "PRESS ANY KEY TO CONTINUE"
6025 IF INKEY$="" THEN GOTO 6025
6030 CLS
6040 PRINT " THE COMMANDS ARE:"
6050 PRINT "1)HELM-TO MOVE TO ANY POINT IN THE GALAXY,GIVING THE COURSE ANDWARP(EACH UNIT MOVES 1 PARSEC)."
6055 PRINT
6060 PRINT "2)LONG RANGE SCAN-GIVES THE NO. OF %K\''%* IN THE ADJACENT SECTORS."
6065 PRINT
6070 PRINT "3)PHASERS-THIS WEAPON ACTS IN ALL DIRECTIONS BUT ITS EFFECT DECREASES WITH DISTANCE."
6075 PRINT
6080 PRINT "4)PHOTON TORPEDOES-DIRECTIONAL WEAPON BUT A SINGLE BOLT WILL DESTROY A KLINGON AT ANY DIST."
6085 PRINT
6090 PRINT "5)SHIELDS-INPUT AMOUNT OF ENERGY DIVERTED TO THE SHIELDS."
6095 PRINT
6100 PRINT "6)INSTRUCTIONS"
6110 PRINT "7)RESIGNATION"
6120 PRINT "PRESS ANY KEY TO CONTINUE"
6125 IF INKEY$="" THEN GOTO 6125
6130 CLS
6132 IF T=0 THEN RETURN
6134 LET L=T
6140 GOTO 230
6995 REM **RESIGNATION**
7000 PRINT "STARFLEET: RESIGNATION ACCEPTED"
7010 GOTO 9900
7990 REM **SUBROUTINES**
7995 REM **CAL. KLINGON DIST.**
8000 LET Z=A-G(I)
8010 LET Y=B-H(I)
8020 LET D=INT SQR (Z*Z+Y*Y)
8030 RETURN
8095 REM ***********************
8100 PRINT "THE ENTERPRISE IS DEAD IN SPACE."
8110 IF S>-100 THEN GOTO 8120
8112 LET PE=-300
8114 PRINT " THERE ARE NO SURVIVERS."
8116 GOTO 9900
8120 IF S>-50 THEN GOTO 8130
8122 LET PE=-200
8124 PRINT "HALF THE CREW WERE KILLED."
8126 GOTO 9900
8130 LET PE=S*2
8132 PRINT -S;" OF THE CREW WERE KILLED."
8134 GOTO 9900
8195 REM ***********************
8200 FOR I=1 TO RA
8210 IF G(I)=G AND H(I)=H THEN GOTO 8230
8220 NEXT I
8230 LET K(I)=0
8235 PRINT AT G(I),H(I);"% "
8240 GOSUB 9100
8250 PRINT A$(RND*3+.5)
8260 LET X=X-1
8265 LET K=K-1
8270 RETURN
8495 REM **READ COURSE AND CAL**
8496 REM ** MOVEMENT VECTOR **
8500 PRINT "CHEKOV:COURSE, CAPTAIN?(O-7)"
8510 INPUT C
8520 IF C<0 OR C>7 OR C<>INT C THEN GOTO 8500
8530 LET M=0
8540 LET N=0
8550 IF C<2 OR C>6 THEN LET M=-1
8560 IF C>2 AND C<6 THEN LET M=1
8570 IF C<4 AND C>0 THEN LET N=1
8580 IF C>4 THEN LET N=-1
8590 RETURN
8595 REM ***********************
9000 LET CH=PEEK (PEEK 16398+256*PEEK 16399)
9010 RETURN
9100 PRINT AT 8,0;
9110 FOR J=1 TO 14
9120 PRINT " "
9130 NEXT J
9140 PRINT AT 8,0;
9150 RETURN
9200 DIM A$(13,33)
9202 LET A$(1)="SULU: BULLS EYE, CAPTAIN"
9204 LET A$(2)="SPOCK: KLINGON DESTROYED"
9206 LET A$(3)="CHEKOV: WE GOT HIM, SIR"
9208 LET A$(11)="HUMAN LOGIC FASCINATES ME"
9210 LET A$(12)="I CAN NEVER UNDERSTAND EMOTIONS"
9220 LET A$(13)="HUMAN BEHAVIOUR IS VERYIRRATIONAL"
9222 LET A$(4)="DILITHIUM CRYSTALS DAMAGED,"
9224 LET A$(5)="ANTIMATTER STABLISER BROKEN ,"
9226 LET A$(6)="WEE DAMAGE TO ENERGY BANKS ,"
9228 LET A$(7)="YOU DON""T STAND A CHANCE, KIRK"
9230 LET A$(8)="GIVE YOURSELF UP, KIRK"
9232 LET A$(9)="SURRENDER NOW, KIRK, OR DIE"
9234 LET A$(10)="YOUR PUNY RACE CAN""T KILL A FLY"
9250 RETURN
9300 PRINT TAB 9;"************"
9310 PRINT TAB 9;"**STARTRIP**"
9320 PRINT TAB 9;"************"
9330 PRINT
9340 PRINT "DO YOU WANT INSTRUCTIONS?"
9350 LET B$=INKEY$
9360 IF B$="" THEN GOTO 9350
9370 IF B$="Y" THEN GOSUB 6000
9372 PRINT
9380 PRINT "WHAT STAR-RATING ARE YOU, CAPTAIN? ( 6 IS THE HIGHEST )"
9390 INPUT RA
9400 IF RA>6 OR RA<1 OR RA<>INT RA THEN GOTO 9380
9410 CLS
9420 RETURN
9890 LET E=0
9892 PRINT "YOU HAVE NO ENERGY LEFT"
9894 LET PE=-100
9900 FOR D=1 TO 25
9902 NEXT D
9903 CLS
9904 PRINT TAB 10;"GAME OVER"
9906 LET S=PE+INT (TE/100/RA)+(KL-K)*10
9908 PRINT
9910 PRINT "YOUR SCORE IS ";S
9920 PRINT
9922 PRINT "YOU HAVE KILLED ";KL-K;" KLINGONS"
9924 PRINT
9928 LET RA=(RA+7)/16
9930 IF S>RA*200 THEN GOTO 9940
9932 PRINT "NOT VERY GOOD-YOU""LL HAVE TO DO BETTER THAN THAT."
9934 STOP
9940 IF S>RA*400 THEN GOTO 9950
9942 PRINT "NOT BAD, BUT YOU CAN STILL DO MUCH BETTER."
9944 STOP
9950 IF S>RA*600 THEN GOTO 9960
9952 PRINT "A WORTHY ATTEMPT, CAPTAIN."
9954 STOP
9960 IF S>RA*800 THEN GOTO 9970
9962 PRINT "VERY GOOD, YOU DESERVE PROMOTION"
9964 STOP
9970 IF S>RA*1000 THEN GOTO 9980
9972 PRINT "A CREDITABLE EXAMPLE FOR THE REST OF THE FLEET, WELL DONE."
9974 STOP
9980 PRINT "EXCELLENT, YOU DESERVE TO BE STARFLEET COMMANDER."
9997 FOR A=1 TO 20
9998 PRINT A$(A)
9999 NEXT A
People
No people associated with this content.