diff options
author | Haru <haru@dotalux.com> | 2019-06-01 16:05:05 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-01 16:05:05 +0200 |
commit | 259a790cb0a6fa17a346fc30ca61ce6f1a085d3e (patch) | |
tree | 3f4eeaf3dae03d64cd43727a59d150b0d8222271 /doc | |
parent | 9154e3c3cde864e7c08f6df3cda28772e268f2e6 (diff) | |
parent | 1f9c83ef453741b7029b5706c7cd52edc7ce9039 (diff) | |
download | hercules-259a790cb0a6fa17a346fc30ca61ce6f1a085d3e.tar.gz hercules-259a790cb0a6fa17a346fc30ca61ce6f1a085d3e.tar.bz2 hercules-259a790cb0a6fa17a346fc30ca61ce6f1a085d3e.tar.xz hercules-259a790cb0a6fa17a346fc30ca61ce6f1a085d3e.zip |
Merge pull request #2472 from Emistry/scriptcommand_cap_value
Add *cap_value script command
Diffstat (limited to 'doc')
-rw-r--r-- | doc/script_commands.txt | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/doc/script_commands.txt b/doc/script_commands.txt index ae9d05d46..bcd2297b9 100644 --- a/doc/script_commands.txt +++ b/doc/script_commands.txt @@ -8537,6 +8537,18 @@ Example: --------------------------------------- +*cap_value(<number>, <min>, <max>) + +Returns the number but capped between <min> and <max>. + +Example: + // capped between 0 ~ 100 + .@value = cap_value(10, 0, 100); // .@value will be equal to 10 + .@value = cap_value(1000, 0, 100); // .@value will be equal to 100 + .@value = cap_value(-10, 3, 100); // .@value will be equal to 3 + +--------------------------------------- + *md5("<string>") Returns the md5 checksum of a number or string. |