summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormekolat <mekolat@users.noreply.github.com>2016-04-20 18:33:07 -0400
committermekolat <mekolat@users.noreply.github.com>2016-04-20 18:33:07 -0400
commitcab5e80475f0fa1370b8587c519bb6b6b7c6190a (patch)
treed15d6b9c891bc688835d0ccb60e0a06f162306f9
parent9e95e25b4d5839ea25605c1fb0ce6816648830b2 (diff)
parent4a5ad09aeecefa53409ea26535e01da31eacf209 (diff)
downloadserverdata-cab5e80475f0fa1370b8587c519bb6b6b7c6190a.tar.gz
serverdata-cab5e80475f0fa1370b8587c519bb6b6b7c6190a.tar.bz2
serverdata-cab5e80475f0fa1370b8587c519bb6b6b7c6190a.tar.xz
serverdata-cab5e80475f0fa1370b8587c519bb6b6b7c6190a.zip
Merge pull request #471 from mekolat/hug
Hug modifications
-rw-r--r--world/map/npc/functions/hug.txt7
1 files changed, 2 insertions, 5 deletions
diff --git a/world/map/npc/functions/hug.txt b/world/map/npc/functions/hug.txt
index d8fc81df..f1bd2637 100644
--- a/world/map/npc/functions/hug.txt
+++ b/world/map/npc/functions/hug.txt
@@ -6,7 +6,9 @@
if (.@name$[0] == "Tree" || .@name$[0] == "tree") set @target_id, .tree_id;
set .@range, if_then_else(@target_id == .tree_id, 3, 6);
if (distance(BL_ID, @target_id) >= .@range) end;
+ if (gettimetick(2) - @hugspell_time < 3) end;
+ set @hugspell_time, gettimetick(2);
misceffect FX_HUG, strcharinfo(0);
if (@target_id != BL_ID) misceffect FX_HUG, @target_id;
@@ -16,11 +18,6 @@
OnInit:
set .tree_id, getnpcid("#DruidTree0#_M");
- registercmd "hug", strnpcinfo(0);
- registercmd "*hug", strnpcinfo(0);
- registercmd "*hug*", strnpcinfo(0);
- registercmd "hugs", strnpcinfo(0);
registercmd "*hugs", strnpcinfo(0);
- registercmd "*hugs*", strnpcinfo(0);
end;
}