Home API Manuals About Forum
Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

FindCount

Returns the number of distinct items found by the last FindType, FindTypeEx, or FindTypesArrayEx call.

Returns 0 if no objects were found or the character is disconnected.

Stacks containing multiple items are counted as 1 item. To get the total quantity including stack contents, use FindFullQuantity.

Возвращает количество найденных предметов после последнего вызова FindType, FindTypeEx или FindTypesArrayEx.

Возвращает 0, если ничего не найдено или персонаж не подключён.

Стеки, содержащие несколько предметов, считаются как 1 предмет. Для получения общего количества с учётом стеков используйте FindFullQuantity.

Pascal

function FindCount: Integer;

Python

def FindCount() -> int: ...

Pascal Example

begin
  FindType($1F14, Backpack);
  AddToSystemJournal('Rune stacks found: ' + IntToStr(FindCount));
end.

Python Example

FindType(0x1F14, Backpack())
AddToSystemJournal(f'Rune stacks found: {FindCount()}')

See Also

FindTypeEx, FindItem, FindQuantity, FindFullQuantity