0010 REM INSTRUCTIONS FOR "STREK" GAME 0020 REM VERSION "STRINST2" 12/8/74 0030 DIM A$(5) 0040 FOR I=1 TO 0 0050 ON I THEN GOSUB 0240,0360,0540,0640,0720,0780,0860,0910,0960 0060 PRINT 0070 PRINT "(TO CONTINUE, HIT 'RETURN')" 0080 PRINT 0090 INPUT A$ 0100 NEXT I 0110 PRINT " 1. WHEN YOU SEE 'COMMAND ?' PRINTED, ENTER ONE OF THE LEGAL" 0120 PRINT " COMMANDS (NAV,SRS,LRS,PHA,TOR,SHE,DAM,COM, OR XXX)." 0130 PRINT " 2. IF YOU SHOULD TYPE IN AN ILLEGAL COMMAND, YOU'LL GET A SHORT" 0140 PRINT " LIST OF THE LEGAL COMMANDS PRINTED OUT." 0150 PRINT " 3. SOME COMMANDS REQUIRE YOU TO ENTER DATA. (FOR EXAMPLE, THE" 0160 PRINT " 'NAV' COMMAND COMES BACK WITH 'COURSE (1-9)?'.) IF YOU" 0170 PRINT " TYPE IN ILLEGAL DATA (LIKE NEGATIVE NUMBERS), THAT COMMAND" 0180 PRINT " WILL BE ABORTED." 0190 PRINT 0200 PRINT " HIT (CAR RET) TO CONTINUE " 0210 INPUT A$ 0220 CHAIN "STREK" THEN GOTO 0250 0230 REM *** EXIT HERE *** 0240 PRINT 0250 PRINT " INSTRUCTIONS FOR ** STAR TREK ** " 0260 PRINT 0270 PRINT " THE GALAXY IS DIVIDED INTO AN 8 X 8 QUADRANT GRID," 0280 PRINT " AND EACH QUADRANT IS FURTHER DIVIDED INTO AN 8 X 8 SECTOR GRID." 0290 PRINT 0300 PRINT " YOU WILL BE ASSIGNED A STARTING POINT SOMEWHERE IN THE GALAXY" 0310 PRINT " TO BEGIN A TOUR OF DUTY AS COMMANDER OF THE STARSHIP 'ENTERPRISE';" 0320 PRINT " YOUR MISSION: TO SEEK AND DESTROY THE FLEET OF KLINGON WARSHIPS" 0330 PRINT " WHICH ARE MENACING THE UNITED FEDERATION OF PLANETS." 0340 PRINT 0350 RETURN 0360 PRINT " YOU HAVE THE FOLLOWING COMMANDS AVAILABLE TO YOU AS" 0370 PRINT " CAPTION OF THE STARSHIP:" 0380 PRINT " 'NAV' COMMAND = WARP ENGINE CONTROL --" 0390 PRINT " COURSE IS IN A CIRCULAR NUMERICAL 4 3 2" 0400 PRINT " VECTOR ARRANGEMENT AS SHOWN . . ." 0410 PRINT " INTEGER AND REAL VALUES MAY BE ..." 0420 PRINT " USED. (THUS, COURSE 1.5 IS HALF- 5 ----- 1" 0430 PRINT " WAY BETWEEN 1 AND 2.) ..." 0440 PRINT " . . . " 0450 PRINT " VALUES MAY APPROACH 9.0, WHICH 6 7 8" 0460 PRINT " ITSELF IS EQUIVALENT TO 1.0." 0470 PRINT " COURSE" 0480 PRINT " ONE WARP FACTOR IS THE SIZE OF" 0490 PRINT " ONE QUADRANT. THEREFORE, TO GET" 0500 PRINT " FROM QUADRANT 6,5 TO 5,5, YOU WOULD" 0510 PRINT " USE COURSE 3, WARP FACTOR 1." 0520 RETURN 0530 PRINT " 'SRS' COMMAND = SHORT RANGE SENSOR SCAN" 0540 PRINT " SHOWS YOU A SCAN OF YOUR PRESENT QUADRANT." 0550 PRINT " SYMBOLOGY ON YOUR SENSOR SCREEN IS AS FOLLOWS:" 0560 PRINT " (*) = YOUR STARSHIP'S POSITION" 0570 PRINT " +++ = KLINGON BATTLE CRUISER" 0580 PRINT " >!< = FEDERATION STARBASE (REFUEL/REPAIR/RE-ARM HERE!)" 0590 PRINT " * = STAR" 0600 PRINT 0610 RETURN 0620 PRINT " 'LRS' COMMAND = LONG RANGE SENSOR SCAN" 0630 PRINT " SHOWS CONDITIONS IN SPACE FOR ONE QUADRANT ON EACH SIDE" 0640 PRINT " OF THE ENTERPRISE (WHICH IS IN THE MIDDLE OF THE SCAN)" 0650 PRINT " THE SCAN IS CODED IN THE FORM '***'. WHERE THE UNITS DIGIT" 0660 PRINT " IS THE NUMBER OF STARS, TENS DIGIT IS THE NUMBER OF STARBASES," 0670 PRINT " AND HUNDREDS DIGIT IS THE NUMBER OF KLINGONS." 0680 PRINT " EXAMPLE -- 207 = 2 KLINGONS, NO STARBASES, 7 STARS." 0690 RETURN 0700 PRINT "'PHA' COMMAND = PHASER CONTROL" 0710 PRINT " ALLOWS YOU TO DESTROY THE KLINGON BATTLE CRUISERS BY" 0720 PRINT " ZAPPING THEM WITH SUITABLY LARGE UNITS OF ENERGY TO" 0730 PRINT " DEPLETE THEIR SHIELD POWER. (REMEMBER, KLINGONS HAVE" 0740 PRINT " PHASERS, TOO!)" 0750 RETURN 0760 PRINT "'TOR' COMMAND = PHOTON TORPEDO CONTROL" 0780 PRINT " TORPEDO COURSE IS THE SAME AS USED IN WARP ENGINE CONTROL." 0790 PRINT " IF YOU HIT THE KLINGON VESSEL, HE IS DESTROVED AND" 0800 PRINT " CANNOT FIRE BACK AT YOU. IF YOU MISS, YOU ARE SUBJECT TO" 0810 PRINT " HIS PHASER FIRE." 0820 PRINT " NOTE: THE LIBRARY-COMPUTER ('COM' COMMAND) HAS AN" 0830 PRINT " OPTION TO COMPUTE TORPEDO TRAJECTORY FOR YOU (OPTION 2)." 0840 RETURN 0850 PRINT "'SHE' COMMAND = SHIELD CONTROL" 0860 PRINT " DEFINES NUMBER OF ENERGY UNITS TO BE ASSIGNED TO SHIELDS." 0870 PRINT " ENERGY IS TAKEN FROM TOTAL SHIP'S ENERGY. NOTE THAT THE" 0880 PRINT " TOTAL ENERGY INCLUDES SHIELD ENERGY." 0890 RETURN 0900 PRINT "'DAM' COMMAND = DAMAGE CONTROL REPORT" 0910 PRINT " GIVES STATE OF REPAIR OF ALL DEVICES, WHERE A NEGATIVE" 0920 PRINT " 'STATE OF REPAIR' SHOWS THAT THE DEVICE IS TEMPORARILY" 0930 PRINT " DAMAGED." 0940 RETURN 0950 PRINT "'COM' COMMAND = LIBRARY-COMPUTER" 0960 PRINT " THE LIBRARY-COMPUTER CONTAINS SIX OPTIONS:" 0970 PRINT " OPTION 0 = CUMULATIVE GALACTIC RECORD" 0980 PRINT " WHICH SHOWS COMPUTER MEMORY OF THE RESULTS OF ALL PREVIOUS" 0990 PRINT " LONG RANGE SENSOR SCANS" 1000 PRINT " OPTION 1 = STATUS REPORT" 1010 PRINT " WHICH SHOWS THE NUMBER OF KLINGONS, STARDATES, AND STARBASES" 1020 PRINT " REMAINING IN THE GAME." 1030 PRINT " OPTION 2 = PHOTON TORPEDO DATA" 1040 PRINT " WHICH GIVES DIRECTIONS AND DISTANCE FROM THE ENTERPRISE" 1050 PRINT " TO ALL KLINGONS IN YOUR QUADRANT" 1060 PRINT " OPTION 3 = STARBASE NAV DATA" 1070 PRINT " WHICH GIVES DIRECTIONS AND DISTANCE TO ANY STARBASE" 1080 PRINT " WITHIN YOUR QUADRANT" 1090 PRINT " OPTION 4 = DIRECTION/DISTANCE CALCULATOR" 1100 PRINT " WHICH ALLOWS YOU TO ENTER COORDINATES FOR" 1110 PRINT " DIRECTION/DISTANCE CALCULATIONS." 1120 PRINT " OPTION 5 = GALACTIC 'REGION NAME' MAP" 1130 PRINT " WHICH PRINTS THE NAMES OF THE SIXTEEN MAJOR GALACTIC 1150 PRINT " REGIONS REFERRED TO IN THE GAME." 1160 RETURN 1170 END 0010 REM (VERSION "STREK7", 1/12/75 RCL) 0020 REM 0030 REM 0040 REM *** *** STAR TREK *** *** 0050 REM *** SIMULATION OF A MISSION OF THE STARSHIP ENTERPRISE. 0060 REM *** AS SEEN ON THE STAR TREK TV SHOW. 0070 REM *** ORIGINAL PROGRAM BY MIKE MAYFIELD, MODIFIED VERSION 0080 REM *** PUBLISHED IN DEC'S "101 BASIC GAMES", BY DAVE AHL. 0090 REM *** MODIFICATIONS TO THE LATTER (PLUS DEBUGGING) BY 0100 REM *** BOB LEEDOM -- APRIL & DECEMBER 1974, 0110 REM *** WITH A LITTLE HELP FROM HIS FRIENDS . . . 0120 REM *** COMMENTS, EPITHETS, AND SUGGESTIONS SOLICITED -0130 REM *** ADDRESS TO: R.C.LEEDOM 0140 REM *** WESTINGHOUSE DEFENSE & ELECTRONIC SYSTEMS CNTR. 0150 REM *** BOX 745, M.S. 338 BALTIMORE, MD 21203 0160 RANDOMIZE 0170 PRINT TAB(15); "* * * STAR TREK * * *" 0180 PRINT 0190 PRINT " DO YOU NEED INSTRUCTIONS (YES/NO)"; 0200 DIM A$[20] 0210 INPUT A$ 0220 IF A$<>"YES" THEN GOTO 0240 0230 CHAIN "STINST" 0240 REM PROGRAM BEGINS HERE . . . . . 0250 DIM Z$[72],Q$[72],R$[72],S$[72[ 0260 DIM G1$[150],G2$[16],G3$[3],G4$[3] 0270 FOR I=1 TO 72 0280 LET Z$[I,1]=" " 0290 LET Q$[I,1]=" " 0300 LET R$[I,1]=" " 0310 LET S$[I,1]=" " 0320 NEXT I 0330 DIM 0[8,8],C[9,2],K[3,3],N[3],Z[8,] 0340 DIM 01$[40],C$[10] 0350 DIM A1$[20],T$[6] 0360 DIM D$[96],03$[60] 0370 LET T=INT(RND(1)+20+20)*100 0380 LET T0=T 0390 LET T9=30 0400 LET D0=0 0410 LET E0=3000 0420 LET E=E0 0430 LET P=10 0440 LET P0=P 0450 LET S9=200 0460 LET S=0 0470 DEF FND(D)=SQR((K[I,1]-S1)^2+(K[I,2]-S2)^2) 0480 REM INITIALIZE ENTERPRISE'S POSITION 0490 LET Q1=INT(RND(1)*8+1) 0500 LET Q2=INT(RND(1)*8+1) 0510 LET S1=INT(RND(1)*8+1) 0520 LET S2=INT(RND(1)*8+1) 0530 MAT C=ZER 0540 LET C[3,1]=-1 0550 LET C[2,1]=-1 0560 LET C[4,1]=-1 0570 LET C[4,2]=-1 0580 LET C[5,2]=-1 0590 LET C[6,2]=-1 0600 LET C[1,2]=1 0610 LET C[2,2]=1 0620 LET C[6,1]=1 0630 LET C[7,1]=1 0640 LET C[8,1]=1 0650 LET C[8,2]=1 0660 LET C[9,2]=1 0670 DIM D(8) 0680 FOR I=1 TO 8 0690 LET D[1]=0 0700 NEXT I 0710 LET A1$="NSLPTSDCX" 0720 LET D$="WARP ENGINESS R. SENSORSL T SENSORSPHASER CNTRL" 0730 LET D$=D$,"PHOTON TUBESDAMAGE CNTRLSHIELD CNTRLCOMPUTER" 0740 LET G4$="III" 0750 LET G1$="ANTARES. SIRIUS.RIGEL.DENEB.PROCYON.CAPELLA.VEGA." 0760 LET G1$=G1$, "BETELGEUSE.CANOPUS.ALDEBARAN.ALTAIR.REGULUS." 0770 LET G1$=G1$,"SAGITTARIUS.ARCTURUS.POLLUX.SPICA." 0780 LET B9=0 0790 LET K9=0 0800 LET A1$="NSLPTSDCX" 0810 REM SET UP WHAT EXISTS IN GALAXY ... 0820 FOR I=1 TO 8 0830 FOR J=1 TO 8 0840 LET R1=RND(1) 0850 IF R1>. 98 THEN GOTO 0900 0860 IF R1>. 95 THEN GOTO 0930 0870 IF R1>. 8 THEN GOTO 0960 0880 LET K3=0 0890 GOTO 0980 0900 LET K3=3 0910 LET K9=K9+3 0920 GOTO 0980 0930 LET K3=2 0940 LET K9=K9+2 0950 GOTO 0980 0960 LET K3=1 0970 LET K9=K9+1 0980 LET R1=RND(1) 0990 OF R1>. 96 THEN GOTO 1020 1000 LET B3=0 1010 GOTO 1040 1020 LET B3=1 1030 LET B9=B9+1 1040 LET S3=INT(RND(1)*8+1) 1050 LET G[I,J]=K3*100+B3*10+S3 1060 REM K3=#KLINGONS B3=#STARBASES S3=#STARS 1070 LET Z[I,J]=0 1080 NEXT J 1090 NEXT I 1100 LET K7=K9 1110 DIM X$[2],X0$[5] 1120 LET X$="" 1130 LET X0$=" IS" 1140 IF B9<>0 THEN GOTO 1200 1150 LET B9=1 1160 IF G[6,3]>200 THEN GOTO 1190 1170 LET G[6,3]=G[6,3]+100 1180 LET K9=K9+1 1190 LET G[6,3]=G[6,3]+10 1200 IF B9=1 THEN GOTO 1230 1210 LET X$="S" 1220 LET X0$="ARE" 1230 PRINT "YOUR ORDERS ARE AS FOLLOWS:" 1240 PRINT " DESTROY THE "K9" KLINGON WARSHIPS WHICH HAVE INVADED" 1250 PRINT " THE GALAXY BEFORE THEY CAN ATTACK FEDERATION HEADQUARTERS" 1260 PRINT " ON STARDATE"T0+T9"; THIS GIVES YOU"T9" DAYS. THERE"X0$ 1270 PRINT " "B9" STARBASE";X$" IN THE GALAXY FOR RESUPPLYING YOUR SHIP." 1280 PRINT 1290 PRINT "HIT 'RETURN' WHEN READY TO ASSUME COMMAND ---"