FindType

Search for the objects with specified type ObjType in specified container Container.

Returns the last object found using the function.

If no objects found, or char disconnected - returns 0.

NB: THis method is NOT searching in subcontainers! For searching in subcontainers use FindTypeEx with True in last param.

Search result:

Search distance modifiers:

The parameter Container can be:

If ObjType = -1($FFFF) - will search ANY objects.

Pascal

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

Python

def FindType(ObjType, Container): -> uint

Example Pascal

if FindType(bottle_type,Ground) > 0 then
begin
  UseObject(FindItem);
end;

Example Python

 FindType(runes, Backpack())
  AddAddToSystemJournal('Runes found: {0}'.format(FindCount()))