From 85a9aff1aaf7799b82047f005c8c3295db3aa212 Mon Sep 17 00:00:00 2001
From: MobiusDev <8391001+MobiusDevelopment@users.noreply.github.com>
Date: Sun, 21 Aug 2016 10:37:43 +0000
Subject: [PATCH] Quest Blade Under foot (512).
---
.../data/scripts/quests/MissingQuests.txt | 1 -
.../Q00512_BladeUnderFoot.java | 129 ++++++++++++++++++
.../Q00512_BladeUnderFoot/Warden-00a.htm | 6 +
.../Q00512_BladeUnderFoot/Warden-00b.htm | 4 +
.../Q00512_BladeUnderFoot/Warden-01.htm | 9 ++
.../Q00512_BladeUnderFoot/Warden-02.htm | 10 ++
.../Q00512_BladeUnderFoot/Warden-03.html | 8 ++
.../Q00512_BladeUnderFoot/Warden-04.html | 4 +
.../Q00512_BladeUnderFoot/Warden-05.html | 8 ++
.../Q00512_BladeUnderFoot/Warden-06.html | 14 ++
.../Q00512_BladeUnderFoot/Warden-07.html | 11 ++
.../Q00512_BladeUnderFoot/Warden-08.html | 12 ++
.../Q00512_BladeUnderFoot/Warden-09.html | 4 +
.../Q00512_BladeUnderFoot/Warden-10.html | 6 +
.../scripts/quests/QuestMasterHandler.java | 2 +
15 files changed, 227 insertions(+), 1 deletion(-)
create mode 100644 L2J_Mobius_Underground/dist/game/data/scripts/quests/Q00512_BladeUnderFoot/Q00512_BladeUnderFoot.java
create mode 100644 L2J_Mobius_Underground/dist/game/data/scripts/quests/Q00512_BladeUnderFoot/Warden-00a.htm
create mode 100644 L2J_Mobius_Underground/dist/game/data/scripts/quests/Q00512_BladeUnderFoot/Warden-00b.htm
create mode 100644 L2J_Mobius_Underground/dist/game/data/scripts/quests/Q00512_BladeUnderFoot/Warden-01.htm
create mode 100644 L2J_Mobius_Underground/dist/game/data/scripts/quests/Q00512_BladeUnderFoot/Warden-02.htm
create mode 100644 L2J_Mobius_Underground/dist/game/data/scripts/quests/Q00512_BladeUnderFoot/Warden-03.html
create mode 100644 L2J_Mobius_Underground/dist/game/data/scripts/quests/Q00512_BladeUnderFoot/Warden-04.html
create mode 100644 L2J_Mobius_Underground/dist/game/data/scripts/quests/Q00512_BladeUnderFoot/Warden-05.html
create mode 100644 L2J_Mobius_Underground/dist/game/data/scripts/quests/Q00512_BladeUnderFoot/Warden-06.html
create mode 100644 L2J_Mobius_Underground/dist/game/data/scripts/quests/Q00512_BladeUnderFoot/Warden-07.html
create mode 100644 L2J_Mobius_Underground/dist/game/data/scripts/quests/Q00512_BladeUnderFoot/Warden-08.html
create mode 100644 L2J_Mobius_Underground/dist/game/data/scripts/quests/Q00512_BladeUnderFoot/Warden-09.html
create mode 100644 L2J_Mobius_Underground/dist/game/data/scripts/quests/Q00512_BladeUnderFoot/Warden-10.html
diff --git a/L2J_Mobius_Underground/dist/game/data/scripts/quests/MissingQuests.txt b/L2J_Mobius_Underground/dist/game/data/scripts/quests/MissingQuests.txt
index 2bc5e7fb58..5c5593fc2a 100644
--- a/L2J_Mobius_Underground/dist/game/data/scripts/quests/MissingQuests.txt
+++ b/L2J_Mobius_Underground/dist/game/data/scripts/quests/MissingQuests.txt
@@ -17,7 +17,6 @@
483 Intended Tactic
491 In Nomine Patris
504 Competition for the Bandit Stronghold
-512 Blade Under Foot
655 A Grand Plan for Taming Wild Beasts
665 Great Pirate Zaken's Treasure
666 Leona Blackbird's Treasure
diff --git a/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q00512_BladeUnderFoot/Q00512_BladeUnderFoot.java b/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q00512_BladeUnderFoot/Q00512_BladeUnderFoot.java
new file mode 100644
index 0000000000..f0278c7312
--- /dev/null
+++ b/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q00512_BladeUnderFoot/Q00512_BladeUnderFoot.java
@@ -0,0 +1,129 @@
+/*
+ * This file is part of the L2J Mobius project.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+package quests.Q00512_BladeUnderFoot;
+
+import com.l2jmobius.gameserver.enums.QuestType;
+import com.l2jmobius.gameserver.model.L2Clan;
+import com.l2jmobius.gameserver.model.actor.L2Npc;
+import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
+import com.l2jmobius.gameserver.model.entity.Castle;
+import com.l2jmobius.gameserver.model.quest.Quest;
+import com.l2jmobius.gameserver.model.quest.QuestState;
+
+/**
+ * Blade Under Foot (512)
+ * @author Mobius
+ */
+public final class Q00512_BladeUnderFoot extends Quest
+{
+ // NPCs
+ private static final int[] NPCS =
+ {
+ 36403, // Gludio
+ 36404, // Dion
+ 36405, // Giran
+ 36406, // Oren
+ 36407, // Aden
+ 36408, // Innadril
+ 36409, // Goddard
+ 36410, // Rune
+ 36411, // Schuttgart
+ };
+ // Items
+ private static final int MARK = 9798;
+ private static final int KNIGHT_EPALUETTE = 9912;
+ // Misc
+ private static final int MIN_LEVEL = 90;
+
+ public Q00512_BladeUnderFoot()
+ {
+ super(512);
+ addStartNpc(NPCS);
+ addTalkId(NPCS);
+ addCondMinLevel(MIN_LEVEL, "Warden-00a.htm");
+ }
+
+ @Override
+ public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
+ {
+ final QuestState qs = getQuestState(player, false);
+ if (qs == null)
+ {
+ return null;
+ }
+
+ String htmltext = event;
+ switch (event)
+ {
+ case "Warden-03.html":
+ case "Warden-04.html":
+ case "Warden-05.html":
+ case "Warden-06.html":
+ case "Warden-09.html":
+ {
+ break;
+ }
+ case "Warden-02.htm":
+ {
+ qs.startQuest();
+ break;
+ }
+ case "Warden-10.html":
+ {
+ qs.exitQuest(QuestType.REPEATABLE);
+ break;
+ }
+ default:
+ {
+ htmltext = null;
+ }
+ }
+ return htmltext;
+ }
+
+ @Override
+ public String onTalk(L2Npc npc, L2PcInstance player, boolean isSimulated)
+ {
+ final QuestState qs = getQuestState(player, true);
+ String htmltext = getNoQuestMsg(player);
+
+ if (qs.isCreated())
+ {
+ final Castle castle = npc.getCastle();
+ final L2Clan clan = player.getClan();
+ htmltext = ((castle != null) && (clan != null) && (clan.getCastleId() == castle.getResidenceId())) ? "Warden-01.htm" : "Warden-00b.htm";
+ }
+ else
+ {
+ final long itemCount = getQuestItemsCount(player, MARK);
+ if (itemCount == 0)
+ {
+ htmltext = "Warden-07.html";
+ }
+ else
+ {
+ if (!isSimulated)
+ {
+ takeItems(player, MARK, itemCount);
+ giveItems(player, KNIGHT_EPALUETTE, itemCount * 2);
+ }
+ htmltext = "Warden-08.html";
+ }
+ }
+ return htmltext;
+ }
+}
\ No newline at end of file
diff --git a/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q00512_BladeUnderFoot/Warden-00a.htm b/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q00512_BladeUnderFoot/Warden-00a.htm
new file mode 100644
index 0000000000..f01a4f997e
--- /dev/null
+++ b/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q00512_BladeUnderFoot/Warden-00a.htm
@@ -0,0 +1,6 @@
+
Prison Warden:
+Thank you for your willingness to help, adventurer; however, I can't put you in danger.
+I handle all of the bookkeeping for the castle and the sheer amount of paperwork that I would have to fill out to get permission to put you on our payroll. Oi! Makes me shudder just thinking about it.
+ Get some more training, learn mores skills, get some more missions under your belt and then I'll see what I can do to get you certified for a destruction mission.
+(This quest is for characters level 90 or above.)
+
\ No newline at end of file
diff --git a/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q00512_BladeUnderFoot/Warden-00b.htm b/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q00512_BladeUnderFoot/Warden-00b.htm
new file mode 100644
index 0000000000..008e2abc69
--- /dev/null
+++ b/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q00512_BladeUnderFoot/Warden-00b.htm
@@ -0,0 +1,4 @@
+Prison Warden:
+Who are you? I don't see your name on the list of clan members...
+(This quest is reserved for members of the clan that currently owns this castle.)
+
\ No newline at end of file
diff --git a/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q00512_BladeUnderFoot/Warden-01.htm b/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q00512_BladeUnderFoot/Warden-01.htm
new file mode 100644
index 0000000000..b0e33e96ff
--- /dev/null
+++ b/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q00512_BladeUnderFoot/Warden-01.htm
@@ -0,0 +1,9 @@
+Prison Warden:
+I am the warden of this castle prison. This monster dungeon was discovered only recently.
+I suspect that other castles also have such dungeons. My duty is to keep this basement prison area safe.
+Having monsters appear and disappear at will here would hardly let the castle inhabitants sleep soundly at night, eh?
+Unfortunately, we don't have the numbers to handle this task alone.
+We need help from the clan members.
+We'll compensate you for your assistance, naturally.
+
+
\ No newline at end of file
diff --git a/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q00512_BladeUnderFoot/Warden-02.htm b/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q00512_BladeUnderFoot/Warden-02.htm
new file mode 100644
index 0000000000..c79ef1a1c0
--- /dev/null
+++ b/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q00512_BladeUnderFoot/Warden-02.htm
@@ -0,0 +1,10 @@
+Prison Warden:
+Excellent! I appreciate your offer, friend.
+This dungeon prison was only recently discovered, and no one knows its true purpose.
+Some legends say that long, long ago, some emperor created this dungeon as a place to secretly breed monsters for magical experiments.
+Others say that it was built during the empire's golden age to contain monsters that were pitted against prisoners in gladiatorial fights.
+Whatever its purpose, it was sealed and hidden for centuries -- we only recently uncovered the entrance.
+Well, let's get down to brass tacks. Please defeat the leaders of the three prisoner gangs that roam the dungeon - Beautiful Atrielle, Nagen the Tomboy and Jax the Destroyer - and bring me the monsters' rank badges.
+
+
+
\ No newline at end of file
diff --git a/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q00512_BladeUnderFoot/Warden-03.html b/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q00512_BladeUnderFoot/Warden-03.html
new file mode 100644
index 0000000000..dbce6c5ae5
--- /dev/null
+++ b/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q00512_BladeUnderFoot/Warden-03.html
@@ -0,0 +1,8 @@
+Prison Warden:
+Hmm...
+Since the dungeon was abandoned for so long, the prisoners -- monsters all -- eventually formed an independent society.
+This basement camp features a very complicated network of secret passageways, which the monsters now use to move at will throughout this dungeon and even to areas of the surface world they inhabit.
+And those paths are connected to the areas controlled by the monsters on the surface.
+They rule the underground world, which even has its own twisted class structure. Apparently higher-level monsters inhabit the dungeons beneath castles while relatively low-level creatures live beneath fortresses.
+
+
\ No newline at end of file
diff --git a/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q00512_BladeUnderFoot/Warden-04.html b/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q00512_BladeUnderFoot/Warden-04.html
new file mode 100644
index 0000000000..06d913f8e9
--- /dev/null
+++ b/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q00512_BladeUnderFoot/Warden-04.html
@@ -0,0 +1,4 @@
+Prison Warden:
+I can grant you access to the castle dungeon prison right here.
+Thank you for your help!
+
\ No newline at end of file
diff --git a/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q00512_BladeUnderFoot/Warden-05.html b/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q00512_BladeUnderFoot/Warden-05.html
new file mode 100644
index 0000000000..222c95fd91
--- /dev/null
+++ b/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q00512_BladeUnderFoot/Warden-05.html
@@ -0,0 +1,8 @@
+Prison Warden:
+Correct.
+That is why we seek assistance from the clan's adventurers.
+Undoubtedly, a permanent solution is being studied by high class strategists, scholars and mystics.
+But those efforts are hampered by the disharmony among the various castles.
+Unless there is some sort of ultimate resolution, the fighting will undoubtedly continue...
+
+
\ No newline at end of file
diff --git a/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q00512_BladeUnderFoot/Warden-06.html b/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q00512_BladeUnderFoot/Warden-06.html
new file mode 100644
index 0000000000..13e104d77e
--- /dev/null
+++ b/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q00512_BladeUnderFoot/Warden-06.html
@@ -0,0 +1,14 @@
+Prison Warden:
+Long ago, there was a great battle between monsters and a large punitive force.
+What a fight that was...
+Both sides suffered enormous casualties.
+In its aftermath, however, the monsters became more cautious in their movements.
+But recently we have observed 3 powerful gangs of monster ex-prisoners.
+They are up to something, that's for sure.
+Your task is to slay all 3 gangs and destroy the monsters' organization in the dungeon.
+When you defeat the leader of the last gang, bring me a piece of the monster's rank badge and I will repay you with the Knight's Epaulette, which you can exchange with the palace's magician for the castle's clan supply.
+Ah, one last thing...
+The rumored leaders of the monsters are Beautiful Atrielle, Nagen the Tomboy and Jax the Destroyer.
+I can grant you access to the dungeon right now.
+Good luck!
+
\ No newline at end of file
diff --git a/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q00512_BladeUnderFoot/Warden-07.html b/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q00512_BladeUnderFoot/Warden-07.html
new file mode 100644
index 0000000000..301913eabc
--- /dev/null
+++ b/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q00512_BladeUnderFoot/Warden-07.html
@@ -0,0 +1,11 @@
+Prison Warden:
+Enter the dungeon prison and slay the prisoners.
+Wipe out all 3 gangs to eradicate the monsters' entire organization in the dungeon.
+When you defeat the leader of the last gang, bring me a Fragment of the Dungeon Leader Mark and I will pay you with a Knight's Epaulette.
+If you take it to a Court Wizard, he will exchange it for the castle's clan supply for you.
+Ah, one last thing...
+The leaders of the monsters are Beautiful Atrielle, Nagen the Tomboy and Jax the Destroyer.
+I can grant you access to the dungeon right now.
+Good luck!
+
+
\ No newline at end of file
diff --git a/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q00512_BladeUnderFoot/Warden-08.html b/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q00512_BladeUnderFoot/Warden-08.html
new file mode 100644
index 0000000000..d9e9174f9c
--- /dev/null
+++ b/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q00512_BladeUnderFoot/Warden-08.html
@@ -0,0 +1,12 @@
+Prison Warden:
+So you eradicated the leader of the monster prisoners in the dungeon? Well done!
+Thank you for your help in eliminating this threat to our safety.
+Here is the Knight's Epaulette as promised.
+If you take it to a Court Wizard, he will exchange it for the castle's clan supply for you.
+...
+"Here they are."
+Would you like to continue your efforts down here?
+
+
+
+
\ No newline at end of file
diff --git a/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q00512_BladeUnderFoot/Warden-09.html b/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q00512_BladeUnderFoot/Warden-09.html
new file mode 100644
index 0000000000..a713f1c349
--- /dev/null
+++ b/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q00512_BladeUnderFoot/Warden-09.html
@@ -0,0 +1,4 @@
+Prison Warden:
+Continue to seek out and defeat Beautiful Atrielle, Nagen the Tomboy and Jax the Destroyer, who are the leaders of the 3 underground prison gangs that roam this prison. Bring me the rank badges of the monsters you defeat there and I will exchange them for a Knight's Epaulette.
+Good luck -- and good hunting!
+
\ No newline at end of file
diff --git a/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q00512_BladeUnderFoot/Warden-10.html b/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q00512_BladeUnderFoot/Warden-10.html
new file mode 100644
index 0000000000..0661603ecf
--- /dev/null
+++ b/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q00512_BladeUnderFoot/Warden-10.html
@@ -0,0 +1,6 @@
+Prison Warden:
+Ah, I understand -- no doubt another adventure calls you...
+Thank you for all you've done here.
+If you'd like to lend a hand again, we'd be very grateful.
+Good luck on your journeys!
+
\ No newline at end of file
diff --git a/L2J_Mobius_Underground/dist/game/data/scripts/quests/QuestMasterHandler.java b/L2J_Mobius_Underground/dist/game/data/scripts/quests/QuestMasterHandler.java
index 8fc56e45d7..b188cb9b56 100644
--- a/L2J_Mobius_Underground/dist/game/data/scripts/quests/QuestMasterHandler.java
+++ b/L2J_Mobius_Underground/dist/game/data/scripts/quests/QuestMasterHandler.java
@@ -146,6 +146,7 @@ import quests.Q00508_AClansReputation.Q00508_AClansReputation;
import quests.Q00509_AClansFame.Q00509_AClansFame;
import quests.Q00510_AClansPrestige.Q00510_AClansPrestige;
import quests.Q00511_AwlUnderFoot.Q00511_AwlUnderFoot;
+import quests.Q00512_BladeUnderFoot.Q00512_BladeUnderFoot;
import quests.Q00551_OlympiadStarter.Q00551_OlympiadStarter;
import quests.Q00553_OlympiadUndefeated.Q00553_OlympiadUndefeated;
import quests.Q00617_GatherTheFlames.Q00617_GatherTheFlames;
@@ -521,6 +522,7 @@ public class QuestMasterHandler
Q00509_AClansFame.class,
Q00510_AClansPrestige.class,
Q00511_AwlUnderFoot.class,
+ Q00512_BladeUnderFoot.class,
Q00551_OlympiadStarter.class,
Q00553_OlympiadUndefeated.class,
Q00617_GatherTheFlames.class,