home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1993 #2 / Image.iso / games1 / dcg303xa.zip / TRAINER.SCR < prev    next >
Text File  |  1993-06-27  |  6KB  |  254 lines

  1. !
  2. ! Default trainer script..
  3. !
  4. ! (c) DC Software, 1992
  5. !
  6.  
  7. !------------------------------------------------------------------------!
  8. :@TALK ! Talk to the character !
  9. !------------------------------------------------------------------------!
  10.  
  11.   if player.hp = 0 then
  12.     writeln( player.name, " is dead!" );
  13.     STOP;
  14.   endif;
  15.  
  16.   if npc.picture >= 0 then
  17.     viewpcx(npc);
  18.   endif;
  19.  
  20. ! First, say hello.. !
  21.   if NPC.V0 > 0 then
  22.     writeln( "Hello ", player.name, ". What brings you back?" );
  23.   else
  24.     writeln( "Welcome to ", npc.name, ". How may I help you?" );
  25.   endif;
  26.  
  27. ! Now, set some variables..
  28.   NPC.V0 = 1; ! From know on, remember we've been here
  29.   L1   = 0; ! No business transactions have taken place
  30.   L15  = 0; ! Has not asked for credit.. 
  31.  
  32.   L4 = npc.value * (random(3)+1); ! Cost of STRENGTH training !
  33.   L5 = npc.value * (random(3)+1); ! Cost of DEXERITY training !
  34.   L6 = npc.value * (random(3)+1); ! Cost of AIM      training !
  35.   L7 = npc.value * (random(3)+1); ! Cost of Speed    training !
  36.   L8 = npc.value * (random(3)+1); ! Cost of IQ       training !
  37.  
  38. :LOOP
  39.  
  40.   L9 = random(5) + 2; ! Points given when training.. !
  41.  
  42.   L3 = select$( "Strength",     L4,
  43.                 "Dexterity",    L5,
  44.                 "Aim",          L6,
  45.                 "Speed",        L7,
  46.                 "Intelligence", L8,
  47.                 "Talk", -1 );
  48.  
  49.   IF L3 >= 0 AND L3 < 5 GOTO TRAIN;
  50.   IF L3 = 5             GOTO CHAT;
  51.  
  52. :CSTOP
  53.   if L1 = 0 then
  54.     writeln( "Next time buy something!" );
  55.   else
  56.     writeln( "It's been a pleasure doing business with you!" );
  57.   endif;
  58.   goto XSTOP;
  59.  
  60. !
  61. ! Want's to train..  Now find out WHO!
  62. !
  63. :TRAIN
  64.  
  65.   writeln( "Who want's to train?" );
  66.   L10 = select( group );
  67.   IF L10 < 0 GOTO LOOP;
  68.   group.current = L10;
  69.  
  70.   ON L3 GOTO XSTR, XDEX, XAIM, XSPD, XIQ;
  71.  
  72. !
  73. ! Increase your strength..
  74. !
  75. :XSTR
  76.  
  77.   if L4 > group.gold goto BROKE;
  78.  
  79.   dec( group.gold, L4 );
  80.   inc( player.mstr, L9 );
  81.   inc( player.str,  L9 );
  82.   writeln( player.name, " undergoes extensive physical training.." );
  83.   writeln( "Your strength has increased by ", L9, " units." );
  84.   inc( L1 );
  85.   GOTO LOOP;
  86.  
  87. !
  88. ! Increase your dexterity..
  89. !
  90. :XDEX
  91.  
  92.   if L5 > group.gold goto BROKE;
  93.  
  94.   dec( group.gold, L5 );
  95.   inc( player.mdex, L9 );
  96.   inc( player.dex,  L9 );
  97.   writeln( "Your dexterity has increased by ", L9, " units." );
  98.   inc( L1 );
  99.   GOTO LOOP;
  100.  
  101. !
  102. ! Increase your aim..
  103. !
  104. :XAIM
  105.  
  106.   if L6 > group.gold goto BROKE;
  107.  
  108.   dec( group.gold, L6 );
  109.   inc( player.maim, L9 );
  110.   inc( player.aim,  L9 );
  111.   writeln( "You practice with all kinds of missle weapons, including" );
  112.   writeln( "stationary and moving targets." );
  113.   writeln( "Your aim has increased by ", L9, " units." );
  114.   inc( L1 );
  115.   GOTO LOOP;
  116.  
  117. !
  118. ! Increase your speed
  119. !
  120. :XSPD
  121.  
  122.   if L7 > group.gold goto BROKE;
  123.  
  124.   dec( group.gold, L7 );
  125.   inc( player.miq, L9 );
  126.   inc( player.iq,  L9 );
  127.   writeln( "You learn that every move you make is followed by another" );
  128.   writeln( "and practice teaches your body to anticipate that move and" );
  129.   writeln( "flow into it.  You never thought of yourself as 'gracefull'." );
  130.   writeln( "Your iq has increased by ", L9, " units." );
  131.   inc( L1 );
  132.   GOTO LOOP;
  133.  
  134. !
  135. ! Increase your iq..
  136. !
  137. :XIQ
  138.  
  139.   if L8 > group.gold goto BROKE;
  140.  
  141.   dec( group.gold, L8 );
  142.   inc( player.miq, L9 );
  143.   inc( player.iq,  L9 );
  144.   writeln( "You learn some new concentration techniques and fine tune" );
  145.   writeln( "your deductive reasoning methods.." );
  146.   writeln( "Your iq has increased by ", L9, " units." );
  147.   inc( L1 );
  148.   GOTO LOOP;
  149.  
  150. :BROKE
  151.   writeln( "You don't have enough money!");
  152.   voice( "Broke" );
  153.   goto LOOP;
  154.  
  155. !
  156. ! Handle conversation..
  157. !
  158. :CHAT
  159.   writeln( "What would you like to talk about?" );
  160.  
  161. :CHAT1
  162.   L3 = getstr("Name","Strength","Dexerity","Aim","I.Q.","Train","Credit","Job","Bye");
  163.   if L3 = -1 then 
  164.     writeln( "Ok." );
  165.     goto LOOP; ! Pressed ESCape !
  166.   endif;
  167.  
  168. ! First, see if the keyword typed is in the character's text block !
  169.   if dotext( S0 ) then
  170.     if L3 = 3 goto XSTOP;
  171.     goto CHAT1;
  172.   endif;
  173.  
  174. ! It didn't, so try the predefined ones..
  175.   on L3 goto CNAME, CSTR, CDEX, CAIM, CIQ, CTRAIN, CCREDIT, CJOB, CSTOP;
  176.  
  177. ! Nope, try a 'DEFAULT' line
  178.   if not dotext( "DEFAULT" ) then
  179.     writeln( "I don't know anything about that!" );
  180.   endif;
  181.   goto CHAT1;
  182.  
  183. :CNAME 
  184.   writeln( "My name is ", NPC.name, "."                    );
  185.   goto CHAT1;
  186.  
  187. :CSTR
  188.   writeln( "Strength let's you carry heavier weights" );
  189.   writeln( "It also increases the damage you do with contact weapons" );
  190.   goto CHAT1;
  191.  
  192. :CDEX
  193.   writeln( "Dexterity allows you to a void hits when being attacked" );
  194.   writeln( "It also helps avoid traps!" );
  195.   goto CHAT1;
  196.  
  197. :CAIM
  198.   writeln( "Good aim is needed when using missle weapons." );
  199.   writeln( "During a fight, the targets move a lot and aim is essential" );
  200.   goto CHAT1;
  201.  
  202. :CSPD
  203.   writeln( "With practice, your body can react a lot faster than you can" );
  204.   writeln( "think.  Speed gives you an edga allowing an extra hit during" );
  205.   writeln( "a battle." );
  206.   goto CHAT1;
  207.  
  208. :CIQ
  209.   writeln( "A magician must learn to concentrate and focus their mental" );
  210.   writeln( "powers.  I teach techniques that increase your ability to tap" );
  211.   writeln( "your inner strength." );
  212.   goto CHAT1;
  213.  
  214. :CCREDIT
  215.   L3 = select( "MasterCard", 
  216.                "Visa",
  217.                "Am. Express",
  218.                "Diner's Club",
  219.                "Discover",
  220.                "Sears" );
  221.   if L3 >= 0 then
  222.     if L15 > 0 then
  223.       writeln( "I don't take that one either.." );
  224.       if L15 = 2 then
  225.         writeln( "(you start to see a pattern here..)" );
  226.       endif;
  227.     else
  228.       writeln( "Sorry, I don't take that one.." );
  229.     endif;
  230.   endif;
  231.   inc( L15 );
  232.   goto CHAT1;
  233.  
  234. :CTRAIN
  235.   writeln( "What do you want to train in?" );
  236.   goto LOOP;
  237.  
  238. :CJOB
  239.   writeln( "I teach people to use what nature has already given them!" );
  240.   goto CHAT1;
  241.  
  242. ! Feel free to expand on this list.. !
  243.  
  244. !-----------------------------------------------------------------!
  245. ! All STOPs now lead here so the screen can be restored if needed !
  246. !-----------------------------------------------------------------!
  247. :XSTOP
  248.   if npc.picture >= 0 then
  249.     paint(window); ! Assumes the picture fits in the window !
  250.   endif;
  251.   STOP;
  252.  
  253.  
  254.