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

SetCatchBag

Designates a container as the “catch bag” — all items received by the character (loot, trade, etc.) are automatically moved to this container.

ObjID — serial (ID) of the container to use as the catch bag. Pass 0 to clear the catch bag (equivalent to calling UnsetCatchBag).

Returns:

Value Meaning
0 Catch bag cleared (ObjID was 0), or error (character not connected, object not found, or object is not a container)
1 Catch bag set successfully

The specified object must exist and must be a container. If the object is not found or is not a container, the catch bag is not set and 0 is returned.

Назначает контейнер в качестве «catch bag» — все предметы, получаемые персонажем (добыча, обмен и т.д.), автоматически перемещаются в этот контейнер.

ObjID — serial (ID) контейнера. Передайте 0 для сброса catch bag (эквивалент вызова UnsetCatchBag).

Возвращает:

Значение Смысл
0 Catch bag сброшен (ObjID = 0), или ошибка (персонаж не подключён, объект не найден или не является контейнером)
1 Catch bag установлен успешно

Указанный объект должен существовать и быть контейнером. Если объект не найден или не является контейнером, catch bag не устанавливается и возвращается 0.

Pascal

function SetCatchBag(ObjID: Cardinal): Byte;

Python

def SetCatchBag(ObjID: int) -> int: ...

Pascal Example

begin
  if SetCatchBag(Backpack) = 1 then
    AddToSystemJournal('Catch bag set to backpack')
  else
    AddToSystemJournal('Failed to set catch bag');
end.

Python Example

if SetCatchBag(Backpack()) == 1:
    AddToSystemJournal('Catch bag set to backpack')
else:
    AddToSystemJournal('Failed to set catch bag')

See Also

UnsetCatchBag