From 0a310d309f574998cc91d9a4234f404ca0310c7e Mon Sep 17 00:00:00 2001 From: MobiusDev <8391001+MobiusDevelopment@users.noreply.github.com> Date: Sat, 30 Jul 2016 19:10:25 +0000 Subject: [PATCH] Quest For Victory (10825). --- .../data/scripts/quests/MissingQuests.txt | 1 - .../Q10824_ConfrontingTheGreatestDanger.java | 3 + .../quests/Q10825_ForVictory/30870-01.htm | 5 + .../quests/Q10825_ForVictory/30870-02.html | 4 + .../quests/Q10825_ForVictory/30870-03.html | 5 + .../quests/Q10825_ForVictory/30870-04.htm | 5 + .../quests/Q10825_ForVictory/30870-05.htm | 6 + .../quests/Q10825_ForVictory/30870-06.html | 5 + .../quests/Q10825_ForVictory/30870-07.html | 5 + .../quests/Q10825_ForVictory/30870-08.html | 4 + .../quests/Q10825_ForVictory/30870-09.html | 5 + .../quests/Q10825_ForVictory/30870-10.html | 5 + .../Q10825_ForVictory/Q10825_ForVictory.java | 172 ++++++++++++++++++ .../scripts/quests/QuestMasterHandler.java | 4 +- 14 files changed, 227 insertions(+), 2 deletions(-) create mode 100644 trunk/dist/game/data/scripts/quests/Q10825_ForVictory/30870-01.htm create mode 100644 trunk/dist/game/data/scripts/quests/Q10825_ForVictory/30870-02.html create mode 100644 trunk/dist/game/data/scripts/quests/Q10825_ForVictory/30870-03.html create mode 100644 trunk/dist/game/data/scripts/quests/Q10825_ForVictory/30870-04.htm create mode 100644 trunk/dist/game/data/scripts/quests/Q10825_ForVictory/30870-05.htm create mode 100644 trunk/dist/game/data/scripts/quests/Q10825_ForVictory/30870-06.html create mode 100644 trunk/dist/game/data/scripts/quests/Q10825_ForVictory/30870-07.html create mode 100644 trunk/dist/game/data/scripts/quests/Q10825_ForVictory/30870-08.html create mode 100644 trunk/dist/game/data/scripts/quests/Q10825_ForVictory/30870-09.html create mode 100644 trunk/dist/game/data/scripts/quests/Q10825_ForVictory/30870-10.html create mode 100644 trunk/dist/game/data/scripts/quests/Q10825_ForVictory/Q10825_ForVictory.java diff --git a/trunk/dist/game/data/scripts/quests/MissingQuests.txt b/trunk/dist/game/data/scripts/quests/MissingQuests.txt index ae87bde6b6..4e9d33f98b 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 -10825 For Victory 10826 Luck Befitting of the Status 10827 Step Up to Lead 10829 In Search of the Cause diff --git a/trunk/dist/game/data/scripts/quests/Q10824_ConfrontingTheGreatestDanger/Q10824_ConfrontingTheGreatestDanger.java b/trunk/dist/game/data/scripts/quests/Q10824_ConfrontingTheGreatestDanger/Q10824_ConfrontingTheGreatestDanger.java index 8a213a657e..0db42eec4e 100644 --- a/trunk/dist/game/data/scripts/quests/Q10824_ConfrontingTheGreatestDanger/Q10824_ConfrontingTheGreatestDanger.java +++ b/trunk/dist/game/data/scripts/quests/Q10824_ConfrontingTheGreatestDanger/Q10824_ConfrontingTheGreatestDanger.java @@ -51,6 +51,7 @@ public final class Q10824_ConfrontingTheGreatestDanger extends Quest addTalkId(MERLOT); addCondMinLevel(MIN_LEVEL, "34019-02.html"); addCondStartedQuest(Q10823_ExaltedOneWhoShattersTheLimit.class.getSimpleName(), "34019-03.html"); + registerQuestItems(MARK_OF_ADVANCE); } @Override @@ -140,4 +141,6 @@ public final class Q10824_ConfrontingTheGreatestDanger extends Quest } return htmltext; } + + // TODO: Dimensional Raid - https://l2wiki.com/Dimensional_Raid } \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10825_ForVictory/30870-01.htm b/trunk/dist/game/data/scripts/quests/Q10825_ForVictory/30870-01.htm new file mode 100644 index 0000000000..61b01e8085 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10825_ForVictory/30870-01.htm @@ -0,0 +1,5 @@ +Captain Kurtiz:
+Did Lionel send you? I've been waiting for you.
+I'm sure it wasn't easy to come all the way here. Well, I'm sure Lionel trusted you to make it here.
+ + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10825_ForVictory/30870-02.html b/trunk/dist/game/data/scripts/quests/Q10825_ForVictory/30870-02.html new file mode 100644 index 0000000000..ef7f3c2fd4 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10825_ForVictory/30870-02.html @@ -0,0 +1,4 @@ +Captain Kurtiz:
+You think being the guard captain in Aden is easy? Don't bother me.
+(Only characters above Lv. 100.) + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10825_ForVictory/30870-03.html b/trunk/dist/game/data/scripts/quests/Q10825_ForVictory/30870-03.html new file mode 100644 index 0000000000..da282d58d4 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10825_ForVictory/30870-03.html @@ -0,0 +1,5 @@ +Captain Kurtiz:
+What do you mean? Where did you hear that?
+I'm not sure how you found out, but if you want to do this test, you must talk to Lionel first.
+(Only characters who are performing the Exalted, One Who Shatters the Limit quest may take this quest.) + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10825_ForVictory/30870-04.htm b/trunk/dist/game/data/scripts/quests/Q10825_ForVictory/30870-04.htm new file mode 100644 index 0000000000..ab3c3f3573 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10825_ForVictory/30870-04.htm @@ -0,0 +1,5 @@ +Captain Kurtiz:
+Of course. It's not easy. And if your past tests were easy, this one will be very challenging.
+I'm sure you've gone through countless tests, but you still have a long way to go. This test will show us whether you have what it takes to lead this world.
+ + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10825_ForVictory/30870-05.htm b/trunk/dist/game/data/scripts/quests/Q10825_ForVictory/30870-05.htm new file mode 100644 index 0000000000..d2127a5ee2 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10825_ForVictory/30870-05.htm @@ -0,0 +1,6 @@ +Captain Kurtiz:
+If you really are someone that Lionel trusts, don't you think that you should be the top in your class? I'm sure you don't just go hide behind others in the most crucial times, right?
+What do you think of castles? I mean the castle sieges.
+Well, not everyone needs to understand the importance of castles, but you should. Right?
+ + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10825_ForVictory/30870-06.html b/trunk/dist/game/data/scripts/quests/Q10825_ForVictory/30870-06.html new file mode 100644 index 0000000000..938f140a23 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10825_ForVictory/30870-06.html @@ -0,0 +1,5 @@ +Captain Kurtiz:
+You are quick to understand.
+You have to participate in a siege or a dimensional siege. When you reach the Flag of Protection inside, you'll be able to obtain a Mark of Valor. Your mission is to obtain 10 of these.
+You'll be able to get more marks when you participate in a dimensional siege or in the Aden or Rune Castle Sieges. + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10825_ForVictory/30870-07.html b/trunk/dist/game/data/scripts/quests/Q10825_ForVictory/30870-07.html new file mode 100644 index 0000000000..650b48db68 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10825_ForVictory/30870-07.html @@ -0,0 +1,5 @@ +Captain Kurtiz:
+You didn't forget what you have to do, right? Well, I can tell you again.
+You have to participate in a siege or a dimensional siege. When you reach the Flag of Protection inside, you'll be able to obtain a Mark of Valor. Your mission is to obtain 10 of these.
+You'll be able to get more marks when you participate in a dimensional siege or in the Aden or Rune Castle Sieges. + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10825_ForVictory/30870-08.html b/trunk/dist/game/data/scripts/quests/Q10825_ForVictory/30870-08.html new file mode 100644 index 0000000000..a29a3be936 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10825_ForVictory/30870-08.html @@ -0,0 +1,4 @@ +Captain Kurtiz:
+Did you get all the Marks of Valor?
+ + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10825_ForVictory/30870-09.html b/trunk/dist/game/data/scripts/quests/Q10825_ForVictory/30870-09.html new file mode 100644 index 0000000000..86fae6a6d8 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10825_ForVictory/30870-09.html @@ -0,0 +1,5 @@ +Captain Kurtiz:
+Oh, great! I knew you would do well, since you came all the way here, but I didn't think you would be this good.
+Sorry for underestimating you. You really might be who Lionel has been looking for.
+Here's the certificate. Good luck. + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10825_ForVictory/30870-10.html b/trunk/dist/game/data/scripts/quests/Q10825_ForVictory/30870-10.html new file mode 100644 index 0000000000..d52379f621 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10825_ForVictory/30870-10.html @@ -0,0 +1,5 @@ +Captain Kurtiz:
+Oh, great! I knew you would do well, since you came all the way here, but I didn't think you would be this good.
+Sorry for underestimating you. You really might be who Lionel has been looking for.
+Here's the certificate. It looks like you passed the other tests as well. Go find Lionel now. Good luck. + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10825_ForVictory/Q10825_ForVictory.java b/trunk/dist/game/data/scripts/quests/Q10825_ForVictory/Q10825_ForVictory.java new file mode 100644 index 0000000000..cbdd09d41c --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10825_ForVictory/Q10825_ForVictory.java @@ -0,0 +1,172 @@ +/* + * 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.Q10825_ForVictory; + +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.sieges.OnCastleSiegeFinish; +import com.l2jmobius.gameserver.model.quest.Quest; +import com.l2jmobius.gameserver.model.quest.QuestState; +import com.l2jmobius.gameserver.model.quest.State; + +import quests.Q10823_ExaltedOneWhoShattersTheLimit.Q10823_ExaltedOneWhoShattersTheLimit; + +/** + * For Victory (10825) + * @URL https://l2wiki.com/For_Victory + * @author Mobius + */ +public final class Q10825_ForVictory extends Quest +{ + // NPC + private static final int KURTIZ = 34019; + // Items + private static final int MARK_OF_VALOR = 46059; + private static final int MERLOT_SERTIFICATE = 46056; + private static final int MAMMON_CERTIFICATE = 45635; + private static final int GUSTAV_CERTIFICATE = 45636; + // Rewards + private static final int KURTIZ_CERTIFICATE = 46057; + private static final int SPELLBOOK_SUMMON_BATTLE_POTION = 45927; + // Misc + private static final int MIN_LEVEL = 100; + + public Q10825_ForVictory() + { + super(10825); + addStartNpc(KURTIZ); + addTalkId(KURTIZ); + addCondMinLevel(MIN_LEVEL, "30870-02.html"); + addCondStartedQuest(Q10823_ExaltedOneWhoShattersTheLimit.class.getSimpleName(), "30870-03.html"); + registerQuestItems(MARK_OF_VALOR); + } + + @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 "30870-04.htm": + case "30870-05.htm": + { + htmltext = event; + break; + } + case "30870-06.html": + { + qs.startQuest(); + htmltext = event; + break; + } + case "30870-09.html": + { + if (qs.isCond(1) && (getQuestItemsCount(player, MARK_OF_VALOR) >= 10)) + { + if ((player.getLevel() >= MIN_LEVEL)) + { + if (hasQuestItems(player, MERLOT_SERTIFICATE, MAMMON_CERTIFICATE, GUSTAV_CERTIFICATE)) + { + htmltext = "30870-10.html"; + } + else + { + htmltext = event; + } + giveItems(player, KURTIZ_CERTIFICATE, 1); + giveItems(player, SPELLBOOK_SUMMON_BATTLE_POTION, 1); + qs.exitQuest(false, true); + } + 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 = "30870-01.htm"; + break; + } + case State.STARTED: + { + if (getQuestItemsCount(player, MARK_OF_VALOR) >= 10) + { + htmltext = "30870-08.html"; + } + else + { + htmltext = "30870-07.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, MARK_OF_VALOR, 1); + playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET); + } + } + } + + @RegisterEvent(EventType.ON_CASTLE_SIEGE_FINISH) + @RegisterType(ListenerRegisterType.GLOBAL_PLAYERS) + private void OnCastleSiegeFinish(OnCastleSiegeFinish event) + { + event.getSiege().getPlayersInZone().forEach(player -> manageQuestProgress(player)); + } + + // TODO: Dimensional Raid - https://l2wiki.com/Dimensional_Raid +} \ 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 0abf02ba94..a3189eda30 100644 --- a/trunk/dist/game/data/scripts/quests/QuestMasterHandler.java +++ b/trunk/dist/game/data/scripts/quests/QuestMasterHandler.java @@ -362,6 +362,7 @@ import quests.Q10820_RelationshipsBefittingOfTheStatus.Q10820_RelationshipsBefit import quests.Q10821_HelpingOthers.Q10821_HelpingOthers; import quests.Q10823_ExaltedOneWhoShattersTheLimit.Q10823_ExaltedOneWhoShattersTheLimit; import quests.Q10824_ConfrontingTheGreatestDanger.Q10824_ConfrontingTheGreatestDanger; +import quests.Q10825_ForVictory.Q10825_ForVictory; /** * @author NosBit @@ -714,7 +715,8 @@ public class QuestMasterHandler Q10820_RelationshipsBefittingOfTheStatus.class, Q10821_HelpingOthers.class, Q10823_ExaltedOneWhoShattersTheLimit.class, - Q10824_ConfrontingTheGreatestDanger.class + Q10824_ConfrontingTheGreatestDanger.class, + Q10825_ForVictory.class }; public static void main(String[] args)