Difference between revisions of "FindBagID"

From Wiki
Jump to: navigation, search
(Example)
Line 3: Line 3:
 
== Example ==
 
== Example ==
 
<pre>
 
<pre>
 
+
finditem POF C
 +
if #FINDCNT > 0
 +
{
 +
display ok I found a stack of gold in a bag, the ID of the bag I found it in is #FINDBAGID
 +
}
 +
if #FINDCNT < 1
 +
{
 +
display ok I could not find any gold in open containers.
 +
}
 +
halt
 
</pre>
 
</pre>
  

Revision as of 00:23, 4 September 2007

The #findBagID system variable contains the bagID the object returned by findItem is contained in.

Example

finditem POF C
if #FINDCNT > 0
{
	display ok I found a stack of gold in a bag, the ID of the bag I found it in is #FINDBAGID
}
if #FINDCNT < 1
{
	display ok I could not find any gold in open containers.
}
halt

Related Commands

ignoreItem findItem #findCnt
#findID #findType #findX
#findY #findZ #findDist
#findKind #findStack #findBagID
#findMod #findRep #findCol
#findIndex

See also

Main Page Documentation