Difference between revisions of "FindID"

From Wiki
Jump to: navigation, search
(See Also)
 
(6 intermediate revisions by 3 users not shown)
Line 1: Line 1:
__NOTOC__
+
{{header|FindItem|ro|The #findID system variable contains the id of the object at the current #[[findIndex]] position. All of the find* variables are populated by using the [[findItem]] command.}}
== #findID ==
+
'''FindItem System Variables'''
+
=== Description ===
+
{{ro}}
+
  
The [[Var findID|#findID]] system variable contains the id of the object returned by [[findItem|findItem]].
+
== Example ==
 
+
==== Example ====
+
 
<pre>
 
<pre>
findAgain:
+
finditem POF C_ , #BACKPACKID
finditem POF
+
if #FINDCNT > 0
 
+
if #findkind = 1
+
 
{
 
{
  ignoreitem #findid
+
msg #FINDID is the ID of the gold in my bag. There is #FINDSTACK gold in that stack.$
  goto findAgain
+
 
}
 
}
if findkind = -1
 
  halt
 
msg #findid is the ID of the gold in my bag. I have exactly #findstack gold on me.$
 
 
halt
 
halt
 +
</pre>
  
</pre>
+
=See Also=
==== See Also ====
+
{{FindItem}}
{|
+
| Width=200px | [[findItem|findItem]] || Width=200px | [[Var findType|&#0035;findType]]|| Width=200px | [[Var findX|&#0035;findX]] || Width=200px | [[Var findY|&#0035;findY]] || Width=200px | [[Var findZ|&#0035;findZ]] || Width=200px | [[Var findDist|&#0035;findDist]] || Width=200px | [[Var findKind|&#0035;findKind]] || Width=200px | [[Var findStack|&#0035;findStack]] || Width=200px | [[Var findBagID|&#0035;findBagID]] || Width=200px | [[Var findMod|&#0035;findMod]] || Width=200px | [[Var findRep|&#0035;findRep]] || Width=200px | [[Var findCol|&#0035;findCol]] || Width=200px | [[Var findIndex|&#0035;findIndex]] || Width=200px | [[Var findCnt|&#0035;findCnt]]
+
|}
+
----
+
{|
+
| Width=200px | [[Main_Page]] || Width=200px | [[Documentation]] || Width=200px | [[Documentation#FindItem|FindItem System Variables]]
+
|}
+

Latest revision as of 09:11, 7 September 2007

The #findID system variable contains the id of the object at the current #findIndex position. All of the find* variables are populated by using the findItem command.

Example

finditem POF C_ , #BACKPACKID
if #FINDCNT > 0
{
 msg #FINDID is the ID of the gold in my bag. There is #FINDSTACK gold in that stack.$
}
halt

See Also

FindItem

  • These system variables are set when the FindItem command is used.
#findID Returns the id of the object returned by findItem
#findType Returns the type of the object returned by findItem
#findX Returns the x-coordinate of the object returned by findItem
#findY Returns the y-coordinate of the object returned by findItem
#findZ Returns the z-coordinate of the object returned by findItem
#findDist Returns the distance from the character to the object returned by findItem
#findKind Returns the kind of the object returned by findItem
#findStack Returns the number of stacked items in the object returned by findItem
#findBagID Returns the bag the object returned by findItem is contained in
#findMod Returns displacement for #findX and #findY
#findRep Returns the reputation of the object returned by findItem
#findCol Returns the color of the object returned by findItem
#findIndex Gets the values of all other findItem results without restarting the time-consuming FindItem command.
#findCnt Returns the number of objects that matches what was searched for with the findItem command