home *** CD-ROM | disk | FTP | other *** search
/ The Best of Select: Games 3 / cd.iso / games / dcg303xa / regular.scr < prev    next >
Text File  |  1993-06-27  |  2KB  |  92 lines

  1. !
  2. ! Default adventurer 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( "Hello. I am ", 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.  
  30. :CHAT
  31.   L3 = getstr("Name","Job","Join","Bye");
  32.   if L3 = -1 goto CSTOP; 
  33.  
  34. ! Handle JOIN differently..
  35.   if L3 = 2 then 
  36.     if npc.level > player.level + 4 then
  37.       writeln( "You are much to inexperienced. Ask me again later!" );
  38.       goto CHAT;
  39.     endif;
  40.     if npc.level < player.level - 6 then
  41.       writeln( "I am much to inexperienced to join you.." );
  42.       goto CHAT;
  43.     endif;
  44.     if group.size = 6 then
  45.       writeln( "Your party is full!" );
  46.       goto CHAT;
  47.     endif;
  48.     if NOT dotext( S0 ) then
  49.       writeln( "Let's get busy!" );
  50.     endif;
  51.     JOIN;
  52.     goto XSTOP;
  53.   endif;
  54.  
  55. ! First, see if the keyword typed is in the character's writeln block !
  56.   if dotext( S0 ) then
  57.     if L3 = 3 goto XSTOP;
  58.     goto CHAT;
  59.   endif;
  60.  
  61. ! It didn't, so try the predefined ones..
  62.   on L3 goto CNAME, CJOB, CHAT, CSTOP;
  63.  
  64. ! Nope, try a 'DEFAULT' line
  65.   if not dotext( "DEFAULT" ) then
  66.     writeln( "I don't know anything about that!" );
  67.   endif;
  68.   goto CHAT;
  69.  
  70. :CNAME
  71.   writeln( "My name is ", NPC.name, "." );
  72.   GOTO CHAT;
  73.  
  74. :CJOB
  75.   writeln( "I am a ", npc.type );
  76.   GOTO CHAT;
  77.  
  78. :CSTOP
  79.   writeln( "Nice talking to you.." );
  80.   goto XSTOP;
  81.  
  82. ! Feel free to expand on this list.. !
  83.  
  84. !-----------------------------------------------------------------!
  85. ! All STOPs now lead here so the screen can be restored if needed !
  86. !-----------------------------------------------------------------!
  87. :XSTOP
  88.   if npc.picture >= 0 then
  89.     paint(window); ! Assumes the picture fits in the window !
  90.   endif;
  91.   STOP;
  92.