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

Ground

Returns the special value used to indicate the ground as a target container/location in item and search methods.

This function returns 0.

Use this function instead of a magic number when a method expects a destination/container parameter that can refer to the ground, for example in DropItem, FindType, FindTypeEx, or FindTypesArrayEx.

Возвращает специальное значение, обозначающее землю как цель или место назначения в методах работы с предметами и поиска.

Эта функция возвращает 0.

Используйте эту функцию вместо «магического числа», когда метод ожидает параметр контейнера/назначения, который может указывать на землю, например в DropItem, FindType, FindTypeEx или FindTypesArrayEx.

Pascal

function Ground: Cardinal;

Python

def Ground() -> int: ...

Pascal Example

begin
  DragItem(item_id, 1);
  Wait(300);
  DropItem(Ground, GetX(Self), GetY(Self), GetZ(Self));
end.
if FindType($0EED, Ground) <> 0 then
  AddToSystemJournal('Gold found on the ground');

Python Example

DragItem(item_id, 1)
Wait(300)
DropItem(Ground(), GetX(Self()), GetY(Self()), GetZ(Self()))
if FindType(0x0EED, Ground()) != 0:
    AddToSystemJournal('Gold found on the ground')

See Also

DropItem, FindType, FindTypeEx, FindTypesArrayEx