Quest For Victory (10825).

This commit is contained in:
MobiusDev 2016-07-30 19:10:25 +00:00
parent af7d02e879
commit 0a310d309f
14 changed files with 227 additions and 2 deletions

View File

@ -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

View File

@ -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
}

View File

@ -0,0 +1,5 @@
<html><body>Captain Kurtiz:<br>
Did Lionel send you? I've been waiting for you.<br>
I'm sure it wasn't easy to come all the way here. Well, I'm sure Lionel trusted you to make it here.<br>
<Button ALIGN=LEFT ICON="Normal" action="bypass -h Quest Q10825_ForVictory 30870-04.htm">"It wasn't easy."</Button>
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Captain Kurtiz:<br>
You think being the guard captain in Aden is easy? Don't bother me.<br>
(Only characters above Lv. 100.)
</body></html>

View File

@ -0,0 +1,5 @@
<html><body>Captain Kurtiz:<br>
What do you mean? Where did you hear that?<br>
I'm not sure how you found out, but if you want to do this test, you must talk to Lionel first.<br>
(Only characters who are performing the Exalted, One Who Shatters the Limit quest may take this quest.)
</body></html>

View File

@ -0,0 +1,5 @@
<html><body>Captain Kurtiz:<br>
Of course. It's not easy. And if your past tests were easy, this one will be very challenging.<br>
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.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10825_ForVictory 30870-05.htm">"What do you mean?"</Button>
</body></html>

View File

@ -0,0 +1,6 @@
<html><body>Captain Kurtiz:<br>
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?<br>
What do you think of castles? I mean the castle sieges.<br>
Well, not everyone needs to understand the importance of castles, but you should. Right?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10825_ForVictory 30870-06.html">"Will this have to do with castles?"</Button>
</body></html>

View File

@ -0,0 +1,5 @@
<html><body>Captain Kurtiz:<br>
You are quick to understand.<br>
You have to participate in a <font color="LEVEL">siege</font> or a <font color="LEVEL">dimensional siege</font>. When you reach the <font color="LEVEL">Flag of Protection</font> inside, you'll be able to obtain a <font color="LEVEL">Mark of Valor</font>. Your mission is to obtain <font color="LEVEL">10</font> of these.<br>
You'll be able to get more marks when you participate in a dimensional siege or in the Aden or Rune Castle Sieges.
</body></html>

View File

@ -0,0 +1,5 @@
<html><body>Captain Kurtiz:<br>
You didn't forget what you have to do, right? Well, I can tell you again.<br>
You have to participate in a <font color="LEVEL">siege</font> or a <font color="LEVEL">dimensional siege</font>. When you reach the <font color="LEVEL">Flag of Protection</font> inside, you'll be able to obtain a <font color="LEVEL">Mark of Valor</font>. Your mission is to obtain <font color="LEVEL">10</font> of these.<br>
You'll be able to get more marks when you participate in a dimensional siege or in the Aden or Rune Castle Sieges.
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Captain Kurtiz:<br>
Did you get all the Marks of Valor?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10825_ForVictory 30870-09.html">"Yes."</Button>
</body></html>

View File

@ -0,0 +1,5 @@
<html><body>Captain Kurtiz:<br>
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.<br>
Sorry for underestimating you. You really might be who Lionel has been looking for.<br>
Here's the certificate. Good luck.
</body></html>

View File

@ -0,0 +1,5 @@
<html><body>Captain Kurtiz:<br>
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.<br>
Sorry for underestimating you. You really might be who Lionel has been looking for.<br>
Here's the certificate. It looks like you passed the other tests as well. Go find Lionel now. Good luck.
</body></html>

View File

@ -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 <http://www.gnu.org/licenses/>.
*/
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
}

View File

@ -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)