summaryrefslogtreecommitdiff
path: root/doc/script_commands.txt
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2014-11-02 01:30:33 +0100
committerHaru <haru@dotalux.com>2014-11-02 01:34:58 +0100
commit6b20c5b6988c889df35b890d93c338f8b87fa430 (patch)
tree470f3ae3255ed4211687db27b2d187c6f03fde0f /doc/script_commands.txt
parent19e6b0f9de7280770f0dd98d9431d3337b9a6e7c (diff)
downloadhercules-6b20c5b6988c889df35b890d93c338f8b87fa430.tar.gz
hercules-6b20c5b6988c889df35b890d93c338f8b87fa430.tar.bz2
hercules-6b20c5b6988c889df35b890d93c338f8b87fa430.tar.xz
hercules-6b20c5b6988c889df35b890d93c338f8b87fa430.zip
Added min() and max() script commands
- Special thanks to Streusel, Xgear Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'doc/script_commands.txt')
-rw-r--r--doc/script_commands.txt12
1 files changed, 12 insertions, 0 deletions
diff --git a/doc/script_commands.txt b/doc/script_commands.txt
index 9d2317942..4e28b5b71 100644
--- a/doc/script_commands.txt
+++ b/doc/script_commands.txt
@@ -7586,6 +7586,18 @@ Example:
---------------------------------------
+*min(<number>{,<number>...<number>})
+*max(<number>{,<number>...<number>})
+
+Returns the smallest (or biggest) from the set of given numbers.
+
+Example:
+ .@minimum = min(1, -6, -2, 8, 2); // .@minimum will be equal to -6
+ .@maximum = max(0, 5, 10, 4); // .@maximum will be equal to 10
+ .@level = min(BaseLevel, 70); // .@level will be the character's base level, capped to 70
+
+---------------------------------------
+
*md5("<string>")
Returns the md5 checksum of a number or string.