[Crossfire-wiki] [Crossfire DokuWiki] page changed: server_plugin
no-reply_wiki at metalforge.org
no-reply_wiki at metalforge.org
Fri Nov 24 09:43:33 CST 2006
A page in your DokuWiki was added or changed. Here are the details:
Date : 2006/11/24 09:43
User : ryo
Edit Summary: add list
@@ -18,14 +18,80 @@
The full list of events corresponds to the //event_xxx// archetypes, found in the [[http://crossfire.svn.sourceforge.net/viewvc/crossfire/arch/trunk/system/|/system folder of the archetypes]].
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.
+
===== 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.
+ When an object-specific event is raised, affected object is sent to the plugin.
+
+ Here is the full list of object-specific events.
+
+ ==== Apply ====
+ Archetype: event_apply
+
+ This event is generated whenever the object is applied or unapplied.
+
+ ==== Attack ====
+ Archetype: event_attack
+
+ This event is used in two cases:
+ * bound to a weapon, it is triggered each time the weapon is used to slay something; this can typically be used to generate special effects when you hit a monster;
+ * bound to a monster, it is triggered when the monster is attacked.
+
+ ==== Close ====
+ Archetype: event_close
+
+ Generated when a container is closed.
+
+ ==== Death ====
+ Archetype: event_death
+
+ Generated when the object dies.
+
+ ==== Drop ====
+ Archetype: event_drop
+
+ Generated when the object is dropped, either on the floor or in a container.
+
+ ==== Pickup ====
+ Archetype: event_pickup
+
+ Generated when the object is picked up.
+
+ ==== Say ====
+ Archetype: event_say
+
+ Generated when someone says something around the object.
+
+ ==== Stop ====
+ Archetype: event_stop
+
+ Generated for a thrown object, when the object is stopped for some reason.
+
+ ==== Time ====
+ Archetype: event_time
+
+ Generated each time the object gets an opportunity to move.
+
+ ==== Throw ====
+ Archetype: event_throw
+
+ Generated when the object is thrown.
+
+ ==== Trigger ====
+ Archetype: event_trigger
+
+ Used for various objects, like traps, teleporters or triggers. Generated when those objects are used (for example, when a player passes through a teleporter).
+
+ ==== Timer ====
+ Archetype: event_timer
+
+ Generated when the timer connected triggered.
===== Hooking to global events =====
Plugin should use provided server callbacks to register itself. See the specific plugin documentation.
IP-Address : 213.174.127.3
Old Revision: http://wiki.metalforge.net/doku.php/server_plugin?rev=1164382636
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