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

Race

Returns the character’s race as a numeric value (from the extended status info).

Common values: 1 = Human, 2 = Elf, 3 = Gargoyle.

Returns 0 if the character is not connected.

Возвращает расу персонажа в виде числового значения (из расширенной информации о статусе).

Типичные значения: 1 = Человек, 2 = Эльф, 3 = Гаргулья.

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

Pascal

function Race: Byte;

Python

def Race() -> int: ...

Pascal Example

begin
  case Race of
    1: AddToSystemJournal('Race: Human');
    2: AddToSystemJournal('Race: Elf');
    3: AddToSystemJournal('Race: Gargoyle');
  else
    AddToSystemJournal('Race: Unknown (' + IntToStr(Race) + ')');
  end;
end.

Python Example

race_names = {1: 'Human', 2: 'Elf', 3: 'Gargoyle'}
AddToSystemJournal(f'Race: {race_names.get(Race(), "Unknown")}')

See Also

Sex, ExtendedInfo