Difference between revisions of "FindCnt"

From Wiki
Jump to: navigation, search
(Example)
(Example)
Line 25: Line 25:
 
</pre>
 
</pre>
  
 +
== Related Commands ==
 +
{| style="background:gainsboro; color:black; border: 2px #aaa solid;"
 +
| width=250px align=center | [[ignoreItem]]              || width=250px align=center | [[findItem]]                  || width=250px align=center | [[findCnt|&#0035;findCnt]]
 +
|-
 +
| width=250px align=center | [[findID|&#0035;findID]]    || width=250px align=center | [[findType|&#0035;findType]]  || width=250px align=center | [[findX|&#0035;findX]]
 +
|-
 +
| width=250px align=center | [[findY|&#0035;findY]]      || width=250px align=center | [[findZ|&#0035;findZ]]        || width=250px align=center | [[findDist|&#0035;findDist]]
 +
|-
 +
| width=250px align=center | [[findKind|&#0035;findKind]] || width=250px align=center | [[findStack|&#0035;findStack]] || width=250px align=center | [[findBagID|&#0035;findBagID]]
 +
|-
 +
| width=250px align=center | [[findMod|&#0035;findMod]]  || width=250px align=center | [[findRep|&#0035;findRep]]    || width=250px align=center | [[findCol|&#0035;findCol]]
 +
|-
 +
| width=250px align=center | [[findIndex|&#0035;findIndex]]
 +
|}
 
{{footer}}
 
{{footer}}

Revision as of 00:15, 4 September 2007

The #findCnt system variable contains the number of objects that matches what was searched for with the findItem command.

Example

....
loop:
finditem %housesign G_5
if #findcnt < 1
{
gosub placement
}
goto loop
....
finditem * C_ , #BACKPACKID
if #FINDCNT > 0
{
 display ok There are #FINDCNT items in your backpack!
}
if #FINDCNT < 1
{
 display ok No items were found in your 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