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 ($FFFFFFFF) |
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. |
| Container ID | Drops the item into the specified container. X, 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 ($FFFFFFFF) |
Сброс на землю по координатам (X, Y, Z). X/Y в диапазоне -2..+2 считаются относительными смещениями от персонажа. |
| ID контейнера | Сброс в указанный контейнер. X, Y обычно 0. |
| ID предмета | Попытка стекирования с указанным предметом. |
После успешного сброса метод ожидает DropDelay миллисекунд (от 50 до 10000 мс).
Если DropCheckCoord включён и координаты выглядят подозрительно, координаты сброса рандомизируются.
function DropItem(MoveIntoID: Cardinal; X: Integer; Y: Integer; Z: ShortInt): Boolean;
Parameters:
- MoveIntoID — destination: Ground, container ID, or item ID for stacking.
- X, Y, Z — coordinates (meaning depends on target type, see table above).
def DropItem(MoveIntoID: int, X: int, Y: int, Z: int) -> bool: ...
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;
Drop on the ground:
begin
DragItem(item_id, 1);
Wait(300);
DropItem(Ground, GetX(Self), GetY(Self), GetZ(Self));
end.
# 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()))
DragItem, Drop, DropHere, MoveItem, DropDelay, DropCheckCoord