summaryrefslogtreecommitdiff
path: root/server/scripts
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-03-02 14:58:05 +0300
committerAndrei Karas <akaras@inbox.ru>2016-03-02 14:58:05 +0300
commit57db79eda786c1e50c2b3715486094ef0628d7af (patch)
tree875890a13fec352169f1324e369615831f5c6d16 /server/scripts
parentabcf13b475a31a397c5f8de582e1ee9c52d9a993 (diff)
downloaddocs-57db79eda786c1e50c2b3715486094ef0628d7af.tar.gz
docs-57db79eda786c1e50c2b3715486094ef0628d7af.tar.bz2
docs-57db79eda786c1e50c2b3715486094ef0628d7af.tar.xz
docs-57db79eda786c1e50c2b3715486094ef0628d7af.zip
Update docs from hercules.
Diffstat (limited to 'server/scripts')
-rw-r--r--server/scripts/constants.md30
-rw-r--r--server/scripts/script_commands.txt9
2 files changed, 36 insertions, 3 deletions
diff --git a/server/scripts/constants.md b/server/scripts/constants.md
index 9137e53..bec1341 100644
--- a/server/scripts/constants.md
+++ b/server/scripts/constants.md
@@ -3425,6 +3425,31 @@
- `4_BLOODYMAN`: 10176
- `4_GIBBET`: 10177
- `4_DULLAHAN`: 10178
+- `4_M_LAZY`: 10179
+- `4_M_GONY`: 10180
+- `4_M_ROOKIE`: 10181
+- `4_M_PHILOFONTES`: 10182
+- `4_F_ESTLOVELOY`: 10183
+- `4_F_LEEDSH`: 10184
+- `4_F_DIENE`: 10185
+- `4_F_COATNEIS`: 10186
+- `4_M_RUPERT`: 10187
+- `4_M_FALLENGONY`: 10188
+- `4_M_EISEN`: 10189
+- `4_F_DEADEVIL`: 10190
+- `4_F_HUNTER_EVIL`: 10191
+- `4_F_ELENA`: 10192
+- `4_F_ANYA`: 10193
+- `4_M_SEIREN_UC`: 10194
+- `4_M_GUNSLINGER2`: 10195
+- `4_M_GUNSLINGER3`: 10196
+- `4_M_REBELLION2`: 10197
+- `4_M_REBELLION3`: 10198
+- `4_F_GUNSLINGER2`: 10199
+- `4_F_GUNSLINGER3`: 10200
+- `4_F_REBELLION2`: 10201
+- `4_F_REBELLION3`: 10202
+- `4_M_ILYA`: 10203
### Mercenary IDs
@@ -3636,6 +3661,11 @@
- `C_GOLD`: 16766720
- `C_VIOLET`: 15631086
+### Genders
+
+- `SEX_FEMALE`: 0
+- `SEX_MALE`: 1
+
## Hardcoded Constants (source)
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