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.
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.
def FindType(obj_type: int, container: int = None) -> int: ...
begin
if FindType($0EED, Backpack) > 0 then
AddToSystemJournal('Gold found: ' + IntToStr(FindFullQuantity))
else
AddToSystemJournal('No gold in backpack');
end.
if FindType(0x0EED, Backpack()) > 0:
AddToSystemJournal(f'Gold found: {FindFullQuantity()}')
else:
AddToSystemJournal('No gold in backpack')