MoveItem
Moves an item to the specified container or ground location. This is a combined DragItem + DropItem operation in a single call.
ObjID — ID of the item to move.
Count — number of items from the stack. Use 0 for the entire stack.
MoveIntoID — destination container ID, or 0 to drop on the ground.
X, Y, Z — coordinates within the container, or world coordinates when dropping on the ground. Use 0, 0, 0 for default placement.
Returns True if the item was successfully moved, False otherwise.
Перемещает предмет в указанный контейнер или на землю. Объединяет DragItem + DropItem в один вызов.
ObjID — ID предмета для перемещения.
Count — количество предметов из стопки. 0 — вся стопка.
MoveIntoID — ID контейнера-получателя, или 0 для сброса на землю.
X, Y, Z — координаты внутри контейнера или мировые координаты при сбросе на землю. 0, 0, 0 для размещения по умолчанию.
Возвращает True при успешном перемещении, False — в противном случае.
function MoveItem(ObjID: Cardinal; Count: Integer; MoveIntoID: Cardinal;
X: Integer; Y: Integer; Z: ShortInt): Boolean;
def MoveItem(item_id: int, count: int, move_into_id: int,
x: int, y: int, z: int) -> bool: ...
begin
if FindType($0EED, Backpack) > 0 then
begin
if MoveItem(FindItem, 100, LastContainer, 0, 0, 0) then
AddToSystemJournal('Moved 100 gold to container')
else
AddToSystemJournal('Failed to move');
end;
end.
if FindType(0x0EED, Backpack()) > 0:
if MoveItem(FindItem(), 100, LastContainer(), 0, 0, 0):
AddToSystemJournal('Moved 100 gold to container')
else:
AddToSystemJournal('Failed to move')