summaryrefslogtreecommitdiff
path: root/src/emap/script.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/emap/script.c')
-rw-r--r--src/emap/script.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/emap/script.c b/src/emap/script.c
index 7eaa074..530a13f 100644
--- a/src/emap/script.c
+++ b/src/emap/script.c
@@ -26,6 +26,7 @@
#include "emap/script.h"
#include "emap/clif.h"
#include "emap/lang.h"
+#include "emap/map.h"
#include "emap/scriptdefines.h"
#include "emap/send.h"
#include "emap/data/bgd.h"
@@ -1806,3 +1807,23 @@ BUILDIN(checkNpcCell)
return true;
}
+
+BUILDIN(setCells)
+{
+ int m;
+
+ const char *mapname = script_getstr(st, 2);
+ int x1 = script_getnum(st, 3);
+ int y1 = script_getnum(st, 4);
+ int x2 = script_getnum(st, 5);
+ int y2 = script_getnum(st, 6);
+ int mask = script_getnum(st, 7);
+ const char *name = script_getstr(st, 8);
+
+ if ((m = map->mapname2mapid(mapname)) < 0)
+ return true; // Invalid Map
+
+ emap_iwall_set2(m, x1, y1, x2, y2, mask, name);
+
+ return true;
+}