home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.barnyard.co.uk
/
2015.02.ftp.barnyard.co.uk.tar
/
ftp.barnyard.co.uk
/
cpm
/
walnut-creek-CDROM
/
SIMTEL
/
CPMUG
/
CPMUG080.ARK
/
TRK-HELP.STB
< prev
next >
Wrap
Text File
|
1984-04-29
|
15KB
|
371 lines
10 Rem Version 09/20/81
20 Set 0,-1 : Deg
30 I=2.5 : If I=2.5 Then Imode : Run
40 Long Stardate,Time'left,Damage
50 Dim Plot$(5),Device$(152)
60 Device$="Short range sensorsLong range sensors Warp engines Impulse engines"
70 Device$(76)="Phasers Photon torpedoes Shields Ship computer"
80 Warp=6 : Stardate=2500 : Shield'status=1 : Shield'strength=95
90 Quadx=4 : Quady=3 : Sectorx=4 : Sectory=6
100 Torpedoes=7 : Energy=3679 : Time'left=3.97 : Klingons=78
110 Plot$=".*KCBE"
120 *Title
130 Gosub Screen'erase
140 Call .Cursor (20,4)
150 @"STARTREK HELP"
160 Call .Cursor (20,6)
170 @"copyright 1980"
180 Call .Cursor (20,8)
190 @"by"
200 Call .Cursor (20,10)
210 @"David E. Trachtenbarg."
220 Call .Erase'line (28,18)
230 Call .Cursor (24,18)
240 Input"Press RETURN for the main index.",Command$
250 *Help'index
260 Gosub Screen'erase
270 @ : @ Tab(32);"HELP INDEX" : @
280 @ Tab(28);"A. Introduction"
290 @ Tab(28);"B. The galaxy"
300 @ Tab(28);"C. Long range scanner"
310 @ Tab(28);"D. Short range sensors"
320 @ Tab(28);"E. Ship status"
330 @ Tab(28);"F. Warp Drive"
340 @ Tab(28);"G. Impulse Drive"
350 @ Tab(28);"H. Phasers"
360 @ Tab(28);"I. Photon torpedoes"
370 @ Tab(28);"J. Shields"
380 @ Tab(28);"K. Klingons"
390 @ Tab(28);"L. Damage and repairs"
400 @ Tab(28);"M. Starbases"
410 @ Tab(28);"N. Surrendering"
420 @ Tab(28);"O. Lesson help"
430 @ Tab(28);"P. Taking command"
440 Call .Erase'bottom (22,20)
450 @"Enter the letter of your choice. ";
460 Gosub Enter'letter
470 On(Asc(Command$)-64) Goto Intro,Ch,Lr,Sr,Score,Wa,Im,Ph,Pt,Su,Klingons,Da,Base,Qg,He,Command
480 Goto 440
490 *Intro
500 Gosub Screen'erase
510 @"Introduction" : @
520 @"After 50 years of peace between the Federation and the Klingon empire"
530 @"open war has been declared. As the commander of the starship Enterprise,"
540 @"your mission is to eliminate the Klingon threat and restore peace to the"
550 @"Federation. To ensure peace every Klingon ship must be destroyed. You"
560 @"currently have five stardates to accomplish your mission. More time may"
570 @"be allowed if you are successful. Good luck commander. The fate of the"
580 @"Federation depends on you."
590 Gosub Query
600 *Ch
610 Gosub Galaxy
620 Call .Cursor (0,6)
630 @"This display is a chart of the galaxy. The galaxy is divided up"
640 @"into a 10x10 grid of one-hundred different quadrants. If the"
650 @"number of Klingons in a quadrant is not known, the quadrant will"
660 @"as 3 dots (...) on the chart. If the number of Klingons in"
670 @"a quadrant is known, a 3 digit number will appear on the chart"
680 @"instead. The first digit is the number of Klingons, the second"
690 @"digit is the number of Federation bases, and the third digit is the"
700 @"number of stars in the quadrant. The position of the Enterprise is"
710 @"indicated by a box around its position. Since the information for"
720 @"the chart is stored in the ship's computer, it may not be displayed "
730 @"the computer is damaged. The chart command is 'CH'."
740 Gosub Query
750 *Lr
760 Gosub Long'range
770 Call .Cursor (0,14)
780 @"This is a long range scan. The position of the Enterprise is"
790 @"in the middle of the 3x3 grid. The same 3 digit system is"
800 @"used for representing the number of Klingons, bases, and stars"
810 @"in a quadrant as in the map of the galaxy. The quadrant numbers"
820 @"to the left and at the below the grid. If the Enterprise"
830 @"is near the edge of the galaxy a ``` will appear instead of the"
840 @"normal display. The long range sensor command is 'LR'."
850 Gosub Query
860 *Sr
870 Gosub Screen'erase
880 @ : Call .Cursor (0,5)
890 @ Tab(44);"This is a short range scan of"
900 @ Tab(44);"a quadrant. Each quadrant is"
910 @ Tab(44);"divided up into a 10x10 grid of"
920 @ Tab(44);"one-hundred sectors. If a sector"
930 @ Tab(44);"is empty you will see a dot on the"
940 @ Tab(44);"display. Other symbols are E for"
950 @ Tab(44);"Enterprise, B for Base, * for star,"
960 @ Tab(44);"K for Klingon, and C for a Klingon"
970 @ Tab(44);"commander. The short range sensor"
980 @ Tab(44);"command is 'SR'."
990 Gosub Short'range
1000 Gosub Query
1010 *Score
1020 Gosub Score'board
1030 Call .Cursor (0,6)
1040 @"This is Enterprise's status display."
1050 @"The time remaining is the total number of"
1060 @"Stardates left that you have to eliminate"
1070 @"the Klingon threat. You initially have"
1080 @"5 stardates, but may be given more time"
1090 @"as the number of Klingons decreases."
1100 @"The number of Klingons listed is the"
1110 @"total number of Klingons remaining."
1120 @"There will be a condition RED if the"
1130 @"Enterprise is under attack, otherwise"
1140 @"there will be condition GREEN."
1150 Gosub Query
1170 *Wa
1180 Gosub Score'board
1190 Call .Cursor (0,4)
1200 @"The command to change the warp speed is 'WA'."
1210 @"A warp speed above 6 may damage the warp drive."
1220 @"The command to move using warp drive is 'MO'."
1230 @"After typing 'MO' you will be asked to specify"
1240 @"A direction and distance. The entered should"
1250 @"be like the numbers on a clock."
1260 @ Tab(33);" 12"
1270 @ Tab(33);"9 1"
1280 @ Tab(33);" 6"
1290 @ : @"The distance is the number of quadrants."
1300 @"Therfore the distance between two adjacent points"
1310 @"is .1, not 1. The direction and distance should"
1320 @"be entered on one line separated by commas. For"
1330 @"example 1.5,.1 is one possible combination."
1340 Gosub Query
1350 *Im
1360 Gosub Screen'erase
1370 Call .Cursor (0,6)
1380 @"The command for impulse drive is 'IM'. Impulse drive is"
1390 @"slower than warp drive, but uses less energy for short"
1400 @"distances. You must enter a direction and distance"
1410 @"for impulse travel in the same way as they are entered"
1420 @"for warp travel."
1440 Gosub Query
1450 *Ph
1460 Gosub Score'board
1470 Call .Cursor (0,6)
1480 @"The command for phasers is 'PH'. Phasers use"
1490 @"pure energy. After entering the phaser"
1500 @"command you will be asked to enter the direction"
1505 @"of phaser fire and the amount of energy to use."
1510 @"to use. The direction and energy should be"
1520 @"entered on one line separated by commas. "
1530 @"Your remaining energy level is printed on the"
1531 @"status display."
1540 Gosub Query
1550 *Pt
1560 Gosub Score'board
1570 Call .Cursor (0,6)
1580 @"The command to fire photon torpedoes is 'PT'."
1590 @"Up to 3 photon torpedoes may be fired at once."
1600 @"After the 'PT' command the direction of"
1610 @"torpedoe travel must be entered. Enter"
1620 @"up to 3 directions separated by commas"
1630 @"to fire more than one torpedoe. The "
1640 @"number of torpedoes you have left is"
1650 @"printed in the status display."
1660 Gosub Query
1670 *Su
1680 Gosub Score'board
1690 Call .Cursor (0,6)
1700 @"The command to bring up the shields is 'SU'."
1710 @"The command to bring down the shields is 'SD'."
1720 @"The current status of the shields is printed"
1730 @"on the status display."
1740 Gosub Query
1750 *Klingons
1760 Gosub Screen'erase
1761 Call .Cursor (0,8)
1770 @"There are two types of Klingons. Regular and Klingon commanders."
1790 @"The Klingon commanders are more powerful. When you start a tour of"
1800 @"command on the Enterprise you are asked to enter your skill level."
1810 @"A higher skill level will entitle you to a more dangerous mission."
1820 @"During these more dangerous missions the Klingons are much more"
1830 @"aggresive and will attempt to move as close as possible to your"
1840 @"your ship to attack."
1850 Gosub Query
1860 *Da
1870 Gosub Screen'erase
1879 @
1880 Call .Cursor (0,6)
1890 @ Tab(50);"The damage report command is"
1900 @ Tab(50);"'DA'. Repairs are 10 times"
1910 @ Tab(50);"faster while docked at a "
1920 @ Tab(50);"starbase. "
1940 Gosub Damage'report
1950 Gosub Query
1970 *Base
1980 Gosub Screen'erase
1981 Call .Cursor (0,10)
1990 @"If you are adjacent to a starbase type 'DO' to dock. Your supply"
2000 @"of energy and photon torpedoes will then be replenished."
2010 Gosub Query
2020 *Qg
2030 Gosub Screen'erase
2040 Call .Cursor (0,10)
2050 @"The command to surrender is 'QG' (for quit game). Of course the"
2060 @"Federation will be lost if you do this."
2070 Gosub Query
2080 *He
2090 Gosub Screen'erase
2100 Call .Cursor (0,6)
2110 @"The command for help is 'HE'. After typing this the short"
2120 @"list of commands displayed below will be printed."
2121 Gosub Help
2130 Gosub Query
2140 *Command
2150 Gosub Screen'erase
2160 Call .Cursor (0,6)
2170 Repeat
2180 @"Do you wish to take command of the Enterprise now (Y/N)? ";
2190 Gosub Enter'letter
2200 Until Command$(0,0)="Y" Or Command$(0,0)="N"
2210 If Command$(0,0)="Y" Then Run"TREK.SAV"
2220 Goto Help'index
2230 *Query
2240 Call .Erase'bottom (28,22)
2250 @"Press RETURN to go on."
2260 Call .Cursor (25,23) : @"Press I for the HELP INDEX. ";
2270 Gosub Enter'letter
2280 If Command$(0,0)="I" Then Goto Help'index
2290 If Command$(0,0)<>Chr$(13) Then Goto Query
2300 Return
2310 *Enter'letter
2320 Open\1\"$SY"
2330 Get\1\Command$(0,0)
2340 Close\1\
2350 If Command$(0,0)=Chr$(27) Then Stop
2360 Call .Capitalize (Command$)
2370 Return
2380 *Grid
2390 For J=1 To 10
2400 Print Using"## ",J;
2410 For I=1 To 10
2420 K=Rnd(0)*100
2430 L=0
2440 If K>90 Then L=1
2450 If K<5 Then L=2
2460 If I=Sectorx And J=Sectory Then L=5
2470 If I=4 And J=9 Then L=4
2480 If I=6 And J=3 Then L=3
2490 @" ";Plot$(L,L);" ";
2500 Next I
2510 @ : @
2520 Next J
2530 @" 1 2 3 4 5 6 7 8 9 10"
2540 Return
2550 *Score'board
2560 Gosub Screen'erase
2570 Call .Cursor (52,0) : @ Using"STARDATE: ####.##",Stardate;
2580 Call .Cursor (52,2) : @"POSITION";
2590 Call .Cursor (53,3) : @" QUADRANT ";Quadx;",";Quady;
2600 Call .Cursor (53,4) : @" SECTOR ";Sectorx;",";Sectory;
2610 Call .Cursor (52,6) : @ Using"TIME REMAINING: ##.##",Time'left
2620 Call .Cursor (52,8) : @"KLINGONS: ";Klingons;" ";
2630 Call .Cursor (52,10) : @"ENERGY: ";Energy;" ";
2640 Call .Cursor (52,12) : If Shield'status=0 Then @"SHIELDS DOWN";
2650 If Shield'status=1 Then @"SHIELDS UP ";
2660 Call .Cursor (52,13) : @ Using" SHIELD STRENGTH: ###%",Shield'strength;
2670 Call .Cursor (52,15) : @"TORPEDOES: ";Torpedoes;" ";
2680 Call .Cursor (52,17) : @"WARP: ";Warp;
2690 Call .Cursor (52,19)
2700 @"CONDITION: RED ";
2710 Return
2810 *Short'range
2820 Call .Cursor (0,0)
2830 Gosub Grid
2840 Return
2850 *Galaxy
2860 Gosub Screen'erase
2870 For J=1 To 10
2880 Print Using"##",J;
2890 For I=1 To 10
2900 K=Rnd(0)*100
2910 If I=Quadx And J=Quady Then K=6
2920 If K<5 Then @" .1. "; : Goto 2950
2930 If K>50 Then @" ... "; : Goto 2950
2940 @" ";Int(Rnd(0)*9);(K>5 And K<10);Int(Rnd(0)*9);" ";
2950 Next I
2960 @ : @
2970 Next J
2980 @" 1 2 3 4 5 6 7 8 9 10"
2990 X=4*6-1 : Y=3*2-2 : Call .Cursor (X,Y+1) : @"=";
3000 If Y>1 Then Call .Cursor (X,Y-1) : @"=";
3010 Call .Cursor (X-2,Y) : @"|";
3020 Call .Cursor (X+2,Y) : @"|";
3030 Return
3040 *Long'range
3050 Gosub Screen'erase
3060 @"LONG RANGE SCAN FROM QUADRANT ";Quadx;",";Quady;"." : @ : @
3070 For J=(Quady-1) To(Quady+1)
3080 Print Using" ##",J;
3090 For I=(Quadx-1) To(Quadx+1)
3100 If I<1 Or J<1 Or I>10 Or J>10 Then @ Spc(5);"```"; : Goto 3120
3110 @ Spc(5);Int(Rnd(0)*5)*(Rnd(0)>0.3);Int(Rnd(0)*1);Int(Rnd(0)*9);
3120 Next I
3130 @ : @ : @
3140 Next J
3150 @ Tab(9);Quadx-1;Tab(17);Quadx;Tab(25);Quadx+1
3160 Return
3170 *Damage'report
3171 Call .Cursor (0,0)
3190 @
3200 @ Tab(13);"DAMAGE REPORT" : @
3210 @ Tab(10);"System";Tab(28);"Repair Time" : @
3220 For I=0 To 7
3230 @ Tab(10);Device$(I*19,I*19+18) : @
3240 Next I
3260 *Damage'numbers
3270 For I=0 To 7
3280 Y=I*2+5
3290 Call .Cursor (30,Y)
3300 J=Rnd(0)*100
3310 Damage=0
3320 If J<25 Then Damage=Rnd(0)*2
3330 If Damage>0 Then @ Using"##&.&&&",Damage
3340 If Damage=0 Then @" OK "
3350 Next I
3360 Return
3370 *Help
3380 @ : @
3390 @"SR=Short range scan MO=Warp drive PH=Phasers RE=Repair DO=Dock"
3400 @"LR=Long range scan WA=Warp speed PT=Torpedoes SU=Shields up"
3410 @"CH=Chart of Galaxy IM=Impulse drive DA=Damage report SD=Shields down";
3460 Return
3470 *Screen'erase
3480 Out 1,126 : Out 1,28
3490 Return
3500 Procedure .Cursor (X1,Y1)
3510 Out 1,126 : Out 1,17
3520 Out 1,X1 : Out 1,Y1
3530 Endproc
3540 Procedure .Get'numbers
3550 Mat Number=-1
3560 I=0
3570 For J=1 To 3
3580 K=Asc(Command2$(I))
3590 If K=47 Or K<46 Or K>57 Then 3630
3600 Number(J)=Val(Command2$(I))
3610 I=Pos(Command2$,",",I)+1
3620 If I=0 Then J=3
3630 Next J
3640 Endproc (Number(1),Number(2),Number(3))
3650 Endproc
3660 Procedure .Erase'line (X1,Y1)
3670 Out 1,126 : Out 1,17 : Out 1,X1 : Out 1,Y1
3680 Out 1,126 : Out 1,15
3690 Endproc
3700 Procedure .Erase'bottom (X1,Y1)
3710 Out 1,126 : Out 1,17 : Out 1,X1 : Out 1,Y1
3720 Out 1,126 : Out 1,24
3730 Endproc
3740 Procedure .Capitalize (Command$)
3750 Local I
3760 For I=0 To Len(Command$)-1
3770 If Command$(I,I)>="a" And Command$(I,I)<="z" Then Do
3780 Command$(I,I)=Chr$(Asc(Command$(I,I))-32)
3790 Enddo
3800 Next I
3810 Endproc