Aden Vanguard Corpse:
-Another Aden Soldier's been killed! Eugh - it was horrible!
+Yet another sad loss of life. Well, at least he went out with a fight.
\ No newline at end of file
diff --git a/trunk/dist/game/data/html/default/33167.htm b/trunk/dist/game/data/html/default/33167.htm
index 10ecd7dd18..d0f36f8213 100644
--- a/trunk/dist/game/data/html/default/33167.htm
+++ b/trunk/dist/game/data/html/default/33167.htm
@@ -1,4 +1,4 @@
Aden Vanguard Corpse:
-Another Aden Soldier's been killed! Eugh - it was horrible!
+Another fallen Aden Vanguard soldier found dead... however demonstrating the most dexterous rigor mortis ever seen.
\ No newline at end of file
diff --git a/trunk/dist/game/data/html/default/33169.htm b/trunk/dist/game/data/html/default/33169.htm
index 10ecd7dd18..e971028ad2 100644
--- a/trunk/dist/game/data/html/default/33169.htm
+++ b/trunk/dist/game/data/html/default/33169.htm
@@ -1,4 +1,4 @@
Aden Vanguard Corpse:
-Another Aden Soldier's been killed! Eugh - it was horrible!
+What a loss of a fine Aden Soldier. Looks like he went out fighting.
\ No newline at end of file
diff --git a/trunk/dist/game/data/instances/IncubatorOfEvil.xml b/trunk/dist/game/data/instances/IncubatorOfEvil.xml
new file mode 100644
index 0000000000..d7d94babc3
--- /dev/null
+++ b/trunk/dist/game/data/instances/IncubatorOfEvil.xml
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/instances/IncubatorOfEvil/IncubatorOfEvil.java b/trunk/dist/game/data/scripts/instances/IncubatorOfEvil/IncubatorOfEvil.java
new file mode 100644
index 0000000000..1d9e9176b8
--- /dev/null
+++ b/trunk/dist/game/data/scripts/instances/IncubatorOfEvil/IncubatorOfEvil.java
@@ -0,0 +1,142 @@
+/*
+ * 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 instances.IncubatorOfEvil;
+
+import com.l2jmobius.gameserver.instancemanager.InstanceManager;
+import com.l2jmobius.gameserver.model.Location;
+import com.l2jmobius.gameserver.model.actor.L2Npc;
+import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
+import com.l2jmobius.gameserver.model.instancezone.InstanceWorld;
+import com.l2jmobius.gameserver.model.quest.QuestState;
+
+import instances.AbstractInstance;
+import quests.Q10341_DayOfDestinyHumansFate.Q10341_DayOfDestinyHumansFate;
+import quests.Q10342_DayOfDestinyElvenFate.Q10342_DayOfDestinyElvenFate;
+import quests.Q10343_DayOfDestinyDarkElfsFate.Q10343_DayOfDestinyDarkElfsFate;
+import quests.Q10344_DayOfDestinyOrcsFate.Q10344_DayOfDestinyOrcsFate;
+import quests.Q10345_DayOfDestinyDwarfsFate.Q10345_DayOfDestinyDwarfsFate;
+import quests.Q10346_DayOfDestinyKamaelsFate.Q10346_DayOfDestinyKamaelsFate;
+
+/**
+ * Incubator of Evil Instance Zone.
+ * TODO: Implement this!
+ * @author Mobius
+ */
+public final class IncubatorOfEvil extends AbstractInstance
+{
+ // NPCs
+ private static final int OFFICER = 19155;
+ // Locations
+ private static final Location START_LOC = new Location(56180, -172898, -7952);
+ @SuppressWarnings("unused")
+ private static final Location FIGHT_LOC = new Location(56177, -175627, -7952);
+ @SuppressWarnings("unused")
+ private static final Location EXIT_LOC = new Location(185798, 20400, -3345);
+ // Misc
+ private static final int TEMPLATE_ID = 185;
+
+ protected class IOE extends InstanceWorld
+ {
+ }
+
+ public IncubatorOfEvil()
+ {
+ super(IncubatorOfEvil.class.getSimpleName());
+ addStartNpc(OFFICER);
+ addTalkId(OFFICER);
+ addFirstTalkId(OFFICER);
+ }
+
+ @Override
+ public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
+ {
+ if (event.equals("enter_instance"))
+ {
+ if (getPlayerQuestState(player) == null)
+ {
+ return null;
+ }
+ enterInstance(player, new IOE(), "IncubatorOfEvil.xml", TEMPLATE_ID);
+ return null;
+ }
+
+ final InstanceWorld tmpworld = InstanceManager.getInstance().getPlayerWorld(player);
+ if ((tmpworld == null) || !(tmpworld instanceof IOE))
+ {
+ return null;
+ }
+ @SuppressWarnings("unused")
+ final IOE world = (IOE) tmpworld;
+
+ switch (event)
+ {
+
+ }
+
+ return super.onAdvEvent(event, npc, player);
+ }
+
+ @Override
+ public void onEnterInstance(L2PcInstance player, InstanceWorld world, boolean firstEntrance)
+ {
+ if (firstEntrance)
+ {
+ world.setStatus(1);
+ world.addAllowed(player.getObjectId());
+ }
+ teleportPlayer(player, START_LOC, world.getInstanceId());
+ }
+
+ private QuestState getPlayerQuestState(L2PcInstance player)
+ {
+ QuestState qs = null;
+ switch (player.getRace())
+ {
+ case HUMAN:
+ {
+ qs = player.getQuestState(Q10341_DayOfDestinyHumansFate.class.getSimpleName());
+ break;
+ }
+ case ELF:
+ {
+ qs = player.getQuestState(Q10342_DayOfDestinyElvenFate.class.getSimpleName());
+ break;
+ }
+ case DARK_ELF:
+ {
+ qs = player.getQuestState(Q10343_DayOfDestinyDarkElfsFate.class.getSimpleName());
+ break;
+ }
+ case ORC:
+ {
+ qs = player.getQuestState(Q10344_DayOfDestinyOrcsFate.class.getSimpleName());
+ break;
+ }
+ case DWARF:
+ {
+ qs = player.getQuestState(Q10345_DayOfDestinyDwarfsFate.class.getSimpleName());
+ break;
+ }
+ case KAMAEL:
+ {
+ qs = player.getQuestState(Q10346_DayOfDestinyKamaelsFate.class.getSimpleName());
+ break;
+ }
+ }
+ return qs;
+ }
+}
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/instances/InstanceLoader.java b/trunk/dist/game/data/scripts/instances/InstanceLoader.java
index 72bc768a26..e652e7d332 100644
--- a/trunk/dist/game/data/scripts/instances/InstanceLoader.java
+++ b/trunk/dist/game/data/scripts/instances/InstanceLoader.java
@@ -37,6 +37,7 @@ import instances.HarnakUndergroundRuins.HarnakUndergroundRuins;
import instances.HideoutOfTheDawn.HideoutOfTheDawn;
import instances.IceQueensCastle.IceQueensCastle;
import instances.IceQueensCastleBattle.IceQueensCastleBattle;
+import instances.IncubatorOfEvil.IncubatorOfEvil;
import instances.JiniaGuildHideout1.JiniaGuildHideout1;
import instances.JiniaGuildHideout2.JiniaGuildHideout2;
import instances.JiniaGuildHideout3.JiniaGuildHideout3;
@@ -83,6 +84,7 @@ final class InstanceLoader
ChamberOfDelusionWest.class,
IceQueensCastle.class,
IceQueensCastleBattle.class,
+ IncubatorOfEvil.class,
JiniaGuildHideout1.class,
JiniaGuildHideout2.class,
JiniaGuildHideout3.class,
diff --git a/trunk/dist/game/data/scripts/quests/Q10341_DayOfDestinyHumansFate/30857-01.htm b/trunk/dist/game/data/scripts/quests/Q10341_DayOfDestinyHumansFate/30857-01.htm
new file mode 100644
index 0000000000..53af39bfee
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10341_DayOfDestinyHumansFate/30857-01.htm
@@ -0,0 +1,4 @@
+High Priest Orven:
+Hum, has the time come? Your name is quite well-known throughout these parts. They say your star is rising, and that we can entrust you with our clan's future. Those that are an a new stage normnally seek new strength. It is time you demonstrated that you are worthy of such expectations.
+
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10341_DayOfDestinyHumansFate/30857-02.htm b/trunk/dist/game/data/scripts/quests/Q10341_DayOfDestinyHumansFate/30857-02.htm
new file mode 100644
index 0000000000..02e79456a4
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10341_DayOfDestinyHumansFate/30857-02.htm
@@ -0,0 +1,5 @@
+High Priest Orven:
+I have been given a divine revelation of a new destiny for all who are qualified to represent the Einhasad Temple. I judge you to be qualified in all aspects.
+The Einhasad Temple is in a dire situation, and we need more candidates like you if we are to redeem ourselves for following the Goddess of Destruction. If you are ready to receive new powers and restore honor to our clan, accept this mission.
+
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10341_DayOfDestinyHumansFate/30857-03.htm b/trunk/dist/game/data/scripts/quests/Q10341_DayOfDestinyHumansFate/30857-03.htm
new file mode 100644
index 0000000000..9fe2ba785f
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10341_DayOfDestinyHumansFate/30857-03.htm
@@ -0,0 +1,5 @@
+High Priest Orven:
+You have surely heard of the Seal of Shilen, near to Aden Castle? The Goddess or Destruction has opened her evil eyes, and is strengthening her dark powers. She has already filled that place with evil energy, and her spirits are looking for an opportunity to take over Aden Castle.
+The Vanguard went to the underground lair where they believe the Spirits are coming from, but nothing has been heard from them in days. We are about to deploy a search team, and we would like you to accept the mission.
+
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10341_DayOfDestinyHumansFate/30857-04.htm b/trunk/dist/game/data/scripts/quests/Q10341_DayOfDestinyHumansFate/30857-04.htm
new file mode 100644
index 0000000000..526a23995f
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10341_DayOfDestinyHumansFate/30857-04.htm
@@ -0,0 +1,4 @@
+High Priest Orven:
+A person of your abilities, I don't doubt that you are well suited for this mission. From here, head toward the Seal of Shilen and the Cemetery, and look for the vanguard near the Evil Incubator. Don't forget that every step you take could change the future of our clan.
+
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10341_DayOfDestinyHumansFate/30857-05.html b/trunk/dist/game/data/scripts/quests/Q10341_DayOfDestinyHumansFate/30857-05.html
new file mode 100644
index 0000000000..45aa598a63
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10341_DayOfDestinyHumansFate/30857-05.html
@@ -0,0 +1,3 @@
+High Priest Orven:
+I'll explain again about the mission. First, go to Shilen's Seal and the Cemetary, find the vanguard, and help them. The quartermaster will probably be waiting for you.
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10341_DayOfDestinyHumansFate/30857-06.html b/trunk/dist/game/data/scripts/quests/Q10341_DayOfDestinyHumansFate/30857-06.html
new file mode 100644
index 0000000000..c1ce526f46
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10341_DayOfDestinyHumansFate/30857-06.html
@@ -0,0 +1,6 @@
+High Priest Orven:
+Adolph has told me all about you. You were truly a sight to behold, I see. Well, it's time for you to be granted a new path, perhaps.
+I'll tell you more if you wish. Otherwise, I have a gift for you.
+
+
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10341_DayOfDestinyHumansFate/30857-07.html b/trunk/dist/game/data/scripts/quests/Q10341_DayOfDestinyHumansFate/30857-07.html
new file mode 100644
index 0000000000..843407dbe1
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10341_DayOfDestinyHumansFate/30857-07.html
@@ -0,0 +1,4 @@
+High Priest Orven:
+So, you are ready? Absolutely sure?
+
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10341_DayOfDestinyHumansFate/30857-08.html b/trunk/dist/game/data/scripts/quests/Q10341_DayOfDestinyHumansFate/30857-08.html
new file mode 100644
index 0000000000..4ce20fc6bf
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10341_DayOfDestinyHumansFate/30857-08.html
@@ -0,0 +1,3 @@
+High Priest Orven:
+New destiny will open up your path.
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10341_DayOfDestinyHumansFate/33165-01.html b/trunk/dist/game/data/scripts/quests/Q10341_DayOfDestinyHumansFate/33165-01.html
new file mode 100644
index 0000000000..f2dc15b9d3
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10341_DayOfDestinyHumansFate/33165-01.html
@@ -0,0 +1,5 @@
+Aden Vanguard Member:
+High priest Orven, sent you to help, right? Great. The Captain ordered me to direct you to the underground crypt when you arrived. The soldiers are already there, battling monsters. Please hurry, they're going to need all the help they can get.
+Powerfull monsters are encamped there right now. So let me teleport you there. Otherwise, it would be too dangerous.
+
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10341_DayOfDestinyHumansFate/33407-01.html b/trunk/dist/game/data/scripts/quests/Q10341_DayOfDestinyHumansFate/33407-01.html
new file mode 100644
index 0000000000..04fbc467b9
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10341_DayOfDestinyHumansFate/33407-01.html
@@ -0,0 +1,5 @@
+Quartermaster:
+Finally I've been waiting for Aden to send me backup for ages. Captain Adolph and his soldiers all went to the underground Evil Incubator to see about the monsters that have been flooding out of it, and I need help.
+Can you help?
+
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10341_DayOfDestinyHumansFate/33407-02.html b/trunk/dist/game/data/scripts/quests/Q10341_DayOfDestinyHumansFate/33407-02.html
new file mode 100644
index 0000000000..f21298afee
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10341_DayOfDestinyHumansFate/33407-02.html
@@ -0,0 +1,5 @@
+Quartermaster:
+So many monsters have broken through our lines, Captain Adolph and his men have pushed them back through a valiant fight, but casualties were unavoidable.
+We must pay the dead the respect of bringing their personal possessions back to their families, but we have no numbers to spare. Please, could you bring back 4 keepsakes from the bodies of Aden Vanguard Members in the Cemetary?
+It's horrible, but we haven't been able to retrieve the bodies. They're scattered all over the Cemetary, but your best bet would be to check the corners or the square guarded by the Grave Guards. It's between the Seal or Shilen and the Cemetary.
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10341_DayOfDestinyHumansFate/33407-03.html b/trunk/dist/game/data/scripts/quests/Q10341_DayOfDestinyHumansFate/33407-03.html
new file mode 100644
index 0000000000..8dfe9f6239
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10341_DayOfDestinyHumansFate/33407-03.html
@@ -0,0 +1,4 @@
+Quartermaster:
+Many Aden Vanguard Members have died at the Cemetary. Please bring back 4 keepsakes from their bodies.
+It's horrible, but we haven't been able to retrieve the bodies. They're scattered all over the Cemetary, but your be bet would be to check the corners of the square guarded by the Grave Guards. It's between the Seal of Shilen and the Cemetary.
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10341_DayOfDestinyHumansFate/33407-04.html b/trunk/dist/game/data/scripts/quests/Q10341_DayOfDestinyHumansFate/33407-04.html
new file mode 100644
index 0000000000..f02856b1f4
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10341_DayOfDestinyHumansFate/33407-04.html
@@ -0,0 +1,5 @@
+Quartermaster:
+Yes, these are our fallen comrades' dog tags. Thank you. I'm sure the families will appreciate your hard work. Our heroes deserve to be remembered.
+Now, I don't think there's much else for you to do here. I'm worried about captain Adolph and the soldiers that went ahead to the monsters' base. I'm sure they could use some help there.
+
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10341_DayOfDestinyHumansFate/33407-05.html b/trunk/dist/game/data/scripts/quests/Q10341_DayOfDestinyHumansFate/33407-05.html
new file mode 100644
index 0000000000..77a2b30502
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10341_DayOfDestinyHumansFate/33407-05.html
@@ -0,0 +1,4 @@
+Quartermaster:
+Captain Adolph's team is in the underground crypt near the Cemetery, fighting monsters that resurrected through Shilen. Go and help him if you can. Powerful creatures are blocking the entrance to the crypt, so you'd better teleport through the Aden Vanguard Member standing behind me.
+Good luck, warrior of Aden.
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10341_DayOfDestinyHumansFate/Q10341_DayOfDestinyHumansFate.java b/trunk/dist/game/data/scripts/quests/Q10341_DayOfDestinyHumansFate/Q10341_DayOfDestinyHumansFate.java
new file mode 100644
index 0000000000..41af2b2d0d
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10341_DayOfDestinyHumansFate/Q10341_DayOfDestinyHumansFate.java
@@ -0,0 +1,378 @@
+/*
+ * 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.Q10341_DayOfDestinyHumansFate;
+
+import com.l2jmobius.Config;
+import com.l2jmobius.gameserver.cache.HtmCache;
+import com.l2jmobius.gameserver.enums.QuestSound;
+import com.l2jmobius.gameserver.enums.Race;
+import com.l2jmobius.gameserver.model.actor.L2Npc;
+import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
+import com.l2jmobius.gameserver.model.events.EventType;
+import com.l2jmobius.gameserver.model.events.ListenerRegisterType;
+import com.l2jmobius.gameserver.model.events.annotations.RegisterEvent;
+import com.l2jmobius.gameserver.model.events.annotations.RegisterType;
+import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerLevelChanged;
+import com.l2jmobius.gameserver.model.quest.Quest;
+import com.l2jmobius.gameserver.model.quest.QuestState;
+import com.l2jmobius.gameserver.model.quest.State;
+import com.l2jmobius.gameserver.network.serverpackets.ExQuestNpcLogList;
+import com.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage;
+
+/**
+ * Day of Destiny: Human's Fate (10341)
+ * @author Mobius
+ */
+public class Q10341_DayOfDestinyHumansFate extends Quest
+{
+ // NPCs
+ private static final int ORVEN = 30857;
+ private static final int QUARTERMASTER = 33407;
+ private static final int DEAD_SOLDIER_1 = 33166;
+ private static final int DEAD_SOLDIER_2 = 33167;
+ private static final int DEAD_SOLDIER_3 = 33168;
+ private static final int DEAD_SOLDIER_4 = 33169;
+ private static final int VANGUARD_MEMBER = 33165;
+ // Items
+ private static final int DEAD_SOLDIER_TAGS = 17748;
+ // Rewards
+ private static final int STEEL_DOOR_GUILD_COIN = 37045;
+ private static final int M_SOULSHOT_S = 22576;
+ private static final int M_SPIRITSHOT_S = 22607;
+ // Requirement
+ private static final int MIN_LEVEL = 76;
+
+ public Q10341_DayOfDestinyHumansFate()
+ {
+ super(10341, Q10341_DayOfDestinyHumansFate.class.getSimpleName(), "Day of Destiny: Human's Fate");
+ addStartNpc(ORVEN);
+ addTalkId(ORVEN, QUARTERMASTER, DEAD_SOLDIER_1, DEAD_SOLDIER_2, DEAD_SOLDIER_3, DEAD_SOLDIER_4, VANGUARD_MEMBER);
+ registerQuestItems(DEAD_SOLDIER_TAGS);
+ addCondMinLevel(MIN_LEVEL, "no_level.html");
+ addCondRace(Race.HUMAN, "no_race.html");
+ }
+
+ @Override
+ public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
+ {
+ final QuestState qs = getQuestState(player, false);
+ if (qs == null)
+ {
+ return null;
+ }
+
+ String htmltext = null;
+ switch (event)
+ {
+ case "30857-02.htm":
+ case "30857-03.htm":
+ case "30857-04.htm":
+ case "30857-06.html":
+ case "30857-07.html":
+ {
+ htmltext = event;
+ break;
+ }
+ case "30857-05.html":
+ {
+ qs.startQuest();
+ qs.setCond(2); // arrow hack
+ qs.setCond(1);
+ htmltext = event;
+ break;
+ }
+ case "33407-02.html":
+ {
+ if (qs.isCond(1))
+ {
+ qs.setCond(2, true);
+ htmltext = event;
+ }
+ break;
+ }
+ case "dead_collect.html":
+ {
+ if (qs.isCond(2))
+ {
+ if (qs.get("" + npc.getId()) == null)
+ {
+ qs.set("" + npc.getId(), 1);
+ giveItems(player, DEAD_SOLDIER_TAGS, 1);
+ playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
+
+ }
+ final int count = qs.getMemoState() + 1;
+ if (count >= 4)
+ {
+ qs.setCond(3, true);
+ qs.unset("" + DEAD_SOLDIER_1);
+ qs.unset("" + DEAD_SOLDIER_2);
+ qs.unset("" + DEAD_SOLDIER_3);
+ qs.unset("" + DEAD_SOLDIER_4);
+ htmltext = "dead_complete.html";
+ }
+ else
+ {
+ qs.setMemoState(count);
+ final ExQuestNpcLogList log = new ExQuestNpcLogList(getId());
+ log.addItem(DEAD_SOLDIER_TAGS, count);
+ player.sendPacket(log);
+ htmltext = event;
+ }
+ }
+ break;
+ }
+ case "33407-05.html":
+ {
+ if (qs.isCond(3))
+ {
+ takeItems(player, DEAD_SOLDIER_TAGS, -1);
+ qs.setCond(4, true);
+ htmltext = event;
+ }
+ break;
+ }
+ case "transfer_info":
+ {
+ if (qs.isCond(13))
+ {
+ switch (player.getClassId().getId())
+ {
+ // TODO: Return detail htmls.
+ }
+ }
+ break;
+ }
+ case "30857-08.html":
+ {
+ if (qs.isCond(13))
+ {
+ switch (player.getClassId().getId())
+ {
+ // Gladiator -> Duelist
+ case 2:
+ {
+ player.setBaseClassId(88);
+ player.setClassId(88);
+ break;
+ }
+ // Warlord -> Dreadnought
+ case 3:
+ {
+ player.setBaseClassId(89);
+ player.setClassId(89);
+ break;
+ }
+ // Paladin -> Phoenix Knight
+ case 5:
+ {
+ player.setBaseClassId(90);
+ player.setClassId(90);
+ break;
+ }
+ // Dark Avenger -> Hell Knight
+ case 6:
+ {
+ player.setBaseClassId(91);
+ player.setClassId(91);
+ break;
+ }
+ // Treasure Hunter -> Adventurer
+ case 8:
+ {
+ player.setBaseClassId(93);
+ player.setClassId(93);
+ break;
+ }
+ // Hawkeye -> Sagitarius
+ case 9:
+ {
+ player.setBaseClassId(92);
+ player.setClassId(92);
+ break;
+ }
+ // Sorcerer -> Archmage
+ case 12:
+ {
+ player.setBaseClassId(94);
+ player.setClassId(94);
+ break;
+ }
+ // Necromancer -> Soultaker
+ case 13:
+ {
+ player.setBaseClassId(95);
+ player.setClassId(95);
+ break;
+ }
+ // Warlock -> Arcana Lord
+ case 14:
+ {
+ player.setBaseClassId(96);
+ player.setClassId(96);
+ break;
+ }
+ // Bishop -> Cardinal
+ case 16:
+ {
+ player.setBaseClassId(97);
+ player.setClassId(97);
+ break;
+ }
+ // Prophet -> Hierophant
+ case 17:
+ {
+ player.setBaseClassId(98);
+ player.setClassId(98);
+ break;
+ }
+ }
+ rewardItems(player, STEEL_DOOR_GUILD_COIN, 87);
+ rewardItems(player, M_SOULSHOT_S, 1);
+ rewardItems(player, M_SPIRITSHOT_S, 1);
+ addExpAndSp(player, 2050000, 0);
+ player.broadcastUserInfo();
+ qs.exitQuest(false, true);
+ }
+ break;
+ }
+ }
+ return htmltext;
+ }
+
+ @Override
+ public String onTalk(L2Npc npc, L2PcInstance player)
+ {
+ final QuestState qs = getQuestState(player, true);
+ String htmltext = getNoQuestMsg(player);
+
+ switch (qs.getState())
+ {
+ case State.STARTED:
+ {
+ switch (npc.getId())
+ {
+ case ORVEN:
+ {
+ if (qs.isCond(1))
+ {
+ htmltext = "30857-05.html";
+ }
+ else if (qs.isCond(13))
+ {
+ htmltext = "30857-06.html";
+ }
+ break;
+ }
+ case QUARTERMASTER:
+ {
+ switch (qs.getCond())
+ {
+ case 1:
+ {
+ htmltext = "33407-01.html";
+ break;
+ }
+ case 2:
+ {
+ htmltext = "33407-03.html";
+ break;
+ }
+ case 3:
+ {
+ htmltext = "33407-04.html";
+ break;
+ }
+ case 4:
+ {
+ htmltext = "33407-05.html";
+ break;
+ }
+ }
+ break;
+ }
+ case DEAD_SOLDIER_1:
+ case DEAD_SOLDIER_2:
+ case DEAD_SOLDIER_3:
+ case DEAD_SOLDIER_4:
+ {
+ if (qs.isCond(2))
+ {
+ if (qs.get("" + npc.getId()) == null)
+ {
+ htmltext = "dead_soldier.html";
+ }
+ else
+ {
+ htmltext = "dead_collect.html";
+ }
+ }
+ else if (qs.isCond(3))
+ {
+ htmltext = "dead_complete.html";
+ }
+ break;
+ }
+ case VANGUARD_MEMBER:
+ {
+ if ((qs.getCond() > 3) && (qs.getCond() < 13))
+ {
+ htmltext = "33165-01.html";
+ }
+ break;
+ }
+ }
+ break;
+ }
+ case State.CREATED:
+ {
+ if ((npc.getId() == ORVEN) && !player.isSubClassActive() && !player.isDualClassActive() && (player.getClassId().level() == 2))
+ {
+ htmltext = "30857-01.htm";
+ }
+ break;
+ }
+ case State.COMPLETED:
+ {
+ htmltext = getAlreadyCompletedMsg(player);
+ break;
+ }
+ }
+ return htmltext;
+ }
+
+ @RegisterEvent(EventType.ON_PLAYER_LEVEL_CHANGED)
+ @RegisterType(ListenerRegisterType.GLOBAL)
+ public void OnPlayerLevelChanged(OnPlayerLevelChanged event)
+ {
+ if (Config.DISABLE_TUTORIAL)
+ {
+ return;
+ }
+ final L2PcInstance player = event.getActiveChar();
+ if ((player.getLevel() >= MIN_LEVEL) && (player.getRace() == Race.HUMAN))
+ {
+ final QuestState qs = getQuestState(player, false);
+ if (qs == null)
+ {
+ final NpcHtmlMessage html = new NpcHtmlMessage();
+ html.setHtml(HtmCache.getInstance().getHtm(player.getHtmlPrefix(), "scripts/quests/Q10341_DayOfDestinyHumansFate/announce.html"));
+ player.sendPacket(html);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10341_DayOfDestinyHumansFate/announce.html b/trunk/dist/game/data/scripts/quests/Q10341_DayOfDestinyHumansFate/announce.html
new file mode 100644
index 0000000000..66c84489f8
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10341_DayOfDestinyHumansFate/announce.html
@@ -0,0 +1,6 @@
+High Priest Orven:
+So the Goddess of Death has opened her malicious eyes, at last. Shilen's vile creatures are rampaging all over Aden Castle. I heard a vanguard force from Aden Castle set out to eradicate those monsters and found an underground lair near the Seal of Shilen. But the problem is that we haven't heard anything from them since then. So we're arranging to send a search party after them, and I hope you who of renown could help us with this mission. If you do, I'll help you gain greater powers.
+I shall be waiting for you in the Einhasad Temple in the Town of Aden. Do not be led astray from your fated duty.
+(When your level is 76 or higher, you can complete the third class transfer)
+
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10341_DayOfDestinyHumansFate/dead_collect.html b/trunk/dist/game/data/scripts/quests/Q10341_DayOfDestinyHumansFate/dead_collect.html
new file mode 100644
index 0000000000..3bbbcb4743
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10341_DayOfDestinyHumansFate/dead_collect.html
@@ -0,0 +1,3 @@
+Aden Vanguard Corpse:
+(You collected the dog tag from this soldier.)
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10341_DayOfDestinyHumansFate/dead_complete.html b/trunk/dist/game/data/scripts/quests/Q10341_DayOfDestinyHumansFate/dead_complete.html
new file mode 100644
index 0000000000..ed72abd87c
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10341_DayOfDestinyHumansFate/dead_complete.html
@@ -0,0 +1,3 @@
+Aden Vanguard Corpse:
+(You collected a dog tag from the corpse. You now have all you need and can return to the Aden Supplier.)
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10341_DayOfDestinyHumansFate/dead_soldier.html b/trunk/dist/game/data/scripts/quests/Q10341_DayOfDestinyHumansFate/dead_soldier.html
new file mode 100644
index 0000000000..f58749e9cf
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10341_DayOfDestinyHumansFate/dead_soldier.html
@@ -0,0 +1,4 @@
+Aden Vanguard Corpse:
+(It looks like this is one of the fallen soldiers the Vanguard quartermaster was talking about.)
+
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10341_DayOfDestinyHumansFate/no_level.html b/trunk/dist/game/data/scripts/quests/Q10341_DayOfDestinyHumansFate/no_level.html
new file mode 100644
index 0000000000..6a1166f873
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10341_DayOfDestinyHumansFate/no_level.html
@@ -0,0 +1,3 @@
+I don't talk to youngsters. Come back when you've grown up a bit more.
+(This quest can only be taken by a character of level 76 or above.)
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10341_DayOfDestinyHumansFate/no_race.html b/trunk/dist/game/data/scripts/quests/Q10341_DayOfDestinyHumansFate/no_race.html
new file mode 100644
index 0000000000..a28cade14d
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10341_DayOfDestinyHumansFate/no_race.html
@@ -0,0 +1 @@
+You are either not on a quest that involves this NPC, or you don't meet this NPC's minimum quest requirements.
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10342_DayOfDestinyElvenFate/30856-01.htm b/trunk/dist/game/data/scripts/quests/Q10342_DayOfDestinyElvenFate/30856-01.htm
new file mode 100644
index 0000000000..397ddabe84
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10342_DayOfDestinyElvenFate/30856-01.htm
@@ -0,0 +1,4 @@
+Grand Magister Winonin:
+Hum, has the time come? Your name is quite well-known throughout these parts. They say your star is rising, and that we can entrust you with our clan's future. Those that are an a new stage normnally seek new strength. It is time you demonstrated that you are worthy of such expectations.
+
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10342_DayOfDestinyElvenFate/30856-02.htm b/trunk/dist/game/data/scripts/quests/Q10342_DayOfDestinyElvenFate/30856-02.htm
new file mode 100644
index 0000000000..c2d8207a04
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10342_DayOfDestinyElvenFate/30856-02.htm
@@ -0,0 +1,5 @@
+Grand Magister Winonin:
+I have been given a divine revelation of a new destiny for all who are qualified to represent the Mystic Guild. I judge you to be qualified in all aspects.
+The Mystic Guild is in a dire situation, and we need more candidates like you if we are to redeem ourselves for following the Goddess of Destruction. If you are ready to receive new powers and restore honor to our clan, accept this mission.
+
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10342_DayOfDestinyElvenFate/30856-03.htm b/trunk/dist/game/data/scripts/quests/Q10342_DayOfDestinyElvenFate/30856-03.htm
new file mode 100644
index 0000000000..138681a80d
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10342_DayOfDestinyElvenFate/30856-03.htm
@@ -0,0 +1,5 @@
+Grand Magister Winonin:
+You have surely heard of the Seal of Shilen, near to Aden Castle? The Goddess or Destruction has opened her evil eyes, and is strengthening her dark powers. She has already filled that place with evil energy, and her spirits are looking for an opportunity to take over Aden Castle.
+The Vanguard went to the underground lair where they believe the Spirits are coming from, but nothing has been heard from them in days. We are about to deploy a search team, and we would like you to accept the mission.
+
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10342_DayOfDestinyElvenFate/30856-04.htm b/trunk/dist/game/data/scripts/quests/Q10342_DayOfDestinyElvenFate/30856-04.htm
new file mode 100644
index 0000000000..e1b3797338
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10342_DayOfDestinyElvenFate/30856-04.htm
@@ -0,0 +1,4 @@
+Grand Magister Winonin:
+A person of your abilities, I don't doubt that you are well suited for this mission. From here, head toward the Seal of Shilen and the Cemetery, and look for the vanguard near the Evil Incubator. Don't forget that every step you take could change the future of our clan.
+
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10342_DayOfDestinyElvenFate/30856-05.html b/trunk/dist/game/data/scripts/quests/Q10342_DayOfDestinyElvenFate/30856-05.html
new file mode 100644
index 0000000000..a5af460062
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10342_DayOfDestinyElvenFate/30856-05.html
@@ -0,0 +1,3 @@
+Grand Magister Winonin:
+I'll explain again about the mission. First, go to Shilen's Seal and the Cemetary, find the vanguard, and help them. The quartermaster will probably be waiting for you.
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10342_DayOfDestinyElvenFate/30856-06.html b/trunk/dist/game/data/scripts/quests/Q10342_DayOfDestinyElvenFate/30856-06.html
new file mode 100644
index 0000000000..e3475b7548
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10342_DayOfDestinyElvenFate/30856-06.html
@@ -0,0 +1,6 @@
+Grand Magister Winonin:
+Adolph has told me all about you. You were truly a sight to behold, I see. Well, it's time for you to be granted a new path, perhaps.
+I'll tell you more if you wish. Otherwise, I have a gift for you.
+
+
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10342_DayOfDestinyElvenFate/30856-07.html b/trunk/dist/game/data/scripts/quests/Q10342_DayOfDestinyElvenFate/30856-07.html
new file mode 100644
index 0000000000..3829555762
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10342_DayOfDestinyElvenFate/30856-07.html
@@ -0,0 +1,4 @@
+Grand Magister Winonin:
+So, you are ready? Absolutely sure?
+
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10342_DayOfDestinyElvenFate/30856-08.html b/trunk/dist/game/data/scripts/quests/Q10342_DayOfDestinyElvenFate/30856-08.html
new file mode 100644
index 0000000000..bdef2dad06
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10342_DayOfDestinyElvenFate/30856-08.html
@@ -0,0 +1,3 @@
+Grand Magister Winonin:
+New destiny will open up your path.
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10342_DayOfDestinyElvenFate/33165-01.html b/trunk/dist/game/data/scripts/quests/Q10342_DayOfDestinyElvenFate/33165-01.html
new file mode 100644
index 0000000000..f2dc15b9d3
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10342_DayOfDestinyElvenFate/33165-01.html
@@ -0,0 +1,5 @@
+Aden Vanguard Member:
+High priest Orven, sent you to help, right? Great. The Captain ordered me to direct you to the underground crypt when you arrived. The soldiers are already there, battling monsters. Please hurry, they're going to need all the help they can get.
+Powerfull monsters are encamped there right now. So let me teleport you there. Otherwise, it would be too dangerous.
+
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10342_DayOfDestinyElvenFate/33407-01.html b/trunk/dist/game/data/scripts/quests/Q10342_DayOfDestinyElvenFate/33407-01.html
new file mode 100644
index 0000000000..53d5b26762
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10342_DayOfDestinyElvenFate/33407-01.html
@@ -0,0 +1,5 @@
+Quartermaster:
+Finally I've been waiting for Aden to send me backup for ages. Captain Adolph and his soldiers all went to the underground Evil Incubator to see about the monsters that have been flooding out of it, and I need help.
+Can you help?
+
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10342_DayOfDestinyElvenFate/33407-02.html b/trunk/dist/game/data/scripts/quests/Q10342_DayOfDestinyElvenFate/33407-02.html
new file mode 100644
index 0000000000..f21298afee
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10342_DayOfDestinyElvenFate/33407-02.html
@@ -0,0 +1,5 @@
+Quartermaster:
+So many monsters have broken through our lines, Captain Adolph and his men have pushed them back through a valiant fight, but casualties were unavoidable.
+We must pay the dead the respect of bringing their personal possessions back to their families, but we have no numbers to spare. Please, could you bring back 4 keepsakes from the bodies of Aden Vanguard Members in the Cemetary?
+It's horrible, but we haven't been able to retrieve the bodies. They're scattered all over the Cemetary, but your best bet would be to check the corners or the square guarded by the Grave Guards. It's between the Seal or Shilen and the Cemetary.
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10342_DayOfDestinyElvenFate/33407-03.html b/trunk/dist/game/data/scripts/quests/Q10342_DayOfDestinyElvenFate/33407-03.html
new file mode 100644
index 0000000000..8dfe9f6239
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10342_DayOfDestinyElvenFate/33407-03.html
@@ -0,0 +1,4 @@
+Quartermaster:
+Many Aden Vanguard Members have died at the Cemetary. Please bring back 4 keepsakes from their bodies.
+It's horrible, but we haven't been able to retrieve the bodies. They're scattered all over the Cemetary, but your be bet would be to check the corners of the square guarded by the Grave Guards. It's between the Seal of Shilen and the Cemetary.
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10342_DayOfDestinyElvenFate/33407-04.html b/trunk/dist/game/data/scripts/quests/Q10342_DayOfDestinyElvenFate/33407-04.html
new file mode 100644
index 0000000000..7e4ffc1697
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10342_DayOfDestinyElvenFate/33407-04.html
@@ -0,0 +1,5 @@
+Quartermaster:
+Yes, these are our fallen comrades' dog tags. Thank you. I'm sure the families will appreciate your hard work. Our heroes deserve to be remembered.
+Now, I don't think there's much else for you to do here. I'm worried about captain Adolph and the soldiers that went ahead to the monsters' base. I'm sure they could use some help there.
+
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10342_DayOfDestinyElvenFate/33407-05.html b/trunk/dist/game/data/scripts/quests/Q10342_DayOfDestinyElvenFate/33407-05.html
new file mode 100644
index 0000000000..77a2b30502
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10342_DayOfDestinyElvenFate/33407-05.html
@@ -0,0 +1,4 @@
+Quartermaster:
+Captain Adolph's team is in the underground crypt near the Cemetery, fighting monsters that resurrected through Shilen. Go and help him if you can. Powerful creatures are blocking the entrance to the crypt, so you'd better teleport through the Aden Vanguard Member standing behind me.
+Good luck, warrior of Aden.
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10342_DayOfDestinyElvenFate/Q10342_DayOfDestinyElvenFate.java b/trunk/dist/game/data/scripts/quests/Q10342_DayOfDestinyElvenFate/Q10342_DayOfDestinyElvenFate.java
new file mode 100644
index 0000000000..66052c4410
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10342_DayOfDestinyElvenFate/Q10342_DayOfDestinyElvenFate.java
@@ -0,0 +1,350 @@
+/*
+ * 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.Q10342_DayOfDestinyElvenFate;
+
+import com.l2jmobius.Config;
+import com.l2jmobius.gameserver.cache.HtmCache;
+import com.l2jmobius.gameserver.enums.QuestSound;
+import com.l2jmobius.gameserver.enums.Race;
+import com.l2jmobius.gameserver.model.actor.L2Npc;
+import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
+import com.l2jmobius.gameserver.model.events.EventType;
+import com.l2jmobius.gameserver.model.events.ListenerRegisterType;
+import com.l2jmobius.gameserver.model.events.annotations.RegisterEvent;
+import com.l2jmobius.gameserver.model.events.annotations.RegisterType;
+import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerLevelChanged;
+import com.l2jmobius.gameserver.model.quest.Quest;
+import com.l2jmobius.gameserver.model.quest.QuestState;
+import com.l2jmobius.gameserver.model.quest.State;
+import com.l2jmobius.gameserver.network.serverpackets.ExQuestNpcLogList;
+import com.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage;
+
+/**
+ * Day of Destiny: Elven Fate (10342)
+ * @author Mobius
+ */
+public class Q10342_DayOfDestinyElvenFate extends Quest
+{
+ // NPCs
+ private static final int WINONIN = 30856;
+ private static final int QUARTERMASTER = 33407;
+ private static final int DEAD_SOLDIER_1 = 33166;
+ private static final int DEAD_SOLDIER_2 = 33167;
+ private static final int DEAD_SOLDIER_3 = 33168;
+ private static final int DEAD_SOLDIER_4 = 33169;
+ private static final int VANGUARD_MEMBER = 33165;
+ // Items
+ private static final int DEAD_SOLDIER_TAGS = 17749;
+ // Rewards
+ private static final int STEEL_DOOR_GUILD_COIN = 37045;
+ private static final int M_SOULSHOT_S = 22576;
+ private static final int M_SPIRITSHOT_S = 22607;
+ // Requirement
+ private static final int MIN_LEVEL = 76;
+
+ public Q10342_DayOfDestinyElvenFate()
+ {
+ super(10342, Q10342_DayOfDestinyElvenFate.class.getSimpleName(), "Day of Destiny: Elven Fate");
+ addStartNpc(WINONIN);
+ addTalkId(WINONIN, QUARTERMASTER, DEAD_SOLDIER_1, DEAD_SOLDIER_2, DEAD_SOLDIER_3, DEAD_SOLDIER_4, VANGUARD_MEMBER);
+ registerQuestItems(DEAD_SOLDIER_TAGS);
+ addCondMinLevel(MIN_LEVEL, "no_level.html");
+ addCondRace(Race.ELF, "no_race.html");
+ }
+
+ @Override
+ public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
+ {
+ final QuestState qs = getQuestState(player, false);
+ if (qs == null)
+ {
+ return null;
+ }
+
+ String htmltext = null;
+ switch (event)
+ {
+ case "30856-02.htm":
+ case "30856-03.htm":
+ case "30856-04.htm":
+ case "30856-06.html":
+ case "30856-07.html":
+ {
+ htmltext = event;
+ break;
+ }
+ case "30856-05.html":
+ {
+ qs.startQuest();
+ qs.setCond(2); // arrow hack
+ qs.setCond(1);
+ htmltext = event;
+ break;
+ }
+ case "33407-02.html":
+ {
+ if (qs.isCond(1))
+ {
+ qs.setCond(2, true);
+ htmltext = event;
+ }
+ break;
+ }
+ case "dead_collect.html":
+ {
+ if (qs.isCond(2))
+ {
+ if (qs.get("" + npc.getId()) == null)
+ {
+ qs.set("" + npc.getId(), 1);
+ giveItems(player, DEAD_SOLDIER_TAGS, 1);
+ playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
+
+ }
+ final int count = qs.getMemoState() + 1;
+ if (count >= 4)
+ {
+ qs.setCond(3, true);
+ qs.unset("" + DEAD_SOLDIER_1);
+ qs.unset("" + DEAD_SOLDIER_2);
+ qs.unset("" + DEAD_SOLDIER_3);
+ qs.unset("" + DEAD_SOLDIER_4);
+ htmltext = "dead_complete.html";
+ }
+ else
+ {
+ qs.setMemoState(count);
+ final ExQuestNpcLogList log = new ExQuestNpcLogList(getId());
+ log.addItem(DEAD_SOLDIER_TAGS, count);
+ player.sendPacket(log);
+ htmltext = event;
+ }
+ }
+ break;
+ }
+ case "33407-05.html":
+ {
+ if (qs.isCond(3))
+ {
+ takeItems(player, DEAD_SOLDIER_TAGS, -1);
+ qs.setCond(4, true);
+ htmltext = event;
+ }
+ break;
+ }
+ case "transfer_info":
+ {
+ if (qs.isCond(13))
+ {
+ switch (player.getClassId().getId())
+ {
+ // TODO: Return detail htmls.
+ }
+ }
+ break;
+ }
+ case "30856-08.html":
+ {
+ if (qs.isCond(13))
+ {
+ switch (player.getClassId().getId())
+ {
+ case 20:
+ {
+ // Temple Knight -> Eva's Templar
+ player.setBaseClassId(99);
+ player.setClassId(99);
+ break;
+ }
+ case 21:
+ {
+ // Sword Singer -> Sword Muse
+ player.setBaseClassId(100);
+ player.setClassId(100);
+ break;
+ }
+ case 23:
+ {
+ // Plains Walker -> Wind Rider
+ player.setBaseClassId(101);
+ player.setClassId(101);
+ break;
+ }
+ case 24:
+ {
+ // Silver Ranger -> Moonlight Sentinel
+ player.setBaseClassId(102);
+ player.setClassId(102);
+ break;
+ }
+ case 27:
+ {
+ // Spellsinger -> Mystic Muse
+ player.setBaseClassId(103);
+ player.setClassId(103);
+ break;
+ }
+ case 28:
+ {
+ // Elemental Summoner -> Elemental Master
+ player.setBaseClassId(104);
+ player.setClassId(104);
+ break;
+ }
+ case 30:
+ {
+ // Elven Elder -> Eva's Saint
+ player.setBaseClassId(105);
+ player.setClassId(105);
+ break;
+ }
+ }
+ rewardItems(player, STEEL_DOOR_GUILD_COIN, 87);
+ rewardItems(player, M_SOULSHOT_S, 1);
+ rewardItems(player, M_SPIRITSHOT_S, 1);
+ addExpAndSp(player, 2050000, 0);
+ player.broadcastUserInfo();
+ qs.exitQuest(false, true);
+ }
+ break;
+ }
+ }
+ return htmltext;
+ }
+
+ @Override
+ public String onTalk(L2Npc npc, L2PcInstance player)
+ {
+ final QuestState qs = getQuestState(player, true);
+ String htmltext = getNoQuestMsg(player);
+
+ switch (qs.getState())
+ {
+ case State.STARTED:
+ {
+ switch (npc.getId())
+ {
+ case WINONIN:
+ {
+ if (qs.isCond(1))
+ {
+ htmltext = "30856-05.html";
+ }
+ else if (qs.isCond(13))
+ {
+ htmltext = "30856-06.html";
+ }
+ break;
+ }
+ case QUARTERMASTER:
+ {
+ switch (qs.getCond())
+ {
+ case 1:
+ {
+ htmltext = "33407-01.html";
+ break;
+ }
+ case 2:
+ {
+ htmltext = "33407-03.html";
+ break;
+ }
+ case 3:
+ {
+ htmltext = "33407-04.html";
+ break;
+ }
+ case 4:
+ {
+ htmltext = "33407-05.html";
+ break;
+ }
+ }
+ break;
+ }
+ case DEAD_SOLDIER_1:
+ case DEAD_SOLDIER_2:
+ case DEAD_SOLDIER_3:
+ case DEAD_SOLDIER_4:
+ {
+ if (qs.isCond(2))
+ {
+ if (qs.get("" + npc.getId()) == null)
+ {
+ htmltext = "dead_soldier.html";
+ }
+ else
+ {
+ htmltext = "dead_collect.html";
+ }
+ }
+ else if (qs.isCond(3))
+ {
+ htmltext = "dead_complete.html";
+ }
+ break;
+ }
+ case VANGUARD_MEMBER:
+ {
+ if ((qs.getCond() > 3) && (qs.getCond() < 13))
+ {
+ htmltext = "33165-01.html";
+ }
+ break;
+ }
+ }
+ break;
+ }
+ case State.CREATED:
+ {
+ if ((npc.getId() == WINONIN) && !player.isSubClassActive() && !player.isDualClassActive() && (player.getClassId().level() == 2))
+ {
+ htmltext = "30856-01.htm";
+ }
+ break;
+ }
+ case State.COMPLETED:
+ {
+ htmltext = getAlreadyCompletedMsg(player);
+ break;
+ }
+ }
+ return htmltext;
+ }
+
+ @RegisterEvent(EventType.ON_PLAYER_LEVEL_CHANGED)
+ @RegisterType(ListenerRegisterType.GLOBAL)
+ public void OnPlayerLevelChanged(OnPlayerLevelChanged event)
+ {
+ if (Config.DISABLE_TUTORIAL)
+ {
+ return;
+ }
+ final L2PcInstance player = event.getActiveChar();
+ if ((player.getLevel() >= MIN_LEVEL) && (player.getRace() == Race.ELF))
+ {
+ final QuestState qs = getQuestState(player, false);
+ if (qs == null)
+ {
+ final NpcHtmlMessage html = new NpcHtmlMessage();
+ html.setHtml(HtmCache.getInstance().getHtm(player.getHtmlPrefix(), "scripts/quests/Q10342_DayOfDestinyElvenFate/announce.html"));
+ player.sendPacket(html);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10342_DayOfDestinyElvenFate/announce.html b/trunk/dist/game/data/scripts/quests/Q10342_DayOfDestinyElvenFate/announce.html
new file mode 100644
index 0000000000..6c1aea844b
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10342_DayOfDestinyElvenFate/announce.html
@@ -0,0 +1,6 @@
+Grand Magister Winonin:
+So the Goddess of Death has opened her malicious eyes, at last. Shilen's vile creatures are rampaging all over Aden Castle. I heard a vanguard force from Aden Castle set out to eradicate those monsters and found an underground lair near the Seal of Shilen. But the problem is that we haven't heard anything from them since then. So we're arranging to send a search party after them, and I hope you who of renown could help us with this mission. If you do, I'll help you gain greater powers.
+I shall be waiting for you in the Dark Elf Guild in the Town of Aden. Do not be led astray from your fated duty.
+(When your level is 76 or higher, you can complete the third class transfer)
+
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10342_DayOfDestinyElvenFate/dead_collect.html b/trunk/dist/game/data/scripts/quests/Q10342_DayOfDestinyElvenFate/dead_collect.html
new file mode 100644
index 0000000000..3bbbcb4743
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10342_DayOfDestinyElvenFate/dead_collect.html
@@ -0,0 +1,3 @@
+Aden Vanguard Corpse:
+(You collected the dog tag from this soldier.)
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10342_DayOfDestinyElvenFate/dead_complete.html b/trunk/dist/game/data/scripts/quests/Q10342_DayOfDestinyElvenFate/dead_complete.html
new file mode 100644
index 0000000000..ed72abd87c
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10342_DayOfDestinyElvenFate/dead_complete.html
@@ -0,0 +1,3 @@
+Aden Vanguard Corpse:
+(You collected a dog tag from the corpse. You now have all you need and can return to the Aden Supplier.)
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10342_DayOfDestinyElvenFate/dead_soldier.html b/trunk/dist/game/data/scripts/quests/Q10342_DayOfDestinyElvenFate/dead_soldier.html
new file mode 100644
index 0000000000..eb73d845c2
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10342_DayOfDestinyElvenFate/dead_soldier.html
@@ -0,0 +1,4 @@
+Aden Vanguard Corpse:
+(It looks like this is one of the fallen soldiers the Vanguard quartermaster was talking about.)
+
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10342_DayOfDestinyElvenFate/no_level.html b/trunk/dist/game/data/scripts/quests/Q10342_DayOfDestinyElvenFate/no_level.html
new file mode 100644
index 0000000000..6a1166f873
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10342_DayOfDestinyElvenFate/no_level.html
@@ -0,0 +1,3 @@
+I don't talk to youngsters. Come back when you've grown up a bit more.
+(This quest can only be taken by a character of level 76 or above.)
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10342_DayOfDestinyElvenFate/no_race.html b/trunk/dist/game/data/scripts/quests/Q10342_DayOfDestinyElvenFate/no_race.html
new file mode 100644
index 0000000000..a28cade14d
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10342_DayOfDestinyElvenFate/no_race.html
@@ -0,0 +1 @@
+You are either not on a quest that involves this NPC, or you don't meet this NPC's minimum quest requirements.
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10343_DayOfDestinyDarkElfsFate/30862-01.htm b/trunk/dist/game/data/scripts/quests/Q10343_DayOfDestinyDarkElfsFate/30862-01.htm
new file mode 100644
index 0000000000..79f603417c
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10343_DayOfDestinyDarkElfsFate/30862-01.htm
@@ -0,0 +1,4 @@
+Grand Master Oltran:
+Hum, has the time come? Your name is quite well-known throughout these parts. They say your star is rising, and that we can entrust you with our clan's future. Those that are an a new stage normnally seek new strength. It is time you demonstrated that you are worthy of such expectations.
+
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10343_DayOfDestinyDarkElfsFate/30862-02.htm b/trunk/dist/game/data/scripts/quests/Q10343_DayOfDestinyDarkElfsFate/30862-02.htm
new file mode 100644
index 0000000000..e8f2878242
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10343_DayOfDestinyDarkElfsFate/30862-02.htm
@@ -0,0 +1,5 @@
+Grand Master Oltran:
+I have been given a divine revelation of a new destiny for all who are qualified to represent the Dark Elf Clan. I judge you to be qualified in all aspects.
+Our Dark Elf Clan is in a dire situation, and we need more candidates like you if we are to redeem ourselves for following the Goddess of Destruction. If you are ready to receive new powers and restore honor to our clan, accept this mission.
+
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10343_DayOfDestinyDarkElfsFate/30862-03.htm b/trunk/dist/game/data/scripts/quests/Q10343_DayOfDestinyDarkElfsFate/30862-03.htm
new file mode 100644
index 0000000000..e21a2c12de
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10343_DayOfDestinyDarkElfsFate/30862-03.htm
@@ -0,0 +1,5 @@
+Grand Master Oltran:
+You have surely heard of the Seal of Shilen, near to Aden Castle? The Goddess or Destruction has opened her evil eyes, and is strengthening her dark powers. She has already filled that place with evil energy, and her spirits are looking for an opportunity to take over Aden Castle.
+The Vanguard went to the underground lair where they believe the Spirits are coming from, but nothing has been heard from them in days. We are about to deploy a search team, and we would like you to accept the mission.
+
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10343_DayOfDestinyDarkElfsFate/30862-04.htm b/trunk/dist/game/data/scripts/quests/Q10343_DayOfDestinyDarkElfsFate/30862-04.htm
new file mode 100644
index 0000000000..664e607971
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10343_DayOfDestinyDarkElfsFate/30862-04.htm
@@ -0,0 +1,4 @@
+Grand Master Oltran:
+A person of your abilities, I don't doubt that you are well suited for this mission. From here, head toward the Seal of Shilen and the Cemetery, and look for the vanguard near the Evil Incubator. Don't forget that every step you take could change the future of our clan.
+
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10343_DayOfDestinyDarkElfsFate/30862-05.html b/trunk/dist/game/data/scripts/quests/Q10343_DayOfDestinyDarkElfsFate/30862-05.html
new file mode 100644
index 0000000000..c8124cf684
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10343_DayOfDestinyDarkElfsFate/30862-05.html
@@ -0,0 +1,3 @@
+Grand Master Oltran:
+I'll explain again about the mission. First, go to Shilen's Seal and the Cemetary, find the vanguard, and help them. The quartermaster will probably be waiting for you.
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10343_DayOfDestinyDarkElfsFate/30862-06.html b/trunk/dist/game/data/scripts/quests/Q10343_DayOfDestinyDarkElfsFate/30862-06.html
new file mode 100644
index 0000000000..6c0cfd633e
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10343_DayOfDestinyDarkElfsFate/30862-06.html
@@ -0,0 +1,6 @@
+Grand Master Oltran:
+Adolph has told me all about you. You were truly a sight to behold, I see. Well, it's time for you to be granted a new path, perhaps.
+I'll tell you more if you wish. Otherwise, I have a gift for you.
+
+
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10343_DayOfDestinyDarkElfsFate/30862-07.html b/trunk/dist/game/data/scripts/quests/Q10343_DayOfDestinyDarkElfsFate/30862-07.html
new file mode 100644
index 0000000000..0df0c75c2d
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10343_DayOfDestinyDarkElfsFate/30862-07.html
@@ -0,0 +1,4 @@
+Grand Master Oltran:
+So, you are ready? Absolutely sure?
+
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10343_DayOfDestinyDarkElfsFate/30862-08.html b/trunk/dist/game/data/scripts/quests/Q10343_DayOfDestinyDarkElfsFate/30862-08.html
new file mode 100644
index 0000000000..05c4a0ed9d
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10343_DayOfDestinyDarkElfsFate/30862-08.html
@@ -0,0 +1,3 @@
+Grand Master Oltran:
+New destiny will open up your path.
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10343_DayOfDestinyDarkElfsFate/33165-01.html b/trunk/dist/game/data/scripts/quests/Q10343_DayOfDestinyDarkElfsFate/33165-01.html
new file mode 100644
index 0000000000..f2dc15b9d3
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10343_DayOfDestinyDarkElfsFate/33165-01.html
@@ -0,0 +1,5 @@
+Aden Vanguard Member:
+High priest Orven, sent you to help, right? Great. The Captain ordered me to direct you to the underground crypt when you arrived. The soldiers are already there, battling monsters. Please hurry, they're going to need all the help they can get.
+Powerfull monsters are encamped there right now. So let me teleport you there. Otherwise, it would be too dangerous.
+
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10343_DayOfDestinyDarkElfsFate/33407-01.html b/trunk/dist/game/data/scripts/quests/Q10343_DayOfDestinyDarkElfsFate/33407-01.html
new file mode 100644
index 0000000000..41f4a90488
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10343_DayOfDestinyDarkElfsFate/33407-01.html
@@ -0,0 +1,5 @@
+Quartermaster:
+Finally I've been waiting for Aden to send me backup for ages. Captain Adolph and his soldiers all went to the underground Evil Incubator to see about the monsters that have been flooding out of it, and I need help.
+Can you help?
+
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10343_DayOfDestinyDarkElfsFate/33407-02.html b/trunk/dist/game/data/scripts/quests/Q10343_DayOfDestinyDarkElfsFate/33407-02.html
new file mode 100644
index 0000000000..f21298afee
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10343_DayOfDestinyDarkElfsFate/33407-02.html
@@ -0,0 +1,5 @@
+Quartermaster:
+So many monsters have broken through our lines, Captain Adolph and his men have pushed them back through a valiant fight, but casualties were unavoidable.
+We must pay the dead the respect of bringing their personal possessions back to their families, but we have no numbers to spare. Please, could you bring back 4 keepsakes from the bodies of Aden Vanguard Members in the Cemetary?
+It's horrible, but we haven't been able to retrieve the bodies. They're scattered all over the Cemetary, but your best bet would be to check the corners or the square guarded by the Grave Guards. It's between the Seal or Shilen and the Cemetary.
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10343_DayOfDestinyDarkElfsFate/33407-03.html b/trunk/dist/game/data/scripts/quests/Q10343_DayOfDestinyDarkElfsFate/33407-03.html
new file mode 100644
index 0000000000..8dfe9f6239
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10343_DayOfDestinyDarkElfsFate/33407-03.html
@@ -0,0 +1,4 @@
+Quartermaster:
+Many Aden Vanguard Members have died at the Cemetary. Please bring back 4 keepsakes from their bodies.
+It's horrible, but we haven't been able to retrieve the bodies. They're scattered all over the Cemetary, but your be bet would be to check the corners of the square guarded by the Grave Guards. It's between the Seal of Shilen and the Cemetary.
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10343_DayOfDestinyDarkElfsFate/33407-04.html b/trunk/dist/game/data/scripts/quests/Q10343_DayOfDestinyDarkElfsFate/33407-04.html
new file mode 100644
index 0000000000..ea34dfc8ed
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10343_DayOfDestinyDarkElfsFate/33407-04.html
@@ -0,0 +1,5 @@
+Quartermaster:
+Yes, these are our fallen comrades' dog tags. Thank you. I'm sure the families will appreciate your hard work. Our heroes deserve to be remembered.
+Now, I don't think there's much else for you to do here. I'm worried about captain Adolph and the soldiers that went ahead to the monsters' base. I'm sure they could use some help there.
+
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10343_DayOfDestinyDarkElfsFate/33407-05.html b/trunk/dist/game/data/scripts/quests/Q10343_DayOfDestinyDarkElfsFate/33407-05.html
new file mode 100644
index 0000000000..77a2b30502
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10343_DayOfDestinyDarkElfsFate/33407-05.html
@@ -0,0 +1,4 @@
+Quartermaster:
+Captain Adolph's team is in the underground crypt near the Cemetery, fighting monsters that resurrected through Shilen. Go and help him if you can. Powerful creatures are blocking the entrance to the crypt, so you'd better teleport through the Aden Vanguard Member standing behind me.
+Good luck, warrior of Aden.
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10343_DayOfDestinyDarkElfsFate/Q10343_DayOfDestinyDarkElfsFate.java b/trunk/dist/game/data/scripts/quests/Q10343_DayOfDestinyDarkElfsFate/Q10343_DayOfDestinyDarkElfsFate.java
new file mode 100644
index 0000000000..c98f99f028
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10343_DayOfDestinyDarkElfsFate/Q10343_DayOfDestinyDarkElfsFate.java
@@ -0,0 +1,343 @@
+/*
+ * 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.Q10343_DayOfDestinyDarkElfsFate;
+
+import com.l2jmobius.Config;
+import com.l2jmobius.gameserver.cache.HtmCache;
+import com.l2jmobius.gameserver.enums.QuestSound;
+import com.l2jmobius.gameserver.enums.Race;
+import com.l2jmobius.gameserver.model.actor.L2Npc;
+import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
+import com.l2jmobius.gameserver.model.events.EventType;
+import com.l2jmobius.gameserver.model.events.ListenerRegisterType;
+import com.l2jmobius.gameserver.model.events.annotations.RegisterEvent;
+import com.l2jmobius.gameserver.model.events.annotations.RegisterType;
+import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerLevelChanged;
+import com.l2jmobius.gameserver.model.quest.Quest;
+import com.l2jmobius.gameserver.model.quest.QuestState;
+import com.l2jmobius.gameserver.model.quest.State;
+import com.l2jmobius.gameserver.network.serverpackets.ExQuestNpcLogList;
+import com.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage;
+
+/**
+ * Day of Destiny: Dark Elf's Fate (10343)
+ * @author Mobius
+ */
+public class Q10343_DayOfDestinyDarkElfsFate extends Quest
+{
+ // NPCs
+ private static final int OLTRAN = 30862;
+ private static final int QUARTERMASTER = 33407;
+ private static final int DEAD_SOLDIER_1 = 33166;
+ private static final int DEAD_SOLDIER_2 = 33167;
+ private static final int DEAD_SOLDIER_3 = 33168;
+ private static final int DEAD_SOLDIER_4 = 33169;
+ private static final int VANGUARD_MEMBER = 33165;
+ // Items
+ private static final int DEAD_SOLDIER_TAGS = 17750;
+ // Rewards
+ private static final int STEEL_DOOR_GUILD_COIN = 37045;
+ private static final int M_SOULSHOT_S = 22576;
+ private static final int M_SPIRITSHOT_S = 22607;
+ // Requirement
+ private static final int MIN_LEVEL = 76;
+
+ public Q10343_DayOfDestinyDarkElfsFate()
+ {
+ super(10343, Q10343_DayOfDestinyDarkElfsFate.class.getSimpleName(), "Day of Destiny: Dark Elf's Fate");
+ addStartNpc(OLTRAN);
+ addTalkId(OLTRAN, QUARTERMASTER, DEAD_SOLDIER_1, DEAD_SOLDIER_2, DEAD_SOLDIER_3, DEAD_SOLDIER_4, VANGUARD_MEMBER);
+ registerQuestItems(DEAD_SOLDIER_TAGS);
+ addCondMinLevel(MIN_LEVEL, "no_level.html");
+ addCondRace(Race.DARK_ELF, "no_race.html");
+ }
+
+ @Override
+ public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
+ {
+ final QuestState qs = getQuestState(player, false);
+ if (qs == null)
+ {
+ return null;
+ }
+
+ String htmltext = null;
+ switch (event)
+ {
+ case "30862-02.htm":
+ case "30862-03.htm":
+ case "30862-04.htm":
+ case "30862-06.html":
+ case "30862-07.html":
+ {
+ htmltext = event;
+ break;
+ }
+ case "30862-05.html":
+ {
+ qs.startQuest();
+ qs.setCond(2); // arrow hack
+ qs.setCond(1);
+ htmltext = event;
+ break;
+ }
+ case "33407-02.html":
+ {
+ if (qs.isCond(1))
+ {
+ qs.setCond(2, true);
+ htmltext = event;
+ }
+ break;
+ }
+ case "dead_collect.html":
+ {
+ if (qs.isCond(2))
+ {
+ if (qs.get("" + npc.getId()) == null)
+ {
+ qs.set("" + npc.getId(), 1);
+ giveItems(player, DEAD_SOLDIER_TAGS, 1);
+ playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
+
+ }
+ final int count = qs.getMemoState() + 1;
+ if (count >= 4)
+ {
+ qs.setCond(3, true);
+ qs.unset("" + DEAD_SOLDIER_1);
+ qs.unset("" + DEAD_SOLDIER_2);
+ qs.unset("" + DEAD_SOLDIER_3);
+ qs.unset("" + DEAD_SOLDIER_4);
+ htmltext = "dead_complete.html";
+ }
+ else
+ {
+ qs.setMemoState(count);
+ final ExQuestNpcLogList log = new ExQuestNpcLogList(getId());
+ log.addItem(DEAD_SOLDIER_TAGS, count);
+ player.sendPacket(log);
+ htmltext = event;
+ }
+ }
+ break;
+ }
+ case "33407-05.html":
+ {
+ if (qs.isCond(3))
+ {
+ takeItems(player, DEAD_SOLDIER_TAGS, -1);
+ qs.setCond(4, true);
+ htmltext = event;
+ }
+ break;
+ }
+ case "transfer_info":
+ {
+ if (qs.isCond(13))
+ {
+ switch (player.getClassId().getId())
+ {
+ // TODO: Return detail htmls.
+ }
+ }
+ break;
+ }
+ case "30862-08.html":
+ {
+ if (qs.isCond(13))
+ {
+ switch (player.getClassId().getId())
+ {
+ // Shillien Knight -> Shillien Templar
+ case 33:
+ {
+ player.setBaseClassId(106);
+ player.setClassId(106);
+ break;
+ }
+ // Bladedancer -> Spectral Dancer
+ case 34:
+ {
+ player.setBaseClassId(107);
+ player.setClassId(107);
+ break;
+ }
+ // Abyss Walker -> Ghost Hunter
+ case 36:
+ {
+ player.setBaseClassId(108);
+ player.setClassId(108);
+ break;
+ }
+ // Phantom Ranger -> Ghost Sentinel
+ case 37:
+ {
+ player.setBaseClassId(109);
+ player.setClassId(109);
+ break;
+ }
+ // Spellhowler -> Storm Screamer
+ case 40:
+ {
+ player.setBaseClassId(110);
+ player.setClassId(110);
+ break;
+ }
+ // Shillien Elder -> Shillien Saint
+ case 43:
+ {
+ player.setBaseClassId(112);
+ player.setClassId(112);
+ break;
+ }
+ }
+ rewardItems(player, STEEL_DOOR_GUILD_COIN, 87);
+ rewardItems(player, M_SOULSHOT_S, 1);
+ rewardItems(player, M_SPIRITSHOT_S, 1);
+ addExpAndSp(player, 2050000, 0);
+ player.broadcastUserInfo();
+ qs.exitQuest(false, true);
+ }
+ break;
+ }
+ }
+ return htmltext;
+ }
+
+ @Override
+ public String onTalk(L2Npc npc, L2PcInstance player)
+ {
+ final QuestState qs = getQuestState(player, true);
+ String htmltext = getNoQuestMsg(player);
+
+ switch (qs.getState())
+ {
+ case State.STARTED:
+ {
+ switch (npc.getId())
+ {
+ case OLTRAN:
+ {
+ if (qs.isCond(1))
+ {
+ htmltext = "30862-05.html";
+ }
+ else if (qs.isCond(13))
+ {
+ htmltext = "30862-06.html";
+ }
+ break;
+ }
+ case QUARTERMASTER:
+ {
+ switch (qs.getCond())
+ {
+ case 1:
+ {
+ htmltext = "33407-01.html";
+ break;
+ }
+ case 2:
+ {
+ htmltext = "33407-03.html";
+ break;
+ }
+ case 3:
+ {
+ htmltext = "33407-04.html";
+ break;
+ }
+ case 4:
+ {
+ htmltext = "33407-05.html";
+ break;
+ }
+ }
+ break;
+ }
+ case DEAD_SOLDIER_1:
+ case DEAD_SOLDIER_2:
+ case DEAD_SOLDIER_3:
+ case DEAD_SOLDIER_4:
+ {
+ if (qs.isCond(2))
+ {
+ if (qs.get("" + npc.getId()) == null)
+ {
+ htmltext = "dead_soldier.html";
+ }
+ else
+ {
+ htmltext = "dead_collect.html";
+ }
+ }
+ else if (qs.isCond(3))
+ {
+ htmltext = "dead_complete.html";
+ }
+ break;
+ }
+ case VANGUARD_MEMBER:
+ {
+ if ((qs.getCond() > 3) && (qs.getCond() < 13))
+ {
+ htmltext = "33165-01.html";
+ }
+ break;
+ }
+ }
+ break;
+ }
+ case State.CREATED:
+ {
+ if ((npc.getId() == OLTRAN) && !player.isSubClassActive() && !player.isDualClassActive() && (player.getClassId().level() == 2))
+ {
+ htmltext = "30862-01.htm";
+ }
+ break;
+ }
+ case State.COMPLETED:
+ {
+ htmltext = getAlreadyCompletedMsg(player);
+ break;
+ }
+ }
+ return htmltext;
+ }
+
+ @RegisterEvent(EventType.ON_PLAYER_LEVEL_CHANGED)
+ @RegisterType(ListenerRegisterType.GLOBAL)
+ public void OnPlayerLevelChanged(OnPlayerLevelChanged event)
+ {
+ if (Config.DISABLE_TUTORIAL)
+ {
+ return;
+ }
+ final L2PcInstance player = event.getActiveChar();
+ if ((player.getLevel() >= MIN_LEVEL) && (player.getRace() == Race.DARK_ELF))
+ {
+ final QuestState qs = getQuestState(player, false);
+ if (qs == null)
+ {
+ final NpcHtmlMessage html = new NpcHtmlMessage();
+ html.setHtml(HtmCache.getInstance().getHtm(player.getHtmlPrefix(), "scripts/quests/Q10343_DayOfDestinyDarkElfsFate/announce.html"));
+ player.sendPacket(html);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10343_DayOfDestinyDarkElfsFate/announce.html b/trunk/dist/game/data/scripts/quests/Q10343_DayOfDestinyDarkElfsFate/announce.html
new file mode 100644
index 0000000000..9e2f988310
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10343_DayOfDestinyDarkElfsFate/announce.html
@@ -0,0 +1,6 @@
+Grand Master Oltran:
+So the Goddess of Death has opened her malicious eyes, at last. Shilen's vile creatures are rampaging all over Aden Castle. I heard a vanguard force from Aden Castle set out to eradicate those monsters and found an underground lair near the Seal of Shilen. But the problem is that we haven't heard anything from them since then. So we're arranging to send a search party after them, and I hope you who of renown could help us with this mission. If you do, I'll help you gain greater powers.
+I shall be waiting for you in the Dark Elf Guild in the Town of Aden. Do not be led astray from your fated duty.
+(When your level is 76 or higher, you can complete the third class transfer)
+
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10343_DayOfDestinyDarkElfsFate/dead_collect.html b/trunk/dist/game/data/scripts/quests/Q10343_DayOfDestinyDarkElfsFate/dead_collect.html
new file mode 100644
index 0000000000..3bbbcb4743
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10343_DayOfDestinyDarkElfsFate/dead_collect.html
@@ -0,0 +1,3 @@
+Aden Vanguard Corpse:
+(You collected the dog tag from this soldier.)
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10343_DayOfDestinyDarkElfsFate/dead_complete.html b/trunk/dist/game/data/scripts/quests/Q10343_DayOfDestinyDarkElfsFate/dead_complete.html
new file mode 100644
index 0000000000..ed72abd87c
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10343_DayOfDestinyDarkElfsFate/dead_complete.html
@@ -0,0 +1,3 @@
+Aden Vanguard Corpse:
+(You collected a dog tag from the corpse. You now have all you need and can return to the Aden Supplier.)
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10343_DayOfDestinyDarkElfsFate/dead_soldier.html b/trunk/dist/game/data/scripts/quests/Q10343_DayOfDestinyDarkElfsFate/dead_soldier.html
new file mode 100644
index 0000000000..cf793d4364
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10343_DayOfDestinyDarkElfsFate/dead_soldier.html
@@ -0,0 +1,4 @@
+Aden Vanguard Corpse:
+(It looks like this is one of the fallen soldiers the Vanguard quartermaster was talking about.)
+
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10343_DayOfDestinyDarkElfsFate/no_level.html b/trunk/dist/game/data/scripts/quests/Q10343_DayOfDestinyDarkElfsFate/no_level.html
new file mode 100644
index 0000000000..6a1166f873
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10343_DayOfDestinyDarkElfsFate/no_level.html
@@ -0,0 +1,3 @@
+I don't talk to youngsters. Come back when you've grown up a bit more.
+(This quest can only be taken by a character of level 76 or above.)
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10343_DayOfDestinyDarkElfsFate/no_race.html b/trunk/dist/game/data/scripts/quests/Q10343_DayOfDestinyDarkElfsFate/no_race.html
new file mode 100644
index 0000000000..a28cade14d
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10343_DayOfDestinyDarkElfsFate/no_race.html
@@ -0,0 +1 @@
+You are either not on a quest that involves this NPC, or you don't meet this NPC's minimum quest requirements.
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10344_DayOfDestinyOrcsFate/30865-01.htm b/trunk/dist/game/data/scripts/quests/Q10344_DayOfDestinyOrcsFate/30865-01.htm
new file mode 100644
index 0000000000..5f14aa2df0
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10344_DayOfDestinyOrcsFate/30865-01.htm
@@ -0,0 +1,4 @@
+High Prefect Ladanza:
+Hum, has the time come? Your name is quite well-known throughout these parts. They say your star is rising, and that we can entrust you with our clan's future. Those that are an a new stage normnally seek new strength. It is time you demonstrated that you are worthy of such expectations.
+
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10344_DayOfDestinyOrcsFate/30865-02.htm b/trunk/dist/game/data/scripts/quests/Q10344_DayOfDestinyOrcsFate/30865-02.htm
new file mode 100644
index 0000000000..cc5077c526
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10344_DayOfDestinyOrcsFate/30865-02.htm
@@ -0,0 +1,5 @@
+High Prefect Ladanza:
+I have been given a divine revelation of a new destiny for all who are qualified to represent the Orc Clan. I judge you to be qualified in all aspects.
+Our Orc Clan is in a dire situation, and we need more candidates like you if we are to redeem ourselves for following the Goddess of Destruction. If you are ready to receive new powers and restore honor to our clan, accept this mission.
+
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10344_DayOfDestinyOrcsFate/30865-03.htm b/trunk/dist/game/data/scripts/quests/Q10344_DayOfDestinyOrcsFate/30865-03.htm
new file mode 100644
index 0000000000..fa94f434ad
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10344_DayOfDestinyOrcsFate/30865-03.htm
@@ -0,0 +1,5 @@
+High Prefect Ladanza:
+You have surely heard of the Seal of Shilen, near to Aden Castle? The Goddess or Destruction has opened her evil eyes, and is strengthening her dark powers. She has already filled that place with evil energy, and her spirits are looking for an opportunity to take over Aden Castle.
+The Vanguard went to the underground lair where they believe the Spirits are coming from, but nothing has been heard from them in days. We are about to deploy a search team, and we would like you to accept the mission.
+
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10344_DayOfDestinyOrcsFate/30865-04.htm b/trunk/dist/game/data/scripts/quests/Q10344_DayOfDestinyOrcsFate/30865-04.htm
new file mode 100644
index 0000000000..a57fafb535
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10344_DayOfDestinyOrcsFate/30865-04.htm
@@ -0,0 +1,4 @@
+High Prefect Ladanza:
+A person of your abilities, I don't doubt that you are well suited for this mission. From here, head toward the Seal of Shilen and the Cemetery, and look for the vanguard near the Evil Incubator. Don't forget that every step you take could change the future of our clan.
+
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10344_DayOfDestinyOrcsFate/30865-05.html b/trunk/dist/game/data/scripts/quests/Q10344_DayOfDestinyOrcsFate/30865-05.html
new file mode 100644
index 0000000000..359114fa1d
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10344_DayOfDestinyOrcsFate/30865-05.html
@@ -0,0 +1,3 @@
+High Prefect Ladanza:
+I'll explain again about the mission. First, go to Shilen's Seal and the Cemetary, find the vanguard, and help them. The quartermaster will probably be waiting for you.
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10344_DayOfDestinyOrcsFate/30865-06.html b/trunk/dist/game/data/scripts/quests/Q10344_DayOfDestinyOrcsFate/30865-06.html
new file mode 100644
index 0000000000..71c39fc3c7
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10344_DayOfDestinyOrcsFate/30865-06.html
@@ -0,0 +1,6 @@
+High Prefect Ladanza:
+Adolph has told me all about you. You were truly a sight to behold, I see. Well, it's time for you to be granted a new path, perhaps.
+I'll tell you more if you wish. Otherwise, I have a gift for you.
+
+
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10344_DayOfDestinyOrcsFate/30865-07.html b/trunk/dist/game/data/scripts/quests/Q10344_DayOfDestinyOrcsFate/30865-07.html
new file mode 100644
index 0000000000..22c79fa34e
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10344_DayOfDestinyOrcsFate/30865-07.html
@@ -0,0 +1,4 @@
+High Prefect Ladanza:
+So, you are ready? Absolutely sure?
+
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10344_DayOfDestinyOrcsFate/30865-08.html b/trunk/dist/game/data/scripts/quests/Q10344_DayOfDestinyOrcsFate/30865-08.html
new file mode 100644
index 0000000000..443627969e
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10344_DayOfDestinyOrcsFate/30865-08.html
@@ -0,0 +1,3 @@
+High Prefect Ladanza:
+New destiny will open up your path.
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10344_DayOfDestinyOrcsFate/33165-01.html b/trunk/dist/game/data/scripts/quests/Q10344_DayOfDestinyOrcsFate/33165-01.html
new file mode 100644
index 0000000000..f2dc15b9d3
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10344_DayOfDestinyOrcsFate/33165-01.html
@@ -0,0 +1,5 @@
+Aden Vanguard Member:
+High priest Orven, sent you to help, right? Great. The Captain ordered me to direct you to the underground crypt when you arrived. The soldiers are already there, battling monsters. Please hurry, they're going to need all the help they can get.
+Powerfull monsters are encamped there right now. So let me teleport you there. Otherwise, it would be too dangerous.
+
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10344_DayOfDestinyOrcsFate/33407-01.html b/trunk/dist/game/data/scripts/quests/Q10344_DayOfDestinyOrcsFate/33407-01.html
new file mode 100644
index 0000000000..2f6eb750a3
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10344_DayOfDestinyOrcsFate/33407-01.html
@@ -0,0 +1,5 @@
+Quartermaster:
+Finally I've been waiting for Aden to send me backup for ages. Captain Adolph and his soldiers all went to the underground Evil Incubator to see about the monsters that have been flooding out of it, and I need help.
+Can you help?
+
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10344_DayOfDestinyOrcsFate/33407-02.html b/trunk/dist/game/data/scripts/quests/Q10344_DayOfDestinyOrcsFate/33407-02.html
new file mode 100644
index 0000000000..f21298afee
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10344_DayOfDestinyOrcsFate/33407-02.html
@@ -0,0 +1,5 @@
+Quartermaster:
+So many monsters have broken through our lines, Captain Adolph and his men have pushed them back through a valiant fight, but casualties were unavoidable.
+We must pay the dead the respect of bringing their personal possessions back to their families, but we have no numbers to spare. Please, could you bring back 4 keepsakes from the bodies of Aden Vanguard Members in the Cemetary?
+It's horrible, but we haven't been able to retrieve the bodies. They're scattered all over the Cemetary, but your best bet would be to check the corners or the square guarded by the Grave Guards. It's between the Seal or Shilen and the Cemetary.
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10344_DayOfDestinyOrcsFate/33407-03.html b/trunk/dist/game/data/scripts/quests/Q10344_DayOfDestinyOrcsFate/33407-03.html
new file mode 100644
index 0000000000..8dfe9f6239
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10344_DayOfDestinyOrcsFate/33407-03.html
@@ -0,0 +1,4 @@
+Quartermaster:
+Many Aden Vanguard Members have died at the Cemetary. Please bring back 4 keepsakes from their bodies.
+It's horrible, but we haven't been able to retrieve the bodies. They're scattered all over the Cemetary, but your be bet would be to check the corners of the square guarded by the Grave Guards. It's between the Seal of Shilen and the Cemetary.
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10344_DayOfDestinyOrcsFate/33407-04.html b/trunk/dist/game/data/scripts/quests/Q10344_DayOfDestinyOrcsFate/33407-04.html
new file mode 100644
index 0000000000..7c89c428c9
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10344_DayOfDestinyOrcsFate/33407-04.html
@@ -0,0 +1,5 @@
+Quartermaster:
+Yes, these are our fallen comrades' dog tags. Thank you. I'm sure the families will appreciate your hard work. Our heroes deserve to be remembered.
+Now, I don't think there's much else for you to do here. I'm worried about captain Adolph and the soldiers that went ahead to the monsters' base. I'm sure they could use some help there.
+
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10344_DayOfDestinyOrcsFate/33407-05.html b/trunk/dist/game/data/scripts/quests/Q10344_DayOfDestinyOrcsFate/33407-05.html
new file mode 100644
index 0000000000..77a2b30502
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10344_DayOfDestinyOrcsFate/33407-05.html
@@ -0,0 +1,4 @@
+Quartermaster:
+Captain Adolph's team is in the underground crypt near the Cemetery, fighting monsters that resurrected through Shilen. Go and help him if you can. Powerful creatures are blocking the entrance to the crypt, so you'd better teleport through the Aden Vanguard Member standing behind me.
+Good luck, warrior of Aden.
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10344_DayOfDestinyOrcsFate/Q10344_DayOfDestinyOrcsFate.java b/trunk/dist/game/data/scripts/quests/Q10344_DayOfDestinyOrcsFate/Q10344_DayOfDestinyOrcsFate.java
new file mode 100644
index 0000000000..1507533f31
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10344_DayOfDestinyOrcsFate/Q10344_DayOfDestinyOrcsFate.java
@@ -0,0 +1,329 @@
+/*
+ * 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.Q10344_DayOfDestinyOrcsFate;
+
+import com.l2jmobius.Config;
+import com.l2jmobius.gameserver.cache.HtmCache;
+import com.l2jmobius.gameserver.enums.QuestSound;
+import com.l2jmobius.gameserver.enums.Race;
+import com.l2jmobius.gameserver.model.actor.L2Npc;
+import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
+import com.l2jmobius.gameserver.model.events.EventType;
+import com.l2jmobius.gameserver.model.events.ListenerRegisterType;
+import com.l2jmobius.gameserver.model.events.annotations.RegisterEvent;
+import com.l2jmobius.gameserver.model.events.annotations.RegisterType;
+import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerLevelChanged;
+import com.l2jmobius.gameserver.model.quest.Quest;
+import com.l2jmobius.gameserver.model.quest.QuestState;
+import com.l2jmobius.gameserver.model.quest.State;
+import com.l2jmobius.gameserver.network.serverpackets.ExQuestNpcLogList;
+import com.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage;
+
+/**
+ * Day of Destiny: Orc's Fate (10344)
+ * @author Mobius
+ */
+public class Q10344_DayOfDestinyOrcsFate extends Quest
+{
+ // NPCs
+ private static final int LADANZA = 30865;
+ private static final int QUARTERMASTER = 33407;
+ private static final int DEAD_SOLDIER_1 = 33166;
+ private static final int DEAD_SOLDIER_2 = 33167;
+ private static final int DEAD_SOLDIER_3 = 33168;
+ private static final int DEAD_SOLDIER_4 = 33169;
+ private static final int VANGUARD_MEMBER = 33165;
+ // Items
+ private static final int DEAD_SOLDIER_TAGS = 17751;
+ // Rewards
+ private static final int STEEL_DOOR_GUILD_COIN = 37045;
+ private static final int M_SOULSHOT_S = 22576;
+ private static final int M_SPIRITSHOT_S = 22607;
+ // Requirement
+ private static final int MIN_LEVEL = 76;
+
+ public Q10344_DayOfDestinyOrcsFate()
+ {
+ super(10344, Q10344_DayOfDestinyOrcsFate.class.getSimpleName(), "Day of Destiny: Orc's Fate");
+ addStartNpc(LADANZA);
+ addTalkId(LADANZA, QUARTERMASTER, DEAD_SOLDIER_1, DEAD_SOLDIER_2, DEAD_SOLDIER_3, DEAD_SOLDIER_4, VANGUARD_MEMBER);
+ registerQuestItems(DEAD_SOLDIER_TAGS);
+ addCondMinLevel(MIN_LEVEL, "no_level.html");
+ addCondRace(Race.ORC, "no_race.html");
+ }
+
+ @Override
+ public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
+ {
+ final QuestState qs = getQuestState(player, false);
+ if (qs == null)
+ {
+ return null;
+ }
+
+ String htmltext = null;
+ switch (event)
+ {
+ case "30865-02.htm":
+ case "30865-03.htm":
+ case "30865-04.htm":
+ case "30865-06.html":
+ case "30865-07.html":
+ {
+ htmltext = event;
+ break;
+ }
+ case "30865-05.html":
+ {
+ qs.startQuest();
+ qs.setCond(2); // arrow hack
+ qs.setCond(1);
+ htmltext = event;
+ break;
+ }
+ case "33407-02.html":
+ {
+ if (qs.isCond(1))
+ {
+ qs.setCond(2, true);
+ htmltext = event;
+ }
+ break;
+ }
+ case "dead_collect.html":
+ {
+ if (qs.isCond(2))
+ {
+ if (qs.get("" + npc.getId()) == null)
+ {
+ qs.set("" + npc.getId(), 1);
+ giveItems(player, DEAD_SOLDIER_TAGS, 1);
+ playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
+
+ }
+ final int count = qs.getMemoState() + 1;
+ if (count >= 4)
+ {
+ qs.setCond(3, true);
+ qs.unset("" + DEAD_SOLDIER_1);
+ qs.unset("" + DEAD_SOLDIER_2);
+ qs.unset("" + DEAD_SOLDIER_3);
+ qs.unset("" + DEAD_SOLDIER_4);
+ htmltext = "dead_complete.html";
+ }
+ else
+ {
+ qs.setMemoState(count);
+ final ExQuestNpcLogList log = new ExQuestNpcLogList(getId());
+ log.addItem(DEAD_SOLDIER_TAGS, count);
+ player.sendPacket(log);
+ htmltext = event;
+ }
+ }
+ break;
+ }
+ case "33407-05.html":
+ {
+ if (qs.isCond(3))
+ {
+ takeItems(player, DEAD_SOLDIER_TAGS, -1);
+ qs.setCond(4, true);
+ htmltext = event;
+ }
+ break;
+ }
+ case "transfer_info":
+ {
+ if (qs.isCond(13))
+ {
+ switch (player.getClassId().getId())
+ {
+ // TODO: Return detail htmls.
+ }
+ }
+ break;
+ }
+ case "30865-08.html":
+ {
+ if (qs.isCond(13))
+ {
+ switch (player.getClassId().getId())
+ {
+ // Destroyer -> Titan
+ case 46:
+ {
+ player.setBaseClassId(113);
+ player.setClassId(113);
+ break;
+ }
+ // Tyrant -> Grand Khavatari
+ case 48:
+ {
+ player.setBaseClassId(114);
+ player.setClassId(114);
+ break;
+ }
+ // Overlord -> Dominator
+ case 51:
+ {
+ player.setBaseClassId(115);
+ player.setClassId(115);
+ break;
+ }
+ // Warcryer -> Doom Cryer
+ case 52:
+ {
+ player.setBaseClassId(116);
+ player.setClassId(116);
+ break;
+ }
+ }
+ rewardItems(player, STEEL_DOOR_GUILD_COIN, 87);
+ rewardItems(player, M_SOULSHOT_S, 1);
+ rewardItems(player, M_SPIRITSHOT_S, 1);
+ addExpAndSp(player, 2050000, 0);
+ player.broadcastUserInfo();
+ qs.exitQuest(false, true);
+ }
+ break;
+ }
+ }
+ return htmltext;
+ }
+
+ @Override
+ public String onTalk(L2Npc npc, L2PcInstance player)
+ {
+ final QuestState qs = getQuestState(player, true);
+ String htmltext = getNoQuestMsg(player);
+
+ switch (qs.getState())
+ {
+ case State.STARTED:
+ {
+ switch (npc.getId())
+ {
+ case LADANZA:
+ {
+ if (qs.isCond(1))
+ {
+ htmltext = "30865-05.html";
+ }
+ else if (qs.isCond(13))
+ {
+ htmltext = "30865-06.html";
+ }
+ break;
+ }
+ case QUARTERMASTER:
+ {
+ switch (qs.getCond())
+ {
+ case 1:
+ {
+ htmltext = "33407-01.html";
+ break;
+ }
+ case 2:
+ {
+ htmltext = "33407-03.html";
+ break;
+ }
+ case 3:
+ {
+ htmltext = "33407-04.html";
+ break;
+ }
+ case 4:
+ {
+ htmltext = "33407-05.html";
+ break;
+ }
+ }
+ break;
+ }
+ case DEAD_SOLDIER_1:
+ case DEAD_SOLDIER_2:
+ case DEAD_SOLDIER_3:
+ case DEAD_SOLDIER_4:
+ {
+ if (qs.isCond(2))
+ {
+ if (qs.get("" + npc.getId()) == null)
+ {
+ htmltext = "dead_soldier.html";
+ }
+ else
+ {
+ htmltext = "dead_collect.html";
+ }
+ }
+ else if (qs.isCond(3))
+ {
+ htmltext = "dead_complete.html";
+ }
+ break;
+ }
+ case VANGUARD_MEMBER:
+ {
+ if ((qs.getCond() > 3) && (qs.getCond() < 13))
+ {
+ htmltext = "33165-01.html";
+ }
+ break;
+ }
+ }
+ break;
+ }
+ case State.CREATED:
+ {
+ if ((npc.getId() == LADANZA) && !player.isSubClassActive() && !player.isDualClassActive() && (player.getClassId().level() == 2))
+ {
+ htmltext = "30865-01.htm";
+ }
+ break;
+ }
+ case State.COMPLETED:
+ {
+ htmltext = getAlreadyCompletedMsg(player);
+ break;
+ }
+ }
+ return htmltext;
+ }
+
+ @RegisterEvent(EventType.ON_PLAYER_LEVEL_CHANGED)
+ @RegisterType(ListenerRegisterType.GLOBAL)
+ public void OnPlayerLevelChanged(OnPlayerLevelChanged event)
+ {
+ if (Config.DISABLE_TUTORIAL)
+ {
+ return;
+ }
+ final L2PcInstance player = event.getActiveChar();
+ if ((player.getLevel() >= MIN_LEVEL) && (player.getRace() == Race.ORC))
+ {
+ final QuestState qs = getQuestState(player, false);
+ if (qs == null)
+ {
+ final NpcHtmlMessage html = new NpcHtmlMessage();
+ html.setHtml(HtmCache.getInstance().getHtm(player.getHtmlPrefix(), "scripts/quests/Q10344_DayOfDestinyOrcsFate/announce.html"));
+ player.sendPacket(html);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10344_DayOfDestinyOrcsFate/announce.html b/trunk/dist/game/data/scripts/quests/Q10344_DayOfDestinyOrcsFate/announce.html
new file mode 100644
index 0000000000..dc0a0eb686
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10344_DayOfDestinyOrcsFate/announce.html
@@ -0,0 +1,6 @@
+High Prefect Ladanza:
+So the Goddess of Death has opened her malicious eyes, at last. Shilen's vile creatures are rampaging all over Aden Castle. I heard a vanguard force from Aden Castle set out to eradicate those monsters and found an underground lair near the Seal of Shilen. But the problem is that we haven't heard anything from them since then. So we're arranging to send a search party after them, and I hope you who of renown could help us with this mission. If you do, I'll help you gain greater powers.
+I shall be waiting for you in the Orc Guild in the Town of Aden. Do not be led astray from your fated duty.
+(When your level is 76 or higher, you can complete the third class transfer)
+
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10344_DayOfDestinyOrcsFate/dead_collect.html b/trunk/dist/game/data/scripts/quests/Q10344_DayOfDestinyOrcsFate/dead_collect.html
new file mode 100644
index 0000000000..3bbbcb4743
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10344_DayOfDestinyOrcsFate/dead_collect.html
@@ -0,0 +1,3 @@
+Aden Vanguard Corpse:
+(You collected the dog tag from this soldier.)
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10344_DayOfDestinyOrcsFate/dead_complete.html b/trunk/dist/game/data/scripts/quests/Q10344_DayOfDestinyOrcsFate/dead_complete.html
new file mode 100644
index 0000000000..ed72abd87c
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10344_DayOfDestinyOrcsFate/dead_complete.html
@@ -0,0 +1,3 @@
+Aden Vanguard Corpse:
+(You collected a dog tag from the corpse. You now have all you need and can return to the Aden Supplier.)
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10344_DayOfDestinyOrcsFate/dead_soldier.html b/trunk/dist/game/data/scripts/quests/Q10344_DayOfDestinyOrcsFate/dead_soldier.html
new file mode 100644
index 0000000000..860c7c8eac
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10344_DayOfDestinyOrcsFate/dead_soldier.html
@@ -0,0 +1,4 @@
+Aden Vanguard Corpse:
+(It looks like this is one of the fallen soldiers the Vanguard quartermaster was talking about.)
+
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10344_DayOfDestinyOrcsFate/no_level.html b/trunk/dist/game/data/scripts/quests/Q10344_DayOfDestinyOrcsFate/no_level.html
new file mode 100644
index 0000000000..6a1166f873
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10344_DayOfDestinyOrcsFate/no_level.html
@@ -0,0 +1,3 @@
+I don't talk to youngsters. Come back when you've grown up a bit more.
+(This quest can only be taken by a character of level 76 or above.)
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10344_DayOfDestinyOrcsFate/no_race.html b/trunk/dist/game/data/scripts/quests/Q10344_DayOfDestinyOrcsFate/no_race.html
new file mode 100644
index 0000000000..a28cade14d
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10344_DayOfDestinyOrcsFate/no_race.html
@@ -0,0 +1 @@
+You are either not on a quest that involves this NPC, or you don't meet this NPC's minimum quest requirements.
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10345_DayOfDestinyDwarfsFate/30847-01.htm b/trunk/dist/game/data/scripts/quests/Q10345_DayOfDestinyDwarfsFate/30847-01.htm
new file mode 100644
index 0000000000..211948e67d
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10345_DayOfDestinyDwarfsFate/30847-01.htm
@@ -0,0 +1,4 @@
+Head Blacksmith Ferris:
+Hum, has the time come? Your name is quite well-known throughout these parts. They say your star is rising, and that we can entrust you with our clan's future. Those that are an a new stage normnally seek new strength. It is time you demonstrated that you are worthy of such expectations.
+
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10345_DayOfDestinyDwarfsFate/30847-02.htm b/trunk/dist/game/data/scripts/quests/Q10345_DayOfDestinyDwarfsFate/30847-02.htm
new file mode 100644
index 0000000000..3877711e74
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10345_DayOfDestinyDwarfsFate/30847-02.htm
@@ -0,0 +1,5 @@
+Head Blacksmith Ferris:
+I have been given a divine revelation of a new destiny for all who are qualified to represent the Blacksmith Guild. I judge you to be qualified in all aspects.
+The Blacksmith Guild is in a dire situation, and we need more candidates like you if we are to redeem ourselves for following the Goddess of Destruction. If you are ready to receive new powers and restore honor to our clan, accept this mission.
+
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10345_DayOfDestinyDwarfsFate/30847-03.htm b/trunk/dist/game/data/scripts/quests/Q10345_DayOfDestinyDwarfsFate/30847-03.htm
new file mode 100644
index 0000000000..7628bf2e72
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10345_DayOfDestinyDwarfsFate/30847-03.htm
@@ -0,0 +1,5 @@
+Head Blacksmith Ferris:
+You have surely heard of the Seal of Shilen, near to Aden Castle? The Goddess or Destruction has opened her evil eyes, and is strengthening her dark powers. She has already filled that place with evil energy, and her spirits are looking for an opportunity to take over Aden Castle.
+The Vanguard went to the underground lair where they believe the Spirits are coming from, but nothing has been heard from them in days. We are about to deploy a search team, and we would like you to accept the mission.
+
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10345_DayOfDestinyDwarfsFate/30847-04.htm b/trunk/dist/game/data/scripts/quests/Q10345_DayOfDestinyDwarfsFate/30847-04.htm
new file mode 100644
index 0000000000..7e6bceccf0
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10345_DayOfDestinyDwarfsFate/30847-04.htm
@@ -0,0 +1,4 @@
+Head Blacksmith Ferris:
+A person of your abilities, I don't doubt that you are well suited for this mission. From here, head toward the Seal of Shilen and the Cemetery, and look for the vanguard near the Evil Incubator. Don't forget that every step you take could change the future of our clan.
+
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10345_DayOfDestinyDwarfsFate/30847-05.html b/trunk/dist/game/data/scripts/quests/Q10345_DayOfDestinyDwarfsFate/30847-05.html
new file mode 100644
index 0000000000..9f80be8f60
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10345_DayOfDestinyDwarfsFate/30847-05.html
@@ -0,0 +1,3 @@
+Head Blacksmith Ferris:
+I'll explain again about the mission. First, go to Shilen's Seal and the Cemetary, find the vanguard, and help them. The quartermaster will probably be waiting for you.
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10345_DayOfDestinyDwarfsFate/30847-06.html b/trunk/dist/game/data/scripts/quests/Q10345_DayOfDestinyDwarfsFate/30847-06.html
new file mode 100644
index 0000000000..8adc4d142f
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10345_DayOfDestinyDwarfsFate/30847-06.html
@@ -0,0 +1,6 @@
+Head Blacksmith Ferris:
+Adolph has told me all about you. You were truly a sight to behold, I see. Well, it's time for you to be granted a new path, perhaps.
+I'll tell you more if you wish. Otherwise, I have a gift for you.
+
+
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10345_DayOfDestinyDwarfsFate/30847-07.html b/trunk/dist/game/data/scripts/quests/Q10345_DayOfDestinyDwarfsFate/30847-07.html
new file mode 100644
index 0000000000..b9cdb69f18
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10345_DayOfDestinyDwarfsFate/30847-07.html
@@ -0,0 +1,4 @@
+Head Blacksmith Ferris:
+So, you are ready? Absolutely sure?
+
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10345_DayOfDestinyDwarfsFate/30847-08.html b/trunk/dist/game/data/scripts/quests/Q10345_DayOfDestinyDwarfsFate/30847-08.html
new file mode 100644
index 0000000000..f075366cf1
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10345_DayOfDestinyDwarfsFate/30847-08.html
@@ -0,0 +1,3 @@
+Head Blacksmith Ferris:
+New destiny will open up your path.
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10345_DayOfDestinyDwarfsFate/33165-01.html b/trunk/dist/game/data/scripts/quests/Q10345_DayOfDestinyDwarfsFate/33165-01.html
new file mode 100644
index 0000000000..f2dc15b9d3
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10345_DayOfDestinyDwarfsFate/33165-01.html
@@ -0,0 +1,5 @@
+Aden Vanguard Member:
+High priest Orven, sent you to help, right? Great. The Captain ordered me to direct you to the underground crypt when you arrived. The soldiers are already there, battling monsters. Please hurry, they're going to need all the help they can get.
+Powerfull monsters are encamped there right now. So let me teleport you there. Otherwise, it would be too dangerous.
+
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10345_DayOfDestinyDwarfsFate/33407-01.html b/trunk/dist/game/data/scripts/quests/Q10345_DayOfDestinyDwarfsFate/33407-01.html
new file mode 100644
index 0000000000..5bb3811558
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10345_DayOfDestinyDwarfsFate/33407-01.html
@@ -0,0 +1,5 @@
+Quartermaster:
+Finally I've been waiting for Aden to send me backup for ages. Captain Adolph and his soldiers all went to the underground Evil Incubator to see about the monsters that have been flooding out of it, and I need help.
+Can you help?
+
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10345_DayOfDestinyDwarfsFate/33407-02.html b/trunk/dist/game/data/scripts/quests/Q10345_DayOfDestinyDwarfsFate/33407-02.html
new file mode 100644
index 0000000000..f21298afee
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10345_DayOfDestinyDwarfsFate/33407-02.html
@@ -0,0 +1,5 @@
+Quartermaster:
+So many monsters have broken through our lines, Captain Adolph and his men have pushed them back through a valiant fight, but casualties were unavoidable.
+We must pay the dead the respect of bringing their personal possessions back to their families, but we have no numbers to spare. Please, could you bring back 4 keepsakes from the bodies of Aden Vanguard Members in the Cemetary?
+It's horrible, but we haven't been able to retrieve the bodies. They're scattered all over the Cemetary, but your best bet would be to check the corners or the square guarded by the Grave Guards. It's between the Seal or Shilen and the Cemetary.
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10345_DayOfDestinyDwarfsFate/33407-03.html b/trunk/dist/game/data/scripts/quests/Q10345_DayOfDestinyDwarfsFate/33407-03.html
new file mode 100644
index 0000000000..8dfe9f6239
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10345_DayOfDestinyDwarfsFate/33407-03.html
@@ -0,0 +1,4 @@
+Quartermaster:
+Many Aden Vanguard Members have died at the Cemetary. Please bring back 4 keepsakes from their bodies.
+It's horrible, but we haven't been able to retrieve the bodies. They're scattered all over the Cemetary, but your be bet would be to check the corners of the square guarded by the Grave Guards. It's between the Seal of Shilen and the Cemetary.
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10345_DayOfDestinyDwarfsFate/33407-04.html b/trunk/dist/game/data/scripts/quests/Q10345_DayOfDestinyDwarfsFate/33407-04.html
new file mode 100644
index 0000000000..7791b746e7
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10345_DayOfDestinyDwarfsFate/33407-04.html
@@ -0,0 +1,5 @@
+Quartermaster:
+Yes, these are our fallen comrades' dog tags. Thank you. I'm sure the families will appreciate your hard work. Our heroes deserve to be remembered.
+Now, I don't think there's much else for you to do here. I'm worried about captain Adolph and the soldiers that went ahead to the monsters' base. I'm sure they could use some help there.
+
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10345_DayOfDestinyDwarfsFate/33407-05.html b/trunk/dist/game/data/scripts/quests/Q10345_DayOfDestinyDwarfsFate/33407-05.html
new file mode 100644
index 0000000000..77a2b30502
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10345_DayOfDestinyDwarfsFate/33407-05.html
@@ -0,0 +1,4 @@
+Quartermaster:
+Captain Adolph's team is in the underground crypt near the Cemetery, fighting monsters that resurrected through Shilen. Go and help him if you can. Powerful creatures are blocking the entrance to the crypt, so you'd better teleport through the Aden Vanguard Member standing behind me.
+Good luck, warrior of Aden.
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10345_DayOfDestinyDwarfsFate/Q10345_DayOfDestinyDwarfsFate.java b/trunk/dist/game/data/scripts/quests/Q10345_DayOfDestinyDwarfsFate/Q10345_DayOfDestinyDwarfsFate.java
new file mode 100644
index 0000000000..8b321fe86f
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10345_DayOfDestinyDwarfsFate/Q10345_DayOfDestinyDwarfsFate.java
@@ -0,0 +1,315 @@
+/*
+ * 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.Q10345_DayOfDestinyDwarfsFate;
+
+import com.l2jmobius.Config;
+import com.l2jmobius.gameserver.cache.HtmCache;
+import com.l2jmobius.gameserver.enums.QuestSound;
+import com.l2jmobius.gameserver.enums.Race;
+import com.l2jmobius.gameserver.model.actor.L2Npc;
+import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
+import com.l2jmobius.gameserver.model.events.EventType;
+import com.l2jmobius.gameserver.model.events.ListenerRegisterType;
+import com.l2jmobius.gameserver.model.events.annotations.RegisterEvent;
+import com.l2jmobius.gameserver.model.events.annotations.RegisterType;
+import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerLevelChanged;
+import com.l2jmobius.gameserver.model.quest.Quest;
+import com.l2jmobius.gameserver.model.quest.QuestState;
+import com.l2jmobius.gameserver.model.quest.State;
+import com.l2jmobius.gameserver.network.serverpackets.ExQuestNpcLogList;
+import com.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage;
+
+/**
+ * Day of Destiny: Dwarf's Fate (10345)
+ * @author Mobius
+ */
+public class Q10345_DayOfDestinyDwarfsFate extends Quest
+{
+ // NPCs
+ private static final int FERRIS = 30847;
+ private static final int QUARTERMASTER = 33407;
+ private static final int DEAD_SOLDIER_1 = 33166;
+ private static final int DEAD_SOLDIER_2 = 33167;
+ private static final int DEAD_SOLDIER_3 = 33168;
+ private static final int DEAD_SOLDIER_4 = 33169;
+ private static final int VANGUARD_MEMBER = 33165;
+ // Items
+ private static final int DEAD_SOLDIER_TAGS = 17752;
+ // Rewards
+ private static final int STEEL_DOOR_GUILD_COIN = 37045;
+ private static final int M_SOULSHOT_S = 22576;
+ private static final int M_SPIRITSHOT_S = 22607;
+ // Requirement
+ private static final int MIN_LEVEL = 76;
+
+ public Q10345_DayOfDestinyDwarfsFate()
+ {
+ super(10345, Q10345_DayOfDestinyDwarfsFate.class.getSimpleName(), "Day of Destiny: Dwarf's Fate");
+ addStartNpc(FERRIS);
+ addTalkId(FERRIS, QUARTERMASTER, DEAD_SOLDIER_1, DEAD_SOLDIER_2, DEAD_SOLDIER_3, DEAD_SOLDIER_4, VANGUARD_MEMBER);
+ registerQuestItems(DEAD_SOLDIER_TAGS);
+ addCondMinLevel(MIN_LEVEL, "no_level.html");
+ addCondRace(Race.DWARF, "no_race.html");
+ }
+
+ @Override
+ public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
+ {
+ final QuestState qs = getQuestState(player, false);
+ if (qs == null)
+ {
+ return null;
+ }
+
+ String htmltext = null;
+ switch (event)
+ {
+ case "30847-02.htm":
+ case "30847-03.htm":
+ case "30847-04.htm":
+ case "30847-06.html":
+ case "30847-07.html":
+ {
+ htmltext = event;
+ break;
+ }
+ case "30847-05.html":
+ {
+ qs.startQuest();
+ qs.setCond(2); // arrow hack
+ qs.setCond(1);
+ htmltext = event;
+ break;
+ }
+ case "33407-02.html":
+ {
+ if (qs.isCond(1))
+ {
+ qs.setCond(2, true);
+ htmltext = event;
+ }
+ break;
+ }
+ case "dead_collect.html":
+ {
+ if (qs.isCond(2))
+ {
+ if (qs.get("" + npc.getId()) == null)
+ {
+ qs.set("" + npc.getId(), 1);
+ giveItems(player, DEAD_SOLDIER_TAGS, 1);
+ playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
+
+ }
+ final int count = qs.getMemoState() + 1;
+ if (count >= 4)
+ {
+ qs.setCond(3, true);
+ qs.unset("" + DEAD_SOLDIER_1);
+ qs.unset("" + DEAD_SOLDIER_2);
+ qs.unset("" + DEAD_SOLDIER_3);
+ qs.unset("" + DEAD_SOLDIER_4);
+ htmltext = "dead_complete.html";
+ }
+ else
+ {
+ qs.setMemoState(count);
+ final ExQuestNpcLogList log = new ExQuestNpcLogList(getId());
+ log.addItem(DEAD_SOLDIER_TAGS, count);
+ player.sendPacket(log);
+ htmltext = event;
+ }
+ }
+ break;
+ }
+ case "33407-05.html":
+ {
+ if (qs.isCond(3))
+ {
+ takeItems(player, DEAD_SOLDIER_TAGS, -1);
+ qs.setCond(4, true);
+ htmltext = event;
+ }
+ break;
+ }
+ case "transfer_info":
+ {
+ if (qs.isCond(13))
+ {
+ switch (player.getClassId().getId())
+ {
+ // TODO: Return detail htmls.
+ }
+ }
+ break;
+ }
+ case "30847-08.html":
+ {
+ if (qs.isCond(13))
+ {
+ switch (player.getClassId().getId())
+ {
+ // Bounty Hunter -> Fortune Seeker
+ case 55:
+ {
+ player.setBaseClassId(117);
+ player.setClassId(117);
+ break;
+ }
+ // Warsmith -> Maestro
+ case 57:
+ {
+ player.setBaseClassId(118);
+ player.setClassId(118);
+ break;
+ }
+ }
+ rewardItems(player, STEEL_DOOR_GUILD_COIN, 87);
+ rewardItems(player, M_SOULSHOT_S, 1);
+ rewardItems(player, M_SPIRITSHOT_S, 1);
+ addExpAndSp(player, 2050000, 0);
+ player.broadcastUserInfo();
+ qs.exitQuest(false, true);
+ }
+ break;
+ }
+ }
+ return htmltext;
+ }
+
+ @Override
+ public String onTalk(L2Npc npc, L2PcInstance player)
+ {
+ final QuestState qs = getQuestState(player, true);
+ String htmltext = getNoQuestMsg(player);
+
+ switch (qs.getState())
+ {
+ case State.STARTED:
+ {
+ switch (npc.getId())
+ {
+ case FERRIS:
+ {
+ if (qs.isCond(1))
+ {
+ htmltext = "30847-05.html";
+ }
+ else if (qs.isCond(13))
+ {
+ htmltext = "30847-06.html";
+ }
+ break;
+ }
+ case QUARTERMASTER:
+ {
+ switch (qs.getCond())
+ {
+ case 1:
+ {
+ htmltext = "33407-01.html";
+ break;
+ }
+ case 2:
+ {
+ htmltext = "33407-03.html";
+ break;
+ }
+ case 3:
+ {
+ htmltext = "33407-04.html";
+ break;
+ }
+ case 4:
+ {
+ htmltext = "33407-05.html";
+ break;
+ }
+ }
+ break;
+ }
+ case DEAD_SOLDIER_1:
+ case DEAD_SOLDIER_2:
+ case DEAD_SOLDIER_3:
+ case DEAD_SOLDIER_4:
+ {
+ if (qs.isCond(2))
+ {
+ if (qs.get("" + npc.getId()) == null)
+ {
+ htmltext = "dead_soldier.html";
+ }
+ else
+ {
+ htmltext = "dead_collect.html";
+ }
+ }
+ else if (qs.isCond(3))
+ {
+ htmltext = "dead_complete.html";
+ }
+ break;
+ }
+ case VANGUARD_MEMBER:
+ {
+ if ((qs.getCond() > 3) && (qs.getCond() < 13))
+ {
+ htmltext = "33165-01.html";
+ }
+ break;
+ }
+ }
+ break;
+ }
+ case State.CREATED:
+ {
+ if ((npc.getId() == FERRIS) && !player.isSubClassActive() && !player.isDualClassActive() && (player.getClassId().level() == 2))
+ {
+ htmltext = "30847-01.htm";
+ }
+ break;
+ }
+ case State.COMPLETED:
+ {
+ htmltext = getAlreadyCompletedMsg(player);
+ break;
+ }
+ }
+ return htmltext;
+ }
+
+ @RegisterEvent(EventType.ON_PLAYER_LEVEL_CHANGED)
+ @RegisterType(ListenerRegisterType.GLOBAL)
+ public void OnPlayerLevelChanged(OnPlayerLevelChanged event)
+ {
+ if (Config.DISABLE_TUTORIAL)
+ {
+ return;
+ }
+ final L2PcInstance player = event.getActiveChar();
+ if ((player.getLevel() >= MIN_LEVEL) && (player.getRace() == Race.DWARF))
+ {
+ final QuestState qs = getQuestState(player, false);
+ if (qs == null)
+ {
+ final NpcHtmlMessage html = new NpcHtmlMessage();
+ html.setHtml(HtmCache.getInstance().getHtm(player.getHtmlPrefix(), "scripts/quests/Q10345_DayOfDestinyDwarfsFate/announce.html"));
+ player.sendPacket(html);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10345_DayOfDestinyDwarfsFate/announce.html b/trunk/dist/game/data/scripts/quests/Q10345_DayOfDestinyDwarfsFate/announce.html
new file mode 100644
index 0000000000..da98169e40
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10345_DayOfDestinyDwarfsFate/announce.html
@@ -0,0 +1,6 @@
+Head Blacksmith Ferris:
+So the Goddess of Death has opened her malicious eyes, at last. Shilen's vile creatures are rampaging all over Aden Castle. I heard a vanguard force from Aden Castle set out to eradicate those monsters and found an underground lair near the Seal of Shilen. But the problem is that we haven't heard anything from them since then. So we're arranging to send a search party after them, and I hope you who of renown could help us with this mission. If you do, I'll help you gain greater powers.
+I shall be waiting for you in the Blacksmith Shop in the Town of Aden. Do not be led astray from your fated duty.
+(When your level is 76 or higher, you can complete the third class transfer)
+
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10345_DayOfDestinyDwarfsFate/dead_collect.html b/trunk/dist/game/data/scripts/quests/Q10345_DayOfDestinyDwarfsFate/dead_collect.html
new file mode 100644
index 0000000000..3bbbcb4743
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10345_DayOfDestinyDwarfsFate/dead_collect.html
@@ -0,0 +1,3 @@
+Aden Vanguard Corpse:
+(You collected the dog tag from this soldier.)
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10345_DayOfDestinyDwarfsFate/dead_complete.html b/trunk/dist/game/data/scripts/quests/Q10345_DayOfDestinyDwarfsFate/dead_complete.html
new file mode 100644
index 0000000000..ed72abd87c
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10345_DayOfDestinyDwarfsFate/dead_complete.html
@@ -0,0 +1,3 @@
+Aden Vanguard Corpse:
+(You collected a dog tag from the corpse. You now have all you need and can return to the Aden Supplier.)
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10345_DayOfDestinyDwarfsFate/dead_soldier.html b/trunk/dist/game/data/scripts/quests/Q10345_DayOfDestinyDwarfsFate/dead_soldier.html
new file mode 100644
index 0000000000..4da30c6261
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10345_DayOfDestinyDwarfsFate/dead_soldier.html
@@ -0,0 +1,4 @@
+Aden Vanguard Corpse:
+(It looks like this is one of the fallen soldiers the Vanguard quartermaster was talking about.)
+
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10345_DayOfDestinyDwarfsFate/no_level.html b/trunk/dist/game/data/scripts/quests/Q10345_DayOfDestinyDwarfsFate/no_level.html
new file mode 100644
index 0000000000..6a1166f873
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10345_DayOfDestinyDwarfsFate/no_level.html
@@ -0,0 +1,3 @@
+I don't talk to youngsters. Come back when you've grown up a bit more.
+(This quest can only be taken by a character of level 76 or above.)
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10345_DayOfDestinyDwarfsFate/no_race.html b/trunk/dist/game/data/scripts/quests/Q10345_DayOfDestinyDwarfsFate/no_race.html
new file mode 100644
index 0000000000..a28cade14d
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10345_DayOfDestinyDwarfsFate/no_race.html
@@ -0,0 +1 @@
+You are either not on a quest that involves this NPC, or you don't meet this NPC's minimum quest requirements.
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10346_DayOfDestinyKamaelsFate/32221-01.htm b/trunk/dist/game/data/scripts/quests/Q10346_DayOfDestinyKamaelsFate/32221-01.htm
new file mode 100644
index 0000000000..c7de9c3d26
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10346_DayOfDestinyKamaelsFate/32221-01.htm
@@ -0,0 +1,4 @@
+Grand Master Brome:
+Hum, has the time come? Your name is quite well-known throughout these parts. They say your star is rising, and that we can entrust you with our clan's future. Those that are an a new stage normnally seek new strength. It is time you demonstrated that you are worthy of such expectations.
+
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10346_DayOfDestinyKamaelsFate/32221-02.htm b/trunk/dist/game/data/scripts/quests/Q10346_DayOfDestinyKamaelsFate/32221-02.htm
new file mode 100644
index 0000000000..95e36382b1
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10346_DayOfDestinyKamaelsFate/32221-02.htm
@@ -0,0 +1,5 @@
+Grand Master Brome:
+I have been given a divine revelation of a new destiny for all who are qualified to represent the Kamael Clan. I judge you to be qualified in all aspects.
+Our Kamael Clan is in a dire situation, and we need more candidates like you if we are to redeem ourselves for following the Goddess of Destruction. If you are ready to receive new powers and restore honor to our clan, accept this mission.
+
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10346_DayOfDestinyKamaelsFate/32221-03.htm b/trunk/dist/game/data/scripts/quests/Q10346_DayOfDestinyKamaelsFate/32221-03.htm
new file mode 100644
index 0000000000..3ffc4149a2
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10346_DayOfDestinyKamaelsFate/32221-03.htm
@@ -0,0 +1,5 @@
+Grand Master Brome:
+You have surely heard of the Seal of Shilen, near to Aden Castle? The Goddess or Destruction has opened her evil eyes, and is strengthening her dark powers. She has already filled that place with evil energy, and her spirits are looking for an opportunity to take over Aden Castle.
+The Vanguard went to the underground lair where they believe the Spirits are coming from, but nothing has been heard from them in days. We are about to deploy a search team, and we would like you to accept the mission.
+
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10346_DayOfDestinyKamaelsFate/32221-04.htm b/trunk/dist/game/data/scripts/quests/Q10346_DayOfDestinyKamaelsFate/32221-04.htm
new file mode 100644
index 0000000000..e50f71b0f6
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10346_DayOfDestinyKamaelsFate/32221-04.htm
@@ -0,0 +1,4 @@
+Grand Master Brome:
+A person of your abilities, I don't doubt that you are well suited for this mission. From here, head toward the Seal of Shilen and the Cemetery, and look for the vanguard near the Evil Incubator. Don't forget that every step you take could change the future of our clan.
+
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10346_DayOfDestinyKamaelsFate/32221-05.html b/trunk/dist/game/data/scripts/quests/Q10346_DayOfDestinyKamaelsFate/32221-05.html
new file mode 100644
index 0000000000..a9e17ed925
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10346_DayOfDestinyKamaelsFate/32221-05.html
@@ -0,0 +1,3 @@
+Grand Master Brome:
+I'll explain again about the mission. First, go to Shilen's Seal and the Cemetary, find the vanguard, and help them. The quartermaster will probably be waiting for you.
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10346_DayOfDestinyKamaelsFate/32221-06.html b/trunk/dist/game/data/scripts/quests/Q10346_DayOfDestinyKamaelsFate/32221-06.html
new file mode 100644
index 0000000000..35f2149a09
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10346_DayOfDestinyKamaelsFate/32221-06.html
@@ -0,0 +1,6 @@
+Grand Master Brome:
+Adolph has told me all about you. You were truly a sight to behold, I see. Well, it's time for you to be granted a new path, perhaps.
+I'll tell you more if you wish. Otherwise, I have a gift for you.
+
+
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10346_DayOfDestinyKamaelsFate/32221-07.html b/trunk/dist/game/data/scripts/quests/Q10346_DayOfDestinyKamaelsFate/32221-07.html
new file mode 100644
index 0000000000..f73e393401
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10346_DayOfDestinyKamaelsFate/32221-07.html
@@ -0,0 +1,4 @@
+Grand Master Brome:
+So, you are ready? Absolutely sure?
+
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10346_DayOfDestinyKamaelsFate/32221-08.html b/trunk/dist/game/data/scripts/quests/Q10346_DayOfDestinyKamaelsFate/32221-08.html
new file mode 100644
index 0000000000..f7d850e523
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10346_DayOfDestinyKamaelsFate/32221-08.html
@@ -0,0 +1,3 @@
+Grand Master Brome:
+New destiny will open up your path.
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10346_DayOfDestinyKamaelsFate/33165-01.html b/trunk/dist/game/data/scripts/quests/Q10346_DayOfDestinyKamaelsFate/33165-01.html
new file mode 100644
index 0000000000..f2dc15b9d3
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10346_DayOfDestinyKamaelsFate/33165-01.html
@@ -0,0 +1,5 @@
+Aden Vanguard Member:
+High priest Orven, sent you to help, right? Great. The Captain ordered me to direct you to the underground crypt when you arrived. The soldiers are already there, battling monsters. Please hurry, they're going to need all the help they can get.
+Powerfull monsters are encamped there right now. So let me teleport you there. Otherwise, it would be too dangerous.
+
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10346_DayOfDestinyKamaelsFate/33407-01.html b/trunk/dist/game/data/scripts/quests/Q10346_DayOfDestinyKamaelsFate/33407-01.html
new file mode 100644
index 0000000000..5d017fbfa2
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10346_DayOfDestinyKamaelsFate/33407-01.html
@@ -0,0 +1,5 @@
+Quartermaster:
+Finally I've been waiting for Aden to send me backup for ages. Captain Adolph and his soldiers all went to the underground Evil Incubator to see about the monsters that have been flooding out of it, and I need help.
+Can you help?
+
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10346_DayOfDestinyKamaelsFate/33407-02.html b/trunk/dist/game/data/scripts/quests/Q10346_DayOfDestinyKamaelsFate/33407-02.html
new file mode 100644
index 0000000000..f21298afee
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10346_DayOfDestinyKamaelsFate/33407-02.html
@@ -0,0 +1,5 @@
+Quartermaster:
+So many monsters have broken through our lines, Captain Adolph and his men have pushed them back through a valiant fight, but casualties were unavoidable.
+We must pay the dead the respect of bringing their personal possessions back to their families, but we have no numbers to spare. Please, could you bring back 4 keepsakes from the bodies of Aden Vanguard Members in the Cemetary?
+It's horrible, but we haven't been able to retrieve the bodies. They're scattered all over the Cemetary, but your best bet would be to check the corners or the square guarded by the Grave Guards. It's between the Seal or Shilen and the Cemetary.
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10346_DayOfDestinyKamaelsFate/33407-03.html b/trunk/dist/game/data/scripts/quests/Q10346_DayOfDestinyKamaelsFate/33407-03.html
new file mode 100644
index 0000000000..8dfe9f6239
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10346_DayOfDestinyKamaelsFate/33407-03.html
@@ -0,0 +1,4 @@
+Quartermaster:
+Many Aden Vanguard Members have died at the Cemetary. Please bring back 4 keepsakes from their bodies.
+It's horrible, but we haven't been able to retrieve the bodies. They're scattered all over the Cemetary, but your be bet would be to check the corners of the square guarded by the Grave Guards. It's between the Seal of Shilen and the Cemetary.
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10346_DayOfDestinyKamaelsFate/33407-04.html b/trunk/dist/game/data/scripts/quests/Q10346_DayOfDestinyKamaelsFate/33407-04.html
new file mode 100644
index 0000000000..97bf530f82
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10346_DayOfDestinyKamaelsFate/33407-04.html
@@ -0,0 +1,5 @@
+Quartermaster:
+Yes, these are our fallen comrades' dog tags. Thank you. I'm sure the families will appreciate your hard work. Our heroes deserve to be remembered.
+Now, I don't think there's much else for you to do here. I'm worried about captain Adolph and the soldiers that went ahead to the monsters' base. I'm sure they could use some help there.
+
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10346_DayOfDestinyKamaelsFate/33407-05.html b/trunk/dist/game/data/scripts/quests/Q10346_DayOfDestinyKamaelsFate/33407-05.html
new file mode 100644
index 0000000000..77a2b30502
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10346_DayOfDestinyKamaelsFate/33407-05.html
@@ -0,0 +1,4 @@
+Quartermaster:
+Captain Adolph's team is in the underground crypt near the Cemetery, fighting monsters that resurrected through Shilen. Go and help him if you can. Powerful creatures are blocking the entrance to the crypt, so you'd better teleport through the Aden Vanguard Member standing behind me.
+Good luck, warrior of Aden.
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10346_DayOfDestinyKamaelsFate/Q10346_DayOfDestinyKamaelsFate.java b/trunk/dist/game/data/scripts/quests/Q10346_DayOfDestinyKamaelsFate/Q10346_DayOfDestinyKamaelsFate.java
new file mode 100644
index 0000000000..0fddad5860
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10346_DayOfDestinyKamaelsFate/Q10346_DayOfDestinyKamaelsFate.java
@@ -0,0 +1,329 @@
+/*
+ * 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.Q10346_DayOfDestinyKamaelsFate;
+
+import com.l2jmobius.Config;
+import com.l2jmobius.gameserver.cache.HtmCache;
+import com.l2jmobius.gameserver.enums.QuestSound;
+import com.l2jmobius.gameserver.enums.Race;
+import com.l2jmobius.gameserver.model.actor.L2Npc;
+import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
+import com.l2jmobius.gameserver.model.events.EventType;
+import com.l2jmobius.gameserver.model.events.ListenerRegisterType;
+import com.l2jmobius.gameserver.model.events.annotations.RegisterEvent;
+import com.l2jmobius.gameserver.model.events.annotations.RegisterType;
+import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerLevelChanged;
+import com.l2jmobius.gameserver.model.quest.Quest;
+import com.l2jmobius.gameserver.model.quest.QuestState;
+import com.l2jmobius.gameserver.model.quest.State;
+import com.l2jmobius.gameserver.network.serverpackets.ExQuestNpcLogList;
+import com.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage;
+
+/**
+ * Day of Destiny: Kamael's Fate (10346)
+ * @author Mobius
+ */
+public class Q10346_DayOfDestinyKamaelsFate extends Quest
+{
+ // NPCs
+ private static final int OLTRAN = 32221;
+ private static final int QUARTERMASTER = 33407;
+ private static final int DEAD_SOLDIER_1 = 33166;
+ private static final int DEAD_SOLDIER_2 = 33167;
+ private static final int DEAD_SOLDIER_3 = 33168;
+ private static final int DEAD_SOLDIER_4 = 33169;
+ private static final int VANGUARD_MEMBER = 33165;
+ // Items
+ private static final int DEAD_SOLDIER_TAGS = 17753;
+ // Rewards
+ private static final int STEEL_DOOR_GUILD_COIN = 37045;
+ private static final int M_SOULSHOT_S = 22576;
+ private static final int M_SPIRITSHOT_S = 22607;
+ // Requirement
+ private static final int MIN_LEVEL = 76;
+
+ public Q10346_DayOfDestinyKamaelsFate()
+ {
+ super(10346, Q10346_DayOfDestinyKamaelsFate.class.getSimpleName(), "Day of Destiny: Kamael's Fate");
+ addStartNpc(OLTRAN);
+ addTalkId(OLTRAN, QUARTERMASTER, DEAD_SOLDIER_1, DEAD_SOLDIER_2, DEAD_SOLDIER_3, DEAD_SOLDIER_4, VANGUARD_MEMBER);
+ registerQuestItems(DEAD_SOLDIER_TAGS);
+ addCondMinLevel(MIN_LEVEL, "no_level.html");
+ addCondRace(Race.KAMAEL, "no_race.html");
+ }
+
+ @Override
+ public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
+ {
+ final QuestState qs = getQuestState(player, false);
+ if (qs == null)
+ {
+ return null;
+ }
+
+ String htmltext = null;
+ switch (event)
+ {
+ case "32221-02.htm":
+ case "32221-03.htm":
+ case "32221-04.htm":
+ case "32221-06.html":
+ case "32221-07.html":
+ {
+ htmltext = event;
+ break;
+ }
+ case "32221-05.html":
+ {
+ qs.startQuest();
+ qs.setCond(2); // arrow hack
+ qs.setCond(1);
+ htmltext = event;
+ break;
+ }
+ case "33407-02.html":
+ {
+ if (qs.isCond(1))
+ {
+ qs.setCond(2, true);
+ htmltext = event;
+ }
+ break;
+ }
+ case "dead_collect.html":
+ {
+ if (qs.isCond(2))
+ {
+ if (qs.get("" + npc.getId()) == null)
+ {
+ qs.set("" + npc.getId(), 1);
+ giveItems(player, DEAD_SOLDIER_TAGS, 1);
+ playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
+
+ }
+ final int count = qs.getMemoState() + 1;
+ if (count >= 4)
+ {
+ qs.setCond(3, true);
+ qs.unset("" + DEAD_SOLDIER_1);
+ qs.unset("" + DEAD_SOLDIER_2);
+ qs.unset("" + DEAD_SOLDIER_3);
+ qs.unset("" + DEAD_SOLDIER_4);
+ htmltext = "dead_complete.html";
+ }
+ else
+ {
+ qs.setMemoState(count);
+ final ExQuestNpcLogList log = new ExQuestNpcLogList(getId());
+ log.addItem(DEAD_SOLDIER_TAGS, count);
+ player.sendPacket(log);
+ htmltext = event;
+ }
+ }
+ break;
+ }
+ case "33407-05.html":
+ {
+ if (qs.isCond(3))
+ {
+ takeItems(player, DEAD_SOLDIER_TAGS, -1);
+ qs.setCond(4, true);
+ htmltext = event;
+ }
+ break;
+ }
+ case "transfer_info":
+ {
+ if (qs.isCond(13))
+ {
+ switch (player.getClassId().getId())
+ {
+ // TODO: Return detail htmls.
+ }
+ }
+ break;
+ }
+ case "32221-08.html":
+ {
+ if (qs.isCond(13))
+ {
+ switch (player.getClassId().getId())
+ {
+ // Berserker -> Doombringer
+ case 127:
+ {
+ player.setBaseClassId(131);
+ player.setClassId(131);
+ break;
+ }
+ // Soul Breaker -> Soul Hound (Male)
+ case 128:
+ {
+ player.setBaseClassId(132);
+ player.setClassId(132);
+ break;
+ }
+ // Soul Breaker -> Soul Hound (Female)
+ case 129:
+ {
+ player.setBaseClassId(133);
+ player.setClassId(133);
+ break;
+ }
+ // Arbalester -> Trickster
+ case 130:
+ {
+ player.setBaseClassId(134);
+ player.setClassId(134);
+ break;
+ }
+ }
+ rewardItems(player, STEEL_DOOR_GUILD_COIN, 87);
+ rewardItems(player, M_SOULSHOT_S, 1);
+ rewardItems(player, M_SPIRITSHOT_S, 1);
+ addExpAndSp(player, 2050000, 0);
+ player.broadcastUserInfo();
+ qs.exitQuest(false, true);
+ }
+ break;
+ }
+ }
+ return htmltext;
+ }
+
+ @Override
+ public String onTalk(L2Npc npc, L2PcInstance player)
+ {
+ final QuestState qs = getQuestState(player, true);
+ String htmltext = getNoQuestMsg(player);
+
+ switch (qs.getState())
+ {
+ case State.STARTED:
+ {
+ switch (npc.getId())
+ {
+ case OLTRAN:
+ {
+ if (qs.isCond(1))
+ {
+ htmltext = "32221-05.html";
+ }
+ else if (qs.isCond(13))
+ {
+ htmltext = "32221-06.html";
+ }
+ break;
+ }
+ case QUARTERMASTER:
+ {
+ switch (qs.getCond())
+ {
+ case 1:
+ {
+ htmltext = "33407-01.html";
+ break;
+ }
+ case 2:
+ {
+ htmltext = "33407-03.html";
+ break;
+ }
+ case 3:
+ {
+ htmltext = "33407-04.html";
+ break;
+ }
+ case 4:
+ {
+ htmltext = "33407-05.html";
+ break;
+ }
+ }
+ break;
+ }
+ case DEAD_SOLDIER_1:
+ case DEAD_SOLDIER_2:
+ case DEAD_SOLDIER_3:
+ case DEAD_SOLDIER_4:
+ {
+ if (qs.isCond(2))
+ {
+ if (qs.get("" + npc.getId()) == null)
+ {
+ htmltext = "dead_soldier.html";
+ }
+ else
+ {
+ htmltext = "dead_collect.html";
+ }
+ }
+ else if (qs.isCond(3))
+ {
+ htmltext = "dead_complete.html";
+ }
+ break;
+ }
+ case VANGUARD_MEMBER:
+ {
+ if ((qs.getCond() > 3) && (qs.getCond() < 13))
+ {
+ htmltext = "33165-01.html";
+ }
+ break;
+ }
+ }
+ break;
+ }
+ case State.CREATED:
+ {
+ if ((npc.getId() == OLTRAN) && !player.isSubClassActive() && !player.isDualClassActive() && (player.getClassId().level() == 2))
+ {
+ htmltext = "32221-01.htm";
+ }
+ break;
+ }
+ case State.COMPLETED:
+ {
+ htmltext = getAlreadyCompletedMsg(player);
+ break;
+ }
+ }
+ return htmltext;
+ }
+
+ @RegisterEvent(EventType.ON_PLAYER_LEVEL_CHANGED)
+ @RegisterType(ListenerRegisterType.GLOBAL)
+ public void OnPlayerLevelChanged(OnPlayerLevelChanged event)
+ {
+ if (Config.DISABLE_TUTORIAL)
+ {
+ return;
+ }
+ final L2PcInstance player = event.getActiveChar();
+ if ((player.getLevel() >= MIN_LEVEL) && (player.getRace() == Race.KAMAEL))
+ {
+ final QuestState qs = getQuestState(player, false);
+ if (qs == null)
+ {
+ final NpcHtmlMessage html = new NpcHtmlMessage();
+ html.setHtml(HtmCache.getInstance().getHtm(player.getHtmlPrefix(), "scripts/quests/Q10346_DayOfDestinyKamaelsFate/announce.html"));
+ player.sendPacket(html);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10346_DayOfDestinyKamaelsFate/announce.html b/trunk/dist/game/data/scripts/quests/Q10346_DayOfDestinyKamaelsFate/announce.html
new file mode 100644
index 0000000000..2c570bfcbc
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10346_DayOfDestinyKamaelsFate/announce.html
@@ -0,0 +1,6 @@
+Grand Master Brome:
+So the Goddess of Death has opened her malicious eyes, at last. Shilen's vile creatures are rampaging all over Aden Castle. I heard a vanguard force from Aden Castle set out to eradicate those monsters and found an underground lair near the Seal of Shilen. But the problem is that we haven't heard anything from them since then. So we're arranging to send a search party after them, and I hope you who of renown could help us with this mission. If you do, I'll help you gain greater powers.
+I shall be waiting for you in the Kamael Guild in the Town of Aden. Do not be led astray from your fated duty.
+(When your level is 76 or higher, you can complete the third class transfer)
+
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10346_DayOfDestinyKamaelsFate/dead_collect.html b/trunk/dist/game/data/scripts/quests/Q10346_DayOfDestinyKamaelsFate/dead_collect.html
new file mode 100644
index 0000000000..3bbbcb4743
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10346_DayOfDestinyKamaelsFate/dead_collect.html
@@ -0,0 +1,3 @@
+Aden Vanguard Corpse:
+(You collected the dog tag from this soldier.)
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10346_DayOfDestinyKamaelsFate/dead_complete.html b/trunk/dist/game/data/scripts/quests/Q10346_DayOfDestinyKamaelsFate/dead_complete.html
new file mode 100644
index 0000000000..ed72abd87c
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10346_DayOfDestinyKamaelsFate/dead_complete.html
@@ -0,0 +1,3 @@
+Aden Vanguard Corpse:
+(You collected a dog tag from the corpse. You now have all you need and can return to the Aden Supplier.)
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10346_DayOfDestinyKamaelsFate/dead_soldier.html b/trunk/dist/game/data/scripts/quests/Q10346_DayOfDestinyKamaelsFate/dead_soldier.html
new file mode 100644
index 0000000000..42eb175b78
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10346_DayOfDestinyKamaelsFate/dead_soldier.html
@@ -0,0 +1,4 @@
+Aden Vanguard Corpse:
+(It looks like this is one of the fallen soldiers the Vanguard quartermaster was talking about.)
+
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10346_DayOfDestinyKamaelsFate/no_level.html b/trunk/dist/game/data/scripts/quests/Q10346_DayOfDestinyKamaelsFate/no_level.html
new file mode 100644
index 0000000000..6a1166f873
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10346_DayOfDestinyKamaelsFate/no_level.html
@@ -0,0 +1,3 @@
+I don't talk to youngsters. Come back when you've grown up a bit more.
+(This quest can only be taken by a character of level 76 or above.)
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10346_DayOfDestinyKamaelsFate/no_race.html b/trunk/dist/game/data/scripts/quests/Q10346_DayOfDestinyKamaelsFate/no_race.html
new file mode 100644
index 0000000000..a28cade14d
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10346_DayOfDestinyKamaelsFate/no_race.html
@@ -0,0 +1 @@
+You are either not on a quest that involves this NPC, or you don't meet this NPC's minimum quest requirements.
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/QuestMasterHandler.java b/trunk/dist/game/data/scripts/quests/QuestMasterHandler.java
index fd256be342..e5148f3c72 100644
--- a/trunk/dist/game/data/scripts/quests/QuestMasterHandler.java
+++ b/trunk/dist/game/data/scripts/quests/QuestMasterHandler.java
@@ -223,6 +223,12 @@ import quests.Q10335_RequestToFindSakum.Q10335_RequestToFindSakum;
import quests.Q10336_DividedSakumKanilov.Q10336_DividedSakumKanilov;
import quests.Q10337_SakumsInfluence.Q10337_SakumsInfluence;
import quests.Q10338_SeizeYourDestiny.Q10338_SeizeYourDestiny;
+import quests.Q10341_DayOfDestinyHumansFate.Q10341_DayOfDestinyHumansFate;
+import quests.Q10342_DayOfDestinyElvenFate.Q10342_DayOfDestinyElvenFate;
+import quests.Q10343_DayOfDestinyDarkElfsFate.Q10343_DayOfDestinyDarkElfsFate;
+import quests.Q10344_DayOfDestinyOrcsFate.Q10344_DayOfDestinyOrcsFate;
+import quests.Q10345_DayOfDestinyDwarfsFate.Q10345_DayOfDestinyDwarfsFate;
+import quests.Q10346_DayOfDestinyKamaelsFate.Q10346_DayOfDestinyKamaelsFate;
import quests.Q10358_DividedSakumPoslof.Q10358_DividedSakumPoslof;
import quests.Q10359_SakumsTrace.Q10359_SakumsTrace;
import quests.Q10360_CertificationOfFate.Q10360_CertificationOfFate;
@@ -497,6 +503,12 @@ final class QuestMasterHandler
Q10336_DividedSakumKanilov.class,
Q10337_SakumsInfluence.class,
Q10338_SeizeYourDestiny.class,
+ Q10341_DayOfDestinyHumansFate.class,
+ Q10342_DayOfDestinyElvenFate.class,
+ Q10343_DayOfDestinyDarkElfsFate.class,
+ Q10344_DayOfDestinyOrcsFate.class,
+ Q10345_DayOfDestinyDwarfsFate.class,
+ Q10346_DayOfDestinyKamaelsFate.class,
Q10358_DividedSakumPoslof.class,
Q10359_SakumsTrace.class,
Q10360_CertificationOfFate.class,
diff --git a/trunk/dist/game/data/stats/items/17700-17799.xml b/trunk/dist/game/data/stats/items/17700-17799.xml
index ae2a9eafba..2e37f29d4c 100644
--- a/trunk/dist/game/data/stats/items/17700-17799.xml
+++ b/trunk/dist/game/data/stats/items/17700-17799.xml
@@ -539,6 +539,7 @@
+
@@ -551,6 +552,7 @@
+
@@ -563,6 +565,7 @@
+
@@ -575,6 +578,7 @@
+
@@ -587,6 +591,7 @@
+
@@ -599,6 +604,7 @@
+
diff --git a/trunk/dist/game/data/stats/items/22500-22599.xml b/trunk/dist/game/data/stats/items/22500-22599.xml
index 6a569a7de5..fb1636274b 100644
--- a/trunk/dist/game/data/stats/items/22500-22599.xml
+++ b/trunk/dist/game/data/stats/items/22500-22599.xml
@@ -990,11 +990,15 @@
+
+
+
+
diff --git a/trunk/dist/game/data/stats/items/22600-22699.xml b/trunk/dist/game/data/stats/items/22600-22699.xml
index 93c6e70f4f..ebaacfdcf1 100644
--- a/trunk/dist/game/data/stats/items/22600-22699.xml
+++ b/trunk/dist/game/data/stats/items/22600-22699.xml
@@ -87,12 +87,17 @@
+
+
+
+
+
diff --git a/trunk/dist/game/data/stats/npcs/33400-33499.xml b/trunk/dist/game/data/stats/npcs/33400-33499.xml
index f064611bd9..a3d72f0712 100644
--- a/trunk/dist/game/data/stats/npcs/33400-33499.xml
+++ b/trunk/dist/game/data/stats/npcs/33400-33499.xml
@@ -400,7 +400,7 @@
500
-
+
diff --git a/trunk/dist/game/data/stats/skills/22300-22399.xml b/trunk/dist/game/data/stats/skills/22300-22399.xml
index 6f178c2db7..e7379ab4a7 100644
--- a/trunk/dist/game/data/stats/skills/22300-22399.xml
+++ b/trunk/dist/game/data/stats/skills/22300-22399.xml
@@ -384,14 +384,40 @@
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/trunk/java/com/l2jmobius/gameserver/network/serverpackets/ExQuestNpcLogList.java b/trunk/java/com/l2jmobius/gameserver/network/serverpackets/ExQuestNpcLogList.java
index 605727544d..ee116cd7bf 100644
--- a/trunk/java/com/l2jmobius/gameserver/network/serverpackets/ExQuestNpcLogList.java
+++ b/trunk/java/com/l2jmobius/gameserver/network/serverpackets/ExQuestNpcLogList.java
@@ -40,6 +40,11 @@ public class ExQuestNpcLogList extends L2GameServerPacket
_npcLogList.add(new NpcLogListHolder(npcId, false, count));
}
+ public void addItem(int itemId, int count)
+ {
+ _npcLogList.add(new NpcLogListHolder(itemId, false, count));
+ }
+
public void addNpcString(NpcStringId npcStringId, int count)
{
_npcLogList.add(new NpcLogListHolder(npcStringId.getId(), true, count));