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

  1. !
  2. ! Default Beggar script..
  3. !
  4. ! (c) DC Software, 1992
  5. !
  6. ! Pending Enhancements
  7. !
  8. ! - This script has no voices.  For an example of voices, look at
  9. !   MERCHANT.SCR and HEALER.SCR
  10. !   
  11.  
  12. !------------------------------------------------------------------------!
  13. :@TALK ! Talk to the character !
  14. !------------------------------------------------------------------------!
  15.  
  16.   if player.hp = 0 then
  17.     writeln( player.name, " is dead!" );
  18.     STOP;
  19.   endif;
  20.  
  21.   if npc.picture >= 0 then
  22.     viewpcx(npc);
  23.   endif;
  24.  
  25. ! First line of the text block is the greeting..
  26.   writeln( s1 );
  27.  
  28.   L1 = select( "Give Money", "Leave" );
  29.   if L1 = 0 then
  30.     readtext( npc.text, random(15)+2 ); ! display one line (2-16) !
  31.   else
  32.     writeln( "Thanks for nothing.." );
  33.     if( group.gold > 50 ) then
  34.       dec( group.gold, random(50) );
  35.     else
  36.       dec( group.gold, group.gold );
  37.     endif;
  38.     writeln( "(the beggar bumps into you as you walk away..)" );
  39.   endif;
  40.   goto XSTOP;
  41.  
  42. !-----------------------------------------------------------------!
  43. ! All STOPs now lead here so the screen can be restored if needed !
  44. !-----------------------------------------------------------------!
  45. :XSTOP
  46.   if npc.picture >= 0 then
  47.     paint(window); ! Assumes the picture fits in the window !
  48.   endif;
  49.   STOP;
  50.  
  51.  
  52.