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

no-reply_wiki at metalforge.org no-reply_wiki at metalforge.org
Fri Nov 9 03:10:50 CST 2007


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

Date        : 2007/11/09 03:10
User        : kbulgrien
Edit Summary: Misc. spelling fixes.

@@ -25,11 +25,11 @@
  Calling Crossfire functions with invalid arguments will result in a Python exception being raised. A function failure will also result in an exception.
  
  Scripts will have the same access rights as the server itself. It may be able to write to some directories, but not others.
  
- Data that should survive a server restart should be persisted in the ''PlayerDirectory'' (for specific player information) or ''DataDirectory'' (for regular information), where server normally has write access.
+ Data that should survive a server restart should be persisted in the ''PlayerDirectory'' (for specific player information) or ''DataDirectory'' (for regular information), where the server normally has write access.
  
- Scripts for server releases after 9 november 2007 should prefer the use of new [[cfpython#Log|Crossfire.Log(level,message)]] method over the python build-in print method. The reason of this is to keep coherency between python scripts messages and server logging.
+ Scripts for server releases after 9 November 2007 should prefer the use of new [[cfpython#Log|Crossfire.Log(level,message)]] method over the python build-in print method. The reason of this is to keep coherency between python scripts messages and server logging.
  
  ===== 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 ''[[http://crossfire.svn.sourceforge.net/viewvc/crossfire/arch/trunk/system/|/arch/system]]'' directory). The fields to fill are:
    * **title**: should be //Python// to call the Python plugin.
@@ -211,12 +211,12 @@
  Parameters:
    * level (Crossfire.LogError, Crossfire.LogInfo, Crossfire.LogDebug or Crossfire.LogMonster)
    * message (string)
  
- Use the server logging facilities to output script messages in server console. This is the **recommanded** method, instead of using the
+ Use the server logging facilities to output script messages in server console. This is the **recommended** method, instead of using the
  python build-in "print" method. Using this, scripts take advantage of Debug and Monster level which can be hidden at will by server admin (log level), and
- have access to the error level, mentionning to admin serious troubles.
- exemple:
+ have access to the error level, mentioning to admin serious troubles.
+ Example:
  <code>Crossfire.Log(Crossfire.LogDebug,'Player %s entered guild %s' %obj.Name %guildName)</code>
  === RegisterCommand ===
  Parameters:
    * command name (string)
@@ -285,9 +285,9 @@
    * NewObject: returns a ''Crossfire.Object'' having this archetype as type. It isn't on any map or in any inventory, so should be inserted somewhere or deleted if not used.
  
  ===== Crossfire.Object methods and attributes =====
  FIXME link to dev:objects 's fields? split flag & such info. Make a table with property / mapping to object / Python type
- Properties in **bold** are read-write, others are readonly. Most properties are mapped to fields of the ''object'' structure. ''Boolean'' values are mapped to the various flags.
+ Properties in **bold** are read-write, others are read-only. Most properties are mapped to fields of the ''object'' structure. ''Boolean'' values are mapped to the various flags.
    * **Name**: ''String'' containing the object's name
    * **NamePl**: ''String'' containing the object's plural name
    * **Title**: ''String''
    * **Race**: ''String''
@@ -421,9 +421,9 @@
  Arguments:
    * ''Crossfire.Object'' that is the victim of the trap.
  
  === AddExp ===
- Adds or substracts experience to current object.
+ Adds or subtracts experience to current object.
  
  Arguments:
    * ''number'', experience to add
    * ''string'' (optional), skill to add to
@@ -797,9 +797,9 @@
  ==== GetPlayers ====
  Return value: a ''list'' of ''Crossfire.Players''
  
  ===== Crossfire.Region methods and attributes =====
- This class encapsulates an ingame region. Properties are read-only.
+ This class encapsulates an in-game region. Properties are read-only.
    * Name: ''String''
    * Longname: ''String''
    * Message: ''String''
    * Next: ''Crossfire.Region''


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