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

EmptyContainer

Moves all items from Container to DestContainer with a delay of DelayMS milliseconds between each move.

Returns False if the source container is empty. Otherwise returns the result of the move operations.

If Container equals DestContainer, the method logs a warning and returns False immediately to prevent an infinite loop.

Перемещает все предметы из Container в DestContainer с задержкой DelayMS миллисекунд между каждым перемещением.

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

Если Container равен DestContainer, метод выводит предупреждение и возвращает False для защиты от бесконечного цикла.

Pascal

function EmptyContainer(Container: Cardinal; DestContainer: Cardinal; DelayMS: Word): Boolean;

Parameters:

  • Container — source container ID.
  • DestContainer — destination container ID.
  • DelayMS — delay between item moves in milliseconds.

Python

def EmptyContainer(container: int, dest_container: int, delay_ms: int) -> bool: ...

Pascal Example

begin
  // Empty a corpse into backpack with 500ms delay
  if EmptyContainer(corpse_id, Backpack, 500) then
    AddToSystemJournal('Corpse emptied')
  else
    AddToSystemJournal('Nothing to loot');
end.

Python Example

if EmptyContainer(corpse_id, Backpack(), 500):
    AddToSystemJournal('Corpse emptied')
else:
    AddToSystemJournal('Nothing to loot')

See Also

MoveItem, MoveItems, GetContent