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

no-reply_wiki at metalforge.org no-reply_wiki at metalforge.org
Tue Mar 6 17:37:39 CST 2007


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

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

@@ -26,9 +26,9 @@
  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.
  
- 
+ A script can then use ''WhoAmI()'', ''WhoIsActivator()'', ''WhoIsOther()'', ''WhatIsMessage()'' functions of the ''Crossfire'' module to find the executing context.
  
  
  ===== How do I hook a script to a global event? =====
  
@@ -82,9 +82,13 @@
  ==== WhoIsActivator ====
  Returns the ''Crossfire.Object'' having caused the event being handled, corresponds to the "activator" parameter of the event. Can be ''None''.
  
  ==== WhoIsOther ====
+ Returns the ''Crossfire.Object'' being part of the event, corresponds to the "third" parameter of the event. Can be ''None''.
+ 
  ==== WhatIsMessage ====
+ Returns the ''String'' that was sent as part of the event, corresponds to the "message" parameter of the event.
+ 
  ==== ScriptName ====
  Returns the path of the currently executing script. Relative to maps directory FIXME check
  
  ==== ScriptParameters ====


IP-Address  : 82.236.87.204
Old Revision: http://wiki.metalforge.net/doku.php/cfpython?rev=1173224096
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