summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2019-10-13 00:20:36 -0300
committerJesusaves <cpntb1@ymail.com>2019-10-13 00:20:36 -0300
commitf2db0160febeca62a186b3d9e144799e50bfefa9 (patch)
treeff68782fad67ee0cbcfcb996f28460986a395667
parent713715ac7a5e72683d7601a22cc6ca481dcd34cf (diff)
downloadserverdata-f2db0160febeca62a186b3d9e144799e50bfefa9.tar.gz
serverdata-f2db0160febeca62a186b3d9e144799e50bfefa9.tar.bz2
serverdata-f2db0160febeca62a186b3d9e144799e50bfefa9.tar.xz
serverdata-f2db0160febeca62a186b3d9e144799e50bfefa9.zip
Initial commit: Setup
-rw-r--r--conf/map/maps.conf16
-rw-r--r--db/constants.conf22
-rw-r--r--db/map_index.txt26
-rw-r--r--maps/re/maze0.mcachebin0 -> 58 bytes
-rw-r--r--maps/re/maze1.mcachebin0 -> 60 bytes
-rw-r--r--maps/re/maze10.mcachebin0 -> 67 bytes
-rw-r--r--maps/re/maze11.mcachebin0 -> 61 bytes
-rw-r--r--maps/re/maze12.mcachebin0 -> 63 bytes
-rw-r--r--maps/re/maze13.mcachebin0 -> 61 bytes
-rw-r--r--maps/re/maze14.mcachebin0 -> 58 bytes
-rw-r--r--maps/re/maze15.mcachebin0 -> 69 bytes
-rw-r--r--maps/re/maze2.mcachebin0 -> 58 bytes
-rw-r--r--maps/re/maze3.mcachebin0 -> 61 bytes
-rw-r--r--maps/re/maze4.mcachebin0 -> 58 bytes
-rw-r--r--maps/re/maze5.mcachebin0 -> 62 bytes
-rw-r--r--maps/re/maze6.mcachebin0 -> 62 bytes
-rw-r--r--maps/re/maze7.mcachebin0 -> 64 bytes
-rw-r--r--maps/re/maze8.mcachebin0 -> 62 bytes
-rw-r--r--maps/re/maze9.mcachebin0 -> 70 bytes
-rw-r--r--npc/_import.txt16
-rw-r--r--npc/maze0/_import.txt3
-rw-r--r--npc/maze0/config.txt128
-rw-r--r--npc/maze1/_import.txt2
-rw-r--r--npc/maze10/_import.txt2
-rw-r--r--npc/maze11/_import.txt2
-rw-r--r--npc/maze12/_import.txt2
-rw-r--r--npc/maze13/_import.txt2
-rw-r--r--npc/maze14/_import.txt2
-rw-r--r--npc/maze15/_import.txt2
-rw-r--r--npc/maze2/_import.txt2
-rw-r--r--npc/maze3/_import.txt2
-rw-r--r--npc/maze4/_import.txt2
-rw-r--r--npc/maze5/_import.txt2
-rw-r--r--npc/maze6/_import.txt2
-rw-r--r--npc/maze7/_import.txt2
-rw-r--r--npc/maze8/_import.txt2
-rw-r--r--npc/maze9/_import.txt2
37 files changed, 236 insertions, 5 deletions
diff --git a/conf/map/maps.conf b/conf/map/maps.conf
index 5abef6ff7..80adc2447 100644
--- a/conf/map/maps.conf
+++ b/conf/map/maps.conf
@@ -175,6 +175,22 @@ map_list: (
"boss",
"botcheck",
"guilds",
+ "maze0",
+ "maze1",
+ "maze10",
+ "maze11",
+ "maze12",
+ "maze13",
+ "maze14",
+ "maze15",
+ "maze2",
+ "maze3",
+ "maze4",
+ "maze5",
+ "maze6",
+ "maze7",
+ "maze8",
+ "maze9",
"sec_pri",
"soren-2",
"soren",
diff --git a/db/constants.conf b/db/constants.conf
index 1703a6f33..46363deb5 100644
--- a/db/constants.conf
+++ b/db/constants.conf
@@ -4439,5 +4439,27 @@ constants_db: {
LANG_ON_SEA: 1
LANG_IN_SHIP: 2
+ 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
+
@include "conf/import/constants.conf"
}
diff --git a/db/map_index.txt b/db/map_index.txt
index 2dc2bd3ea..0d3f836ad 100644
--- a/db/map_index.txt
+++ b/db/map_index.txt
@@ -172,8 +172,24 @@
boss 172
botcheck 173
guilds 174
-sec_pri 175
-soren-2 176
-soren 177
-test 178
-testbg 179
+maze0 175
+maze1 176
+maze10 177
+maze11 178
+maze12 179
+maze13 180
+maze14 181
+maze15 182
+maze2 183
+maze3 184
+maze4 185
+maze5 186
+maze6 187
+maze7 188
+maze8 189
+maze9 190
+sec_pri 191
+soren-2 192
+soren 193
+test 194
+testbg 195
diff --git a/maps/re/maze0.mcache b/maps/re/maze0.mcache
new file mode 100644
index 000000000..283b0f0ac
--- /dev/null
+++ b/maps/re/maze0.mcache
Binary files differ
diff --git a/maps/re/maze1.mcache b/maps/re/maze1.mcache
new file mode 100644
index 000000000..d5d4296f9
--- /dev/null
+++ b/maps/re/maze1.mcache
Binary files differ
diff --git a/maps/re/maze10.mcache b/maps/re/maze10.mcache
new file mode 100644
index 000000000..16290fe26
--- /dev/null
+++ b/maps/re/maze10.mcache
Binary files differ
diff --git a/maps/re/maze11.mcache b/maps/re/maze11.mcache
new file mode 100644
index 000000000..497547205
--- /dev/null
+++ b/maps/re/maze11.mcache
Binary files differ
diff --git a/maps/re/maze12.mcache b/maps/re/maze12.mcache
new file mode 100644
index 000000000..d797ab2a4
--- /dev/null
+++ b/maps/re/maze12.mcache
Binary files differ
diff --git a/maps/re/maze13.mcache b/maps/re/maze13.mcache
new file mode 100644
index 000000000..fa525561d
--- /dev/null
+++ b/maps/re/maze13.mcache
Binary files differ
diff --git a/maps/re/maze14.mcache b/maps/re/maze14.mcache
new file mode 100644
index 000000000..dbda4a6d7
--- /dev/null
+++ b/maps/re/maze14.mcache
Binary files differ
diff --git a/maps/re/maze15.mcache b/maps/re/maze15.mcache
new file mode 100644
index 000000000..7a68581e1
--- /dev/null
+++ b/maps/re/maze15.mcache
Binary files differ
diff --git a/maps/re/maze2.mcache b/maps/re/maze2.mcache
new file mode 100644
index 000000000..4d118cddd
--- /dev/null
+++ b/maps/re/maze2.mcache
Binary files differ
diff --git a/maps/re/maze3.mcache b/maps/re/maze3.mcache
new file mode 100644
index 000000000..f74a50ca1
--- /dev/null
+++ b/maps/re/maze3.mcache
Binary files differ
diff --git a/maps/re/maze4.mcache b/maps/re/maze4.mcache
new file mode 100644
index 000000000..f1cef24a6
--- /dev/null
+++ b/maps/re/maze4.mcache
Binary files differ
diff --git a/maps/re/maze5.mcache b/maps/re/maze5.mcache
new file mode 100644
index 000000000..0749b84a6
--- /dev/null
+++ b/maps/re/maze5.mcache
Binary files differ
diff --git a/maps/re/maze6.mcache b/maps/re/maze6.mcache
new file mode 100644
index 000000000..401869839
--- /dev/null
+++ b/maps/re/maze6.mcache
Binary files differ
diff --git a/maps/re/maze7.mcache b/maps/re/maze7.mcache
new file mode 100644
index 000000000..5debe5807
--- /dev/null
+++ b/maps/re/maze7.mcache
Binary files differ
diff --git a/maps/re/maze8.mcache b/maps/re/maze8.mcache
new file mode 100644
index 000000000..e0212bfcd
--- /dev/null
+++ b/maps/re/maze8.mcache
Binary files differ
diff --git a/maps/re/maze9.mcache b/maps/re/maze9.mcache
new file mode 100644
index 000000000..509eeb76f
--- /dev/null
+++ b/maps/re/maze9.mcache
Binary files differ
diff --git a/npc/_import.txt b/npc/_import.txt
index e5596800e..69b3b3add 100644
--- a/npc/_import.txt
+++ b/npc/_import.txt
@@ -174,6 +174,22 @@
@include "npc/boss/_import.txt"
@include "npc/botcheck/_import.txt"
@include "npc/guilds/_import.txt"
+@include "npc/maze0/_import.txt"
+@include "npc/maze1/_import.txt"
+@include "npc/maze10/_import.txt"
+@include "npc/maze11/_import.txt"
+@include "npc/maze12/_import.txt"
+@include "npc/maze13/_import.txt"
+@include "npc/maze14/_import.txt"
+@include "npc/maze15/_import.txt"
+@include "npc/maze2/_import.txt"
+@include "npc/maze3/_import.txt"
+@include "npc/maze4/_import.txt"
+@include "npc/maze5/_import.txt"
+@include "npc/maze6/_import.txt"
+@include "npc/maze7/_import.txt"
+@include "npc/maze8/_import.txt"
+@include "npc/maze9/_import.txt"
@include "npc/sec_pri/_import.txt"
@include "npc/soren-2/_import.txt"
@include "npc/soren/_import.txt"
diff --git a/npc/maze0/_import.txt b/npc/maze0/_import.txt
new file mode 100644
index 000000000..8bad6906c
--- /dev/null
+++ b/npc/maze0/_import.txt
@@ -0,0 +1,3 @@
+// Map maze0: Jesusalva's Trap
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+"npc/maze0/config.txt",
diff --git a/npc/maze0/config.txt b/npc/maze0/config.txt
new file mode 100644
index 000000000..9b81fa7ed
--- /dev/null
+++ b/npc/maze0/config.txt
@@ -0,0 +1,128 @@
+// TMW2 Scripts
+// Author:
+// Jesusalva
+// Description:
+// Maze generation script
+// Based on https://wiki.themanaworld.org/index.php/Archive:Afterlife#maze_generation
+// Begin script, instance is required. Maze is Saved to player data.
+// Scopes: MAZE_ {ID, MX, MY} or {X_Y$} or {X_Y_ALLOWEDTYPES}
+
+// MazeVar(x,y,param)
+function script MazeVar {
+ return "MAZE_"+getarg(0)+"_"+getarg(1)+getarg(2, "");
+ end;
+}
+
+// ParseMaze(instanceID, mapType)
+function script ParseMaze {
+ end;
+}
+
+// WarpToMaze(instanceID, x, y)
+function script WarpToMaze {
+ end;
+}
+
+// GenerateMaze(width, height, instanceID)
+function script GenerateMaze {
+ // Save maze configuration
+ MAZE_ID=getarg(2);
+ MAZE_MX=getarg(0);
+ MAZE_MY=getarg(1);
+
+ ////////////////////
+ // SETUP
+ .@x=0; .@y=0;
+
+ // For every column:
+ while (.@x < MAZE_MX) {
+ // For every cell:
+ while (.@y < MAZE_MY) {
+
+ // Case 1: Left column
+ if (.@y == 0) {
+
+ // NW edge
+ if (.@x == 0)
+ setarray getd(MazeVar(.@x, .@y, "_ALLOWEDTYPES")),
+ MAZEMAPTYPE_DEADS, MAZEMAPTYPE_DEADE,
+ MAZEMAPTYPE_CURVESE;
+ // NE edge
+ else if (.@x == MAZE_MX)
+ setarray getd(MazeVar(.@x, .@y, "_ALLOWEDTYPES")),
+ MAZEMAPTYPE_DEADS, MAZEMAPTYPE_DEADW,
+ MAZEMAPTYPE_CURVESW;
+ // North wall
+ else
+ setarray getd(MazeVar(.@x, .@y, "_ALLOWEDTYPES")),
+ MAZEMAPTYPE_DEADS, MAZEMAPTYPE_DEADW, MAZEMAPTYPE_DEADE,
+ MAZEMAPTYPE_TWES, MAZEMAPTYPE_LINEWE,
+ MAZEMAPTYPE_CURVESE, MAZEMAPTYPE_CURVESW;
+
+
+ // Case 2: Right column
+ } else if (.@y == MAZE_MY) {
+
+ // SW edge
+ if (.@x == 0)
+ setarray getd(MazeVar(.@x, .@y, "_ALLOWEDTYPES")),
+ MAZEMAPTYPE_DEADN, MAZEMAPTYPE_DEADE,
+ MAZEMAPTYPE_CURVENE;
+ // SE edge
+ else if (.@x == MAZE_MX)
+ setarray getd(MazeVar(.@x, .@y, "_ALLOWEDTYPES")),
+ MAZEMAPTYPE_DEADN, MAZEMAPTYPE_DEADW,
+ MAZEMAPTYPE_CURVENW;
+ // South wall
+ else
+ setarray getd(MazeVar(.@x, .@y, "_ALLOWEDTYPES")),
+ MAZEMAPTYPE_DEADN, MAZEMAPTYPE_DEADW, MAZEMAPTYPE_DEADE,
+ MAZEMAPTYPE_TWEN, MAZEMAPTYPE_LINEWE,
+ MAZEMAPTYPE_CURVENE, MAZEMAPTYPE_CURVENW;
+
+
+ // Case 3: Nothing in special
+ } else {
+ setarray getd(MazeVar(.@x, .@y, "_ALLOWEDTYPES")),
+ MAZEMAPTYPE_DEADN, MAZEMAPTYPE_DEADW, MAZEMAPTYPE_DEADE, MAZEMAPTYPE_DEADS,
+ MAZEMAPTYPE_CURVENW, MAZEMAPTYPE_CURVENE, MAZEMAPTYPE_CURVESW, MAZEMAPTYPE_CURVESE,
+ MAZEMAPTYPE_TNWS, MAZEMAPTYPE_TNES, MAZEMAPTYPE_TWEN, MAZEMAPTYPE_TWES,
+ MAZEMAPTYPE_LINEWE, MAZEMAPTYPE_LINENS, MAZEMAPTYPE_CROSS;
+ }
+
+
+ // End the setup loop
+ }
+ }
+
+
+ ////////////////////
+ // BUILDING
+ .@x=0; .@y=0;
+
+ // For every line:
+ while (.@y < MAZE_MY) {
+ // For every cell:
+ while (.@x < MAZE_MX) {
+
+ // End the build loop
+ }
+ }
+ end;
+}
+
+
+// ParseMaze(instanceID, mapType)
+function script ParseMaze {
+ end;
+}
+
+// One warp handler per maze map
+maze0,30,30,0 script #MazeMaster NPC_HIDDEN,{
+ function mazeGen;
+ function parseConnections;
+ end;
+}
+
+
+
diff --git a/npc/maze1/_import.txt b/npc/maze1/_import.txt
new file mode 100644
index 000000000..432077154
--- /dev/null
+++ b/npc/maze1/_import.txt
@@ -0,0 +1,2 @@
+// Map maze1: Jesusalva's Trap
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
diff --git a/npc/maze10/_import.txt b/npc/maze10/_import.txt
new file mode 100644
index 000000000..63222b4b0
--- /dev/null
+++ b/npc/maze10/_import.txt
@@ -0,0 +1,2 @@
+// Map maze10: Jesusalva's Trap
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
diff --git a/npc/maze11/_import.txt b/npc/maze11/_import.txt
new file mode 100644
index 000000000..11592e845
--- /dev/null
+++ b/npc/maze11/_import.txt
@@ -0,0 +1,2 @@
+// Map maze11: Jesusalva's Trap
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
diff --git a/npc/maze12/_import.txt b/npc/maze12/_import.txt
new file mode 100644
index 000000000..08c1110b8
--- /dev/null
+++ b/npc/maze12/_import.txt
@@ -0,0 +1,2 @@
+// Map maze12: Jesusalva's Trap
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
diff --git a/npc/maze13/_import.txt b/npc/maze13/_import.txt
new file mode 100644
index 000000000..b7aaf0fe3
--- /dev/null
+++ b/npc/maze13/_import.txt
@@ -0,0 +1,2 @@
+// Map maze13: Jesusalva's Trap
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
diff --git a/npc/maze14/_import.txt b/npc/maze14/_import.txt
new file mode 100644
index 000000000..fd0a904b8
--- /dev/null
+++ b/npc/maze14/_import.txt
@@ -0,0 +1,2 @@
+// Map maze14: Jesusalva's Trap
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
diff --git a/npc/maze15/_import.txt b/npc/maze15/_import.txt
new file mode 100644
index 000000000..5833ba17c
--- /dev/null
+++ b/npc/maze15/_import.txt
@@ -0,0 +1,2 @@
+// Map maze15: Jesusalva's Trap
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
diff --git a/npc/maze2/_import.txt b/npc/maze2/_import.txt
new file mode 100644
index 000000000..bae535704
--- /dev/null
+++ b/npc/maze2/_import.txt
@@ -0,0 +1,2 @@
+// Map maze2: Jesusalva's Trap
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
diff --git a/npc/maze3/_import.txt b/npc/maze3/_import.txt
new file mode 100644
index 000000000..0b54276f5
--- /dev/null
+++ b/npc/maze3/_import.txt
@@ -0,0 +1,2 @@
+// Map maze3: Jesusalva's Trap
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
diff --git a/npc/maze4/_import.txt b/npc/maze4/_import.txt
new file mode 100644
index 000000000..acdfbcee2
--- /dev/null
+++ b/npc/maze4/_import.txt
@@ -0,0 +1,2 @@
+// Map maze4: Jesusalva's Trap
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
diff --git a/npc/maze5/_import.txt b/npc/maze5/_import.txt
new file mode 100644
index 000000000..7649a951e
--- /dev/null
+++ b/npc/maze5/_import.txt
@@ -0,0 +1,2 @@
+// Map maze5: Jesusalva's Trap
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
diff --git a/npc/maze6/_import.txt b/npc/maze6/_import.txt
new file mode 100644
index 000000000..be1fd23a5
--- /dev/null
+++ b/npc/maze6/_import.txt
@@ -0,0 +1,2 @@
+// Map maze6: Jesusalva's Trap
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
diff --git a/npc/maze7/_import.txt b/npc/maze7/_import.txt
new file mode 100644
index 000000000..f73cd9310
--- /dev/null
+++ b/npc/maze7/_import.txt
@@ -0,0 +1,2 @@
+// Map maze7: Jesusalva's Trap
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
diff --git a/npc/maze8/_import.txt b/npc/maze8/_import.txt
new file mode 100644
index 000000000..4bbc9eb09
--- /dev/null
+++ b/npc/maze8/_import.txt
@@ -0,0 +1,2 @@
+// Map maze8: Jesusalva's Trap
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
diff --git a/npc/maze9/_import.txt b/npc/maze9/_import.txt
new file mode 100644
index 000000000..abccc1d00
--- /dev/null
+++ b/npc/maze9/_import.txt
@@ -0,0 +1,2 @@
+// Map maze9: Jesusalva's Trap
+// This file is generated automatically. All manually added changes will be removed when running the Converter.