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 >
Text File  |  1984-04-29  |  15KB  |  371 lines

  1.  
  2.    10   Rem Version 09/20/81
  3.    20   Set 0,-1 : Deg
  4.    30   I=2.5 : If I=2.5 Then Imode : Run
  5.    40   Long Stardate,Time'left,Damage
  6.    50   Dim Plot$(5),Device$(152)
  7.    60   Device$="Short range sensorsLong range sensors Warp engines       Impulse engines"
  8.    70   Device$(76)="Phasers            Photon torpedoes   Shields            Ship computer"
  9.    80   Warp=6 : Stardate=2500 : Shield'status=1 : Shield'strength=95
  10.    90   Quadx=4 : Quady=3 : Sectorx=4 : Sectory=6
  11.   100   Torpedoes=7 : Energy=3679 : Time'left=3.97 : Klingons=78
  12.   110   Plot$=".*KCBE"
  13.   120 *Title
  14.   130   Gosub Screen'erase
  15.   140   Call .Cursor (20,4)
  16.   150   @"STARTREK HELP"
  17.   160   Call .Cursor (20,6)
  18.   170   @"copyright 1980"
  19.   180   Call .Cursor (20,8)
  20.   190   @"by"
  21.   200   Call .Cursor (20,10)
  22.   210   @"David E. Trachtenbarg."
  23.   220   Call .Erase'line (28,18)
  24.   230   Call .Cursor (24,18)
  25.   240   Input"Press RETURN for the main index.",Command$
  26.   250 *Help'index
  27.   260   Gosub Screen'erase
  28.   270   @ : @ Tab(32);"HELP INDEX" : @
  29.   280   @ Tab(28);"A. Introduction"
  30.   290   @ Tab(28);"B. The galaxy"
  31.   300   @ Tab(28);"C. Long range scanner"
  32.   310   @ Tab(28);"D. Short range sensors"
  33.   320   @ Tab(28);"E. Ship status"
  34.   330   @ Tab(28);"F. Warp Drive"
  35.   340   @ Tab(28);"G. Impulse Drive"
  36.   350   @ Tab(28);"H. Phasers"
  37.   360   @ Tab(28);"I. Photon torpedoes"
  38.   370   @ Tab(28);"J. Shields"
  39.   380   @ Tab(28);"K. Klingons"
  40.   390   @ Tab(28);"L. Damage and repairs"
  41.   400   @ Tab(28);"M. Starbases"
  42.   410   @ Tab(28);"N. Surrendering"
  43.   420   @ Tab(28);"O. Lesson help"
  44.   430   @ Tab(28);"P. Taking command"
  45.   440   Call .Erase'bottom (22,20)
  46.   450   @"Enter the letter of your choice. ";
  47.   460   Gosub Enter'letter
  48.   470   On(Asc(Command$)-64) Goto Intro,Ch,Lr,Sr,Score,Wa,Im,Ph,Pt,Su,Klingons,Da,Base,Qg,He,Command
  49.   480   Goto 440
  50.   490 *Intro
  51.   500   Gosub Screen'erase
  52.   510   @"Introduction" : @
  53.   520   @"After 50 years of peace between the Federation and the Klingon empire"
  54.   530   @"open war has been declared.  As the commander of the starship Enterprise,"
  55.   540   @"your mission is to eliminate the Klingon threat and restore peace to the"
  56.   550   @"Federation.  To ensure peace every Klingon ship must be destroyed.   You"
  57.   560   @"currently have five stardates to accomplish your mission.  More time may"
  58.   570   @"be allowed if you are successful.  Good luck commander.  The fate of the"
  59.   580   @"Federation depends on you."
  60.   590   Gosub Query
  61.   600 *Ch
  62.   610   Gosub Galaxy
  63.   620   Call .Cursor (0,6)
  64.   630   @"This display is a chart of the galaxy.  The galaxy is divided up"
  65.   640   @"into a 10x10 grid of one-hundred different quadrants.  If the"
  66.   650   @"number of Klingons in a quadrant is not known, the quadrant will"
  67.   660   @"as 3 dots (...) on the chart.  If the number of Klingons in"
  68.   670   @"a quadrant is known, a 3 digit number will appear on the chart"
  69.   680   @"instead.  The first digit is the number of Klingons, the second"
  70.   690   @"digit is the number of Federation bases, and the third digit is the"
  71.   700   @"number of stars in the quadrant.  The position of the Enterprise is"
  72.   710   @"indicated by a box around its position.  Since the information for"
  73.   720   @"the chart is stored in the ship's computer, it may not be displayed "
  74.   730   @"the computer is damaged.  The chart command is 'CH'."
  75.   740   Gosub Query
  76.   750 *Lr
  77.   760   Gosub Long'range
  78.   770   Call .Cursor (0,14)
  79.   780   @"This is a long range scan.  The position of the Enterprise is"
  80.   790   @"in the middle of the 3x3 grid.  The same 3 digit system is"
  81.   800   @"used for representing the number of Klingons, bases, and stars"
  82.   810   @"in a quadrant as in the map of the galaxy.  The quadrant numbers"
  83.   820   @"to the left and at the below the grid.  If the Enterprise"
  84.   830   @"is near the edge of the galaxy a ``` will appear instead of the"
  85.   840   @"normal display.  The long range sensor command is 'LR'."
  86.   850   Gosub Query
  87.   860 *Sr
  88.   870   Gosub Screen'erase
  89.   880   @ : Call .Cursor (0,5)
  90.   890   @ Tab(44);"This is a short range scan of"
  91.   900   @ Tab(44);"a quadrant.  Each quadrant is"
  92.   910   @ Tab(44);"divided up into a 10x10 grid of"
  93.   920   @ Tab(44);"one-hundred sectors.  If a sector"
  94.   930   @ Tab(44);"is empty you will see a dot on the"
  95.   940   @ Tab(44);"display.  Other symbols are E for"
  96.   950   @ Tab(44);"Enterprise, B for Base, * for star,"
  97.   960   @ Tab(44);"K for Klingon, and C for a Klingon"
  98.   970   @ Tab(44);"commander.  The short range sensor"
  99.   980   @ Tab(44);"command is 'SR'."
  100.   990   Gosub Short'range
  101.  1000   Gosub Query
  102.  1010 *Score
  103.  1020   Gosub Score'board
  104.  1030   Call .Cursor (0,6)
  105.  1040   @"This is Enterprise's status display."
  106.  1050   @"The time remaining is the total number of"
  107.  1060   @"Stardates left that you have to eliminate"
  108.  1070   @"the Klingon threat.  You initially have"
  109.  1080   @"5 stardates, but may be given more time"
  110.  1090   @"as the number of Klingons decreases."
  111.  1100   @"The number of Klingons listed is the"
  112.  1110   @"total number of Klingons remaining."
  113.  1120   @"There will be a condition RED if the"
  114.  1130   @"Enterprise is under attack, otherwise"
  115.  1140   @"there will be condition GREEN."
  116.  1150   Gosub Query
  117.  1170 *Wa
  118.  1180   Gosub Score'board
  119.  1190   Call .Cursor (0,4)
  120.  1200   @"The command to change the warp speed is 'WA'."
  121.  1210   @"A warp speed above 6 may damage the warp drive."
  122.  1220   @"The command to move using warp drive is 'MO'."
  123.  1230   @"After typing 'MO' you will be asked to specify"
  124.  1240   @"A direction and distance.  The entered should"
  125.  1250   @"be like the numbers on a clock."
  126.  1260   @ Tab(33);"  12"
  127.  1270   @ Tab(33);"9    1"
  128.  1280   @ Tab(33);"   6"
  129.  1290   @ : @"The distance is the number of quadrants."
  130.  1300   @"Therfore the distance between two adjacent points"
  131.  1310   @"is .1, not 1.  The direction and distance should"
  132.  1320   @"be entered on one line separated by commas.  For"
  133.  1330   @"example 1.5,.1 is one possible combination."
  134.  1340   Gosub Query
  135.  1350 *Im
  136.  1360   Gosub Screen'erase
  137.  1370   Call .Cursor (0,6)
  138.  1380   @"The command for impulse drive is 'IM'.  Impulse drive is"
  139.  1390   @"slower than warp drive, but uses less energy for short"
  140.  1400   @"distances.  You must enter a direction and distance"
  141.  1410   @"for impulse travel in the same way as they are entered"
  142.  1420   @"for warp travel."
  143.  1440   Gosub Query
  144.  1450 *Ph
  145.  1460   Gosub Score'board
  146.  1470   Call .Cursor (0,6)
  147.  1480   @"The command for phasers is 'PH'.  Phasers use"
  148.  1490   @"pure energy.  After entering the phaser"
  149.  1500   @"command you will be asked to enter the direction"
  150.  1505   @"of phaser fire and the amount of energy to use."
  151.  1510   @"to use.  The direction and energy should be"
  152.  1520   @"entered on one line separated by commas. "
  153.  1530   @"Your remaining energy level is printed on the"
  154.  1531   @"status display."
  155.  1540   Gosub Query
  156.  1550 *Pt
  157.  1560   Gosub Score'board
  158.  1570   Call .Cursor (0,6)
  159.  1580   @"The command to fire photon torpedoes is 'PT'."
  160.  1590   @"Up to 3 photon torpedoes may be fired at once."
  161.  1600   @"After the 'PT' command the direction of"
  162.  1610   @"torpedoe travel must be entered.  Enter"
  163.  1620   @"up to 3 directions separated by commas"
  164.  1630   @"to fire more than one torpedoe.  The "
  165.  1640   @"number of torpedoes you have left is"
  166.  1650   @"printed in the status display."
  167.  1660   Gosub Query
  168.  1670 *Su
  169.  1680   Gosub Score'board
  170.  1690   Call .Cursor (0,6)
  171.  1700   @"The command to bring up the shields is 'SU'."
  172.  1710   @"The command to bring down the shields is 'SD'."
  173.  1720   @"The current status of the shields is printed"
  174.  1730   @"on the status display."
  175.  1740   Gosub Query
  176.  1750 *Klingons
  177.  1760   Gosub Screen'erase
  178.  1761   Call .Cursor (0,8)
  179.  1770   @"There are two types of Klingons.  Regular and Klingon commanders."
  180.  1790   @"The Klingon commanders are more powerful.  When you start a tour of"
  181.  1800   @"command on the Enterprise you are asked to enter your skill level."
  182.  1810   @"A higher skill level will entitle you to a more dangerous mission."
  183.  1820   @"During these more dangerous missions the Klingons are much more"
  184.  1830   @"aggresive and will attempt to move as close as possible to your"
  185.  1840   @"your ship to attack."
  186.  1850   Gosub Query
  187.  1860 *Da
  188.  1870   Gosub Screen'erase
  189.  1879   @
  190.  1880   Call .Cursor (0,6)
  191.  1890   @ Tab(50);"The damage report command is"
  192.  1900   @ Tab(50);"'DA'.  Repairs are 10 times"
  193.  1910   @ Tab(50);"faster while docked at a "
  194.  1920   @ Tab(50);"starbase. "
  195.  1940   Gosub Damage'report
  196.  1950   Gosub Query
  197.  1970 *Base
  198.  1980   Gosub Screen'erase
  199.  1981   Call .Cursor (0,10)
  200.  1990   @"If you are adjacent to a starbase type 'DO' to dock.  Your supply"
  201.  2000   @"of energy and photon torpedoes will then be replenished."
  202.  2010   Gosub Query
  203.  2020 *Qg
  204.  2030   Gosub Screen'erase
  205.  2040   Call .Cursor (0,10)
  206.  2050   @"The command to surrender is 'QG' (for quit game).  Of course the"
  207.  2060   @"Federation will be lost if you do this."
  208.  2070   Gosub Query
  209.  2080 *He
  210.  2090   Gosub Screen'erase
  211.  2100   Call .Cursor (0,6)
  212.  2110   @"The command for help is 'HE'.  After typing this the short"
  213.  2120   @"list of commands displayed below will be printed."
  214.  2121   Gosub Help
  215.  2130   Gosub Query
  216.  2140 *Command
  217.  2150   Gosub Screen'erase
  218.  2160   Call .Cursor (0,6)
  219.  2170     Repeat
  220.  2180     @"Do you wish to take command of the Enterprise now (Y/N)? ";
  221.  2190     Gosub Enter'letter
  222.  2200     Until Command$(0,0)="Y" Or Command$(0,0)="N"
  223.  2210   If Command$(0,0)="Y" Then Run"TREK.SAV"
  224.  2220   Goto Help'index
  225.  2230 *Query
  226.  2240   Call .Erase'bottom (28,22)
  227.  2250   @"Press RETURN to go on."
  228.  2260   Call .Cursor (25,23) : @"Press I for the HELP INDEX. ";
  229.  2270   Gosub Enter'letter
  230.  2280   If Command$(0,0)="I" Then Goto Help'index
  231.  2290   If Command$(0,0)<>Chr$(13) Then Goto Query
  232.  2300   Return
  233.  2310 *Enter'letter
  234.  2320   Open\1\"$SY"
  235.  2330   Get\1\Command$(0,0)
  236.  2340   Close\1\
  237.  2350   If Command$(0,0)=Chr$(27) Then Stop
  238.  2360   Call .Capitalize (Command$)
  239.  2370   Return
  240.  2380 *Grid
  241.  2390     For J=1 To 10
  242.  2400     Print Using"## ",J;
  243.  2410       For I=1 To 10
  244.  2420       K=Rnd(0)*100
  245.  2430       L=0
  246.  2440       If K>90 Then L=1
  247.  2450       If K<5 Then L=2
  248.  2460       If I=Sectorx And J=Sectory Then L=5
  249.  2470       If I=4 And J=9 Then L=4
  250.  2480       If I=6 And J=3 Then L=3
  251.  2490       @"  ";Plot$(L,L);" ";
  252.  2500       Next I
  253.  2510     @ : @
  254.  2520     Next J
  255.  2530   @"     1   2   3   4   5   6   7   8   9  10"
  256.  2540   Return
  257.  2550 *Score'board
  258.  2560   Gosub Screen'erase
  259.  2570   Call .Cursor (52,0) : @ Using"STARDATE: ####.##",Stardate;
  260.  2580   Call .Cursor (52,2) : @"POSITION";
  261.  2590   Call .Cursor (53,3) : @" QUADRANT ";Quadx;",";Quady;
  262.  2600   Call .Cursor (53,4) : @" SECTOR   ";Sectorx;",";Sectory;
  263.  2610   Call .Cursor (52,6) : @ Using"TIME REMAINING: ##.##",Time'left
  264.  2620   Call .Cursor (52,8) : @"KLINGONS: ";Klingons;" ";
  265.  2630   Call .Cursor (52,10) : @"ENERGY: ";Energy;"   ";
  266.  2640   Call .Cursor (52,12) : If Shield'status=0 Then @"SHIELDS DOWN";
  267.  2650   If Shield'status=1 Then @"SHIELDS UP  ";
  268.  2660   Call .Cursor (52,13) : @ Using" SHIELD STRENGTH: ###%",Shield'strength;
  269.  2670   Call .Cursor (52,15) : @"TORPEDOES: ";Torpedoes;" ";
  270.  2680   Call .Cursor (52,17) : @"WARP: ";Warp;
  271.  2690   Call .Cursor (52,19)
  272.  2700   @"CONDITION: RED  ";
  273.  2710   Return
  274.  2810 *Short'range
  275.  2820   Call .Cursor (0,0)
  276.  2830   Gosub Grid
  277.  2840   Return
  278.  2850 *Galaxy
  279.  2860   Gosub Screen'erase
  280.  2870     For J=1 To 10
  281.  2880     Print Using"##",J;
  282.  2890       For I=1 To 10
  283.  2900       K=Rnd(0)*100
  284.  2910       If I=Quadx And J=Quady Then K=6
  285.  2920       If K<5 Then @"  .1. "; : Goto 2950
  286.  2930       If K>50 Then @"  ... "; : Goto 2950
  287.  2940       @"  ";Int(Rnd(0)*9);(K>5 And K<10);Int(Rnd(0)*9);" ";
  288.  2950       Next I
  289.  2960     @ : @
  290.  2970     Next J
  291.  2980   @"     1     2     3     4     5     6     7     8     9    10"
  292.  2990   X=4*6-1 : Y=3*2-2 : Call .Cursor (X,Y+1) : @"=";
  293.  3000   If Y>1 Then Call .Cursor (X,Y-1) : @"=";
  294.  3010   Call .Cursor (X-2,Y) : @"|";
  295.  3020   Call .Cursor (X+2,Y) : @"|";
  296.  3030   Return
  297.  3040 *Long'range
  298.  3050   Gosub Screen'erase
  299.  3060   @"LONG RANGE SCAN FROM QUADRANT ";Quadx;",";Quady;"." : @ : @
  300.  3070     For J=(Quady-1) To(Quady+1)
  301.  3080     Print Using" ##",J;
  302.  3090       For I=(Quadx-1) To(Quadx+1)
  303.  3100       If I<1 Or J<1 Or I>10 Or J>10 Then @ Spc(5);"```"; : Goto 3120
  304.  3110       @ Spc(5);Int(Rnd(0)*5)*(Rnd(0)>0.3);Int(Rnd(0)*1);Int(Rnd(0)*9);
  305.  3120       Next I
  306.  3130     @ : @ : @
  307.  3140     Next J
  308.  3150   @ Tab(9);Quadx-1;Tab(17);Quadx;Tab(25);Quadx+1
  309.  3160   Return
  310.  3170 *Damage'report
  311.  3171   Call .Cursor (0,0)
  312.  3190   @
  313.  3200   @ Tab(13);"DAMAGE REPORT" : @
  314.  3210   @ Tab(10);"System";Tab(28);"Repair Time" : @
  315.  3220     For I=0 To 7
  316.  3230     @ Tab(10);Device$(I*19,I*19+18) : @
  317.  3240     Next I
  318.  3260 *Damage'numbers
  319.  3270     For I=0 To 7
  320.  3280     Y=I*2+5
  321.  3290     Call .Cursor (30,Y)
  322.  3300     J=Rnd(0)*100
  323.  3310     Damage=0
  324.  3320     If J<25 Then Damage=Rnd(0)*2
  325.  3330     If Damage>0 Then @ Using"##&.&&&",Damage
  326.  3340     If Damage=0 Then @"  OK   "
  327.  3350     Next I
  328.  3360   Return
  329.  3370 *Help
  330.  3380   @ : @
  331.  3390   @"SR=Short range scan  MO=Warp drive     PH=Phasers        RE=Repair      DO=Dock"
  332.  3400   @"LR=Long range scan   WA=Warp speed     PT=Torpedoes      SU=Shields up"
  333.  3410   @"CH=Chart of Galaxy   IM=Impulse drive  DA=Damage report  SD=Shields down";
  334.  3460   Return
  335.  3470 *Screen'erase
  336.  3480   Out 1,126 : Out 1,28
  337.  3490   Return
  338.  3500 Procedure .Cursor (X1,Y1)
  339.  3510   Out 1,126 : Out 1,17
  340.  3520   Out 1,X1 : Out 1,Y1
  341.  3530   Endproc 
  342.  3540 Procedure .Get'numbers 
  343.  3550   Mat Number=-1
  344.  3560   I=0
  345.  3570     For J=1 To 3
  346.  3580     K=Asc(Command2$(I))
  347.  3590     If K=47 Or K<46 Or K>57 Then 3630
  348.  3600     Number(J)=Val(Command2$(I))
  349.  3610     I=Pos(Command2$,",",I)+1
  350.  3620     If I=0 Then J=3
  351.  3630     Next J
  352.  3640   Endproc (Number(1),Number(2),Number(3))
  353.  3650   Endproc 
  354.  3660 Procedure .Erase'line (X1,Y1)
  355.  3670   Out 1,126 : Out 1,17 : Out 1,X1 : Out 1,Y1
  356.  3680   Out 1,126 : Out 1,15
  357.  3690   Endproc 
  358.  3700 Procedure .Erase'bottom (X1,Y1)
  359.  3710   Out 1,126 : Out 1,17 : Out 1,X1 : Out 1,Y1
  360.  3720   Out 1,126 : Out 1,24
  361.  3730   Endproc 
  362.  3740 Procedure .Capitalize (Command$)
  363.  3750   Local I
  364.  3760     For I=0 To Len(Command$)-1
  365.  3770     If Command$(I,I)>="a" And Command$(I,I)<="z" Then  Do
  366.  3780       Command$(I,I)=Chr$(Asc(Command$(I,I))-32)
  367.  3790       Enddo
  368.  3800     Next I
  369.  3810   Endproc 
  370.