diff --git a/trunk/dist/game/data/scripts/quests/MissingQuests.txt b/trunk/dist/game/data/scripts/quests/MissingQuests.txt index 28e9c1bca8..a34a1ff3fb 100644 --- a/trunk/dist/game/data/scripts/quests/MissingQuests.txt +++ b/trunk/dist/game/data/scripts/quests/MissingQuests.txt @@ -163,7 +163,6 @@ 10806 The Dimensional Warp, Part 6 10807 The Dimensional Warp, Part 7 10809 The Hero's Journey: Blazing Swamp -10819 For Honor 10820 Relationships Befitting of the Status 10821 Helping Others 10823 Exalted, One Who Shatters the Limit diff --git a/trunk/dist/game/data/scripts/quests/Q10819_ForHonor/31688-01.htm b/trunk/dist/game/data/scripts/quests/Q10819_ForHonor/31688-01.htm new file mode 100644 index 0000000000..95ca76c130 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10819_ForHonor/31688-01.htm @@ -0,0 +1,7 @@ +Olympiad Manager:
+Welcome! Has Lionel sent you?
+I'm the Olympiad Manager.
+Lionel has told me that new heroes will rise to lead this world, and I'm here to see who those people will be.
+I've seen countless heroes rise, and you sure look like you've got what it takes. You are ready to take my test.
+ + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10819_ForHonor/31688-02.html b/trunk/dist/game/data/scripts/quests/Q10819_ForHonor/31688-02.html new file mode 100644 index 0000000000..81ae0c3fa8 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10819_ForHonor/31688-02.html @@ -0,0 +1,4 @@ +Olympiad Manager:
+You don't meet the conditions yet. Please come back once you are ready.
+(Only characters above Lv. 99.) + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10819_ForHonor/31688-03.html b/trunk/dist/game/data/scripts/quests/Q10819_ForHonor/31688-03.html new file mode 100644 index 0000000000..37129b52be --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10819_ForHonor/31688-03.html @@ -0,0 +1,5 @@ +Olympiad Manager:
+I don't know where you heard about this, but I've prepared this test for those who've spoken to Lionel.
+Please go find him first.
+(Only characters who are performing the Exalted, One Who Overcomes the Limit quest may take this quest.) + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10819_ForHonor/31688-04.htm b/trunk/dist/game/data/scripts/quests/Q10819_ForHonor/31688-04.htm new file mode 100644 index 0000000000..fb3d8f0363 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10819_ForHonor/31688-04.htm @@ -0,0 +1,6 @@ +Olympiad Manager:
+Lionel has told me that those who take this test must be at least Noblesse. The condition for participating in the Olympiad is the same.
+That means that people I will meet will one day lead this world. An honor, of course!
+That's why I'm here.
+ + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10819_ForHonor/31688-05.htm b/trunk/dist/game/data/scripts/quests/Q10819_ForHonor/31688-05.htm new file mode 100644 index 0000000000..5cbf7eb345 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10819_ForHonor/31688-05.htm @@ -0,0 +1,6 @@ +Olympiad Manager:
+I've been constantly meeting Noblesse. So there's no one else who can recognize a Noblesse.
+Recently, I've discussed with the Mysterious Butler about ways to find true heroes. Up until then, I've tested people by asking them to participate in the Olympiad.
+However, I've concluded that in order to find a true hero, I should test them both by making them show me proof that they've participated in the Olympiad and the Ceremony of Chaos.
+ + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10819_ForHonor/31688-06.html b/trunk/dist/game/data/scripts/quests/Q10819_ForHonor/31688-06.html new file mode 100644 index 0000000000..ba82110cd6 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10819_ForHonor/31688-06.html @@ -0,0 +1,5 @@ +Olympiad Manager:
+You'll get a Proof of Battle when you participate in the Olympiad or the Ceremony of Chaos. Please bring 100 of these.
+Bringing 100 Proof of Battle is my test.
+I'm sure as someone who Lionel has personally sent, you'll do great. + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10819_ForHonor/31688-07.html b/trunk/dist/game/data/scripts/quests/Q10819_ForHonor/31688-07.html new file mode 100644 index 0000000000..47324aa5ba --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10819_ForHonor/31688-07.html @@ -0,0 +1,4 @@ +Olympiad Manager:
+I don't think you are done yet.
+Participate in the Olympiad and the Ceremony of Chaos, and collect 100 Proof of Battle. + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10819_ForHonor/31688-08.html b/trunk/dist/game/data/scripts/quests/Q10819_ForHonor/31688-08.html new file mode 100644 index 0000000000..17d91b8282 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10819_ForHonor/31688-08.html @@ -0,0 +1,4 @@ +Olympiad Manager:
+You did it! How was it? Not that bad, right?
+ + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10819_ForHonor/31688-09.html b/trunk/dist/game/data/scripts/quests/Q10819_ForHonor/31688-09.html new file mode 100644 index 0000000000..803cd636ca --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10819_ForHonor/31688-09.html @@ -0,0 +1,3 @@ +Olympiad Manager:
+You've proven me right. I knew you could do it. Here's the certificate. I hope you become even stronger. + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10819_ForHonor/31688-10.html b/trunk/dist/game/data/scripts/quests/Q10819_ForHonor/31688-10.html new file mode 100644 index 0000000000..11bdc92d3b --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10819_ForHonor/31688-10.html @@ -0,0 +1,4 @@ +Olympiad Manager:
+You've proven me right. I knew you could do it. Here's the certificate.
+It looks like you passed the other tests, so go find Lionel. I hope you become even stronger. + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10819_ForHonor/Q10819_ForHonor.java b/trunk/dist/game/data/scripts/quests/Q10819_ForHonor/Q10819_ForHonor.java new file mode 100644 index 0000000000..bc5b61cfc7 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10819_ForHonor/Q10819_ForHonor.java @@ -0,0 +1,186 @@ +/* + * 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.Q10819_ForHonor; + +import com.l2jmobius.gameserver.enums.QuestSound; +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.ceremonyofchaos.OnCeremonyOfChaosMatchResult; +import com.l2jmobius.gameserver.model.events.impl.olympiad.OnOlympiadMatchResult; +import com.l2jmobius.gameserver.model.quest.Quest; +import com.l2jmobius.gameserver.model.quest.QuestState; +import com.l2jmobius.gameserver.model.quest.State; + +import quests.Q10817_ExaltedOneWhoOvercomesTheLimit.Q10817_ExaltedOneWhoOvercomesTheLimit; + +/** + * For Honor (10819) + * @URL https://l2wiki.com/For_Honor + * @author Mobius + */ +public final class Q10819_ForHonor extends Quest +{ + // NPC + private static final int OLYMPIAD_MANAGER = 31688; + // Items + private static final int PROOF_OF_BATTLE = 45872; + private static final int ISHUMA_CERTIFICATE = 45630; + private static final int SIR_KRISTOF_RODEMAI_CERTIFICATE = 45631; + private static final int DAICHIR_SERTIFICATE = 45628; + // Rewards + private static final int OLYMPIAD_MANAGER_CERTIFICATE = 45629; + private static final int BATTLE_QUICK_HEALING_POTION = 45945; + // Misc + private static final int MIN_LEVEL = 99; + + public Q10819_ForHonor() + { + super(10819); + addStartNpc(OLYMPIAD_MANAGER); + addTalkId(OLYMPIAD_MANAGER); + addCondMinLevel(MIN_LEVEL, "31688-02.html"); + addCondStartedQuest(Q10817_ExaltedOneWhoOvercomesTheLimit.class.getSimpleName(), "31688-03.html"); + registerQuestItems(PROOF_OF_BATTLE); + } + + @Override + public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) + { + String htmltext = null; + final QuestState qs = getQuestState(player, false); + if (qs == null) + { + return htmltext; + } + + switch (event) + { + case "31688-04.htm": + case "31688-05.htm": + { + htmltext = event; + break; + } + case "31688-06.html": + { + qs.startQuest(); + htmltext = event; + break; + } + case "31688-09.html": + { + if (qs.isCond(2)) + { + if ((player.getLevel() >= MIN_LEVEL)) + { + if (hasQuestItems(player, DAICHIR_SERTIFICATE, ISHUMA_CERTIFICATE, SIR_KRISTOF_RODEMAI_CERTIFICATE)) + { + htmltext = "31688-10.html"; + } + else + { + htmltext = event; + } + takeItems(player, PROOF_OF_BATTLE, -1); + giveItems(player, BATTLE_QUICK_HEALING_POTION, 180); + giveItems(player, OLYMPIAD_MANAGER_CERTIFICATE, 1); + qs.exitQuest(false, true); + htmltext = event; + } + else + { + htmltext = getNoQuestLevelRewardMsg(player); + } + } + 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.CREATED: + { + htmltext = "31688-01.htm"; + break; + } + case State.STARTED: + { + if (qs.isCond(1)) + { + htmltext = "31688-07.html"; + } + else if (qs.isCond(2)) + { + htmltext = "31688-08.html"; + } + break; + } + case State.COMPLETED: + { + htmltext = getAlreadyCompletedMsg(player); + break; + } + } + return htmltext; + } + + private void manageQuestProgress(L2PcInstance player) + { + if (player != null) + { + final QuestState qs = getQuestState(player, false); + + if ((qs != null) && qs.isCond(1)) + { + giveItems(player, PROOF_OF_BATTLE, 1); + playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET); + + if (getQuestItemsCount(player, PROOF_OF_BATTLE) >= 100) + { + qs.setCond(2, true); + } + } + } + } + + @RegisterEvent(EventType.ON_CEREMONY_OF_CHAOS_MATCH_RESULT) + @RegisterType(ListenerRegisterType.GLOBAL_PLAYERS) + private void onCeremonyOfChaosMatchResult(OnCeremonyOfChaosMatchResult event) + { + event.getMembers().forEach(player -> manageQuestProgress(player.getPlayer())); + } + + @RegisterEvent(EventType.ON_OLYMPIAD_MATCH_RESULT) + @RegisterType(ListenerRegisterType.GLOBAL_PLAYERS) + private void onOlympiadMatchResult(OnOlympiadMatchResult event) + { + manageQuestProgress(event.getWinner().getPlayer()); + manageQuestProgress(event.getLoser().getPlayer()); + } +} \ 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 2ecf0d316f..4dc49004ed 100644 --- a/trunk/dist/game/data/scripts/quests/QuestMasterHandler.java +++ b/trunk/dist/game/data/scripts/quests/QuestMasterHandler.java @@ -349,7 +349,7 @@ import quests.Q10793_SaveTheSouls.Q10793_SaveTheSouls; import quests.Q10795_LettersFromTheQueenWallOfAgros.Q10795_LettersFromTheQueenWallOfAgros; import quests.Q10798_LettersFromTheQueenDragonValley.Q10798_LettersFromTheQueenDragonValley; import quests.Q10799_StrangeThingsAfootInTheValley.Q10799_StrangeThingsAfootInTheValley; -import quests.Q10800_ReconnaissanceADragonValley.Q10800_ReconnaissanceADragonValley; +import quests.Q10800_ReconnaissanceAtDragonValley.Q10800_ReconnaissanceAtDragonValley; import quests.Q10811_ExaltedOneWhoFacesTheLimit.Q10811_ExaltedOneWhoFacesTheLimit; import quests.Q10812_FacingSadness.Q10812_FacingSadness; import quests.Q10813_ForGlory.Q10813_ForGlory; @@ -357,6 +357,7 @@ import quests.Q10814_BefittingOfTheStatus.Q10814_BefittingOfTheStatus; import quests.Q10815_StepUp.Q10815_StepUp; import quests.Q10817_ExaltedOneWhoOvercomesTheLimit.Q10817_ExaltedOneWhoOvercomesTheLimit; import quests.Q10818_ConfrontingAGiantMonster.Q10818_ConfrontingAGiantMonster; +import quests.Q10819_ForHonor.Q10819_ForHonor; /** * @author NosBit @@ -697,14 +698,15 @@ public class QuestMasterHandler Q10795_LettersFromTheQueenWallOfAgros.class, Q10798_LettersFromTheQueenDragonValley.class, Q10799_StrangeThingsAfootInTheValley.class, - Q10800_ReconnaissanceADragonValley.class, + Q10800_ReconnaissanceAtDragonValley.class, Q10811_ExaltedOneWhoFacesTheLimit.class, Q10812_FacingSadness.class, Q10813_ForGlory.class, Q10814_BefittingOfTheStatus.class, Q10815_StepUp.class, Q10817_ExaltedOneWhoOvercomesTheLimit.class, - Q10818_ConfrontingAGiantMonster.class + Q10818_ConfrontingAGiantMonster.class, + Q10819_ForHonor.class }; public static void main(String[] args)