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

  1. !
  2. ! Default prisonner 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.     if NPC.V1 > 0 goto AFTER;
  23.     writeln( "You're back.. I thought you were going to leave me here.." );
  24.   else
  25.     writeln( "Are you here to help me?" );
  26.   endif;
  27.  
  28. ! Now, set some variables..
  29.   NPC.V0 = 1; ! From know on, remember we've been here
  30.  
  31. :CHAT
  32.   L3 = getstr("Name","Job","Join","Bye");
  33.   if L3 = -1 then 
  34.     writeln( "Don't leave me here.. Please.." );
  35.     goto CHAT; ! Pressed ESCape !
  36.   endif;
  37.  
  38. ! Handle JOIN differently..
  39.   if L3 = 2 then 
  40.     if group.size = 6 then
  41.       writeln( "Your party is full!" );
  42.       goto CHAT;
  43.     endif;
  44.     player.v1 = 1; ! 1 when I join the party, 2 if delivered to quester !
  45.     if NOT dotext( S0 ) then
  46.       writeln( "The sooner the better.." );
  47.     endif;
  48.     JOIN;
  49.     goto XSTOP;
  50.   endif;
  51.  
  52. ! First, see if the keyword typed is in the character's text block !
  53.   if dotext( S0 ) goto CHAT;
  54.  
  55. ! It didn't, so try the predefined ones..
  56.   on L3 goto CNAME, CJOB, CHAT, CSTOP;
  57.  
  58. ! Nope, try a 'DEFAULT' line
  59.   if not dotext( "DEFAULT" ) then
  60.     writeln( "I don't know anything about that!" );
  61.   endif;
  62.   goto CHAT;
  63.  
  64. :CNAME
  65.   writeln( "My name is ", NPC.name, "." );
  66.   GOTO CHAT;
  67.  
  68. :CJOB
  69.   writeln( "I am a ", npc.type );
  70.   GOTO CHAT;
  71.  
  72. :CSTOP
  73.   writeln( "Don't leave me here.. Please.." );
  74.   goto XSTOP;
  75.  
  76. !
  77. ! This is the script for AFTER I've been rescued !
  78. !
  79. :AFTER
  80.  
  81.   if npc.v1 = 1 then ! We JOINED, but were not delivered !
  82.     if NOT dotext( "DELIVER" ) then
  83.       writeln( "I need your help to return home.." );
  84.     endif;
  85.     goto CHAT;
  86.   endif;
  87.  
  88. :CHAT2
  89.   L3 = getstr("Name","Job","Join","Bye");
  90.  
  91. ! First, see if the keyword typed is in the character's text block !
  92.   if dotext( S0 ) goto CHAT2;
  93.  
  94. ! It didn't, so try the predefined ones..
  95.   on L3 goto CNAME2, CJOB2, CJOIN2, CSTOP2;
  96.  
  97. ! Nope, try a 'DEFAULT' line
  98.   if not dotext( "DEFAULT" ) then
  99.     writeln( "I don't know anything about that!" );
  100.   endif;
  101.   goto CHAT2;
  102.  
  103. :CNAME2
  104.   writeln( "My name is ", NPC.name, "." );
  105.   GOTO CHAT2;
  106.  
  107. :CJOB2
  108.   writeln( "I am a ", npc.type );
  109.   GOTO CHAT2;
  110.  
  111. :CJOIN2
  112.   writeln( "Sorry.  I've had my fill of adventure.." );
  113.   GOTO CHAT2;
  114.  
  115. :CSTOP2
  116.   writeln( "Nice talking to you.." );
  117.   goto XSTOP;
  118. !------------------------------------------------------------------------!
  119. !
  120. :@DROP  ! DROP a player from the group. !
  121. !
  122. !------------------------------------------------------------------------!
  123.   !
  124.   ! Here, you can handle the 'vacate' action for the prisoner.  Omit
  125.   ! the CONTINUE command tells the system that even though we took some
  126.   ! action, standard processing should be taken anyway.  Change it to 
  127.   ! a 'STOP' if you do not want standard processing to take place.
  128.   !
  129.   ! Note that execution starts with the '@DROP' tag, so no graphics
  130.   ! has been displayed.  A graphics is displayed when you '@TALK' only.
  131.   CONTINUE;
  132.  
  133. !-----------------------------------------------------------------!
  134. ! All STOPs now lead here so the screen can be restored if needed !
  135. !-----------------------------------------------------------------!
  136. :XSTOP
  137.   if npc.picture >= 0 then
  138.     paint(window); ! Assumes the picture fits in the window !
  139.   endif;
  140.   STOP;
  141.  
  142.