Difference between revisions of "FindID"

From Wiki
Jump to: navigation, search
Line 1: Line 1:
 
{{header|FindItem|ro|The #findID system variable contains the id of the object returned by [[findItem]].}}
 
{{header|FindItem|ro|The #findID system variable contains the id of the object returned by [[findItem]].}}
  
{{Example|
+
== Example ==
 +
<pre>
 
findAgain:
 
findAgain:
 
finditem POF
 
finditem POF
Line 13: Line 14:
 
   halt
 
   halt
 
msg #findid is the ID of the gold in my bag. I have exactly #findstack gold on me.$
 
msg #findid is the ID of the gold in my bag. I have exactly #findstack gold on me.$
halt}}
+
halt</pre>
  
 
{{footer}}
 
{{footer}}

Revision as of 07:32, 27 August 2005

The #findID system variable contains the id of the object returned by findItem.

Example

findAgain:
finditem POF

if #findkind = 1
{
   ignoreitem #findid
   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

See also

Main Page Documentation