[Crossfire-wiki] [Crossfire DokuWiki] page changed: cfpython
no-reply_wiki at metalforge.org
no-reply_wiki at metalforge.org
Fri Nov 24 09:54:29 CST 2006
A page in your DokuWiki was added or changed. Here are the details:
Date : 2006/11/24 09:54
User : ryo
Edit Summary: clarify, remove parasitic :
@@ -24,14 +24,15 @@
Python plugin is a [[server plugin]], thus you need to insert in this object one of the //event_xxx// archetype (see ''arch/system'' directory). The fields to fill are:
* **title** : should be //Python// to call the Python plugin.
* **slaying** : contains the path to the Python script to execute. Root refers to the map directory.
+
===== How do I hook a script to a global event? =====
- Create a script, and put it in the ''/python/events/xxx'' subdirectory or the ''maps'' directory, where ''xxx'' is the event's name. Existing events are listed [[server_plugin#Hooking to global events:|on the server_plugin page]].
+ Create a script, and put it in the ''/python/events/xxx'' subdirectory or the ''maps'' directory, where ''xxx'' is the event's name in lowercase (create the directory if it doesn't exist). Available events are listed [[server_plugin#Hooking to global events|on the server_plugin page]].
In addition, there is a special event, ''init'', which is called just after the plugin has been loaded. It behaves like other events in every aspect.
===== How do I register a custom command? =====
IP-Address : 213.174.127.3
Old Revision: http://wiki.metalforge.net/doku.php/cfpython?rev=1164383568
New Revision: http://wiki.metalforge.net/doku.php/cfpython
--
This mail was generated by DokuWiki at
http://wiki.metalforge.net/
More information about the crossfire-wiki
mailing list