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

Weight

Returns the current total weight of the character (in stones).

This value includes the weight of the character’s body, all equipped items, and the entire contents of the backpack (including nested containers).

Returns 0 if the character is not connected.

Возвращает текущий общий вес персонажа (в стоунах).

Это значение включает вес тела персонажа, всех экипированных предметов и всего содержимого рюкзака (включая вложенные контейнеры).

Возвращает 0, если персонаж не подключён.

Pascal

function Weight: Word;

Python

def Weight() -> int: ...

Pascal Example

begin
  AddToSystemJournal('Weight: ' + IntToStr(Weight) + '/' + IntToStr(MaxWeight));
  if Weight > MaxWeight then
    AddToSystemJournal('Overweight!');
end.

Python Example

AddToSystemJournal(f'Weight: {Weight()}/{MaxWeight()}')
if Weight() > MaxWeight():
    AddToSystemJournal('Overweight!')

See Also

MaxWeight, Gold