[Crossfire-wiki] [Crossfire DokuWiki] page changed: cfpython
no-reply_wiki at metalforge.org
no-reply_wiki at metalforge.org
Tue Dec 26 16:28:21 CST 2006
A page in your DokuWiki was added or changed. Here are the details:
Date : 2006/12/26 16:28
User : ryo
Edit Summary: update (not yet finished), sort
@@ -204,9 +204,8 @@
* ''ScriptParameters'' contains any parameter the player added to the command. FIXME {can NULL be passed?}
==== RegisterGlobalEvent ====
==== UnregisterGlobalEvent ====
-
==== GetTime ====
Returns a Python ''list'' corresponding to the in-game server time. Fields are (start at ''0'' to access):
- year
- month
@@ -216,17 +215,9 @@
- day of week
- week of month
- season
- ==== DestroyTimer ====
- Removes specified timer event, which was created through a call to ''Crossfire.Object.CreateTimer''.
-
- Arguments:
- * ''number'', timer identifier as returned.
- Returns:
- * 0: no error
- * -1: invalid timer identifier
===== Crossfire.Archetype methods and attributes =====
This represents an archetype, from which all objects are derived.
@@ -241,8 +232,9 @@
* More: next archetype linked to current archetype. Will be ''None'' for last item
Methods:
* NewObject: returns a ''Crossfire.Object'' having this archetype as type
+
===== Crossfire.Object methods and attributes =====
@@ -361,39 +353,108 @@
* MoveOff
* MoveSlow
* MoveSlowPenalty
- Methods:
- * Remove
- * Apply
- * Drop
- * Fix
- * Say
- * Speak
- * Take
- * Teleport
- * Reposition
- * QueryName
- * GetResist
- * ActivateRune
- * CheckTrigger
- * QueryCost
- * Cast
- * LearnSpell
- * ForgetSpell
- * KnowSpell
- * CastAbility
- * PayAmount
- * Pay
- * CheckInventory
- * CheckArchInventory
- * OutOfMap
- * CreateObject
- * InsertInto
- * ReadKey
- * WriteKey
- * AddTimer
- * AddExp
+ ==== Methods ====
+
+ === ActivateRune ===
+ Current object springs like a trap, hitting the victim.
+
+ Arguments:
+ * ''Crossfire.Object'' that is the victim of the trap.
+
+ === AddExp ===
+ Adds or substracts experience to current object.
+
+ Arguments:
+ * ''number'', experience to add
+ * ''string'' (optional), skill to add to
+ * ''number'' (optional), what to do if player doesn't have the specified skill:
+ * 0: give the player the skill
+ * 1: give player exp to total, no skill
+ * 2: player gets nothing
+ * 3: used when removing exp
+
+ === AddTimer ===
+
+ Fires an ''event_timer'' after the specified delay. Object must have a handler for this event.
+
+ Arguments:
+ * ''number'', delay for timer
+ * ''number'', timer mode
+ * 1: delay is in seconds
+ * 2: delay is in server cycles
+
+ Returns: timer identifier, which can be used to remove the timer through a call to ''[[cfpython#Crossfire.DestroyTimer|Crossfire.DestroyTimer]]''
+
+ === 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
+ * flag FIXME meaning?
+
+ Return value:
+ * 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 ===
+ === CastAbility ===
+ === CheckArchInventory ===
+ === CheckInventory ===
+ === CheckTrigger ===
+ === CreateObject ===
+
+ === 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 ===
+ Current object is reinitialized from its default values, values (ac, wc, Str, ...) are recomputed from items worn, in inventory, ...
+
+ === ForgetSpell ===
+ === GetResist ===
+ === InsertInto ===
+ === KnowSpell ===
+ === LearnSpell ===
+ === OutOfMap ===
+ === Pay ===
+ === PayAmount ===
+ === QueryCost ===
+ === QueryName ===
+ === ReadKey ===
+
+ === Remove ===
+
+ Destroys current object, which then becomes invalid.
+
+ === Reposition ===
+
+ === Say ===
+ Current object says something in current map.
+
+ Argument:
+ * ''string'' to say.
+
+ === Speak ===
+ Current object says something in current map
+
+ FIXME difference with say??
+
+ Argument:
+ * ''string'' to say.
+
+ === 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 ===
+ === WriteKey ===
===== Crossfire.Map methods and attributes =====
All properties are read-only.
IP-Address : 82.236.87.204
Old Revision: http://wiki.metalforge.net/doku.php/cfpython?rev=1167172030
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