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

FindTypeEx

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

InSub select search mode for subcontainers - true or false.

Returns the last object found using the function.

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

Search result:

Search distance modifiers:

The parameter Container can be:

  • Backpack
  • Ground
  • $FFFFFFFF(= -1)
  • ID of the required container (if object with ID not exists, searching in Backpack)

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

If Color = -1($FFFF) - will search objects with ANY color.

Pascal

function FindTypeEx(ObjType:Word; Color:Word; Container:Cardinal; InSub:Boolean):Cardinal

Python

def FindTypeEx(ObjType, Color, Container, InSub=True): -> uint

Example Pascal

if FindTypeEx(bottle_type,bottle_color,Ground,false) > 0 then
begin
  UseObject(FindItem);
end;

Example Python

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