summaryrefslogtreecommitdiff
path: root/src/emap/script_buildins.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/emap/script_buildins.c')
-rw-r--r--src/emap/script_buildins.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/emap/script_buildins.c b/src/emap/script_buildins.c
index ed6c6c1..520f16f 100644
--- a/src/emap/script_buildins.c
+++ b/src/emap/script_buildins.c
@@ -13,6 +13,7 @@
#include "common/timer.h"
#include "map/chat.h"
#include "map/chrif.h"
+#include "map/instance.h"
#include "map/npc.h"
#include "map/pc.h"
#include "map/script.h"
@@ -2246,3 +2247,10 @@ BUILDIN(setItemOptionByIndex)
return true;
}
+
+BUILDIN(isInstance)
+{
+ const int instance_id = script_getnum(st, 2);
+ script_pushint(st, instance->valid(instance_id) ? 1 : 0);
+ return true;
+}