Difference between revisions of "Manual:DIL Manual/SFB COM"

From DikuMUD Wiki
Jump to navigation Jump to search
(XML import)
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
= SFB_COM =
+
<span id="sfbcom"></span>
 +
SFB_COM           Combat message
  
SFB_COM is a combat message that is sent during combat.
+
  When this flag is set, the routine gets activated whenever a combat is in
 +
  progress. The unit containing the DIL program needs not be involved in the
 +
  combat itself:
  
When this flag is used in a wait() statement, it will trigger on combat messages.
+
      'activator'... is a unitptr to the PC/NPC about to hit someone else.
The unit containing the DIL program needs not be involved in the combat itself,
+
      'argument'.... is empty.
it will react to any combat in it's local environment. The combat message is sent
 
just prior to the hit.
 
  
Only the following global value is set in a SFB_COM combat message:
+
      command(CMD_AUTO_COMBAT) will evaluate to TRUE.
  'activator' : is a unitptr to the PC/NPC about to hit someone else.
+
---~---~---~---~---~---~---~---~---
 +
<span id="sfbcom"></span>
 +
SFB_COM           Combat message
  
Note that:
+
  When this flag is set, the routine gets activated whenever a combat is in
  command(CMD_AUTO_COMBAT)
+
  progress. The unit containing the DIL program needs not be involved in the
 +
  combat itself:
  
will evaluate to TRUE.
+
      'activator'... is a unitptr to the PC/NPC about to hit someone else.
 +
      'argument'.... is empty.
  
Example:
+
      command(CMD_AUTO_COMBAT) will evaluate to TRUE.
  wait(SFB_COM, activator == self);
+
---~---~---~---~---~---~---~---~---
 
 
Example:
 
  wait(SFB_COM, activator == self.fighting);
 
 
 
Example:
 
  wait(SFB_ALL, TRUE);
 
  if (command(CMD_AUTO_COMBAT))
 
    exec("flee", self);
 
 
 
See also:
 
  > wait
 

Latest revision as of 22:30, 4 December 2025

SFB_COM            Combat message
  When this flag is set, the routine gets activated whenever a combat is in
  progress. The unit containing the DIL program needs not be involved in the
  combat itself:
     'activator'... is a unitptr to the PC/NPC about to hit someone else.
     'argument'.... is empty.
      command(CMD_AUTO_COMBAT) will evaluate to TRUE.
---~---~---~---~---~---~---~---~---

SFB_COM            Combat message
  When this flag is set, the routine gets activated whenever a combat is in
  progress. The unit containing the DIL program needs not be involved in the
  combat itself:
     'activator'... is a unitptr to the PC/NPC about to hit someone else.
     'argument'.... is empty.
      command(CMD_AUTO_COMBAT) will evaluate to TRUE.
---~---~---~---~---~---~---~---~---