Quest Step Up to Lead (10827).

This commit is contained in:
MobiusDev
2016-07-31 12:23:19 +00:00
parent 8c8f1768fe
commit 76752b6399
13 changed files with 238 additions and 2 deletions

View File

@@ -163,7 +163,6 @@
10806 The Dimensional Warp, Part 6 10806 The Dimensional Warp, Part 6
10807 The Dimensional Warp, Part 7 10807 The Dimensional Warp, Part 7
10809 The Hero's Journey: Blazing Swamp 10809 The Hero's Journey: Blazing Swamp
10827 Step Up to Lead
10829 In Search of the Cause 10829 In Search of the Cause
10830 The Lost Garden of Spirits 10830 The Lost Garden of Spirits
10831 Unbelievable Sight 10831 Unbelievable Sight

View File

@@ -0,0 +1,6 @@
<html><body>Sir Gustav Athebaldt:<br>
Are you the one that Lionel said he would send? Looks like you are.<br>
When Lionel first asked for help, I had my doubts since we aren't that close, but I understand his concern.<br>
I'll give you a certificate if you pass my test.<br>
<Button ALIGN=LEFT ICON="Normal" action="bypass -h Quest Q10827_StepUpToLead 30760-04.htm">"What's the test about?"</Button>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Sir Gustav Athebaldt:<br>
You are not ready yet.<br>
(Only characters above Lv. 100.)
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Sir Gustav Athebaldt:<br>
Not sure how you got here, but 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,6 @@
<html><body>Sir Gustav Athebaldt:<br>
What do you think of the continent as it is? Do you think it will be fine?<br>
You must be pretty strong as you are, if Lionel trusts you enough to send you here.<br>
Then, how much do you know about what it takes to be really strong? Do you think you are fine as you are?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10827_StepUpToLead 30760-05.htm">"Is anything the problem?"</Button>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Sir Gustav Athebaldt:<br>
If you have power, shouldn't you step up and be a role model?<br>
I'm aware that leading others is troublesome. It takes a lot of effort. But if someone as strong as you doesn't take action, then who will lead the others? Don't you agree?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10827_StepUpToLead 30760-06.html">"Maybe?"</Button>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Sir Gustav Athebaldt:<br>
If you are strong, you must have the courage to step up and lead others! I believe you have what it takes to grow into that role. Am I not right?<br>
Show me your ability to gather people and defeat monsters even in dangerous times such as these. If you can show me that, I'll give you a certificate.<br>
Lead others, and receive the <font color="LEVEL">Party Leader Bonus</font> at least <font color="LEVEL">30 times</font>. That will show me your courage and abilities.
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Sir Gustav Athebaldt:<br>
You haven't completed the task I set for you.<br>
Receive the <font color="LEVEL">Party Leader Bonus</font> at least <font color="LEVEL">30 times</font>, and show me you know how to lead others.
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Sir Gustav Athebaldt:<br>
It's not easy for people to step up and lead others. But I knew you would be able to do it.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10827_StepUpToLead 30760-09.html">"Thanks."</Button>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Sir Gustav Athebaldt:<br>
Great. If there are more people like you, I won't have to worry about retiring.<br>
Here, take the certificate.
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Sir Gustav Athebaldt:<br>
Great. If there are more people like you, I won't have to worry about retiring.<br>
Here, take the certificate. Since you've completed all the other tests, you should go see Lionel now.
</body></html>

View File

@@ -0,0 +1,189 @@
/*
* 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.Q10827_StepUpToLead;
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.npc.OnAttackableKill;
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;
/**
* Step Up to Lead (10827)
* @URL https://l2wiki.com/Step_Up_to_Lead
* @author Mobius
*/
public final class Q10827_StepUpToLead extends Quest
{
// NPC
private static final int GUSTAV = 30760;
// Items
private static final int MERLOT_SERTIFICATE = 46056;
private static final int KURTIZ_CERTIFICATE = 46057;
private static final int MAMMON_CERTIFICATE = 45635;
// Rewards
private static final int GUSTAV_CERTIFICATE = 45636;
private static final int SPELLBOOK_FAVOR_OF_THE_EXALTED = 45870;
// Misc
private static final int MIN_LEVEL = 100;
public Q10827_StepUpToLead()
{
super(10827);
addStartNpc(GUSTAV);
addTalkId(GUSTAV);
addCondMinLevel(MIN_LEVEL, "30760-02.html");
addCondStartedQuest(Q10823_ExaltedOneWhoShattersTheLimit.class.getSimpleName(), "30760-03.html");
}
@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 "30760-04.htm":
case "30760-05.htm":
{
htmltext = event;
break;
}
case "30760-06.html":
{
qs.startQuest();
htmltext = event;
break;
}
case "30760-09.html":
{
if (qs.isCond(2))
{
if ((player.getLevel() >= MIN_LEVEL))
{
if (hasQuestItems(player, KURTIZ_CERTIFICATE, MERLOT_SERTIFICATE, MAMMON_CERTIFICATE))
{
htmltext = "30760-10.html";
}
else
{
htmltext = event;
}
giveItems(player, GUSTAV_CERTIFICATE, 1);
giveItems(player, SPELLBOOK_FAVOR_OF_THE_EXALTED, 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 = "30760-01.htm";
break;
}
case State.STARTED:
{
if (qs.isCond(1))
{
htmltext = "30760-07.html";
}
else
{
htmltext = "30760-08.html";
}
break;
}
case State.COMPLETED:
{
htmltext = getAlreadyCompletedMsg(player);
break;
}
}
return htmltext;
}
@RegisterEvent(EventType.ON_ATTACKABLE_KILL)
@RegisterType(ListenerRegisterType.GLOBAL_MONSTERS)
public void onAttackableKill(OnAttackableKill event)
{
final L2PcInstance player = event.getAttacker();
if (player == null)
{
return;
}
final QuestState qs = getQuestState(player, false);
if (qs == null)
{
return;
}
if (player.getParty() == null)
{
return;
}
if (player.getParty().getLeader() != player)
{
return;
}
if (!event.getTarget().isRaid())
{
return;
}
if (event.getTarget().isRaidMinion())
{
return;
}
if (qs.isCond(1))
{
final int memo = qs.getMemoState() + 1;
qs.setMemoState(memo);
if (memo >= 30)
{
qs.setCond(2, true);
}
}
}
}

View File

@@ -364,6 +364,7 @@ import quests.Q10823_ExaltedOneWhoShattersTheLimit.Q10823_ExaltedOneWhoShattersT
import quests.Q10824_ConfrontingTheGreatestDanger.Q10824_ConfrontingTheGreatestDanger; import quests.Q10824_ConfrontingTheGreatestDanger.Q10824_ConfrontingTheGreatestDanger;
import quests.Q10825_ForVictory.Q10825_ForVictory; import quests.Q10825_ForVictory.Q10825_ForVictory;
import quests.Q10826_LuckBefittingOfTheStatus.Q10826_LuckBefittingOfTheStatus; import quests.Q10826_LuckBefittingOfTheStatus.Q10826_LuckBefittingOfTheStatus;
import quests.Q10827_StepUpToLead.Q10827_StepUpToLead;
/** /**
* @author NosBit * @author NosBit
@@ -718,7 +719,8 @@ public class QuestMasterHandler
Q10823_ExaltedOneWhoShattersTheLimit.class, Q10823_ExaltedOneWhoShattersTheLimit.class,
Q10824_ConfrontingTheGreatestDanger.class, Q10824_ConfrontingTheGreatestDanger.class,
Q10825_ForVictory.class, Q10825_ForVictory.class,
Q10826_LuckBefittingOfTheStatus.class Q10826_LuckBefittingOfTheStatus.class,
Q10827_StepUpToLead.class
}; };
public static void main(String[] args) public static void main(String[] args)