diff --git a/L2J_Mobius_Underground/dist/game/data/scripts/quests/MissingQuests.txt b/L2J_Mobius_Underground/dist/game/data/scripts/quests/MissingQuests.txt index 1f51178147..9e4700519b 100644 --- a/L2J_Mobius_Underground/dist/game/data/scripts/quests/MissingQuests.txt +++ b/L2J_Mobius_Underground/dist/game/data/scripts/quests/MissingQuests.txt @@ -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 diff --git a/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10838_TheReasonForNotBeingAbleToGetOut/34064-00.htm b/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10838_TheReasonForNotBeingAbleToGetOut/34064-00.htm new file mode 100644 index 0000000000..9418e8a1b8 --- /dev/null +++ b/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10838_TheReasonForNotBeingAbleToGetOut/34064-00.htm @@ -0,0 +1,4 @@ +Blackbird Clan Member Hurak:
+This place is dangerous. It's still too early for you.
+(Only characters above Lv. 101.) + \ No newline at end of file diff --git a/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10838_TheReasonForNotBeingAbleToGetOut/34064-01.htm b/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10838_TheReasonForNotBeingAbleToGetOut/34064-01.htm new file mode 100644 index 0000000000..dfb47e9626 --- /dev/null +++ b/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10838_TheReasonForNotBeingAbleToGetOut/34064-01.htm @@ -0,0 +1,5 @@ +Blackbird Clan Member Hurak:
+Is that...?
Is Leona here? No, Leona would have come directly here.
+Is that seal from Elikia?
+ + \ No newline at end of file diff --git a/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10838_TheReasonForNotBeingAbleToGetOut/34064-02.htm b/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10838_TheReasonForNotBeingAbleToGetOut/34064-02.htm new file mode 100644 index 0000000000..cb41f7db2f --- /dev/null +++ b/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10838_TheReasonForNotBeingAbleToGetOut/34064-02.htm @@ -0,0 +1,5 @@ +Blackbird Clan Member Hurak:
+How is Elikia doing?
+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.
+ + \ No newline at end of file diff --git a/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10838_TheReasonForNotBeingAbleToGetOut/34064-03.htm b/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10838_TheReasonForNotBeingAbleToGetOut/34064-03.htm new file mode 100644 index 0000000000..5f20cd69e1 --- /dev/null +++ b/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10838_TheReasonForNotBeingAbleToGetOut/34064-03.htm @@ -0,0 +1,4 @@ +Blackbird Clan Member Hurak:
+Do you think you are reliable? How can I trust you? If you really are my ally, show me the proof!
+(Quest may only be undertaken by characters with the Blackbird Seal.) + \ No newline at end of file diff --git a/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10838_TheReasonForNotBeingAbleToGetOut/34064-04.htm b/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10838_TheReasonForNotBeingAbleToGetOut/34064-04.htm new file mode 100644 index 0000000000..1115276ffd --- /dev/null +++ b/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10838_TheReasonForNotBeingAbleToGetOut/34064-04.htm @@ -0,0 +1,6 @@ +Blackbird Clan Member Hurak:
+I can't wait to get out of here, but I must stay here.
+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.
+Do you know about neutralizers?
+ + \ No newline at end of file diff --git a/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10838_TheReasonForNotBeingAbleToGetOut/34064-05.htm b/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10838_TheReasonForNotBeingAbleToGetOut/34064-05.htm new file mode 100644 index 0000000000..3a7d9a39db --- /dev/null +++ b/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10838_TheReasonForNotBeingAbleToGetOut/34064-05.htm @@ -0,0 +1,4 @@ +Blackbird Clan Member Hurak:
+There's something called Dark Atelia Neutralizer. That alleviates the pain I feel a little. The Embryo carry that neutralizer, but it's hard to get.
+If you really are here because Elikia sent you to help me, defeat 150 of the Fortress Guardian Captains, Fortress Raiders, Atelia Passionate Soldiers, and Atelia Elite Captains. Also, I would appreciate it if you could get me 10 Dark Atelia Neutralizers. + \ No newline at end of file diff --git a/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10838_TheReasonForNotBeingAbleToGetOut/34064-06.html b/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10838_TheReasonForNotBeingAbleToGetOut/34064-06.html new file mode 100644 index 0000000000..1bc36e6289 --- /dev/null +++ b/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10838_TheReasonForNotBeingAbleToGetOut/34064-06.html @@ -0,0 +1,4 @@ +Blackbird Clan Member Hurak:
+I can't trust you yet.
+Try defeating 150 of the Fortress Guardian Captains, Fortress Raiders, Atelia Passionate Soldiers, and Atelia Elite Captains. Also, get me 10 Dark Atelia Neutralizers. + \ No newline at end of file diff --git a/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10838_TheReasonForNotBeingAbleToGetOut/34064-07.html b/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10838_TheReasonForNotBeingAbleToGetOut/34064-07.html new file mode 100644 index 0000000000..897d342fd9 --- /dev/null +++ b/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10838_TheReasonForNotBeingAbleToGetOut/34064-07.html @@ -0,0 +1,4 @@ +Blackbird Clan Member Hurak:
+Oh! Did you really defeat the Embryo? Did you also get the Dark Atelia Neutralizer?
+ + \ No newline at end of file diff --git a/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10838_TheReasonForNotBeingAbleToGetOut/34064-08.html b/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10838_TheReasonForNotBeingAbleToGetOut/34064-08.html new file mode 100644 index 0000000000..4f098927a2 --- /dev/null +++ b/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10838_TheReasonForNotBeingAbleToGetOut/34064-08.html @@ -0,0 +1,4 @@ +Blackbird Clan Member Hurak:
+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.
+I'll write you a letter about my situation so please take it to Elikia. Thanks. + \ No newline at end of file diff --git a/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10838_TheReasonForNotBeingAbleToGetOut/Q10838_TheReasonForNotBeingAbleToGetOut.java b/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10838_TheReasonForNotBeingAbleToGetOut/Q10838_TheReasonForNotBeingAbleToGetOut.java new file mode 100644 index 0000000000..e1afcc7cda --- /dev/null +++ b/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q10838_TheReasonForNotBeingAbleToGetOut/Q10838_TheReasonForNotBeingAbleToGetOut.java @@ -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 . + */ +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 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 holder = new HashSet<>(); + holder.add(new NpcLogListHolder(NpcStringId.DEFEAT_THE_EMBRYO, killCount)); + return holder; + } + } + return super.getNpcLogList(player); + } +} \ No newline at end of file diff --git a/L2J_Mobius_Underground/dist/game/data/scripts/quests/QuestMasterHandler.java b/L2J_Mobius_Underground/dist/game/data/scripts/quests/QuestMasterHandler.java index 89f7f2d892..eb3be2e5a8 100644 --- a/L2J_Mobius_Underground/dist/game/data/scripts/quests/QuestMasterHandler.java +++ b/L2J_Mobius_Underground/dist/game/data/scripts/quests/QuestMasterHandler.java @@ -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)