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

DropItem

Drops the item currently held “on the finger” (previously picked up by DragItem) into a container, onto the ground, or onto another item to stack.

Returns True on success, False if no item is currently held.

The behavior of MoveIntoID depends on the target:

Target Behavior
Ground Drops the item on the ground at coordinates (X, Y, Z). X/Y values in range -2..+2 are treated as relative offsets from the character.
$FFFFFFFF Same as Ground.
Container ID Drops the item into the specified container. X and Y are typically 0.
Item ID Attempts to stack the item with the specified item.

After a successful drop, the method waits for DropDelay milliseconds (clamped to 50..10000 ms) before returning.

If DropCheckCoord is enabled and coordinates look suspicious, the drop coordinates are randomized to avoid detection.

Сбрасывает предмет, удерживаемый «на пальце» (ранее взятый через DragItem), в контейнер, на землю или на другой предмет для стекирования.

Возвращает True при успехе, False, если предмет не удерживается.

Поведение MoveIntoID зависит от цели:

Цель Поведение
Ground Сброс на землю по координатам (X, Y, Z). Значения X/Y в диапазоне -2..+2 трактуются как относительные смещения от персонажа.
$FFFFFFFF То же, что Ground.
ID контейнера Сброс в указанный контейнер. X и Y обычно должны быть 0.
ID предмета Попытка стекирования с указанным предметом.

После успешного сброса метод ожидает DropDelay миллисекунд (с ограничением до диапазона 50..10000 мс).

Если DropCheckCoord включён и координаты выглядят подозрительно, координаты сброса рандомизируются.

Pascal

function DropItem(MoveIntoID: Cardinal; X: Integer; Y: Integer; Z: ShortInt): Boolean;

Parameters:

  • MoveIntoID — destination: Ground, $FFFFFFFF, container ID, or item ID for stacking.
  • X, Y, Z — coordinates (their meaning depends on the target type; see the table above).

Python

def DropItem(MoveIntoID: int, X: int, Y: int, Z: int) -> bool: ...

Pascal Example

procedure LootGold;
begin
  if FindType($0EED, Corpse) <> 0 then
  begin
    DragItem(FindItem, 0);
    Wait(300);
    DropItem(Backpack, 0, 0, 0);  // drop into backpack
    Wait(600);
  end;
end;
begin
  DragItem(item_id, 1);
  Wait(300);
  DropItem(Ground, GetX(Self), GetY(Self), GetZ(Self));
end.

Python Example

# Loot gold into backpack
if FindType(0x0EED, corpse) != 0:
    DragItem(FindItem(), 0)
    Wait(300)
    DropItem(Backpack(), 0, 0, 0)
    Wait(600)
# Drop on the ground
DragItem(item_id, 1)
Wait(300)
DropItem(Ground(), GetX(Self()), GetY(Self()), GetZ(Self()))

See Also

DragItem, Drop, DropHere, MoveItem, DropDelay, DropCheckCoord, Ground