summaryrefslogtreecommitdiff
path: root/world/map/npc
diff options
context:
space:
mode:
authormekolat <mekolat@users.noreply.github.com>2016-04-20 17:33:52 -0400
committermekolat <mekolat@users.noreply.github.com>2016-04-20 17:33:52 -0400
commit0f78a426f8fb27bf42b6bf1765710d352f90e165 (patch)
tree569325e6e51665a7294d7bcad1802475bd0e35d2 /world/map/npc
parent9e95e25b4d5839ea25605c1fb0ce6816648830b2 (diff)
downloadserverdata-0f78a426f8fb27bf42b6bf1765710d352f90e165.tar.gz
serverdata-0f78a426f8fb27bf42b6bf1765710d352f90e165.tar.bz2
serverdata-0f78a426f8fb27bf42b6bf1765710d352f90e165.tar.xz
serverdata-0f78a426f8fb27bf42b6bf1765710d352f90e165.zip
add cooldown to hug command
Diffstat (limited to 'world/map/npc')
-rw-r--r--world/map/npc/functions/hug.txt2
1 files changed, 2 insertions, 0 deletions
diff --git a/world/map/npc/functions/hug.txt b/world/map/npc/functions/hug.txt
index d8fc81df..bab8f2ad 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;