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:
- A list of found objects can be obtained ny methods GetFindedList or GetFoundItems
- The last object was found also stored in FindItem
- FindCount returns amount of found items (without stacks content)
- FindQuantity returns quantity of last finded object (object field).
- FindFullQuantity returns amount of found items (including stacks content)
Search distance modifiers:
- FindDistance - specifies the search range by horizontal
- FindVertical - specifies the search range by vertical
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()))