diff options
author | mekolat <mekolat@users.noreply.github.com> | 2015-06-11 11:13:11 -0400 |
---|---|---|
committer | mekolat <mekolat@users.noreply.github.com> | 2016-03-30 11:22:47 -0400 |
commit | bc4deaf81d9701261baac6a10d762b0f40e7f65f (patch) | |
tree | e539e3a49756626e27d4491fccb7a6862b12a120 /world/map/npc/functions/hug.txt | |
parent | 9e7f46ac732851c1359a15837c82ebf67ea2be39 (diff) | |
download | serverdata-bc4deaf81d9701261baac6a10d762b0f40e7f65f.tar.gz serverdata-bc4deaf81d9701261baac6a10d762b0f40e7f65f.tar.bz2 serverdata-bc4deaf81d9701261baac6a10d762b0f40e7f65f.tar.xz serverdata-bc4deaf81d9701261baac6a10d762b0f40e7f65f.zip |
initial commit for magic v3
Fix Druid Tree and add hug to TMW
Diffstat (limited to 'world/map/npc/functions/hug.txt')
-rw-r--r-- | world/map/npc/functions/hug.txt | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/world/map/npc/functions/hug.txt b/world/map/npc/functions/hug.txt new file mode 100644 index 00000000..a663ea1d --- /dev/null +++ b/world/map/npc/functions/hug.txt @@ -0,0 +1,24 @@ +-|script|nonmagic-hug|32767 +{ + explode .@name$[0], @args$, "*"; // strip the trailing * + set @target_id, if_then_else(.@name$[0], getcharid(3, .@name$[0]), BL_ID); + if (@target_id < 1 || !(isloggedin(@target_id))) set @target_id, BL_ID; // fallback to self + if (.@name$[0] == "Tree" || .@name$[0] == "tree") set @target_id, .tree_id; + set .@range, 3; + if (distance(BL_ID, @target_id) >= .@range) end; + misceffect FX_HUG, strcharinfo(0); + if (@target_id != BL_ID) misceffect FX_HUG, @target_id; + if (@target_id != .tree_id) end; + callfunc "QuestTreeTouch"; + close; + +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; +} |