summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2021-09-24 03:58:27 -0300
committerJesusaves <cpntb1@ymail.com>2021-09-24 03:58:27 -0300
commit3079464676d63e74c5c5caab59dd50fbfe00edaa (patch)
treebbcbadfb9cd7cbaf6a6473d6c8d9bc6d9683beed
parent7f8db3e37c31e185e2aef18fee193febc7a8dc78 (diff)
downloadserverdata-3079464676d63e74c5c5caab59dd50fbfe00edaa.tar.gz
serverdata-3079464676d63e74c5c5caab59dd50fbfe00edaa.tar.bz2
serverdata-3079464676d63e74c5c5caab59dd50fbfe00edaa.tar.xz
serverdata-3079464676d63e74c5c5caab59dd50fbfe00edaa.zip
Domain 030
-rw-r--r--conf/map/maps.conf14
-rw-r--r--db/constants.conf24
-rw-r--r--db/map_index.txt54
-rw-r--r--maps/re/030-01.mcachebin0 -> 304 bytes
-rw-r--r--maps/re/030-02.mcachebin0 -> 314 bytes
-rw-r--r--maps/re/030-03.mcachebin0 -> 321 bytes
-rw-r--r--maps/re/030-04.mcachebin0 -> 333 bytes
-rw-r--r--maps/re/030-05.mcachebin0 -> 312 bytes
-rw-r--r--maps/re/030-06.mcachebin0 -> 326 bytes
-rw-r--r--maps/re/030-07.mcachebin0 -> 330 bytes
-rw-r--r--maps/re/030-08.mcachebin0 -> 329 bytes
-rw-r--r--maps/re/030-09.mcachebin0 -> 309 bytes
-rw-r--r--maps/re/030-10.mcachebin0 -> 331 bytes
-rw-r--r--maps/re/030-11.mcachebin0 -> 314 bytes
-rw-r--r--maps/re/030-12.mcachebin0 -> 327 bytes
-rw-r--r--maps/re/030-13.mcachebin0 -> 317 bytes
-rw-r--r--maps/re/030-14.mcachebin0 -> 318 bytes
-rw-r--r--npc/030-01/_import.txt2
-rw-r--r--npc/030-02/_import.txt2
-rw-r--r--npc/030-03/_import.txt2
-rw-r--r--npc/030-04/_import.txt2
-rw-r--r--npc/030-05/_import.txt2
-rw-r--r--npc/030-06/_import.txt2
-rw-r--r--npc/030-07/_import.txt2
-rw-r--r--npc/030-08/_import.txt2
-rw-r--r--npc/030-09/_import.txt2
-rw-r--r--npc/030-10/_import.txt2
-rw-r--r--npc/030-11/_import.txt2
-rw-r--r--npc/030-12/_import.txt2
-rw-r--r--npc/030-13/_import.txt2
-rw-r--r--npc/030-14/_import.txt2
-rw-r--r--npc/_import.txt14
-rw-r--r--npc/functions/maze.txt97
-rw-r--r--npc/scripts.conf1
34 files changed, 191 insertions, 41 deletions
diff --git a/conf/map/maps.conf b/conf/map/maps.conf
index 02dc29a0c..3b0eab69b 100644
--- a/conf/map/maps.conf
+++ b/conf/map/maps.conf
@@ -223,6 +223,20 @@ map_list: (
"029-7",
"029-8",
"029-9",
+ "030-01",
+ "030-02",
+ "030-03",
+ "030-04",
+ "030-05",
+ "030-06",
+ "030-07",
+ "030-08",
+ "030-09",
+ "030-10",
+ "030-11",
+ "030-12",
+ "030-13",
+ "030-14",
"042-0",
"042-1",
"042-10",
diff --git a/db/constants.conf b/db/constants.conf
index 2db1b68f9..0d17911e4 100644
--- a/db/constants.conf
+++ b/db/constants.conf
@@ -2356,27 +2356,9 @@ constants_db: {
BCONFD_DROP: 0
INT_MAX: 2147483647
- comment__: "Maze Generator constants"
- MAZEMAPTYPE_NULL: 0
- MAZEMAPTYPE_DEADS: 1
- MAZEMAPTYPE_DEADW: 2
- MAZEMAPTYPE_DEADN: 3
- MAZEMAPTYPE_DEADE: 4
- MAZEMAPTYPE_CURVENW: 5
- MAZEMAPTYPE_CURVENE: 6
- MAZEMAPTYPE_CURVESW: 7
- MAZEMAPTYPE_CURVESE: 8
- MAZEMAPTYPE_TNWS: 9
- MAZEMAPTYPE_TNES: 10
- MAZEMAPTYPE_TWEN: 11
- MAZEMAPTYPE_TWES: 12
- MAZEMAPTYPE_LINENS: 13
- MAZEMAPTYPE_LINEWE: 14
- MAZEMAPTYPE_CROSS: 15
- MAZENORTH: 0
- MAZE_WEST: 1
- MAZE_EAST: 2
- MAZESOUTH: 3
+ comment__: "Maze Domain constants"
+ MAZE_MIN: 1
+ MAZE_MAX: 14
comment__: "Aurora Event constants"
FY_MISC: 0
diff --git a/db/map_index.txt b/db/map_index.txt
index 002148fb4..15eefda92 100644
--- a/db/map_index.txt
+++ b/db/map_index.txt
@@ -220,23 +220,37 @@
029-7 220
029-8 221
029-9 222
-042-0 223
-042-1 224
-042-10 225
-042-11 226
-042-2 227
-042-3 228
-042-4 229
-042-5 230
-042-6 231
-042-7 232
-042-8 233
-042-9 234
-boss 235
-botcheck 236
-guilds 237
-sec_pri 238
-soren-2 239
-soren 240
-test 241
-testbg 242
+030-01 223
+030-02 224
+030-03 225
+030-04 226
+030-05 227
+030-06 228
+030-07 229
+030-08 230
+030-09 231
+030-10 232
+030-11 233
+030-12 234
+030-13 235
+030-14 236
+042-0 237
+042-1 238
+042-10 239
+042-11 240
+042-2 241
+042-3 242
+042-4 243
+042-5 244
+042-6 245
+042-7 246
+042-8 247
+042-9 248
+boss 249
+botcheck 250
+guilds 251
+sec_pri 252
+soren-2 253
+soren 254
+test 255
+testbg 256
diff --git a/maps/re/030-01.mcache b/maps/re/030-01.mcache
new file mode 100644
index 000000000..e6f3f5d67
--- /dev/null
+++ b/maps/re/030-01.mcache
Binary files differ
diff --git a/maps/re/030-02.mcache b/maps/re/030-02.mcache
new file mode 100644
index 000000000..ab16eaf07
--- /dev/null
+++ b/maps/re/030-02.mcache
Binary files differ
diff --git a/maps/re/030-03.mcache b/maps/re/030-03.mcache
new file mode 100644
index 000000000..0a5472bcf
--- /dev/null
+++ b/maps/re/030-03.mcache
Binary files differ
diff --git a/maps/re/030-04.mcache b/maps/re/030-04.mcache
new file mode 100644
index 000000000..1daad736a
--- /dev/null
+++ b/maps/re/030-04.mcache
Binary files differ
diff --git a/maps/re/030-05.mcache b/maps/re/030-05.mcache
new file mode 100644
index 000000000..79b846fc3
--- /dev/null
+++ b/maps/re/030-05.mcache
Binary files differ
diff --git a/maps/re/030-06.mcache b/maps/re/030-06.mcache
new file mode 100644
index 000000000..698475c1f
--- /dev/null
+++ b/maps/re/030-06.mcache
Binary files differ
diff --git a/maps/re/030-07.mcache b/maps/re/030-07.mcache
new file mode 100644
index 000000000..f887ac97c
--- /dev/null
+++ b/maps/re/030-07.mcache
Binary files differ
diff --git a/maps/re/030-08.mcache b/maps/re/030-08.mcache
new file mode 100644
index 000000000..debc4ba5f
--- /dev/null
+++ b/maps/re/030-08.mcache
Binary files differ
diff --git a/maps/re/030-09.mcache b/maps/re/030-09.mcache
new file mode 100644
index 000000000..2c871480e
--- /dev/null
+++ b/maps/re/030-09.mcache
Binary files differ
diff --git a/maps/re/030-10.mcache b/maps/re/030-10.mcache
new file mode 100644
index 000000000..2f46f4630
--- /dev/null
+++ b/maps/re/030-10.mcache
Binary files differ
diff --git a/maps/re/030-11.mcache b/maps/re/030-11.mcache
new file mode 100644
index 000000000..f79c1b72f
--- /dev/null
+++ b/maps/re/030-11.mcache
Binary files differ
diff --git a/maps/re/030-12.mcache b/maps/re/030-12.mcache
new file mode 100644
index 000000000..d97402929
--- /dev/null
+++ b/maps/re/030-12.mcache
Binary files differ
diff --git a/maps/re/030-13.mcache b/maps/re/030-13.mcache
new file mode 100644
index 000000000..793405076
--- /dev/null
+++ b/maps/re/030-13.mcache
Binary files differ
diff --git a/maps/re/030-14.mcache b/maps/re/030-14.mcache
new file mode 100644
index 000000000..aef22daec
--- /dev/null
+++ b/maps/re/030-14.mcache
Binary files differ
diff --git a/npc/030-01/_import.txt b/npc/030-01/_import.txt
new file mode 100644
index 000000000..a4fa24bda
--- /dev/null
+++ b/npc/030-01/_import.txt
@@ -0,0 +1,2 @@
+// Map 030-01: Mazes and Dragons
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
diff --git a/npc/030-02/_import.txt b/npc/030-02/_import.txt
new file mode 100644
index 000000000..542f3cc8f
--- /dev/null
+++ b/npc/030-02/_import.txt
@@ -0,0 +1,2 @@
+// Map 030-02: Mazes and Dragons
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
diff --git a/npc/030-03/_import.txt b/npc/030-03/_import.txt
new file mode 100644
index 000000000..55cb23041
--- /dev/null
+++ b/npc/030-03/_import.txt
@@ -0,0 +1,2 @@
+// Map 030-03: Mazes and Dragons
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
diff --git a/npc/030-04/_import.txt b/npc/030-04/_import.txt
new file mode 100644
index 000000000..af92695d0
--- /dev/null
+++ b/npc/030-04/_import.txt
@@ -0,0 +1,2 @@
+// Map 030-04: Mazes and Dragons
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
diff --git a/npc/030-05/_import.txt b/npc/030-05/_import.txt
new file mode 100644
index 000000000..194df71e5
--- /dev/null
+++ b/npc/030-05/_import.txt
@@ -0,0 +1,2 @@
+// Map 030-05: Mazes and Dragons
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
diff --git a/npc/030-06/_import.txt b/npc/030-06/_import.txt
new file mode 100644
index 000000000..c7a9873c5
--- /dev/null
+++ b/npc/030-06/_import.txt
@@ -0,0 +1,2 @@
+// Map 030-06: Mazes and Dragons
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
diff --git a/npc/030-07/_import.txt b/npc/030-07/_import.txt
new file mode 100644
index 000000000..3187970af
--- /dev/null
+++ b/npc/030-07/_import.txt
@@ -0,0 +1,2 @@
+// Map 030-07: Mazes and Dragons
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
diff --git a/npc/030-08/_import.txt b/npc/030-08/_import.txt
new file mode 100644
index 000000000..a8e16c8e0
--- /dev/null
+++ b/npc/030-08/_import.txt
@@ -0,0 +1,2 @@
+// Map 030-08: Mazes and Dragons
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
diff --git a/npc/030-09/_import.txt b/npc/030-09/_import.txt
new file mode 100644
index 000000000..f35f31398
--- /dev/null
+++ b/npc/030-09/_import.txt
@@ -0,0 +1,2 @@
+// Map 030-09: Mazes and Dragons
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
diff --git a/npc/030-10/_import.txt b/npc/030-10/_import.txt
new file mode 100644
index 000000000..1fbf111f6
--- /dev/null
+++ b/npc/030-10/_import.txt
@@ -0,0 +1,2 @@
+// Map 030-10: Mazes and Dragons
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
diff --git a/npc/030-11/_import.txt b/npc/030-11/_import.txt
new file mode 100644
index 000000000..126df6cae
--- /dev/null
+++ b/npc/030-11/_import.txt
@@ -0,0 +1,2 @@
+// Map 030-11: Mazes and Dragons
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
diff --git a/npc/030-12/_import.txt b/npc/030-12/_import.txt
new file mode 100644
index 000000000..262596248
--- /dev/null
+++ b/npc/030-12/_import.txt
@@ -0,0 +1,2 @@
+// Map 030-12: Mazes and Dragons
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
diff --git a/npc/030-13/_import.txt b/npc/030-13/_import.txt
new file mode 100644
index 000000000..eea031700
--- /dev/null
+++ b/npc/030-13/_import.txt
@@ -0,0 +1,2 @@
+// Map 030-13: Mazes and Dragons
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
diff --git a/npc/030-14/_import.txt b/npc/030-14/_import.txt
new file mode 100644
index 000000000..c0ace412b
--- /dev/null
+++ b/npc/030-14/_import.txt
@@ -0,0 +1,2 @@
+// Map 030-14: Mazes and Dragons
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
diff --git a/npc/_import.txt b/npc/_import.txt
index 1bbae746d..f7af0c8a9 100644
--- a/npc/_import.txt
+++ b/npc/_import.txt
@@ -222,6 +222,20 @@
@include "npc/029-7/_import.txt"
@include "npc/029-8/_import.txt"
@include "npc/029-9/_import.txt"
+@include "npc/030-01/_import.txt"
+@include "npc/030-02/_import.txt"
+@include "npc/030-03/_import.txt"
+@include "npc/030-04/_import.txt"
+@include "npc/030-05/_import.txt"
+@include "npc/030-06/_import.txt"
+@include "npc/030-07/_import.txt"
+@include "npc/030-08/_import.txt"
+@include "npc/030-09/_import.txt"
+@include "npc/030-10/_import.txt"
+@include "npc/030-11/_import.txt"
+@include "npc/030-12/_import.txt"
+@include "npc/030-13/_import.txt"
+@include "npc/030-14/_import.txt"
@include "npc/042-0/_import.txt"
@include "npc/042-1/_import.txt"
@include "npc/042-10/_import.txt"
diff --git a/npc/functions/maze.txt b/npc/functions/maze.txt
new file mode 100644
index 000000000..8fd9c438e
--- /dev/null
+++ b/npc/functions/maze.txt
@@ -0,0 +1,97 @@
+// TMW2 Scripts
+// Author:
+// Jesusalva
+// Description:
+// Controls map domain 030 and provide helpers. See constants;
+// Player Variables:
+// MAZE_ID → ID of the maze being used
+// MAZE_MAP$ → Map being used for the maze
+// MAZE_INST → Instance ID of the Maze
+
+/////////////////////////////////////////////////////////////////////////////////
+// CreateMaze(scope=IOT_CHAR)
+// Creates the maze instances so they can be configured
+// But does not initializes anything
+function script CreateMaze {
+ .@scope = getarg(0, IOT_CHAR);
+ // Pseudo-random maze ID
+ // (It is not random at all; But two mazes won't repeat)
+ MAZE_ID += 1;
+ if (MAZE_ID > MAZE_MAX)
+ MAZE_ID = MAZE_MIN;
+ if (MAZE_ID < MAZE_MIN)
+ MAZE_ID = MAZE_MIN;
+
+ .@MAZEMP$=sprintf("030-%02d", MAZE_ID);
+ MAZE_MAP$=sprintf("mz%02d@"+getcharid(0), MAZE_ID);
+
+ // Maze is not yet started
+ if (.@scope == IOT_CHAR) {
+ MAZE_INST = instance_create("Maze "+MAZE_ID+" "+getcharid(0), getcharid(3), IOT_CHAR);
+ // Failed
+ if (MAZE_INST < 0) {
+ consolebug("Instance \"%s\" already exists! (Error %d)", "Maze "+MAZE_ID+" "+getcharid(0), MAZE_INST);
+ return 0;
+ }
+ // Attach map
+ instance_attachmap(.@MAZEMP$, .@inst, false, MAZE_MAP$);
+ } else {
+ consolebug("Scope %d not yet supported by maze system", .@scope);
+ return 0;
+ }
+ return MAZE_ID;
+}
+
+/////////////////////////////////////////////////////////////////////////////////
+// InitMaze(duration=2 hours)
+// Puts maze to work and send player there.
+// Exit must have been configured prior to the maze.
+function script InitMaze {
+ .@t = getarg(0, 7200);
+ instance_set_timeout(.@t, .@t, MAZE_INST);
+ instance_init(MAZE_INST);
+
+ // Find random, warpable coordinates
+ .@e=0; .@x=0; .@y=0;
+ .@mx=getmapinfo(MAPINFO_SIZE_X, MAZE_MAP$)-20;
+ .@my=getmapinfo(MAPINFO_SIZE_Y, MAZE_MAP$)-20;
+ do {
+ .@x = rand2(20, .@mx);
+ .@y = rand2(20, .@my);
+ .@e += 1;
+ if (.@e > 30) {
+ consolebug("Too many failures at Maze \"%s\"! Trying anyway!", MAZE_MAP$);
+ break;
+ }
+ } while (!checknpccell(MAZE_MAP$, .@x, .@y, cell_chkpass));
+
+ warp MAZE_MAP$, .@x, .@y;
+ return true;
+}
+
+/////////////////////////////////////////////////////////////////////////////////
+// RenewMaze(duration=2 hours)
+// Renews the map expiration time
+function script RenewMaze {
+ .@t = getarg(0, 7200);
+ instance_set_timeout(.@t, .@t, MAZE_INST);
+ return true;
+}
+
+/////////////////////////////////////////////////////////////////////////////////
+// Configure maze maps as MMO zones
+030-01 mapflag zone MMO
+030-02 mapflag zone MMO
+030-03 mapflag zone MMO
+030-04 mapflag zone MMO
+030-05 mapflag zone MMO
+030-06 mapflag zone MMO
+030-07 mapflag zone MMO
+030-08 mapflag zone MMO
+030-09 mapflag zone MMO
+030-10 mapflag zone MMO
+030-11 mapflag zone MMO
+030-12 mapflag zone MMO
+030-13 mapflag zone MMO
+030-14 mapflag zone MMO
+
diff --git a/npc/scripts.conf b/npc/scripts.conf
index e10a2ac27..df4ca26d2 100644
--- a/npc/scripts.conf
+++ b/npc/scripts.conf
@@ -145,6 +145,7 @@
"npc/functions/instances.txt",
"npc/functions/captcha.txt",
"npc/functions/dungeon.txt",
+"npc/functions/maze.txt",
"npc/config/easteregg_blackbox.txt",
// Maps specific scripts