Quest The Reason For Not Being Able to Get Out (10838).

Contributed by gigilo1968.
This commit is contained in:
MobiusDev
2017-01-06 10:21:07 +00:00
parent eabcf04293
commit 277fc0df3c
12 changed files with 225 additions and 2 deletions

View File

@@ -122,7 +122,6 @@
10806 The Dimensional Warp, Part 6
10807 The Dimensional Warp, Part 7
10809 The Hero's Journey: Blazing Swamp
10838 The Reason For Not Being Able to Get Out
10839 Blackbird's Name Value
10840 Time to Recover
10841 Deep Inside Atelia Fortress

View File

@@ -0,0 +1,4 @@
<html><body>Blackbird Clan Member Hurak:<br>
This place is dangerous. It's still too early for you.<br>
(Only characters above Lv. 101.)
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Blackbird Clan Member Hurak:<br>
Is that...?<br>Is Leona here? No, Leona would have come directly here.<br>
Is that seal from Elikia?<br>
<Button ALIGN=LEFT ICON="Normal" action="bypass -h Quest Q10838_TheReasonForNotBeingAbleToGetOut 34064-02.htm">"Yes."</Button>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Blackbird Clan Member Hurak:<br>
How is Elikia doing? <br>
I was attacked while I was tracking the Embryo. I lost consciousness for a while, and one day, someone who called himself a member of the Aden Vanguard saved me and brought me here. That doesn't mean I trust him, though.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10838_TheReasonForNotBeingAbleToGetOut 34064-04.htm">"Go on."</Button>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Blackbird Clan Member Hurak:<br>
Do you think you are reliable? How can I trust you? If you really are my ally, show me the proof!<br>
(Quest may only be undertaken by characters with the Blackbird Seal.)
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Blackbird Clan Member Hurak:<br>
I can't wait to get out of here, but I must stay here. <br>
I don't know what happened to me when the Embryo brought me in, but if I leave this place, the pain in my body will kill me. <br>
Do you know about neutralizers?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10838_TheReasonForNotBeingAbleToGetOut 34064-05.htm">"What's a neutralizer?"</Button>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Blackbird Clan Member Hurak:<br>
There's something called <font color="LEVEL">Dark Atelia Neutralizer</font>. That alleviates the pain I feel a little. The Embryo carry that neutralizer, but it's hard to get. <br>
If you really are here because Elikia sent you to help me, defeat <font color="LEVEL">150</font> of the <font color="LEVEL">Fortress Guardian Captains, Fortress Raiders, Atelia Passionate Soldiers, and Atelia Elite Captains</font>. Also, I would appreciate it if you could get me <font color="LEVEL">10 Dark Atelia Neutralizers</font>.
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Blackbird Clan Member Hurak:<br>
I can't trust you yet.<br>
Try defeating 150 of the <font color="LEVEL">Fortress Guardian Captains, Fortress Raiders, Atelia Passionate Soldiers, and Atelia Elite Captains</font>. Also, get me <font color="LEVEL">10 Dark Atelia Neutralizers</font>.
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Blackbird Clan Member Hurak:<br>
Oh! Did you really defeat the Embryo? Did you also get the Dark Atelia Neutralizer?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10838_TheReasonForNotBeingAbleToGetOut 34064-08.html">"Yes, I did."</Button>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Blackbird Clan Member Hurak:<br>
Great. I can trust you. But even if the neutralizer alleviates the pain, we still don't know the reason why I'm feeling this pain, so I can't just leave.<br>
I'll write you a letter about my situation so please take it to Elikia. Thanks.
</body></html>

View File

@@ -0,0 +1,182 @@
/*
* 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.Q10838_TheReasonForNotBeingAbleToGetOut;
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;
/**
* The Reason For Not Being Able to Get Out (10838)
* @URL https://l2wiki.com/The_Reason_For_Not_Being_Able_to_Get_Out
* @author Gigi
*/
public final class Q10838_TheReasonForNotBeingAbleToGetOut extends Quest
{
// NPC
private static final int HURAK = 34064;
// Monsters
private static final int[] MONSTERS =
{
23506, // Fortress Guardian Captain
23505, // Fortress Raider
23507, // Atelia Passionate Soldier
23508 // Atelia Elite Captain
};
// Items
private static final int BLACKBIRD_REPORT_HURAK = 46135;
private static final int BLACKBIRD_SEAL = 46132;
private static final int DARK_ATELIA_NATURALIZER = 46133;
// Misc
private static final int MIN_LEVEL = 101;
private static final String KILL_COUNT_VAR = "KillCount";
public Q10838_TheReasonForNotBeingAbleToGetOut()
{
super(10838);
addStartNpc(HURAK);
addTalkId(HURAK);
addKillId(MONSTERS);
registerQuestItems(DARK_ATELIA_NATURALIZER);
addCondMinLevel(MIN_LEVEL, "34064-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 "34064-02.htm":
case "34064-04.htm":
{
htmltext = event;
break;
}
case "34064-05.htm":
{
qs.startQuest();
htmltext = event;
break;
}
case "34064-08.html":
{
giveItems(player, BLACKBIRD_REPORT_HURAK, 1);
addExpAndSp(player, 9683068920L, 23239200);
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 = "34064-03.htm";
break;
}
htmltext = "34064-01.htm";
break;
}
case State.STARTED:
{
if (qs.isCond(1))
{
htmltext = "34064-06.html";
}
else
{
htmltext = "34064-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 >= 150) && (getQuestItemsCount(killer, DARK_ATELIA_NATURALIZER) >= 10))
{
qs.setCond(2, true);
}
else
{
if ((getQuestItemsCount(killer, DARK_ATELIA_NATURALIZER) < 10) && (getRandom(100) > 90))
{
giveItems(killer, DARK_ATELIA_NATURALIZER, 1);
}
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_EMBRYO, killCount));
return holder;
}
}
return super.getNpcLogList(player);
}
}

View File

@@ -415,6 +415,7 @@ import quests.Q10832_EnergyOfSadnessAndAnger.Q10832_EnergyOfSadnessAndAnger;
import quests.Q10833_PutTheQueenOfSpiritsToSleep.Q10833_PutTheQueenOfSpiritsToSleep;
import quests.Q10836_DisappearedClanMember.Q10836_DisappearedClanMember;
import quests.Q10837_LookingForTheBlackbirdClanMember.Q10837_LookingForTheBlackbirdClanMember;
import quests.Q10838_TheReasonForNotBeingAbleToGetOut.Q10838_TheReasonForNotBeingAbleToGetOut;
/**
* @author NosBit
@@ -820,7 +821,8 @@ public class QuestMasterHandler
Q10832_EnergyOfSadnessAndAnger.class,
Q10833_PutTheQueenOfSpiritsToSleep.class,
Q10836_DisappearedClanMember.class,
Q10837_LookingForTheBlackbirdClanMember.class
Q10837_LookingForTheBlackbirdClanMember.class,
Q10838_TheReasonForNotBeingAbleToGetOut.class
};
public static void main(String[] args)