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

GetType

Returns the graphic type (art ID) of the object with the given ObjID.

ObjID — ID of the object or mobile. If 0, returns 0 immediately.

Returns 0 if the object does not exist or the character is disconnected.

Возвращает графический тип (art ID) объекта с указанным ObjID.

ObjID — ID объекта или мобила. Если 0, немедленно возвращает 0.

Возвращает 0, если объект не существует или персонаж не подключён.

Pascal

function GetType(ObjID: Cardinal): Word;

Python

def GetType(ObjID: int) -> int: ...

Pascal Example

begin
  if FindType($0F0E, Backpack) > 0 then
    AddToSystemJournal('Type of found item: $' + IntToHex(GetType(FindItem), 4));

  AddToSystemJournal('Self body type: $' + IntToHex(GetType(Self), 4));
end.

Python Example

if FindType(0x0F0E, Backpack()) > 0:
    AddToSystemJournal(f'Type of found item: ${GetType(FindItem()):04X}')

AddToSystemJournal(f'Self body type: ${GetType(Self()):04X}')

See Also

GetColor, GetName, IsObjectExists