From 2ddb9cf07b3616b28f65f23a6f1772f0b0e5c094 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Thu, 7 Jun 2018 13:12:10 -0300 Subject: isin() --- npc/functions/main.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'npc/functions/main.txt') diff --git a/npc/functions/main.txt b/npc/functions/main.txt index 097c21060..e4bda0d1a 100644 --- a/npc/functions/main.txt +++ b/npc/functions/main.txt @@ -220,6 +220,16 @@ function script npctalkonce { return true; } +function script isin { + if (getmapxy(.@mapName$, .@xpos, .@ypos, 0) != 0) + return false; + if (.@mapName$ != getarg(0)) + return false; + if (.@xpos >= getarg(1) && .@xpos <= getarg(3) && .@ypos >= getarg(2) && .@ypos <= getarg(4)) + return true; + return false; +} + function script getquestlink { return "[@@q" + getarg(0) + "|@@]"; } -- cgit v1.2.3-70-g09d2