diff options
author | Jesusaves <cpntb1@ymail.com> | 2018-06-08 02:07:01 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2018-06-08 02:07:01 -0300 |
commit | a202c621d2f072b57d12feb25e2569573e6e1154 (patch) | |
tree | 7dd99a1b25bc6df3a1d1b58df961f92c77064fbf /npc/functions/util.txt | |
parent | 11ae24341220403175a535e9bf971fbe3a850e47 (diff) | |
download | serverdata-a202c621d2f072b57d12feb25e2569573e6e1154.tar.gz serverdata-a202c621d2f072b57d12feb25e2569573e6e1154.tar.bz2 serverdata-a202c621d2f072b57d12feb25e2569573e6e1154.tar.xz serverdata-a202c621d2f072b57d12feb25e2569573e6e1154.zip |
Soren's Fountain prototype
Diffstat (limited to 'npc/functions/util.txt')
-rw-r--r-- | npc/functions/util.txt | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/npc/functions/util.txt b/npc/functions/util.txt index 953b5f21f..1558fb4b7 100644 --- a/npc/functions/util.txt +++ b/npc/functions/util.txt @@ -120,3 +120,19 @@ function script nard_time { return INT_MAX; } +// Determines if player is still in range. +// eg. +// if (reachable(.x, .y, .distance)) { +function script reachable { + .@x=getarg(0); + .@y=getarg(1); + .@z=getarg(2); + getmapxy(.@mp$, .@xp, .@yp, 0); + + if (distance(.@x, .@y, .@xp, .@yp) <= .@z) + return 1; + else + return 0; +} + + |