[Crossfire-wiki] [Crossfire DokuWiki] page changed: cfpython
no-reply_wiki at metalforge.org
no-reply_wiki at metalforge.org
Tue Mar 13 06:12:18 CDT 2007
A page in your DokuWiki was added or changed. Here are the details:
Date : 2007/03/13 06:12
User : ryo
Edit Summary: no space before : :)
@@ -19,14 +19,15 @@
Scripts will have the same access rights as the server itself. It may be able to write to some directories, but not others.
Data should be persisted in the ''PlayerDirectory'' (for specific player information) or ''DataDirectory'' (for regular information), where server normally has write access.
+
===== How do I hook a script to an object? =====
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.
+ * **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.
A script can then use ''WhoAmI()'', ''WhoIsActivator()'', ''WhoIsOther()'', ''WhatIsMessage()'' functions of the ''Crossfire'' module to find the executing context.
IP-Address : 172.210.238.253
Old Revision: http://wiki.metalforge.net/doku.php/cfpython?rev=1173784287
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