Notifying of Actions

Predefined actions can be found in actions.inc, and are fairly simple to use. They are as follows:

ActionSkill( who, skill, detached := 0 )
ActionDie( who, corpse, detached := 0 )

'detached' notification means that a new script will be started to process the notification event, returning program flow to the original script fairly quickly. The core way to notify of actions is using one of the following two funtions:

  ANotify( action, data, character := 0 )
  ANotifyDetached( action, data, character := 0 )

parameters:
  action       The action type, eg "Skill" or "Die"
  data         Any action-specific data you wish to pass (usually a struct), eg skill id, corpseref, etc.
  character    Either a mobileref to the character who performed the action, their serial, or 0 (no character).