From 0f78a426f8fb27bf42b6bf1765710d352f90e165 Mon Sep 17 00:00:00 2001 From: mekolat Date: Wed, 20 Apr 2016 17:33:52 -0400 Subject: add cooldown to hug command --- world/map/npc/functions/hug.txt | 2 ++ 1 file changed, 2 insertions(+) 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; -- cgit v1.2.3-60-g2f50 From 4a5ad09aeecefa53409ea26535e01da31eacf209 Mon Sep 17 00:00:00 2001 From: mekolat Date: Wed, 20 Apr 2016 17:34:42 -0400 Subject: remove hug command aliases --- world/map/npc/functions/hug.txt | 5 ----- 1 file changed, 5 deletions(-) diff --git a/world/map/npc/functions/hug.txt b/world/map/npc/functions/hug.txt index bab8f2ad..f1bd2637 100644 --- a/world/map/npc/functions/hug.txt +++ b/world/map/npc/functions/hug.txt @@ -18,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; } -- cgit v1.2.3-60-g2f50