MoveItems
Moves all items matching the specified type and color from a source container to a destination.
Container — source container ID.
ItemsType — graphic type to match. $FFFF for any type.
ItemsColor — color to match. $FFFF for any color.
MoveIntoID — destination container ID, or 0 to drop on the ground.
X, Y, Z — coordinates within the destination, or world coordinates. Use 0, 0, 0 for default placement.
DelayMS — delay in milliseconds between moving each item.
Python additionally supports an optional max_count parameter (default 0 = move all).
Returns True if at least one item was moved, False otherwise.
Перемещает все предметы с указанным типом и цветом из контейнера-источника в контейнер-получатель.
Container — ID контейнера-источника.
ItemsType — графический тип для поиска. $FFFF — любой тип.
ItemsColor — цвет для поиска. $FFFF — любой цвет.
MoveIntoID — ID контейнера-получателя, или 0 для сброса на землю.
X, Y, Z — координаты внутри контейнера-получателя или мировые координаты. 0, 0, 0 для размещения по умолчанию.
DelayMS — задержка в миллисекундах между перемещением каждого предмета.
В Python дополнительно поддерживается необязательный параметр max_count (по умолчанию 0 = переместить все).
Возвращает True, если хотя бы один предмет был перемещён, False — в противном случае.
function MoveItems(Container: Cardinal; ItemsType: Word; ItemsColor: Word;
MoveIntoID: Cardinal; X: Integer; Y: Integer; Z: ShortInt;
DelayMS: Integer): Boolean;
Extended version with item count limit:
function MoveItemsEx(Container: Cardinal; ItemsType: Word; ItemsColor: Word;
MoveIntoID: Cardinal; X: Integer; Y: Integer; Z: ShortInt;
DelayMS: Integer; MaxItems: Integer): Boolean;
MaxItems — maximum number of items to move. -1 or a value exceeding the found count moves all items. This is the Pascal equivalent of the Python max_count parameter.
MaxItems — максимальное количество предметов для перемещения. -1 или значение, превышающее количество найденных, перемещает все. Это Pascal-аналог Python-параметра max_count.
def MoveItems(container: int, items_type: int, items_color: int,
move_into_id: int, x: int, y: int, z: int,
delay_ms: int, max_count: int = 0) -> bool: ...
begin
if MoveItems(Backpack, $0EED, $FFFF, LastContainer, 0, 0, 0, 500) then
AddToSystemJournal('All gold moved')
else
AddToSystemJournal('No gold found or failed');
end.
With MoveItemsEx (limit to 10 items):
begin
if MoveItemsEx(Backpack, $0EED, $FFFF, LastContainer, 0, 0, 0, 500, 10) then
AddToSystemJournal('Up to 10 gold stacks moved')
else
AddToSystemJournal('No gold found or failed');
end.
if MoveItems(Backpack(), 0x0EED, 0xFFFF, LastContainer(), 0, 0, 0, 500):
AddToSystemJournal('All gold moved')
else:
AddToSystemJournal('No gold found or failed')
# With max_count (equivalent to Pascal MoveItemsEx)
MoveItems(Backpack(), 0x0EED, 0xFFFF, LastContainer(), 0, 0, 0, 500, max_count=10)