summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2019-05-24 19:21:24 -0300
committerJesusaves <cpntb1@ymail.com>2019-05-24 19:21:24 -0300
commit974162b9fd470b9afcb8204451dd55763febd3d7 (patch)
tree95e451ceff67a144480f1b12646bec2a80ca83d7
parent79c06889aaec4b29c705419f6b0c8c728f0f7f0f (diff)
downloadserverdata-974162b9fd470b9afcb8204451dd55763febd3d7.tar.gz
serverdata-974162b9fd470b9afcb8204451dd55763febd3d7.tar.bz2
serverdata-974162b9fd470b9afcb8204451dd55763febd3d7.tar.xz
serverdata-974162b9fd470b9afcb8204451dd55763febd3d7.zip
Partial Rewrite to rand_sc_heal
-rw-r--r--npc/items/rand_sc_heal.txt7
1 files changed, 5 insertions, 2 deletions
diff --git a/npc/items/rand_sc_heal.txt b/npc/items/rand_sc_heal.txt
index ddb2ab194..a005bf095 100644
--- a/npc/items/rand_sc_heal.txt
+++ b/npc/items/rand_sc_heal.txt
@@ -86,10 +86,13 @@ OnUse:
@val1 = rand(@min, @max);
// Calculate delay if it was not given
- if (!@delay) {
+ if (!@delay || @delay > 60) {
@delay=1 + (@type*2);
}
+ // Update val1
+ @val1 = @val1 / @delay;
+
// Decide the healing bonus type. We have four types: S, L, G and M
// By default, we use 'S'
.@skill = SC_S_LIFEPOTION;
@@ -102,13 +105,13 @@ OnUse:
.@v=getstatus(.@skill, 1);
.@d=getstatus(.@skill, 4);
}
- */
// If there WAS an effect previously, get ponderate average
if (.@v > 0) {
@val1=ponderate_avg(@val1, @delay, .@v, .@d);
@delay=ponderate_avg(@delay, @val1, .@d, .@v);
}
+ */
// Put the delay in ms
@delay *= 1000;