Difference between revisions of "FindStack"
From Wiki
(→Example) |
|||
Line 3: | Line 3: | ||
== Example == | == Example == | ||
<pre> | <pre> | ||
− | + | finditem POF C_ , #BACKPACKID | |
+ | if #FINDCNT > 0 | ||
+ | { | ||
+ | display ok I found a stack of gold and there are #FINDSTACK gold pieces in it. | ||
+ | } | ||
+ | if #FINDCNT < 1 | ||
+ | { | ||
+ | display ok No gold was found in backpack. | ||
+ | } | ||
+ | halt | ||
</pre> | </pre> | ||
Revision as of 23:21, 3 September 2007
⇒ | The #findStack system variable contains the number of stacked items in the object returned by findItem. |
Example
finditem POF C_ , #BACKPACKID if #FINDCNT > 0 { display ok I found a stack of gold and there are #FINDSTACK gold pieces in it. } if #FINDCNT < 1 { display ok No gold was found in backpack. } halt
Related Commands
ignoreItem | findItem | #findCnt |
#findID | #findType | #findX |
#findY | #findZ | #findDist |
#findKind | #findStack | #findBagID |
#findMod | #findRep | #findCol |
#findIndex |
See also
Main Page | Documentation |