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

From DikuMUD Wiki
Jump to navigation Jump to search
(XML import of LLM wiki pages)
 
Line 1: Line 1:
= SFB_COM =
 
  
SFB_COM is a combat message that is sent during combat.
 
  
When this flag is used in a wait() statement, it will trigger on combat messages.
+
<span id="sfbcom"></span>
The unit containing the DIL program needs not be involved in the combat itself,
+
SFB_COM            Combat message
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:
+
  When this flag is set, the routine gets activated whenever a combat is in
  'activator' : is a unitptr to the PC/NPC about to hit someone else.
+
  progress. The unit containing the DIL program needs not be involved in the
 +
  combat itself:
  
Note that:
+
      'activator'... is a unitptr to the PC/NPC about to hit someone else.
  command(CMD_AUTO_COMBAT)
+
      'argument'.... is empty.
  
will evaluate to TRUE.
+
      command(CMD_AUTO_COMBAT) will evaluate to TRUE.
 
+
---~---~---~---~---~---~---~---~---
Example:
 
  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);
 
 
 
You may want to take a look at the DIL vorpalweapon() in one of the distribution zones.
 
 
 
See also:
 
  > wait
 
  > SFB_PRE
 
  > CMD_AUTO_DAMAGE
 

Latest revision as of 10:44, 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.
---~---~---~---~---~---~---~---~---