summaryrefslogtreecommitdiff
path: root/npc/018-3
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2022-10-23 21:44:22 -0300
committerJesusaves <cpntb1@ymail.com>2022-10-23 21:44:22 -0300
commita7c45a192268da2601cef47a4cdba987ae2327ca (patch)
treec5fb5b97db109fe7106496dd96498c475881046b /npc/018-3
downloadserverdata-a7c45a192268da2601cef47a4cdba987ae2327ca.tar.gz
serverdata-a7c45a192268da2601cef47a4cdba987ae2327ca.tar.bz2
serverdata-a7c45a192268da2601cef47a4cdba987ae2327ca.tar.xz
serverdata-a7c45a192268da2601cef47a4cdba987ae2327ca.zip
Initial commit (Moubootaur Legends fork)
Diffstat (limited to 'npc/018-3')
-rw-r--r--npc/018-3/_import.txt5
-rw-r--r--npc/018-3/_mobs.txt18
-rw-r--r--npc/018-3/_warps.txt4
-rw-r--r--npc/018-3/treasure.txt64
4 files changed, 91 insertions, 0 deletions
diff --git a/npc/018-3/_import.txt b/npc/018-3/_import.txt
new file mode 100644
index 0000000..54aa669
--- /dev/null
+++ b/npc/018-3/_import.txt
@@ -0,0 +1,5 @@
+// Map 018-3: Somber Cave
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+"npc/018-3/_mobs.txt",
+"npc/018-3/_warps.txt",
+"npc/018-3/treasure.txt",
diff --git a/npc/018-3/_mobs.txt b/npc/018-3/_mobs.txt
new file mode 100644
index 0000000..5200a96
--- /dev/null
+++ b/npc/018-3/_mobs.txt
@@ -0,0 +1,18 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 018-3: Somber Cave mobs
+018-3,81,91,1,1 monster Dark Lizard 1051,2,0,20000
+018-3,37,61,1,1 monster Dark Lizard 1051,2,0,20000
+018-3,45,114,1,1 monster Troll 1171,2,10000,60000
+018-3,75,53,1,1 monster Black Slime 1178,1,10000,20000
+018-3,115,116,2,2 monster Black Scorpion 1074,1,0,10000
+018-3,39,57,21,38 monster Lava Slime 1097,10,10000,0
+018-3,96,46,34,27 monster Lava Slime 1097,8,10000,0
+018-3,88,84,26,10 monster Lava Slime 1097,4,10000,0
+018-3,123,100,7,26 monster Lava Slime 1097,4,10000,0
+018-3,66,111,48,15 monster Lava Slime 1097,9,10000,0
+018-3,56,114,1,1 monster Black Scorpion 1074,1,0,10000
+018-3,41,76,1,1 monster Electro Worm 1173,1,0,30000
+018-3,95,94,8,4 monster Black Mamba 1174,3,20000,10000
+018-3,123,27,3,3 monster Shadow Plant 1189,2,60000,60000
+018-3,31,28,1,1 monster Gobo Bear 1214,1,0,20000
+018-3,74,72,56,53 monster Black Mamba 1174,8,20000,0
diff --git a/npc/018-3/_warps.txt b/npc/018-3/_warps.txt
new file mode 100644
index 0000000..b044553
--- /dev/null
+++ b/npc/018-3/_warps.txt
@@ -0,0 +1,4 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 018-3: Somber Cave warps
+018-3,114,23,0 warp #018-3_114_23 0,0,017-2-1,27,126
+018-3,94,96,0 warp #018-3_94_96 0,0,018-4,169,114
diff --git a/npc/018-3/treasure.txt b/npc/018-3/treasure.txt
new file mode 100644
index 0000000..c61aee7
--- /dev/null
+++ b/npc/018-3/treasure.txt
@@ -0,0 +1,64 @@
+// TMW2 Script
+
+// (Random) Treasure Chest
+// Authored by Jesusalva
+// Regenerates every 6 hours
+
+018-3,0,0,0 script #chest_01830 NPC_CHEST,{
+
+ if (!.busy && !.empty) {
+ TreasureBox();
+
+ specialeffect(.dir == 0 ? 24 : 25, AREA, getnpcid()); // closed ? opening : closing
+ .dir = .dir == 0 ? 2 : 6; // closed ? opening : closing
+ .busy = true; // lock until available again
+ initnpctimer;
+ } else if (!.busy) {
+ mesc l("Someone looted this treasure box already...");
+ } else {
+ end;
+ }
+ close;
+
+OnTimer160:
+ .dir = .dir == 6 ? 0 : 4; // closing ? closed : open
+ end;
+
+OnTimer500:
+ .busy = false; // unlock
+ if (.dir == 0 || .dir == 4)
+ stopnpctimer; // stop here if the chest is closed
+ end;
+
+OnInit:
+ .busy = false;
+ .distance = 2;
+ .empty = false;
+
+OnClock0156:
+OnClock0756:
+OnClock1356:
+OnClock1956:
+ // Try to warp randomly to a walkable spot, up to 20 attempts
+ // Otherwise, it'll stay where it already is (but will close and refill).
+ .@e=0; .@x=0; .@y=0;
+ while (!checkcell(.map$, .@x, .@y, cell_chkpass))
+ {
+ if (.@e == 20) {
+ .@x=.x;
+ .@y=.y;
+ break;
+ }
+ // Remember the +20 -20 margin adjustment
+ .@x = rand(20, 130);
+ .@y = rand(20, 130);
+ ++.@e;
+ }
+ .busy=false;
+ .empty=false;
+ movenpc .name$, .@x, .@y, 0;
+ end;
+}
+
+018-3,0,0,0 duplicate(#chest_01830) #chest_01831 NPC_CHEST
+