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

FindType

Searches for objects with the specified type ObjType in the given Container. Searches any color, top level only (no subcontainers).

For searching with color filter and/or subcontainer support, use FindTypeEx.

Returns the ID of the last found object, or 0 if nothing was found or the character is disconnected.

After a successful search, the following are updated: FindItem, FindCount, FindFullQuantity, FindQuantity, GetFindedList.

Objects added to the ignore list via Ignore are excluded from results.

Ищет объекты с типом ObjType в указанном Container. Ищет любой цвет, только верхний уровень (без подконтейнеров).

Для поиска с фильтром по цвету и/или с подконтейнерами используйте FindTypeEx.

Возвращает ID последнего найденного объекта или 0.

Pascal

function FindType(ObjType: Word; Container: Cardinal): Cardinal;

Parameters:

  • ObjType — graphic (type) of the object. $FFFF = any type.
  • Container — where to search: Backpack, Ground, or a specific container ID.

Python

def FindType(obj_type: int, container: int = None) -> int: ...

Pascal Example

begin
  if FindType($0EED, Backpack) > 0 then
    AddToSystemJournal('Gold found: ' + IntToStr(FindFullQuantity))
  else
    AddToSystemJournal('No gold in backpack');
end.

Python Example

if FindType(0x0EED, Backpack()) > 0:
    AddToSystemJournal(f'Gold found: {FindFullQuantity()}')
else:
    AddToSystemJournal('No gold in backpack')

See Also

FindTypeEx, FindTypesArrayEx, FindItem, FindCount