diff options
author | Jesusaves <cpntb1@ymail.com> | 2020-10-11 16:25:51 +0000 |
---|---|---|
committer | Micksha <ms-shaman@gmx.de> | 2020-10-11 16:25:51 +0000 |
commit | dbde28d58750225c967796e0c39ab4d4b709a4a2 (patch) | |
tree | 57c1392d62d9b00d796e32e07ddab18b9dfa648b /npc/functions/main.txt | |
parent | 39536b4781e689c19ee2dd5a99cfd83e62bce126 (diff) | |
download | serverdata-dbde28d58750225c967796e0c39ab4d4b709a4a2.tar.gz serverdata-dbde28d58750225c967796e0c39ab4d4b709a4a2.tar.bz2 serverdata-dbde28d58750225c967796e0c39ab4d4b709a4a2.tar.xz serverdata-dbde28d58750225c967796e0c39ab4d4b709a4a2.zip |
AFKing System
Implemented at the Rusty Pick Inn (Hurnscald) only. Red Plush Inn will be next.
Right now, beer/red plush wine/etc. do not affect EXP gain, only players nearby do.
MAX_IDLE is using the same variable form as Moubootaur Legends.
It can be set to a constant if needed.
Wandering storytellers not yet implemented, I believe @toams will use Kfahr
and Janus to do that laterâ„¢
----
close evol-all#108
Diffstat (limited to 'npc/functions/main.txt')
-rw-r--r-- | npc/functions/main.txt | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/npc/functions/main.txt b/npc/functions/main.txt index f3b58d01..eef24ed4 100644 --- a/npc/functions/main.txt +++ b/npc/functions/main.txt @@ -338,3 +338,28 @@ function script delinventorylist { @inventorylist_count=0; return; } + +// isin( map, x1, y1, {[x2, y2][radius]} ) +function script isin { + if (getmapxy(.@mapName$, .@xpos, .@ypos, 0) != 0) + return false; + if (.@mapName$ != getarg(0)) + return false; + + if (getarg(4,-1) < 0) { + // Radius Based + if (.@xpos >= getarg(1)-getarg(3) && .@xpos <= getarg(1)+getarg(3) && .@ypos >= getarg(2)-getarg(3) && .@ypos <= getarg(2)+getarg(3)) + return true; + } else { + // Coordinate based + if (.@xpos >= getarg(1) && .@xpos <= getarg(3) && .@ypos >= getarg(2) && .@ypos <= getarg(4)) + return true; + } + return false; +} + +// Shortcut for getmapname() +function script getmap { + return getmapname(); +} + |