summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-05-01 03:31:53 -0300
committerJesusaves <cpntb1@ymail.com>2020-05-01 03:31:53 -0300
commitbb93deabaffc97994efd08eb8715084d397b7e38 (patch)
tree2fe89bb7f1cd0f5721b7164f68d6500469cb5d9f /npc
parentcabf8a7658b7a63a55e5ec0588df530c543c572a (diff)
downloadserverdata-bb93deabaffc97994efd08eb8715084d397b7e38.tar.gz
serverdata-bb93deabaffc97994efd08eb8715084d397b7e38.tar.bz2
serverdata-bb93deabaffc97994efd08eb8715084d397b7e38.tar.xz
serverdata-bb93deabaffc97994efd08eb8715084d397b7e38.zip
Northeast wing
Diffstat (limited to 'npc')
-rw-r--r--npc/042-6/ctrl.txt2
-rw-r--r--npc/042-7/_import.txt1
-rw-r--r--npc/042-7/_warps.txt1
-rw-r--r--npc/042-7/ctrl.txt116
4 files changed, 118 insertions, 2 deletions
diff --git a/npc/042-6/ctrl.txt b/npc/042-6/ctrl.txt
index 654a199fb..042d4360a 100644
--- a/npc/042-6/ctrl.txt
+++ b/npc/042-6/ctrl.txt
@@ -52,7 +52,7 @@ OnInstanceInit:
if (!rand2(2))
areamonster(.map$, 45, 20, 90, 90, strmobinfo(1, MagicBif), MagicBif, 2);
if (!rand2(2))
- areamonster(.map$, 20, 20, 90, 90, strmobinfo(1, SilverChest), GoldenChest, 1);
+ areamonster(.map$, 20, 20, 90, 90, strmobinfo(1, GoldenChest), GoldenChest, 1);
if (!rand2(2))
areamonster(.map$, 20, 20, 90, 90, strmobinfo(1, SilverChest), SilverChest, 2);
if (!rand2(2))
diff --git a/npc/042-7/_import.txt b/npc/042-7/_import.txt
index 2d8416c0e..7b351c553 100644
--- a/npc/042-7/_import.txt
+++ b/npc/042-7/_import.txt
@@ -1,3 +1,4 @@
// Map 042-7: Camelot Sewer Northeast Path
// This file is generated automatically. All manually added changes will be removed when running the Converter.
"npc/042-7/_warps.txt",
+"npc/042-7/ctrl.txt",
diff --git a/npc/042-7/_warps.txt b/npc/042-7/_warps.txt
index d6a57f36c..25d416791 100644
--- a/npc/042-7/_warps.txt
+++ b/npc/042-7/_warps.txt
@@ -1,4 +1,3 @@
// This file is generated automatically. All manually added changes will be removed when running the Converter.
// Map 042-7: Camelot Sewer Northeast Path warps
-042-7,21,78,0 warp #042-7_21_78 3,0,042-5,56,21
042-7,62,56,0 warp #042-7_62_56 3,0,042-10,86,138
diff --git a/npc/042-7/ctrl.txt b/npc/042-7/ctrl.txt
new file mode 100644
index 000000000..1c6ba40f0
--- /dev/null
+++ b/npc/042-7/ctrl.txt
@@ -0,0 +1,116 @@
+// TMW 2 Script
+// Author:
+// Jesusalva
+// Micksha
+// Description:
+// Controls sewers.
+// FIXME: People should not be able to return here once they leave to 042-10
+// Spawn monsters and respawns them.
+
+// A simple random treasure chest - to be sure players were introduced to this
+// awesome system. Same rules as any treasure box still applies.
+042-7,22,30,0 script #chest_0427 NPC_CHEST,{
+ KamelotTreasure(4);
+ specialeffect(.dir == 0 ? 24 : 25, AREA, getnpcid()); // closed ? opening : closing
+ close;
+
+OnInit:
+ .distance = 2;
+ end;
+
+OnInstanceInit:
+ // Yes, we just hope it works out of box
+ explode(.@map$, .map$, "@");
+ .@g=atoi(.@map$[1]);
+ if (.@g < 1) {
+ debugmes "[ERROR] [KAMELOT] Unable to spawn for Kamelot %s", .map$;
+ debugmes "[ERROR] [KAMELOT] Using dummy data (returned: %d)", .@g;
+ .@g=0;
+ }
+ debugmes "Spawning monsters for guild %d", .@g;
+ .@mx=getguildavg(.@g);
+
+ // Corritors
+ KamelotCaveSpawn(2, 18, 52, 30, 80, .@mx, "042-7");
+ KamelotCaveSpawn(3, 20, 44, 58, 60, .@mx, "042-7");
+ KamelotCaveSpawn(4, 40, 55, 70, 85, .@mx, "042-7");
+ KamelotCaveSpawn(5, 50, 57, 70, 85, .@mx, "042-7");
+
+ // Boss Chamber
+ KamelotCaveSpawn(8, 19, 20, 56, 44, .@mx, "042-7");
+ KamelotBoss("042-7", 30, 30, .@mx+1, .name$);
+
+ // Boss monster
+ // TODO
+
+ // Neutral monsters
+ areamonster(.map$, 20, 20, 70, 80, strmobinfo(1, YellowSlime), YellowSlime, 5);
+ areamonster(.map$, 20, 20, 70, 80, strmobinfo(1, ManaGhost), ManaGhost, max(1, .@mx/10));
+ areamonster(.map$, 20, 20, 70, 80, strmobinfo(1, CaveMaggot), CaveMaggot, 30);
+
+ // Bonus monsters
+ if (!rand2(2))
+ areamonster(.map$, 45, 20, 70, 80, strmobinfo(1, MagicBif), MagicBif, 2);
+ if (!rand2(2))
+ areamonster(.map$, 20, 20, 70, 80, strmobinfo(1, GoldenChest), GoldenChest, 1);
+ if (!rand2(2))
+ areamonster(.map$, 20, 20, 70, 80, strmobinfo(1, SilverChest), SilverChest, 2);
+ if (!rand2(2))
+ areamonster(.map$, 20, 20, 70, 80, strmobinfo(1, BronzeChest), BronzeChest, 3);
+ end;
+
+OnKillBoss:
+ if (!playerattached())
+ goto OnRespawn;
+ // Maybe a reward is due
+ .@g=getcharid(2);
+ if (.@g < 1) percentheal -100, -100;
+ getitem GuildCoin, 2+min(13, $KAMELOT_MX[.@g]/10);
+ getexp $KAMELOT_MX[.@g]*14, $KAMELOT_MX[.@g]*8;
+ mapannounce getmap(), strcharinfo(0)+" has defeated the boss!", 0;
+ .@delay=max(3000, 21000-$KAMELOT_PC[.@g]*1000);
+ goto OnRespawn;
+
+OnKillMob:
+ if (!playerattached())
+ goto OnRespawn;
+ // Maybe a reward is due
+ .@g=getcharid(2);
+ if (.@g < 1) percentheal -100, -100;
+ getexp $KAMELOT_MX[.@g]*7, $KAMELOT_MX[.@g]*4;
+ .@delay=max(3000, 21000-$KAMELOT_PC[.@g]*1000);
+ // FALLTHROUGH
+
+OnRespawn:
+ .@delay=(.@delay ? .@delay : 3000);
+ sleep(.@delay);
+ // Yes, we just hope it works out of box
+ explode(.@map$, .map$, "@");
+ .@g=atoi(.@map$[1]);
+ if (.@g < 1) {
+ debugmes "[ERROR] [KAMELOT] Unable to respawn for Kamelot %s", .map$;
+ .@g=0;
+ }
+ KamelotCaveSpawn(1, 20, 20, 115, 100, $KAMELOT_MX[.@g], "042-7");
+ end;
+
+}
+
+
+// The exit only works before chest is looted
+042-7,21,78,0 script #KDoor0427 NPC_HIDDEN,3,0,{
+ end;
+
+OnTouch:
+ .@g=getcharid(2);
+ if (.@g < 1) percentheal -100, -100;
+ if ($KAMELOT_KEYMASK[.@g] & 4) goto L_NoAccess;
+ warp "042-5@"+.@g, 56, 21;
+ end;
+
+
+L_NoAccess:
+ dispbottom l("OH NOES! The ceiling seems to have collapsed when the chest was open! We are forced to go forward!!");
+ end;
+}
+