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

  1. !
  2. ! Default Fortune Teller 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( "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.   L1 = select$( "Tell Fortune", npc.value, "Leave", -1 );
  31.  
  32.   if L1 <> 0 then
  33.     if NPC.V0 > 0 then
  34.       writeln( "As you wish.." );
  35.     else
  36.       writeln( "Fine, but you may live to regret it.." );
  37.     endif;
  38.     goto XSTOP;
  39.   endif;
  40.  
  41.   if npc.value > group.gold then
  42.     writeln( "You don't have enough money.." );
  43.     goto XSTOP;
  44.   endif;
  45.  
  46.   dec( group.gold, npc.value );
  47.   readtext( npc.text );
  48.   goto XSTOP;
  49.  
  50. !-----------------------------------------------------------------!
  51. ! All STOPs now lead here so the screen can be restored if needed !
  52. !-----------------------------------------------------------------!
  53. :XSTOP
  54.   if npc.picture >= 0 then
  55.     paint(window); ! Assumes the picture fits in the window !
  56.   endif;
  57.   STOP;
  58.  
  59.