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

no-reply_wiki at metalforge.org no-reply_wiki at metalforge.org
Thu Nov 22 16:50:38 CST 2007


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

Date        : 2007/11/22 16:50
User        : tchize
Edit Summary: more methods in table of content

@@ -265,10 +265,11 @@
  Returns ''1'' if string matches the pattern, ''0'' else.
  
  Pattern can be a regular expression FIXME specifications
  
- 
- ===== Archetype class =====
+ ====== Crossfire module classes =====
+ All classes below are part of Crossfire module
+ ===== Archetype =====
  This represents an archetype, from which all objects are derived.
  Pointer to such item can be obtained through the ''Crossfire.Object.Archetype'' or the list returned by ''Crossfire.GetArchetypes()''.
  
  ==== Clone ====
@@ -283,9 +284,9 @@
  next archetype linked to current archetype. Will be ''None'' for last item
  ==== 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 =====
+ ===== Object =====
  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 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
@@ -412,18 +413,17 @@
    * **Duration**
    * **Skill**
  
  
- ==== Methods ====
  FIXME document all parameters. Link to relevant Crossfire function. Split in "standard function" and "helper function"?
  
- === ActivateRune ===
+ ==== ActivateRune ====
  Current object springs like a trap, hitting the victim.
  
  Arguments:
    * ''Crossfire.Object'' that is the victim of the trap.
  
- === AddExp ===
+ ==== AddExp ====
  Adds or subtracts experience to current object.
  
  Arguments:
    * ''number'', experience to add
@@ -433,9 +433,9 @@
      * 1: give player exp to total, no skill
      * 2: player gets nothing
      * 3: used when removing exp
  
- === Apply ===
+ ==== Apply ====
  Current object applies specified object. The effect depends on the object being applied, which can be a potion, a trigger, ...
  
  Arguments:
    * ''Crossfire.Object'' to apply
@@ -445,9 +445,9 @@
    * 0: player or monster can't apply objects of that type
    * 1: has been applied, or there was an error applying the object
    * 2: objects of that type can't be applied if not in inventory
  
- === Cast ===
+ ==== Cast ====
  Current object casts a spell.
  
  Arguments:
    * ''Crossfire.Object'' representing the spell to case
@@ -461,35 +461,35 @@
  Note that all checks related to spell-casting apply: enough sp/gp, knowing the skill, sufficient level, spot where magic isn't forbidden, ...
  
  The spell needn't be known to be known to be cast, though.
  
- === CastAbility ===
+ ==== CastAbility ====
  
  Equivalent of ''Cast''.
  
- === ChangeAbil ===
+ ==== ChangeAbil ====
  Displays relevant messages about resistances and so on changes.
  
  Arguments:
    * ''Crossfire.Object'' which is a force effect, or something that changes a player's attribute and was just added to inventory.
  
- === CheckArchInventory ===
+ ==== CheckArchInventory ====
  Finds an object in current object's inventory.
  
  Arguments:
    * ''String'' representing the object name to find
  
  Will return the first object in inventory that has the specified name. Name must be the raw name, without bonuses and such.
  
- === CheckInventory ===
+ ==== CheckInventory ====
  Finds an object in current object's inventory.
  
  Arguments:
    * ''String'' representing the object to find
  
  Will return the first object in inventory that has the specified name. Matching is done on archetype, and also match on start of the object name.
  
- === CheckTrigger ===
+ ==== CheckTrigger ====
  Checks if current object should/can react to another object moving on it.
  
  Arguments:
    * ''Crossfire.Object'', ''cause'' that can cause current Object to react (altar, ...)
@@ -498,17 +498,17 @@
    * for TRIGGER_ALTAR objects, 1 if ''cause'' was destroyed, 0 if not.
    * TRIGGER: 1 if handle could be moved, 0 if not.
    * TRIGGER_BUTTON, TRIGGER_PEDESTAL: 0.
  
- === CreateObject ===
+ ==== CreateObject ====
  Create an object inside the current object.
  
  Arguments:
    * ''String'' which is the name of the object to create
  
  Will create a new ''Crossfire.Object'' from specified name (like ''[[cfpython#Crossfire.CreateObjectByName|Crossfire.CreateObjectByName]]'') and insert it into the current object.
  
- === CreateTimer ===
+ ==== CreateTimer ====
  Fires an ''event_timer'' after the specified delay. Object should have a handler for this event.
  
  Arguments:
    * ''number'', delay for timer
@@ -517,34 +517,34 @@
      * 2: delay is in server cycles
  
  Returns: timer identifier, which can be used to remove the timer through a call to ''[[cfpython#DestroyTimer|Crossfire.DestroyTimer]]''
  
- === Drop ===
+ ==== Drop ====
  Current object drops specified object, which will be put on the ground, or in a container, depending on applied containers.
  
  Argument:
    * ''Crossfire.Object'' to drop
  
- === Fix ===
+ ==== Fix ====
  Current object is reinitialized from its default values, values (ac, wc, Str, ...) are recomputed from items worn, in inventory, ...
  
- === ForgetSpell ===
+ ==== ForgetSpell ====
  Player forgets a spell.
  
  Arguments:
    * ''Crossfire.Object'' representing the spell to forget
  
  Object forgetting should be a player.
  
- === GetResist ===
+ ==== GetResist ====
  Gets the value of a resistance to an attacktype.
  
  Arguments:
    * ''Number'': attacktype for which to get the resistance
  
  Return: ''Number'' with the value. Note that an invalid attacktype will return 0, which can't be distinguished from a neutral resistance.
  
- === InsertInto ===
+ ==== InsertInto ====
  Insert the current object into another object.
  
  Arguments:
    * ''Crossfire.Object'', in which the current object will be inserted
@@ -553,26 +553,26 @@
    * ''Crossfire.Object'' representing the newly inserted object. 
  
  After using this function, you should not use the initial ''Crossfire.Object'', as it can be merged with others.
  
- === KnowSpell ===
+ ==== KnowSpell ====
  Checks if current object knows a spell.
  
  Arguments:
    * ''String'', name of the spell to check for
  
  Return:
    * ''Crossfire.Object'' representing the spell the object known, or ''None'' if this spell isn't known to the currect ''Crossfire.Object''.
  
- === LearnSpell ===
+ ==== LearnSpell ====
  Make the current object learn a spell.
  
  Arguments:
    * ''Crossfire.Object'' representing the spell to learn
  
  There is no learning failure. Note that any spell can be learned this way. Player will receive the message that the spell was learnt correctly.
  
- === Move ===
+ ==== Move ====
  Tries to move the object in a direction.
  
  Arguments:
    * ''Number'', direction to move to. Should be one of ''Crossfire.Direction.xxx'' value.
@@ -580,9 +580,9 @@
  Return:
    * 1 if object could move
    * 0 else
  
- === OutOfMap ===
+ ==== OutOfMap ====
  Check a position on the object's map.
  
  Arguments:
    * ''Number'', ''x'' and ''y'' coordinates
@@ -592,9 +592,9 @@
    * 0 else
  
  Note that this function takes into account maps tiling.
  
- === Pay ===
+ ==== Pay ====
  Buys an item.
  
  Arguments:
    * ''Crossfire.Object'' to buy
@@ -604,9 +604,9 @@
    * 0 else
  
  This function applies bargaining skill if applicable, and will handle shop-based price difference. Note that the object to buy doesn't need to have the FLAG_UNPAID set.
  
- === PayAmount ===
+ ==== PayAmount ====
  Pays money.
  
  Arguments:
    * ''Number'', amount to pay for, in raw value units (silver coin)
@@ -614,9 +614,9 @@
  Return:
    * 1 if object could pay specified amount
    * 0 else
  
- === QueryCost ===
+ ==== QueryCost ====
  Finds the price of an object.
  
  Arguments:
    * ''Crossfire.Object'' that current ''Crossfire.Object'' wants to know the price of
@@ -624,49 +624,49 @@
  
  Return value:
    * price of the item
  
- === QueryName ===
+ ==== QueryName ====
  Return: ''String'' containing the object's full name.
  
- === ReadKey ===
+ ==== ReadKey ====
  Reads key associated to value.
  
  Arguments:
    * ''String'': key value to read
  
  Return: ''String'' containing the value. Will be empty if NULL value.
  
- === Remove ===
+ ==== Remove ====
  Destroys current object, which then becomes invalid.
  
- === Reposition ===
+ ==== Reposition ====
  Moves current object to specified position on its current map.
  
  Arguments:
    * ''Number'', ''x'' and ''y'', coordinates of position to teleport the object to
  
- === Say ===
+ ==== Say ====
  Current object says something in current map.
  
  Argument:
    * ''string'' to say.
  
- === Speak ===
+ ==== Speak ====
  Current object says something in current map
  
  Argument:
    * ''string'' to say.
  
  Equivalent to ''Say''.
  
- === Take ===
+ ==== Take ====
  Current object picks up specified object, which will be put in inventory, or in a container, depending on applied containers.
  
  Argument:
    * ''Crossfire.Object'' to take
  
- === Teleport ===
+ ==== Teleport ====
  Teleports the object to specified place.
  
  Arguments:
    * ''Crossfire.Map'': map to insert into.
@@ -674,17 +674,17 @@
    * ''Number'': y coordinates
  
  Return value: ''Number'', 0 for success, 1 for failure.
  
- === WriteKey ===
+ ==== WriteKey ====
  Inserts specified key/value in the object.
  
  Arguments:
    * ''String'': key value
    * ''String'': value to associate to the key
    * ''Number'' (optional, defaults to 0): 0 to only update the key and not insert it, non zero to add it anyway. 
  
- ===== Crossfire.Map methods and attributes =====
+ ===== Map =====
  Properties in **bold** are read-write, others read only.
    * Difficulty: ''Number''
    * **Path**: ''String''
    * TempName: ''String''
@@ -797,9 +797,9 @@
  
  ==== GetPlayers ====
  Return value: a ''list'' of ''Crossfire.Players''
  
- ===== Crossfire.Region methods and attributes =====
+ ===== Region =====
  This class encapsulates an in-game region. Properties are read-only.
    * Name: ''String''
    * Longname: ''String''
    * Message: ''String''


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