[Crossfire-wiki] [Crossfire DokuWiki] page changed: server_plugin

no-reply_wiki at metalforge.org no-reply_wiki at metalforge.org
Tue Mar 6 17:07:36 CST 2007


A page in your DokuWiki was added or changed. Here are the details:

Date        : 2007/03/06 17:07
User        : ryo
Edit Summary: update

@@ -29,19 +29,30 @@
  
  Events are either //global// or //object-specific//. Examples of global events include a player joining or exiting the game, a map being loaded. Examples of object-specific events include an item being applied, a player attacking a monster.
  
  FIXME check parameters and such :)
+ 
  
  
  ===== Hooking to an object-specific event =====
  
- Just add an //event_xxx// object into your object's inventory, and fill the ''title'' field with the plugin name. See the specific plugin documentation for optional arguments.
+ Just add an //event_xxx// object into your object's inventory, and fill the ''title'' field with the plugin name. See the specific plugin documentation for optional arguments that need to be set to that object.
  
  When an object-specific event is raised, affected object is sent to the plugin.
  
  For some events, returning a non-zero value will prevent the default server processing to take place, allowing to override things.
  
- Here is the full list of object-specific events.
+ The plugin registered function will get the following parameters. See specific events for the meaning of the field.
+   * op: ''object*'' which is the current object containing the event.
+   * eventcode: ''int'' representing the EVENT_xxx constant of the current event.
+   * activator: ''object*'', can be NULL.
+   * third: ''object*'', can be NULL.
+   * message: ''const char*'', can be NULL.
+   * fix: ''int'' {FIXME} meaning?
+   * slaying: ''const char*'', plugin's name as it was registered
+   * name: ''const char*'', event hook's name
+ 
+ Follows the full list of object-specific events.
  
  ==== Apply ====
  Archetype: event_apply
  


IP-Address  : 82.236.87.204
Old Revision: http://wiki.metalforge.net/doku.php/server_plugin?rev=1173221880
New Revision: http://wiki.metalforge.net/doku.php/server_plugin

-- 
This mail was generated by DokuWiki at
http://wiki.metalforge.net/




More information about the crossfire-wiki mailing list