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

UnequipItems

Removes multiple equipped items and places them into the backpack.

Items — array of object serials (IDs) to unequip.

Returns True if all items were successfully unequipped, False on error or if the character is not connected.

Items that do not exist are silently skipped. The delay between individual unequip operations is controlled by the DressSpeed variable (clamped to 10–10000 ms).

DWScript only. In PascalScript, the parameter type is TCardinalDynArray instead of TArray<Cardinal>.

Снимает несколько экипированных предметов и помещает их в рюкзак.

Items — массив serial (ID) объектов для снятия.

Возвращает True, если все предметы успешно сняты, False при ошибке или если персонаж не подключён.

Несуществующие предметы пропускаются. Задержка между операциями снятия контролируется переменной DressSpeed (ограничена 10–10000 мс).

Только DWScript. В PascalScript тип параметра — TCardinalDynArray вместо TArray<Cardinal>.

DWS

function UnequipItems(Items: TArray<Cardinal>): Boolean;

Pascal Script

function UnequipItems(Items: TCardinalDynArray): Boolean;

Python

def UnequipItems(Items: list[int]) -> bool: ...

Pascal Example

var
  Items: TArray<Cardinal>;
begin
  Items := [ObjAtLayer(RhandLayer), ObjAtLayer(LhandLayer)];
  if UnequipItems(Items) then
    AddToSystemJournal('Items unequipped')
  else
    AddToSystemJournal('Failed to unequip');
end.

Python Example

items = [ObjAtLayer(1), ObjAtLayer(2)]  # RHand, LHand
items = [i for i in items if i > 0]
if UnequipItems(items):
    AddToSystemJournal('Items unequipped')
else:
    AddToSystemJournal('Failed to unequip')

See Also

Unequip, EquipItems, SetDress, GetEquipment