GetDistance
Returns the distance from character’s location to object with ID ObjID. If Object is not exists, returns -1, else returns distance in tiles.
Pascal Syntax:
function GetDistance(ObjID : Cardinal) : Integer;
Pascal Example:
if (GetDistance(chestID) > 1) then
begin
AddToSystemJournal('Proceeding to chest');
MoveXYZ(GetX(chestID), GetY(chestID), GetZ(Self()), 1, 5, true);
Wait(1000);
end;
Python Syntax:
def GetDistance(ObjID): --> int