Quest Time to Recover (10840).

Contributed by gigilo1968.
This commit is contained in:
MobiusDev
2017-01-06 10:27:27 +00:00
parent 1c8f1e2148
commit 578230093e
12 changed files with 218 additions and 2 deletions

View File

@@ -122,7 +122,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
10840 Time to Recover
10841 Deep Inside Atelia Fortress 10841 Deep Inside Atelia Fortress
10843 Anomaly in the Enchanted Valley 10843 Anomaly in the Enchanted Valley
10844 Bloody Battle - Seizing Supplies 10844 Bloody Battle - Seizing Supplies

View File

@@ -0,0 +1,4 @@
<html><body>Blackbird Clan Member Sherry:<br>
Hey, this place is dangerous! You shouldn't be here.<br>
(Only characters above Lv. 101.)
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Blackbird Clan Member Sherry:<br>
That seal is something that only a few people can have. You must have been recognized by a member of the Blackbird clan.<br>
Am I right?<br><Button ALIGN=LEFT ICON="Normal" action="bypass -h Quest Q10840_TimeToRecover 34066-02.htm">"I've met Elikia."</Button>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Blackbird Clan Member Sherry:<br>
Oh, Elikia? Then I know I can trust you.<br>
But... Did Elikia send you to bring me back? I can't just leave...<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10840_TimeToRecover 34066-04.htm">"What's the problem?"</Button>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Blackbird Clan Member Sherry:<br>
I can't trust just anyone in this dangerous place. I can't trust you.<br>
(Quest may only be undertaken by characters with the Blackbird Seal.)
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Blackbird Clan Member Sherry:<br>
A problem? Well, it might not be a problem really. I was captured by the Embryo, and was saved by the Aden Vanguard member, Eliyah. <br>
After I was recued, I've been trying to carry out Leona's mission. But it's been hard since the Embryo are getting stronger by the day. I haven't been able to recover fully.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10840_TimeToRecover 34066-05.htm">"Go on."</Button>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Blackbird Clan Member Sherry:<br>
I know that Elikia is worried, but I must carry out Leona's mission. To do that, I have to recover as soon as possible and find out what the Embryo are up to. <br>
Can you buy me some time to recover and go kill <font color="LEVEL">250 Atelia Passionate Soldiers, Atelia Elite Captains, Atelia High Priests, Fortress Archons, and Atelia Flame Masters</font>?<br>
We should be able to keep the stronghold safe and I'll have more time to recover. I'm counting on you.
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Blackbird Clan Member Sherry:<br>
This isn't enough. I need more time to recover. Can you kill <font color="LEVEL">250 Atelia Passionate Soldiers, Atelia Elite Captains, Atelia High Priests, Fortress Dark Wizards, Fortress Archons, and Atelia Flame Masters</font>? We need to make sure that they don't threaten the stronghold.
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Blackbird Clan Member Sherry:<br>Did you carry out my request?<br>
I think I'm recovering well.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10840_TimeToRecover 34066-08.html">"Yes."</Button>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Blackbird Clan Member Sherry:<br>
Thank you. I haven't recovered completely, but I will have no problem carrying out Leona's mission.<br>
Did Elikia tell you to bring me back? I'm sorry, but I can't do that. I'll give you this letter though, so please take it to Elikia. I'm doing just fine. Thanks.
</body></html>

View File

@@ -0,0 +1,177 @@
/*
* 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.Q10840_TimeToRecover;
import java.util.HashSet;
import java.util.Set;
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.holders.NpcLogListHolder;
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.NpcStringId;
/**
* Time to Recover (10840)
* @URL https://l2wiki.com/Time_to_Recover
* @author Gigi
*/
public final class Q10840_TimeToRecover extends Quest
{
// NPC
private static final int SHERRY = 34066;
private static final int[] MONSTERS =
{
23512, // Atelia High Priest
23509, // Fortress Dark Wizard
23507, // Atelia Passionate Soldier
23508, // Atelia Elite Captain
23510, // Atelia Flame Master
23511 // Fortress Archon
};
// Items
private static final int BLACKBIRD_REPORT_SHERRY = 46137;
private static final int BLACKBIRD_SEAL = 46132;
// Misc
private static final int MIN_LEVEL = 101;
private static final String KILL_COUNT_VAR = "KillCount";
public Q10840_TimeToRecover()
{
super(10840);
addStartNpc(SHERRY);
addTalkId(SHERRY);
addKillId(MONSTERS);
addCondMinLevel(MIN_LEVEL, "34066-00.htm");
}
@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 "34066-02.htm":
case "34066-04.htm":
{
htmltext = event;
break;
}
case "34066-05.htm":
{
qs.startQuest();
htmltext = event;
break;
}
case "34066-08.html":
{
giveItems(player, BLACKBIRD_REPORT_SHERRY, 1);
addExpAndSp(player, 14524603380L, 34858800);
qs.exitQuest(false, true);
htmltext = event;
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:
{
if (!hasQuestItems(player, BLACKBIRD_SEAL))
{
htmltext = "34066-03.htm";
break;
}
htmltext = "34066-01.htm";
break;
}
case State.STARTED:
{
if (qs.isCond(1))
{
htmltext = "34066-06.html";
}
else
{
htmltext = "34066-07.html";
}
break;
}
case State.COMPLETED:
{
htmltext = getAlreadyCompletedMsg(player);
break;
}
}
return htmltext;
}
@Override
public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
{
final QuestState qs = getQuestState(killer, false);
if ((qs != null) && qs.isCond(1))
{
int count = qs.getInt(KILL_COUNT_VAR);
qs.set(KILL_COUNT_VAR, ++count);
if (count >= 250)
{
qs.setCond(2, true);
}
else
{
sendNpcLogList(killer);
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
}
return super.onKill(npc, killer, isSummon);
}
@Override
public Set<NpcLogListHolder> getNpcLogList(L2PcInstance player)
{
final QuestState qs = getQuestState(player, false);
if ((qs != null) && qs.isCond(1))
{
final int killCount = qs.getInt(KILL_COUNT_VAR);
if (killCount > 0)
{
final Set<NpcLogListHolder> holder = new HashSet<>();
holder.add(new NpcLogListHolder(NpcStringId.DEFEAT_THE_EMBRYO3, killCount));
return holder;
}
}
return super.getNpcLogList(player);
}
}

View File

@@ -417,6 +417,7 @@ import quests.Q10836_DisappearedClanMember.Q10836_DisappearedClanMember;
import quests.Q10837_LookingForTheBlackbirdClanMember.Q10837_LookingForTheBlackbirdClanMember; import quests.Q10837_LookingForTheBlackbirdClanMember.Q10837_LookingForTheBlackbirdClanMember;
import quests.Q10838_TheReasonForNotBeingAbleToGetOut.Q10838_TheReasonForNotBeingAbleToGetOut; import quests.Q10838_TheReasonForNotBeingAbleToGetOut.Q10838_TheReasonForNotBeingAbleToGetOut;
import quests.Q10839_BlackbirdsNameValue.Q10839_BlackbirdsNameValue; import quests.Q10839_BlackbirdsNameValue.Q10839_BlackbirdsNameValue;
import quests.Q10840_TimeToRecover.Q10840_TimeToRecover;
/** /**
* @author NosBit * @author NosBit
@@ -824,7 +825,8 @@ public class QuestMasterHandler
Q10836_DisappearedClanMember.class, Q10836_DisappearedClanMember.class,
Q10837_LookingForTheBlackbirdClanMember.class, Q10837_LookingForTheBlackbirdClanMember.class,
Q10838_TheReasonForNotBeingAbleToGetOut.class, Q10838_TheReasonForNotBeingAbleToGetOut.class,
Q10839_BlackbirdsNameValue.class Q10839_BlackbirdsNameValue.class,
Q10840_TimeToRecover.class
}; };
public static void main(String[] args) public static void main(String[] args)