Difference between revisions of "FindID"

From Wiki
Jump to: navigation, search
(clarified description)
(Example)
Line 3: Line 3:
 
== 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
  halt
+
</pre>
msg #findid is the ID of the gold in my bag. I have exactly #findstack gold on me.$
+
halt</pre>
+
  
 
{{footer}}
 
{{footer}}

Revision as of 10:13, 1 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

Main Page Documentation