home *** CD-ROM | disk | FTP | other *** search
/ Superpower (Alt) / SUPERPOWER.iso / q / patch / mbq073 / iwbotsrc / bot_ext.qc < prev    next >
Encoding:
Text File  |  1996-08-30  |  908 b   |  51 lines

  1. /*
  2. ==============================================================================
  3.  
  4. BOT EXTENSIONS
  5.  
  6. ==============================================================================
  7. */
  8.  
  9. // Prototypes
  10.  
  11. void    ()        bot_counter_use;
  12. void    ()        bot_trigger_onlyregistered_touch;
  13.  
  14.  
  15. void() bot_counter_use =
  16. {
  17.     local string junk;
  18.  
  19.     self.count = self.count - 1;
  20.     if (self.count < 0)
  21.         return;
  22.     
  23.     self.enemy = activator;
  24.     multi_trigger ();
  25. };
  26.  
  27.  
  28. void() bot_trigger_onlyregistered_touch =
  29. {
  30.     if (self.attack_finished > time)
  31.         return;
  32.  
  33.     self.attack_finished = time + 2;
  34.     if (cvar("registered"))
  35.     {
  36.         self.message = "";
  37.         SUB_UseTargets ();
  38.         remove (self);
  39.     }
  40.     else
  41.     {
  42.         if (self.message != "")
  43.         {
  44.             sprint (other.owner, "Incoming message from bot:\n");
  45.             centerprint (other.owner, self.message);
  46.             sound (other.owner, CHAN_BODY, "misc/talk.wav", 1, ATTN_NORM);
  47.         }
  48.     }
  49. };
  50.  
  51.