Sex
Returns the sex/gender value of the current character.
Returns a Byte value corresponding to the body type:
| Value | Meaning |
|---|---|
0 |
Male (Human) |
1 |
Female (Human) |
2 |
Male (Elf) |
3 |
Female (Elf) |
4 |
Male (Gargoyle) |
5 |
Female (Gargoyle) |
The exact numeric values depend on the server implementation. The table above shows the standard Ultima Online mappings.
Use IsFemale for a simpler boolean check, or Race to determine the character’s race.
Возвращает значение пола текущего персонажа.
Возвращает значение типа Byte, соответствующее типу тела:
| Значение | Смысл |
|---|---|
0 |
Мужской (Человек) |
1 |
Женский (Человек) |
2 |
Мужской (Эльф) |
3 |
Женский (Эльф) |
4 |
Мужской (Гаргулья) |
5 |
Женский (Гаргулья) |
Точные числовые значения зависят от реализации сервера. Таблица выше показывает стандартные значения Ultima Online.
Используйте IsFemale для простой булевой проверки, или Race для определения расы персонажа.
function Sex: Byte;
def Sex() -> int: ...
begin
case Sex of
0: AddToSystemJournal('Male Human');
1: AddToSystemJournal('Female Human');
2: AddToSystemJournal('Male Elf');
3: AddToSystemJournal('Female Elf');
4: AddToSystemJournal('Male Gargoyle');
5: AddToSystemJournal('Female Gargoyle');
else
AddToSystemJournal('Unknown sex: ' + IntToStr(Sex));
end;
end.
labels = {0: 'Male Human', 1: 'Female Human', 2: 'Male Elf',
3: 'Female Elf', 4: 'Male Gargoyle', 5: 'Female Gargoyle'}
AddToSystemJournal(labels.get(Sex(), f'Unknown sex: {Sex()}'))