diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-03-02 14:58:05 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-03-02 14:58:05 +0300 |
commit | 57db79eda786c1e50c2b3715486094ef0628d7af (patch) | |
tree | 875890a13fec352169f1324e369615831f5c6d16 /server/scripts/script_commands.txt | |
parent | abcf13b475a31a397c5f8de582e1ee9c52d9a993 (diff) | |
download | docs-57db79eda786c1e50c2b3715486094ef0628d7af.tar.gz docs-57db79eda786c1e50c2b3715486094ef0628d7af.tar.bz2 docs-57db79eda786c1e50c2b3715486094ef0628d7af.tar.xz docs-57db79eda786c1e50c2b3715486094ef0628d7af.zip |
Update docs from hercules.
Diffstat (limited to 'server/scripts/script_commands.txt')
-rw-r--r-- | server/scripts/script_commands.txt | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/server/scripts/script_commands.txt b/server/scripts/script_commands.txt index 709aa39..c45b4e6 100644 --- a/server/scripts/script_commands.txt +++ b/server/scripts/script_commands.txt @@ -552,7 +552,7 @@ Weight - Amount of weight the character currently carries. Display as in Weight/10. MaxWeight - Maximum weight the character can carry. Display as in MaxWeight/10. -Sex - 0 if female, 1 if male. +Sex - Character's gender (SEX_MALE or SEX_FEMALE). Class - Character's job. Upper - 0 if the character is normal class, 1 if advanced, 2 if baby. BaseClass - The character's 1-1 'normal' job, regardless of Upper value. @@ -889,11 +889,14 @@ and are the following: ?: - Conditional operator Very useful e.g. to replace - if(Sex) mes "..."; else mes "..."; + if (Sex == SEX_MALE) + mes "You're Male."; + else + mes "You're Female."; clauses with simple - mes "Welcome, " + (Sex?"Mr.":"Mrs.") + " " + strcharinfo(0); + mes "Welcome, " + (Sex == SEX_MALE ? "Mr." : "Mrs.") + " " + strcharinfo(0); or to replace any other simple if-else clauses. It might be worth mentioning that ?: has low priority and has to be enclosed with |