summaryrefslogtreecommitdiff
path: root/doc/script_commands.txt
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2014-03-14 13:41:49 -0300
committershennetsind <ind@henn.et>2014-03-14 13:41:49 -0300
commit2cc2a97b574a9485394c6da315b38b9cf362c277 (patch)
treea46d1ca0b138d7973e847e57b7234919b0f69d64 /doc/script_commands.txt
parentf4b1ff7426b1c4cd5e8cac37f7e3983cc03c706e (diff)
parent1849d357210bc3d01be99e1a7cd5e8c19e5d53f4 (diff)
downloadhercules-2cc2a97b574a9485394c6da315b38b9cf362c277.tar.gz
hercules-2cc2a97b574a9485394c6da315b38b9cf362c277.tar.bz2
hercules-2cc2a97b574a9485394c6da315b38b9cf362c277.tar.xz
hercules-2cc2a97b574a9485394c6da315b38b9cf362c277.zip
Merge branch 'master' of https://github.com/HerculesWS/Hercules
Diffstat (limited to 'doc/script_commands.txt')
-rw-r--r--doc/script_commands.txt21
1 files changed, 15 insertions, 6 deletions
diff --git a/doc/script_commands.txt b/doc/script_commands.txt
index db2b2ec5a..ada57d783 100644
--- a/doc/script_commands.txt
+++ b/doc/script_commands.txt
@@ -4141,17 +4141,26 @@ character and produces no other output whatsoever.
*itemheal <hp>,<sp>;
-This command heals given absolute amounts of HP and/or SP on the invoking
+This command heals given relative amounts of HP and/or SP on the invoking
character. Unlike heal, this command is intended for use in item scripts.
-It applies potion-related bonuses, such as alchemist ranking, cards and
-status changes. When used inside an NPC script, certain bonuses are
-omitted.
+It applies potion-related bonuses, such as alchemist ranking, cards,
+status changes.
+It also applies a sp/vit-related bonus that is calculated by:
+ heal = heal*[(100+STATUS*2)/100]
+So if a player has 99 vit and the script is 'itemheal 5,0':
+ heal(hp) = 5*[(100+99*2)/100]
+ heal(hp) = 14,9
+ heal(hp) = 14
+ heal(sp) = 0
+
+When used inside an NPC script, potion-related bonuses are omitted.
There is also a nice example on using this with the 'rand' function, to
give you a random amount of healing.
- // This will heal anything thing from 100 to 150 HP and no SP
- itemheal rand(100,150),0;
+ // If the player has 50 vit and no bonuses this will heal
+ // anything from 200 to 300 HP and 5 SP
+ itemheal rand(100,150),5;
---------------------------------------