diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/MissingQuests.txt b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/MissingQuests.txt index 3a5f682d05..8c73ec9b2b 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/MissingQuests.txt +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/MissingQuests.txt @@ -37,7 +37,6 @@ 839 Request from the Unworldly Visitors 840 Request from the Kingdom's Royal Guard 841 Contamination Containment -842 Captive Demons 843 Giant Evolution Control 844 Giant's Treasure 845 Sabotage the Embryo Supplies diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-00.htm b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-00.htm new file mode 100644 index 0000000000..7e05a96b57 --- /dev/null +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-00.htm @@ -0,0 +1,6 @@ +Sthor:
+I don't think you'll be able to complete this. You seem passionate, but you don't have enough experience.
+Please come back when you've become stronger.
+Unworldly Visitors faction level should be 1
+(Only characters above Lv. 100.) + \ No newline at end of file diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-01.htm b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-01.htm new file mode 100644 index 0000000000..5e8419301f --- /dev/null +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-01.htm @@ -0,0 +1,6 @@ +Sthor:
+Ah, adventurer! There you are again. How about helping us some more? if you do, you can deepen the mutual trust with us and Ferin.
+What do you say? if you don't remember what to do, I can tell you again. + + + \ No newline at end of file diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-01a.htm b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-01a.htm new file mode 100644 index 0000000000..1c36e1dbab --- /dev/null +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-01a.htm @@ -0,0 +1,6 @@ +Sthor:
+Ah, adventurer! There you are again. How about helping us some more?
+What do you say? If you don't remember what the mission was, I can tell you again.
+ + + \ No newline at end of file diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-01b.htm b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-01b.htm new file mode 100644 index 0000000000..df0ca9ef86 --- /dev/null +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-01b.htm @@ -0,0 +1,6 @@ +Sthor:
+Adventurer! Good to see you. Since you've helped us so much already, how about helping us some more?
+What do you say? If you don't remember what the mission was, I can tell you again.
+ + + \ No newline at end of file diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-01c.htm b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-01c.htm new file mode 100644 index 0000000000..148f512567 --- /dev/null +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-01c.htm @@ -0,0 +1,5 @@ +Sthor:
+I've been waiting for you, adventurer. Well since you are here now, will you listen to me? I know I can trust you, but if you complete this mission, we'll become better allies and your pockets will get heavier. What do you say? Or do you need me to explain the mission again?
+ + + \ No newline at end of file diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-02.htm b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-02.htm new file mode 100644 index 0000000000..3b66a89018 --- /dev/null +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-02.htm @@ -0,0 +1,4 @@ +Sthor:
+We've begun an investigation in the Garden of Spirits starting from here. However, we are being threatened by the spirits there, so something must be done.
+ + \ No newline at end of file diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-03.htm b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-03.htm new file mode 100644 index 0000000000..60850328af --- /dev/null +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-03.htm @@ -0,0 +1,6 @@ +Sthor:
+We know of a way to defeat those spirits, at least temporarily. This way, we'll be able to put the spirits at rest, even if it's just for a little while.
+Of course, we will give you a reward for your help. And there is one more thing. While you are helping us, you'll build trust with us. The more we trust you, the more rewards we will give you, and there are some secret missions that we only give to those we trust.
+That's about it.
+ + \ No newline at end of file diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-04.htm b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-04.htm new file mode 100644 index 0000000000..e578d5f519 --- /dev/null +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-04.htm @@ -0,0 +1,7 @@ +Sthor:
+Good. Let me tell you what to do. Just choose the mission that you are capable of doing.
+Basic Mission - Collect 200 Mutated Spirit's Souls. +Intermediate Mission - Collect 400 Mutated Spirit's Souls.
+ + + \ No newline at end of file diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-04.html b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-04.html new file mode 100644 index 0000000000..4b95d66e11 --- /dev/null +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-04.html @@ -0,0 +1,6 @@ +Sthor:
+This isn't the first time we've met? You've completed a mission before? I see... Well, I don't really have a good memory.
+If you have completed a mission before, then that means you must have a Mark of Trust. What? You don't have one?
+Then you are either a liar, or you haven't been here in a long time. My trust is something you must continously try to maintain. Will you listen to me?
+ + \ No newline at end of file diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-04a.htm b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-04a.htm new file mode 100644 index 0000000000..3ca5bb885a --- /dev/null +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-04a.htm @@ -0,0 +1,7 @@ +Sthor:
+Good. Let me tell you what to do. Just choose the mission that you are capable of doing.
+Basic Mission - Collect 200 Mutated Spirit's Souls. +Intermediate Mission - Collect 400 Mutated Spirit's Souls.
+ + + \ No newline at end of file diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-05.htm b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-05.htm new file mode 100644 index 0000000000..7f904dcb50 --- /dev/null +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-05.htm @@ -0,0 +1,3 @@ +Sthor:
+Alright. Here's the mission. Hunt the Kerberos Leger, Kerberos Fort, Kerberos Nero, Fury Sylph Barrena, Fury Sylph Labido, Fury Sylph Purka, Fury Kerberos Leger, and the Fury Kerberos Nero, and collect their Mutated Spirit's Souls as proof.
You can get rewards only if you bring at least 200. Of course, you'll get more rewards if you bring more. + \ No newline at end of file diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-05.html b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-05.html new file mode 100644 index 0000000000..1e608eed6b --- /dev/null +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-05.html @@ -0,0 +1,3 @@ +Sthor:
+Your Unworldly Visitors Faction Level Must be 3 or above may undertake this mission. + \ No newline at end of file diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-06.html b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-06.html new file mode 100644 index 0000000000..3efafca5f4 --- /dev/null +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-06.html @@ -0,0 +1,6 @@ +Sthor:
+You have chosen the basic mission to collect 200 Mutated Spirit's Souls. Once you have selected the difficulty of the mission, you must meet the requirements in order to complete it. Choose wisely.
+Are you sure you want to proceed with this mission?
+ + + \ No newline at end of file diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-06a.html b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-06a.html new file mode 100644 index 0000000000..d58a28d8dc --- /dev/null +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-06a.html @@ -0,0 +1,6 @@ +Sthor:
+You have chosen the intermediate mission to collect 400 Mutated Spirit's Souls. Once you have selected the difficulty of the mission, you must meet the requirements in order to complete it. Choose wisely.
+Are you sure you want to proceed with this mission?
+ + + \ No newline at end of file diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-07.html b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-07.html new file mode 100644 index 0000000000..00db026769 --- /dev/null +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-07.html @@ -0,0 +1,4 @@ +Sthor:
+Good. Left me explain the details. Go to the Garden of Spirits, defeat the Kerberos Lager, Kerberos Fort, Kerberos Nero, Fury Sylph Barrena, Fury Sylph Labido, Fury Sylph Purka, Fury Kerberos Leger, and Fury Kerberos Nero, and put them to rest.
+As evidence, please bring back 200 Mutated Spirit's Souls. It should be manageable. + \ No newline at end of file diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-07a.html b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-07a.html new file mode 100644 index 0000000000..31e8d782cb --- /dev/null +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-07a.html @@ -0,0 +1,4 @@ +Sthor:
+Good. Left me explain the details. Go to the Garden of Spirits, defeat the Kerberos Lager, Kerberos Fort, Kerberos Nero, Fury Sylph Barrena, Fury Sylph Labido, Fury Sylph Purka, Fury Kerberos Leger, and Fury Kerberos Nero, and put them to rest.
+As evidence, please bring back 400 Mutated Spirit's Souls. It should be manageable. + \ No newline at end of file diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-07c.html b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-07c.html new file mode 100644 index 0000000000..aaef92163e --- /dev/null +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-07c.html @@ -0,0 +1,5 @@ +Sthor:
+You want to finish already? Well, I can still give you a reward... But it won't be something good. Are you sure?
+ + + \ No newline at end of file diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-08.html b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-08.html new file mode 100644 index 0000000000..c0a54e48e6 --- /dev/null +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-08.html @@ -0,0 +1,3 @@ +Sthor:
+Go to the Garden of Spirits and defeat all type monsters until you collect 200 Mutated Spirit's Souls. + \ No newline at end of file diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-08a.html b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-08a.html new file mode 100644 index 0000000000..4a88756bea --- /dev/null +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-08a.html @@ -0,0 +1,3 @@ +Sthor:
+Go to the Garden of Spirits and defeat all type monsters until you collect 400 Mutated Spirit's Souls. + \ No newline at end of file diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-09.html b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-09.html new file mode 100644 index 0000000000..dda8741dc7 --- /dev/null +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-09.html @@ -0,0 +1,6 @@ +Sthor:
+Toy have collected all of the Mutated Spirit's Souls. You have completed the mission successfully.
+I would like to congratulate you on completing the mission. Here's your reward. If you have a Faction Amity Token, I can give You more rewards.
+ + + \ No newline at end of file diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-09a.html b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-09a.html new file mode 100644 index 0000000000..bcc45279f1 --- /dev/null +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-09a.html @@ -0,0 +1,4 @@ +Sthor:
+You completed the mission!
+ + \ No newline at end of file diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-09c.html b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-09c.html new file mode 100644 index 0000000000..06bbf3dd00 --- /dev/null +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-09c.html @@ -0,0 +1,4 @@ +Sthor:
+You completed the mission!
+ + \ No newline at end of file diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-10.html b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-10.html new file mode 100644 index 0000000000..482c458ebf --- /dev/null +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-10.html @@ -0,0 +1,4 @@ +Sthor:
+Here is your reward. This will also help to improve the trust between you and us at the Unworldly Visitors.
+As long as you don't forget us, that is. We thank you for your hard work. + \ No newline at end of file diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-10a.html b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-10a.html new file mode 100644 index 0000000000..4beb6b1f42 --- /dev/null +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-10a.html @@ -0,0 +1,3 @@ +Sthor:
+Here's your reward. We'll be able to maintain our trust. As long as you don't forget about us, that is. + \ No newline at end of file diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-10b.html b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-10b.html new file mode 100644 index 0000000000..e3a6b53369 --- /dev/null +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-10b.html @@ -0,0 +1,3 @@ +Sthor:
+Here's your reward, I'll remember how you've helped us all those times. Here's a higher level Mark of Trust. Thank you for all of your help. + \ No newline at end of file diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-10c.html b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-10c.html new file mode 100644 index 0000000000..53dc6d1f75 --- /dev/null +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-10c.html @@ -0,0 +1,3 @@ +Sthor:
+Here's your reward for helping us. Although you didn't get all the Marks, I still remember how you helped us. I have no doubt the trust between us has deepened even more. + \ No newline at end of file diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00842_CaptiveDemons/Q00842_CaptiveDemons.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00842_CaptiveDemons/Q00842_CaptiveDemons.java new file mode 100644 index 0000000000..7c1f2a688f --- /dev/null +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00842_CaptiveDemons/Q00842_CaptiveDemons.java @@ -0,0 +1,301 @@ +/* + * 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.Q00842_CaptiveDemons; + +import java.util.HashSet; +import java.util.Set; + +import org.l2jmobius.gameserver.enums.Faction; +import org.l2jmobius.gameserver.enums.QuestSound; +import org.l2jmobius.gameserver.enums.QuestType; +import org.l2jmobius.gameserver.model.actor.Npc; +import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; +import org.l2jmobius.gameserver.model.holders.NpcLogListHolder; +import org.l2jmobius.gameserver.model.quest.Quest; +import org.l2jmobius.gameserver.model.quest.QuestState; +import org.l2jmobius.gameserver.model.quest.State; +import org.l2jmobius.gameserver.network.NpcStringId; + +/** + * Captive Demons (842) + * @URL https://l2wiki.com/Captive_Demons + * @author Dmitri + */ +public class Q00842_CaptiveDemons extends Quest +{ + // NPC + private static final int STHOR = 34219; + // Monsters + private static final int[] MONSTERS = + { + 23735, // Captive Familiar Spirit + 23736, // Captive Hell Demon + 23737, // Captive Succubus + 23738 // Captive Phantom + }; + // Items + private static final int GIANT_TRACKERS_BASIC_SUPPLY_BOX = 47184; + private static final int GIANT_TRACKERS_INTERMEDIATE_SUPPLY_BOX = 47185; + private static final int GIANT_TRACKERS_ADVANCED_SUPPLY_BOX = 47186; + // Misc + private static final int KILLING_NPCSTRING_ID = NpcStringId.DEFEATING_THE_CAPTIVE_DEMONS.getId(); + private static final boolean PARTY_QUEST = true; + private static final int MIN_LEVEL = 100; + + public Q00842_CaptiveDemons() + { + super(842); + addStartNpc(STHOR); + addTalkId(STHOR); + addKillId(MONSTERS); + addCondMinLevel(MIN_LEVEL, "34219-00.htm"); + addFactionLevel(Faction.GIANT_TRACKERS, 1, "34219-00.htm"); + } + + @Override + public String onAdvEvent(String event, Npc npc, PlayerInstance player) + { + String htmltext = null; + final QuestState qs = getQuestState(player, false); + if (qs == null) + { + return htmltext; + } + + switch (event) + { + case "34219-02.htm": + case "34219-03.htm": + case "34219-04.htm": + case "34219-04a.htm": + case "34219-06.html": + case "34219-06a.html": + { + htmltext = event; + break; + } + case "select_mission": + { + qs.startQuest(); + if (player.getFactionLevel(Faction.GIANT_TRACKERS) >= 3) + { + htmltext = "34219-04a.htm"; + break; + } + htmltext = "34219-04.htm"; + break; + } + case "return": + { + if (player.getFactionLevel(Faction.GIANT_TRACKERS) >= 3) + { + htmltext = "34219-04a.htm"; + break; + } + htmltext = "34219-04.htm"; + break; + } + case "34219-07.html": + { + qs.setCond(2, true); + htmltext = event; + break; + } + case "34219-07a.html": + { + qs.setCond(3, true); + htmltext = event; + break; + } + case "34219-10.html": + { + final int chance = getRandom(100); + switch (qs.getCond()) + { + case 4: + { + if (player.getLevel() >= MIN_LEVEL) + { + if (chance < 2) + { + giveItems(player, GIANT_TRACKERS_ADVANCED_SUPPLY_BOX, 1); + } + else if (chance < 20) + { + giveItems(player, GIANT_TRACKERS_INTERMEDIATE_SUPPLY_BOX, 1); + } + else if (chance < 100) + { + giveItems(player, GIANT_TRACKERS_BASIC_SUPPLY_BOX, 1); + } + addExpAndSp(player, 5_536_944_000L, 13_288_590); + addFactionPoints(player, Faction.GIANT_TRACKERS, 100); + qs.exitQuest(QuestType.DAILY, true); + htmltext = event; + } + else + { + htmltext = getNoQuestLevelRewardMsg(player); + } + break; + } + case 5: + { + if (player.getLevel() >= MIN_LEVEL) + { + if (chance < 2) + { + giveItems(player, GIANT_TRACKERS_ADVANCED_SUPPLY_BOX, 1); + } + else if (chance < 20) + { + giveItems(player, GIANT_TRACKERS_BASIC_SUPPLY_BOX, 1); + } + else if (chance < 100) + { + giveItems(player, GIANT_TRACKERS_INTERMEDIATE_SUPPLY_BOX, 1); + } + addExpAndSp(player, 11_073_888_000L, 26_577_180); + addFactionPoints(player, Faction.GIANT_TRACKERS, 200); + qs.exitQuest(QuestType.DAILY, true); + htmltext = event; + } + else + { + htmltext = getNoQuestLevelRewardMsg(player); + } + break; + } + } + break; + } + } + return htmltext; + } + + @Override + public String onTalk(Npc npc, PlayerInstance player) + { + final QuestState qs = getQuestState(player, true); + String htmltext = getNoQuestMsg(player); + + switch (qs.getState()) + { + case State.CREATED: + { + htmltext = "34219-01.htm"; + } + case State.STARTED: + { + switch (qs.getCond()) + { + case 1: + { + if (player.getFactionLevel(Faction.GIANT_TRACKERS) >= 3) + { + htmltext = "34219-04a.htm"; + break; + } + htmltext = "34219-04.htm"; + break; + } + case 2: + { + htmltext = "34219-08.html"; + break; + } + case 3: + { + htmltext = "34219-08a.html"; + break; + } + case 4: + case 5: + { + htmltext = "34219-09.html"; + break; + } + } + break; + } + case State.COMPLETED: + { + if (!qs.isNowAvailable()) + { + htmltext = getAlreadyCompletedMsg(player, QuestType.DAILY); + } + else + { + qs.setState(State.CREATED); + htmltext = "34219-01.htm"; + } + break; + } + } + return htmltext; + } + + @Override + public String onKill(Npc npc, PlayerInstance killer, boolean isSummon) + { + final QuestState qs = PARTY_QUEST ? getRandomPartyMemberState(killer, -1, 3, npc) : getQuestState(killer, false); + if ((qs != null) && (qs.getCond() > 1)) + { + switch (qs.getCond()) + { + case 2: + { + final int killedGhosts = qs.getInt("AncientGhosts") + 1; + qs.set("AncientGhosts", killedGhosts); + playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET); + + if (killedGhosts >= 200) + { + qs.setCond(4, true); + } + break; + } + case 3: + { + final int killedGhosts = qs.getInt("AncientGhosts") + 1; + qs.set("AncientGhosts", killedGhosts); + playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET); + + if (killedGhosts >= 400) + { + qs.setCond(5, true); + } + break; + } + } + } + return super.onKill(npc, killer, isSummon); + } + + @Override + public Set getNpcLogList(PlayerInstance player) + { + final QuestState qs = getQuestState(player, false); + if ((qs != null) && (qs.getCond() > 1)) + { + final Set holder = new HashSet<>(); + holder.add(new NpcLogListHolder(KILLING_NPCSTRING_ID, true, qs.getInt("AncientGhosts"))); + return holder; + } + return super.getNpcLogList(player); + } +} diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/QuestMasterHandler.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/QuestMasterHandler.java index 747c444266..0eba6f146b 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/QuestMasterHandler.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/QuestMasterHandler.java @@ -196,6 +196,7 @@ import quests.Q00830_TheWayOfTheGiantsPawn.Q00830_TheWayOfTheGiantsPawn; import quests.Q00831_SayhasScheme.Q00831_SayhasScheme; import quests.Q00833_DevilsTreasureTauti.Q00833_DevilsTreasureTauti; import quests.Q00835_PitiableMelisa.Q00835_PitiableMelisa; +import quests.Q00842_CaptiveDemons.Q00842_CaptiveDemons; import quests.Q00901_HowLavasaurusesAreMade.Q00901_HowLavasaurusesAreMade; import quests.Q00902_ReclaimOurEra.Q00902_ReclaimOurEra; import quests.Q00903_TheCallOfAntharas.Q00903_TheCallOfAntharas; @@ -492,7 +493,6 @@ import quests.not_done.Q00838_RequestFromTheMotherTreeGuardians; import quests.not_done.Q00839_RequestFromTheUnworldlyVisitors; import quests.not_done.Q00840_RequestFromTheKingdomsRoyalGuard; import quests.not_done.Q00841_ContaminationContainment; -import quests.not_done.Q00842_CaptiveDemons; import quests.not_done.Q00843_GiantEvolutionControl; import quests.not_done.Q00844_GiantsTreasure; import quests.not_done.Q00845_SabotageTheEmbryoSupplies; @@ -740,7 +740,7 @@ public class QuestMasterHandler Q00839_RequestFromTheUnworldlyVisitors.class, // TODO: Not done. Q00840_RequestFromTheKingdomsRoyalGuard.class, // TODO: Not done. Q00841_ContaminationContainment.class, // TODO: Not done. - Q00842_CaptiveDemons.class, // TODO: Not done. + Q00842_CaptiveDemons.class, Q00843_GiantEvolutionControl.class, // TODO: Not done. Q00844_GiantsTreasure.class, // TODO: Not done. Q00845_SabotageTheEmbryoSupplies.class, // TODO: Not done. diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/not_done/Q00842_CaptiveDemons.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/not_done/Q00842_CaptiveDemons.java deleted file mode 100644 index 7be5418b76..0000000000 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/not_done/Q00842_CaptiveDemons.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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.not_done; - -import org.l2jmobius.Config; -import org.l2jmobius.gameserver.model.quest.Quest; - -/** - * @author Mobius - */ -public class Q00842_CaptiveDemons extends Quest -{ - private static final int START_NPC = 34219; - - public Q00842_CaptiveDemons() - { - super(842); - addStartNpc(START_NPC); - addTalkId(START_NPC); - addCondMinLevel(Config.PLAYER_MAXIMUM_LEVEL, getNoQuestMsg(null)); - } -} diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/MissingQuests.txt b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/MissingQuests.txt index 457dea57b8..588b6ee4ac 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/MissingQuests.txt +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/MissingQuests.txt @@ -91,7 +91,6 @@ 839 Request from the Unworldly Visitors 840 Request from the Kingdom's Royal Guard 841 Contamination Containment -842 Captive Demons 843 Giant Evolution Control 844 Giant's Treasure 845 Sabotage the Embryo Supplies diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-00.htm b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-00.htm new file mode 100644 index 0000000000..7e05a96b57 --- /dev/null +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-00.htm @@ -0,0 +1,6 @@ +Sthor:
+I don't think you'll be able to complete this. You seem passionate, but you don't have enough experience.
+Please come back when you've become stronger.
+Unworldly Visitors faction level should be 1
+(Only characters above Lv. 100.) + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-01.htm b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-01.htm new file mode 100644 index 0000000000..5e8419301f --- /dev/null +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-01.htm @@ -0,0 +1,6 @@ +Sthor:
+Ah, adventurer! There you are again. How about helping us some more? if you do, you can deepen the mutual trust with us and Ferin.
+What do you say? if you don't remember what to do, I can tell you again. + + + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-01a.htm b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-01a.htm new file mode 100644 index 0000000000..1c36e1dbab --- /dev/null +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-01a.htm @@ -0,0 +1,6 @@ +Sthor:
+Ah, adventurer! There you are again. How about helping us some more?
+What do you say? If you don't remember what the mission was, I can tell you again.
+ + + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-01b.htm b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-01b.htm new file mode 100644 index 0000000000..df0ca9ef86 --- /dev/null +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-01b.htm @@ -0,0 +1,6 @@ +Sthor:
+Adventurer! Good to see you. Since you've helped us so much already, how about helping us some more?
+What do you say? If you don't remember what the mission was, I can tell you again.
+ + + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-01c.htm b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-01c.htm new file mode 100644 index 0000000000..148f512567 --- /dev/null +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-01c.htm @@ -0,0 +1,5 @@ +Sthor:
+I've been waiting for you, adventurer. Well since you are here now, will you listen to me? I know I can trust you, but if you complete this mission, we'll become better allies and your pockets will get heavier. What do you say? Or do you need me to explain the mission again?
+ + + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-02.htm b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-02.htm new file mode 100644 index 0000000000..3b66a89018 --- /dev/null +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-02.htm @@ -0,0 +1,4 @@ +Sthor:
+We've begun an investigation in the Garden of Spirits starting from here. However, we are being threatened by the spirits there, so something must be done.
+ + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-03.htm b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-03.htm new file mode 100644 index 0000000000..60850328af --- /dev/null +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-03.htm @@ -0,0 +1,6 @@ +Sthor:
+We know of a way to defeat those spirits, at least temporarily. This way, we'll be able to put the spirits at rest, even if it's just for a little while.
+Of course, we will give you a reward for your help. And there is one more thing. While you are helping us, you'll build trust with us. The more we trust you, the more rewards we will give you, and there are some secret missions that we only give to those we trust.
+That's about it.
+ + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-04.htm b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-04.htm new file mode 100644 index 0000000000..e578d5f519 --- /dev/null +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-04.htm @@ -0,0 +1,7 @@ +Sthor:
+Good. Let me tell you what to do. Just choose the mission that you are capable of doing.
+Basic Mission - Collect 200 Mutated Spirit's Souls. +Intermediate Mission - Collect 400 Mutated Spirit's Souls.
+ + + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-04.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-04.html new file mode 100644 index 0000000000..4b95d66e11 --- /dev/null +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-04.html @@ -0,0 +1,6 @@ +Sthor:
+This isn't the first time we've met? You've completed a mission before? I see... Well, I don't really have a good memory.
+If you have completed a mission before, then that means you must have a Mark of Trust. What? You don't have one?
+Then you are either a liar, or you haven't been here in a long time. My trust is something you must continously try to maintain. Will you listen to me?
+ + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-04a.htm b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-04a.htm new file mode 100644 index 0000000000..3ca5bb885a --- /dev/null +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-04a.htm @@ -0,0 +1,7 @@ +Sthor:
+Good. Let me tell you what to do. Just choose the mission that you are capable of doing.
+Basic Mission - Collect 200 Mutated Spirit's Souls. +Intermediate Mission - Collect 400 Mutated Spirit's Souls.
+ + + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-05.htm b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-05.htm new file mode 100644 index 0000000000..7f904dcb50 --- /dev/null +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-05.htm @@ -0,0 +1,3 @@ +Sthor:
+Alright. Here's the mission. Hunt the Kerberos Leger, Kerberos Fort, Kerberos Nero, Fury Sylph Barrena, Fury Sylph Labido, Fury Sylph Purka, Fury Kerberos Leger, and the Fury Kerberos Nero, and collect their Mutated Spirit's Souls as proof.
You can get rewards only if you bring at least 200. Of course, you'll get more rewards if you bring more. + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-05.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-05.html new file mode 100644 index 0000000000..1e608eed6b --- /dev/null +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-05.html @@ -0,0 +1,3 @@ +Sthor:
+Your Unworldly Visitors Faction Level Must be 3 or above may undertake this mission. + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-06.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-06.html new file mode 100644 index 0000000000..3efafca5f4 --- /dev/null +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-06.html @@ -0,0 +1,6 @@ +Sthor:
+You have chosen the basic mission to collect 200 Mutated Spirit's Souls. Once you have selected the difficulty of the mission, you must meet the requirements in order to complete it. Choose wisely.
+Are you sure you want to proceed with this mission?
+ + + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-06a.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-06a.html new file mode 100644 index 0000000000..d58a28d8dc --- /dev/null +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-06a.html @@ -0,0 +1,6 @@ +Sthor:
+You have chosen the intermediate mission to collect 400 Mutated Spirit's Souls. Once you have selected the difficulty of the mission, you must meet the requirements in order to complete it. Choose wisely.
+Are you sure you want to proceed with this mission?
+ + + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-07.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-07.html new file mode 100644 index 0000000000..00db026769 --- /dev/null +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-07.html @@ -0,0 +1,4 @@ +Sthor:
+Good. Left me explain the details. Go to the Garden of Spirits, defeat the Kerberos Lager, Kerberos Fort, Kerberos Nero, Fury Sylph Barrena, Fury Sylph Labido, Fury Sylph Purka, Fury Kerberos Leger, and Fury Kerberos Nero, and put them to rest.
+As evidence, please bring back 200 Mutated Spirit's Souls. It should be manageable. + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-07a.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-07a.html new file mode 100644 index 0000000000..31e8d782cb --- /dev/null +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-07a.html @@ -0,0 +1,4 @@ +Sthor:
+Good. Left me explain the details. Go to the Garden of Spirits, defeat the Kerberos Lager, Kerberos Fort, Kerberos Nero, Fury Sylph Barrena, Fury Sylph Labido, Fury Sylph Purka, Fury Kerberos Leger, and Fury Kerberos Nero, and put them to rest.
+As evidence, please bring back 400 Mutated Spirit's Souls. It should be manageable. + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-07c.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-07c.html new file mode 100644 index 0000000000..aaef92163e --- /dev/null +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-07c.html @@ -0,0 +1,5 @@ +Sthor:
+You want to finish already? Well, I can still give you a reward... But it won't be something good. Are you sure?
+ + + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-08.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-08.html new file mode 100644 index 0000000000..c0a54e48e6 --- /dev/null +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-08.html @@ -0,0 +1,3 @@ +Sthor:
+Go to the Garden of Spirits and defeat all type monsters until you collect 200 Mutated Spirit's Souls. + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-08a.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-08a.html new file mode 100644 index 0000000000..4a88756bea --- /dev/null +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-08a.html @@ -0,0 +1,3 @@ +Sthor:
+Go to the Garden of Spirits and defeat all type monsters until you collect 400 Mutated Spirit's Souls. + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-09.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-09.html new file mode 100644 index 0000000000..dda8741dc7 --- /dev/null +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-09.html @@ -0,0 +1,6 @@ +Sthor:
+Toy have collected all of the Mutated Spirit's Souls. You have completed the mission successfully.
+I would like to congratulate you on completing the mission. Here's your reward. If you have a Faction Amity Token, I can give You more rewards.
+ + + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-09a.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-09a.html new file mode 100644 index 0000000000..bcc45279f1 --- /dev/null +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-09a.html @@ -0,0 +1,4 @@ +Sthor:
+You completed the mission!
+ + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-09c.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-09c.html new file mode 100644 index 0000000000..06bbf3dd00 --- /dev/null +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-09c.html @@ -0,0 +1,4 @@ +Sthor:
+You completed the mission!
+ + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-10.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-10.html new file mode 100644 index 0000000000..482c458ebf --- /dev/null +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-10.html @@ -0,0 +1,4 @@ +Sthor:
+Here is your reward. This will also help to improve the trust between you and us at the Unworldly Visitors.
+As long as you don't forget us, that is. We thank you for your hard work. + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-10a.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-10a.html new file mode 100644 index 0000000000..4beb6b1f42 --- /dev/null +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-10a.html @@ -0,0 +1,3 @@ +Sthor:
+Here's your reward. We'll be able to maintain our trust. As long as you don't forget about us, that is. + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-10b.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-10b.html new file mode 100644 index 0000000000..e3a6b53369 --- /dev/null +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-10b.html @@ -0,0 +1,3 @@ +Sthor:
+Here's your reward, I'll remember how you've helped us all those times. Here's a higher level Mark of Trust. Thank you for all of your help. + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-10c.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-10c.html new file mode 100644 index 0000000000..53dc6d1f75 --- /dev/null +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-10c.html @@ -0,0 +1,3 @@ +Sthor:
+Here's your reward for helping us. Although you didn't get all the Marks, I still remember how you helped us. I have no doubt the trust between us has deepened even more. + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00842_CaptiveDemons/Q00842_CaptiveDemons.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00842_CaptiveDemons/Q00842_CaptiveDemons.java new file mode 100644 index 0000000000..7c1f2a688f --- /dev/null +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00842_CaptiveDemons/Q00842_CaptiveDemons.java @@ -0,0 +1,301 @@ +/* + * 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.Q00842_CaptiveDemons; + +import java.util.HashSet; +import java.util.Set; + +import org.l2jmobius.gameserver.enums.Faction; +import org.l2jmobius.gameserver.enums.QuestSound; +import org.l2jmobius.gameserver.enums.QuestType; +import org.l2jmobius.gameserver.model.actor.Npc; +import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; +import org.l2jmobius.gameserver.model.holders.NpcLogListHolder; +import org.l2jmobius.gameserver.model.quest.Quest; +import org.l2jmobius.gameserver.model.quest.QuestState; +import org.l2jmobius.gameserver.model.quest.State; +import org.l2jmobius.gameserver.network.NpcStringId; + +/** + * Captive Demons (842) + * @URL https://l2wiki.com/Captive_Demons + * @author Dmitri + */ +public class Q00842_CaptiveDemons extends Quest +{ + // NPC + private static final int STHOR = 34219; + // Monsters + private static final int[] MONSTERS = + { + 23735, // Captive Familiar Spirit + 23736, // Captive Hell Demon + 23737, // Captive Succubus + 23738 // Captive Phantom + }; + // Items + private static final int GIANT_TRACKERS_BASIC_SUPPLY_BOX = 47184; + private static final int GIANT_TRACKERS_INTERMEDIATE_SUPPLY_BOX = 47185; + private static final int GIANT_TRACKERS_ADVANCED_SUPPLY_BOX = 47186; + // Misc + private static final int KILLING_NPCSTRING_ID = NpcStringId.DEFEATING_THE_CAPTIVE_DEMONS.getId(); + private static final boolean PARTY_QUEST = true; + private static final int MIN_LEVEL = 100; + + public Q00842_CaptiveDemons() + { + super(842); + addStartNpc(STHOR); + addTalkId(STHOR); + addKillId(MONSTERS); + addCondMinLevel(MIN_LEVEL, "34219-00.htm"); + addFactionLevel(Faction.GIANT_TRACKERS, 1, "34219-00.htm"); + } + + @Override + public String onAdvEvent(String event, Npc npc, PlayerInstance player) + { + String htmltext = null; + final QuestState qs = getQuestState(player, false); + if (qs == null) + { + return htmltext; + } + + switch (event) + { + case "34219-02.htm": + case "34219-03.htm": + case "34219-04.htm": + case "34219-04a.htm": + case "34219-06.html": + case "34219-06a.html": + { + htmltext = event; + break; + } + case "select_mission": + { + qs.startQuest(); + if (player.getFactionLevel(Faction.GIANT_TRACKERS) >= 3) + { + htmltext = "34219-04a.htm"; + break; + } + htmltext = "34219-04.htm"; + break; + } + case "return": + { + if (player.getFactionLevel(Faction.GIANT_TRACKERS) >= 3) + { + htmltext = "34219-04a.htm"; + break; + } + htmltext = "34219-04.htm"; + break; + } + case "34219-07.html": + { + qs.setCond(2, true); + htmltext = event; + break; + } + case "34219-07a.html": + { + qs.setCond(3, true); + htmltext = event; + break; + } + case "34219-10.html": + { + final int chance = getRandom(100); + switch (qs.getCond()) + { + case 4: + { + if (player.getLevel() >= MIN_LEVEL) + { + if (chance < 2) + { + giveItems(player, GIANT_TRACKERS_ADVANCED_SUPPLY_BOX, 1); + } + else if (chance < 20) + { + giveItems(player, GIANT_TRACKERS_INTERMEDIATE_SUPPLY_BOX, 1); + } + else if (chance < 100) + { + giveItems(player, GIANT_TRACKERS_BASIC_SUPPLY_BOX, 1); + } + addExpAndSp(player, 5_536_944_000L, 13_288_590); + addFactionPoints(player, Faction.GIANT_TRACKERS, 100); + qs.exitQuest(QuestType.DAILY, true); + htmltext = event; + } + else + { + htmltext = getNoQuestLevelRewardMsg(player); + } + break; + } + case 5: + { + if (player.getLevel() >= MIN_LEVEL) + { + if (chance < 2) + { + giveItems(player, GIANT_TRACKERS_ADVANCED_SUPPLY_BOX, 1); + } + else if (chance < 20) + { + giveItems(player, GIANT_TRACKERS_BASIC_SUPPLY_BOX, 1); + } + else if (chance < 100) + { + giveItems(player, GIANT_TRACKERS_INTERMEDIATE_SUPPLY_BOX, 1); + } + addExpAndSp(player, 11_073_888_000L, 26_577_180); + addFactionPoints(player, Faction.GIANT_TRACKERS, 200); + qs.exitQuest(QuestType.DAILY, true); + htmltext = event; + } + else + { + htmltext = getNoQuestLevelRewardMsg(player); + } + break; + } + } + break; + } + } + return htmltext; + } + + @Override + public String onTalk(Npc npc, PlayerInstance player) + { + final QuestState qs = getQuestState(player, true); + String htmltext = getNoQuestMsg(player); + + switch (qs.getState()) + { + case State.CREATED: + { + htmltext = "34219-01.htm"; + } + case State.STARTED: + { + switch (qs.getCond()) + { + case 1: + { + if (player.getFactionLevel(Faction.GIANT_TRACKERS) >= 3) + { + htmltext = "34219-04a.htm"; + break; + } + htmltext = "34219-04.htm"; + break; + } + case 2: + { + htmltext = "34219-08.html"; + break; + } + case 3: + { + htmltext = "34219-08a.html"; + break; + } + case 4: + case 5: + { + htmltext = "34219-09.html"; + break; + } + } + break; + } + case State.COMPLETED: + { + if (!qs.isNowAvailable()) + { + htmltext = getAlreadyCompletedMsg(player, QuestType.DAILY); + } + else + { + qs.setState(State.CREATED); + htmltext = "34219-01.htm"; + } + break; + } + } + return htmltext; + } + + @Override + public String onKill(Npc npc, PlayerInstance killer, boolean isSummon) + { + final QuestState qs = PARTY_QUEST ? getRandomPartyMemberState(killer, -1, 3, npc) : getQuestState(killer, false); + if ((qs != null) && (qs.getCond() > 1)) + { + switch (qs.getCond()) + { + case 2: + { + final int killedGhosts = qs.getInt("AncientGhosts") + 1; + qs.set("AncientGhosts", killedGhosts); + playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET); + + if (killedGhosts >= 200) + { + qs.setCond(4, true); + } + break; + } + case 3: + { + final int killedGhosts = qs.getInt("AncientGhosts") + 1; + qs.set("AncientGhosts", killedGhosts); + playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET); + + if (killedGhosts >= 400) + { + qs.setCond(5, true); + } + break; + } + } + } + return super.onKill(npc, killer, isSummon); + } + + @Override + public Set getNpcLogList(PlayerInstance player) + { + final QuestState qs = getQuestState(player, false); + if ((qs != null) && (qs.getCond() > 1)) + { + final Set holder = new HashSet<>(); + holder.add(new NpcLogListHolder(KILLING_NPCSTRING_ID, true, qs.getInt("AncientGhosts"))); + return holder; + } + return super.getNpcLogList(player); + } +} diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/QuestMasterHandler.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/QuestMasterHandler.java index 8112ef9e85..1251c2c3c8 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/QuestMasterHandler.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/QuestMasterHandler.java @@ -197,6 +197,7 @@ import quests.Q00830_TheWayOfTheGiantsPawn.Q00830_TheWayOfTheGiantsPawn; import quests.Q00831_SayhasScheme.Q00831_SayhasScheme; import quests.Q00833_DevilsTreasureTauti.Q00833_DevilsTreasureTauti; import quests.Q00835_PitiableMelisa.Q00835_PitiableMelisa; +import quests.Q00842_CaptiveDemons.Q00842_CaptiveDemons; import quests.Q00901_HowLavasaurusesAreMade.Q00901_HowLavasaurusesAreMade; import quests.Q00902_ReclaimOurEra.Q00902_ReclaimOurEra; import quests.Q00903_TheCallOfAntharas.Q00903_TheCallOfAntharas; @@ -498,7 +499,6 @@ import quests.not_done.Q00838_RequestFromTheMotherTreeGuardians; import quests.not_done.Q00839_RequestFromTheUnworldlyVisitors; import quests.not_done.Q00840_RequestFromTheKingdomsRoyalGuard; import quests.not_done.Q00841_ContaminationContainment; -import quests.not_done.Q00842_CaptiveDemons; import quests.not_done.Q00843_GiantEvolutionControl; import quests.not_done.Q00844_GiantsTreasure; import quests.not_done.Q00845_SabotageTheEmbryoSupplies; @@ -768,7 +768,7 @@ public class QuestMasterHandler Q00839_RequestFromTheUnworldlyVisitors.class, // TODO: Not done. Q00840_RequestFromTheKingdomsRoyalGuard.class, // TODO: Not done. Q00841_ContaminationContainment.class, // TODO: Not done. - Q00842_CaptiveDemons.class, // TODO: Not done. + Q00842_CaptiveDemons.class, Q00843_GiantEvolutionControl.class, // TODO: Not done. Q00844_GiantsTreasure.class, // TODO: Not done. Q00845_SabotageTheEmbryoSupplies.class, // TODO: Not done. diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/not_done/Q00842_CaptiveDemons.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/not_done/Q00842_CaptiveDemons.java deleted file mode 100644 index 7be5418b76..0000000000 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/not_done/Q00842_CaptiveDemons.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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.not_done; - -import org.l2jmobius.Config; -import org.l2jmobius.gameserver.model.quest.Quest; - -/** - * @author Mobius - */ -public class Q00842_CaptiveDemons extends Quest -{ - private static final int START_NPC = 34219; - - public Q00842_CaptiveDemons() - { - super(842); - addStartNpc(START_NPC); - addTalkId(START_NPC); - addCondMinLevel(Config.PLAYER_MAXIMUM_LEVEL, getNoQuestMsg(null)); - } -} diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/MissingQuests.txt b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/MissingQuests.txt index bb059b19d4..8aa0bf33fc 100644 --- a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/MissingQuests.txt +++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/MissingQuests.txt @@ -110,7 +110,6 @@ 839 Request from the Unworldly Visitors 840 Request from the Kingdom's Royal Guard 841 Contamination Containment -842 Captive Demons 843 Giant Evolution Control 844 Giant's Treasure 845 Sabotage the Embryo Supplies diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-00.htm b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-00.htm new file mode 100644 index 0000000000..7e05a96b57 --- /dev/null +++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-00.htm @@ -0,0 +1,6 @@ +Sthor:
+I don't think you'll be able to complete this. You seem passionate, but you don't have enough experience.
+Please come back when you've become stronger.
+Unworldly Visitors faction level should be 1
+(Only characters above Lv. 100.) + \ No newline at end of file diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-01.htm b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-01.htm new file mode 100644 index 0000000000..5e8419301f --- /dev/null +++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-01.htm @@ -0,0 +1,6 @@ +Sthor:
+Ah, adventurer! There you are again. How about helping us some more? if you do, you can deepen the mutual trust with us and Ferin.
+What do you say? if you don't remember what to do, I can tell you again. + + + \ No newline at end of file diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-01a.htm b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-01a.htm new file mode 100644 index 0000000000..1c36e1dbab --- /dev/null +++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-01a.htm @@ -0,0 +1,6 @@ +Sthor:
+Ah, adventurer! There you are again. How about helping us some more?
+What do you say? If you don't remember what the mission was, I can tell you again.
+ + + \ No newline at end of file diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-01b.htm b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-01b.htm new file mode 100644 index 0000000000..df0ca9ef86 --- /dev/null +++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-01b.htm @@ -0,0 +1,6 @@ +Sthor:
+Adventurer! Good to see you. Since you've helped us so much already, how about helping us some more?
+What do you say? If you don't remember what the mission was, I can tell you again.
+ + + \ No newline at end of file diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-01c.htm b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-01c.htm new file mode 100644 index 0000000000..148f512567 --- /dev/null +++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-01c.htm @@ -0,0 +1,5 @@ +Sthor:
+I've been waiting for you, adventurer. Well since you are here now, will you listen to me? I know I can trust you, but if you complete this mission, we'll become better allies and your pockets will get heavier. What do you say? Or do you need me to explain the mission again?
+ + + \ No newline at end of file diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-02.htm b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-02.htm new file mode 100644 index 0000000000..3b66a89018 --- /dev/null +++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-02.htm @@ -0,0 +1,4 @@ +Sthor:
+We've begun an investigation in the Garden of Spirits starting from here. However, we are being threatened by the spirits there, so something must be done.
+ + \ No newline at end of file diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-03.htm b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-03.htm new file mode 100644 index 0000000000..60850328af --- /dev/null +++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-03.htm @@ -0,0 +1,6 @@ +Sthor:
+We know of a way to defeat those spirits, at least temporarily. This way, we'll be able to put the spirits at rest, even if it's just for a little while.
+Of course, we will give you a reward for your help. And there is one more thing. While you are helping us, you'll build trust with us. The more we trust you, the more rewards we will give you, and there are some secret missions that we only give to those we trust.
+That's about it.
+ + \ No newline at end of file diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-04.htm b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-04.htm new file mode 100644 index 0000000000..e578d5f519 --- /dev/null +++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-04.htm @@ -0,0 +1,7 @@ +Sthor:
+Good. Let me tell you what to do. Just choose the mission that you are capable of doing.
+Basic Mission - Collect 200 Mutated Spirit's Souls. +Intermediate Mission - Collect 400 Mutated Spirit's Souls.
+ + + \ No newline at end of file diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-04.html b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-04.html new file mode 100644 index 0000000000..4b95d66e11 --- /dev/null +++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-04.html @@ -0,0 +1,6 @@ +Sthor:
+This isn't the first time we've met? You've completed a mission before? I see... Well, I don't really have a good memory.
+If you have completed a mission before, then that means you must have a Mark of Trust. What? You don't have one?
+Then you are either a liar, or you haven't been here in a long time. My trust is something you must continously try to maintain. Will you listen to me?
+ + \ No newline at end of file diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-04a.htm b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-04a.htm new file mode 100644 index 0000000000..3ca5bb885a --- /dev/null +++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-04a.htm @@ -0,0 +1,7 @@ +Sthor:
+Good. Let me tell you what to do. Just choose the mission that you are capable of doing.
+Basic Mission - Collect 200 Mutated Spirit's Souls. +Intermediate Mission - Collect 400 Mutated Spirit's Souls.
+ + + \ No newline at end of file diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-05.htm b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-05.htm new file mode 100644 index 0000000000..7f904dcb50 --- /dev/null +++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-05.htm @@ -0,0 +1,3 @@ +Sthor:
+Alright. Here's the mission. Hunt the Kerberos Leger, Kerberos Fort, Kerberos Nero, Fury Sylph Barrena, Fury Sylph Labido, Fury Sylph Purka, Fury Kerberos Leger, and the Fury Kerberos Nero, and collect their Mutated Spirit's Souls as proof.
You can get rewards only if you bring at least 200. Of course, you'll get more rewards if you bring more. + \ No newline at end of file diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-05.html b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-05.html new file mode 100644 index 0000000000..1e608eed6b --- /dev/null +++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-05.html @@ -0,0 +1,3 @@ +Sthor:
+Your Unworldly Visitors Faction Level Must be 3 or above may undertake this mission. + \ No newline at end of file diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-06.html b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-06.html new file mode 100644 index 0000000000..3efafca5f4 --- /dev/null +++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-06.html @@ -0,0 +1,6 @@ +Sthor:
+You have chosen the basic mission to collect 200 Mutated Spirit's Souls. Once you have selected the difficulty of the mission, you must meet the requirements in order to complete it. Choose wisely.
+Are you sure you want to proceed with this mission?
+ + + \ No newline at end of file diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-06a.html b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-06a.html new file mode 100644 index 0000000000..d58a28d8dc --- /dev/null +++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-06a.html @@ -0,0 +1,6 @@ +Sthor:
+You have chosen the intermediate mission to collect 400 Mutated Spirit's Souls. Once you have selected the difficulty of the mission, you must meet the requirements in order to complete it. Choose wisely.
+Are you sure you want to proceed with this mission?
+ + + \ No newline at end of file diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-07.html b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-07.html new file mode 100644 index 0000000000..00db026769 --- /dev/null +++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-07.html @@ -0,0 +1,4 @@ +Sthor:
+Good. Left me explain the details. Go to the Garden of Spirits, defeat the Kerberos Lager, Kerberos Fort, Kerberos Nero, Fury Sylph Barrena, Fury Sylph Labido, Fury Sylph Purka, Fury Kerberos Leger, and Fury Kerberos Nero, and put them to rest.
+As evidence, please bring back 200 Mutated Spirit's Souls. It should be manageable. + \ No newline at end of file diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-07a.html b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-07a.html new file mode 100644 index 0000000000..31e8d782cb --- /dev/null +++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-07a.html @@ -0,0 +1,4 @@ +Sthor:
+Good. Left me explain the details. Go to the Garden of Spirits, defeat the Kerberos Lager, Kerberos Fort, Kerberos Nero, Fury Sylph Barrena, Fury Sylph Labido, Fury Sylph Purka, Fury Kerberos Leger, and Fury Kerberos Nero, and put them to rest.
+As evidence, please bring back 400 Mutated Spirit's Souls. It should be manageable. + \ No newline at end of file diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-07c.html b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-07c.html new file mode 100644 index 0000000000..aaef92163e --- /dev/null +++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-07c.html @@ -0,0 +1,5 @@ +Sthor:
+You want to finish already? Well, I can still give you a reward... But it won't be something good. Are you sure?
+ + + \ No newline at end of file diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-08.html b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-08.html new file mode 100644 index 0000000000..c0a54e48e6 --- /dev/null +++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-08.html @@ -0,0 +1,3 @@ +Sthor:
+Go to the Garden of Spirits and defeat all type monsters until you collect 200 Mutated Spirit's Souls. + \ No newline at end of file diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-08a.html b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-08a.html new file mode 100644 index 0000000000..4a88756bea --- /dev/null +++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-08a.html @@ -0,0 +1,3 @@ +Sthor:
+Go to the Garden of Spirits and defeat all type monsters until you collect 400 Mutated Spirit's Souls. + \ No newline at end of file diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-09.html b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-09.html new file mode 100644 index 0000000000..dda8741dc7 --- /dev/null +++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-09.html @@ -0,0 +1,6 @@ +Sthor:
+Toy have collected all of the Mutated Spirit's Souls. You have completed the mission successfully.
+I would like to congratulate you on completing the mission. Here's your reward. If you have a Faction Amity Token, I can give You more rewards.
+ + + \ No newline at end of file diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-09a.html b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-09a.html new file mode 100644 index 0000000000..bcc45279f1 --- /dev/null +++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-09a.html @@ -0,0 +1,4 @@ +Sthor:
+You completed the mission!
+ + \ No newline at end of file diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-09c.html b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-09c.html new file mode 100644 index 0000000000..06bbf3dd00 --- /dev/null +++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-09c.html @@ -0,0 +1,4 @@ +Sthor:
+You completed the mission!
+ + \ No newline at end of file diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-10.html b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-10.html new file mode 100644 index 0000000000..482c458ebf --- /dev/null +++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-10.html @@ -0,0 +1,4 @@ +Sthor:
+Here is your reward. This will also help to improve the trust between you and us at the Unworldly Visitors.
+As long as you don't forget us, that is. We thank you for your hard work. + \ No newline at end of file diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-10a.html b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-10a.html new file mode 100644 index 0000000000..4beb6b1f42 --- /dev/null +++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-10a.html @@ -0,0 +1,3 @@ +Sthor:
+Here's your reward. We'll be able to maintain our trust. As long as you don't forget about us, that is. + \ No newline at end of file diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-10b.html b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-10b.html new file mode 100644 index 0000000000..e3a6b53369 --- /dev/null +++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-10b.html @@ -0,0 +1,3 @@ +Sthor:
+Here's your reward, I'll remember how you've helped us all those times. Here's a higher level Mark of Trust. Thank you for all of your help. + \ No newline at end of file diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-10c.html b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-10c.html new file mode 100644 index 0000000000..53dc6d1f75 --- /dev/null +++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-10c.html @@ -0,0 +1,3 @@ +Sthor:
+Here's your reward for helping us. Although you didn't get all the Marks, I still remember how you helped us. I have no doubt the trust between us has deepened even more. + \ No newline at end of file diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q00842_CaptiveDemons/Q00842_CaptiveDemons.java b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q00842_CaptiveDemons/Q00842_CaptiveDemons.java new file mode 100644 index 0000000000..7c1f2a688f --- /dev/null +++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q00842_CaptiveDemons/Q00842_CaptiveDemons.java @@ -0,0 +1,301 @@ +/* + * 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.Q00842_CaptiveDemons; + +import java.util.HashSet; +import java.util.Set; + +import org.l2jmobius.gameserver.enums.Faction; +import org.l2jmobius.gameserver.enums.QuestSound; +import org.l2jmobius.gameserver.enums.QuestType; +import org.l2jmobius.gameserver.model.actor.Npc; +import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; +import org.l2jmobius.gameserver.model.holders.NpcLogListHolder; +import org.l2jmobius.gameserver.model.quest.Quest; +import org.l2jmobius.gameserver.model.quest.QuestState; +import org.l2jmobius.gameserver.model.quest.State; +import org.l2jmobius.gameserver.network.NpcStringId; + +/** + * Captive Demons (842) + * @URL https://l2wiki.com/Captive_Demons + * @author Dmitri + */ +public class Q00842_CaptiveDemons extends Quest +{ + // NPC + private static final int STHOR = 34219; + // Monsters + private static final int[] MONSTERS = + { + 23735, // Captive Familiar Spirit + 23736, // Captive Hell Demon + 23737, // Captive Succubus + 23738 // Captive Phantom + }; + // Items + private static final int GIANT_TRACKERS_BASIC_SUPPLY_BOX = 47184; + private static final int GIANT_TRACKERS_INTERMEDIATE_SUPPLY_BOX = 47185; + private static final int GIANT_TRACKERS_ADVANCED_SUPPLY_BOX = 47186; + // Misc + private static final int KILLING_NPCSTRING_ID = NpcStringId.DEFEATING_THE_CAPTIVE_DEMONS.getId(); + private static final boolean PARTY_QUEST = true; + private static final int MIN_LEVEL = 100; + + public Q00842_CaptiveDemons() + { + super(842); + addStartNpc(STHOR); + addTalkId(STHOR); + addKillId(MONSTERS); + addCondMinLevel(MIN_LEVEL, "34219-00.htm"); + addFactionLevel(Faction.GIANT_TRACKERS, 1, "34219-00.htm"); + } + + @Override + public String onAdvEvent(String event, Npc npc, PlayerInstance player) + { + String htmltext = null; + final QuestState qs = getQuestState(player, false); + if (qs == null) + { + return htmltext; + } + + switch (event) + { + case "34219-02.htm": + case "34219-03.htm": + case "34219-04.htm": + case "34219-04a.htm": + case "34219-06.html": + case "34219-06a.html": + { + htmltext = event; + break; + } + case "select_mission": + { + qs.startQuest(); + if (player.getFactionLevel(Faction.GIANT_TRACKERS) >= 3) + { + htmltext = "34219-04a.htm"; + break; + } + htmltext = "34219-04.htm"; + break; + } + case "return": + { + if (player.getFactionLevel(Faction.GIANT_TRACKERS) >= 3) + { + htmltext = "34219-04a.htm"; + break; + } + htmltext = "34219-04.htm"; + break; + } + case "34219-07.html": + { + qs.setCond(2, true); + htmltext = event; + break; + } + case "34219-07a.html": + { + qs.setCond(3, true); + htmltext = event; + break; + } + case "34219-10.html": + { + final int chance = getRandom(100); + switch (qs.getCond()) + { + case 4: + { + if (player.getLevel() >= MIN_LEVEL) + { + if (chance < 2) + { + giveItems(player, GIANT_TRACKERS_ADVANCED_SUPPLY_BOX, 1); + } + else if (chance < 20) + { + giveItems(player, GIANT_TRACKERS_INTERMEDIATE_SUPPLY_BOX, 1); + } + else if (chance < 100) + { + giveItems(player, GIANT_TRACKERS_BASIC_SUPPLY_BOX, 1); + } + addExpAndSp(player, 5_536_944_000L, 13_288_590); + addFactionPoints(player, Faction.GIANT_TRACKERS, 100); + qs.exitQuest(QuestType.DAILY, true); + htmltext = event; + } + else + { + htmltext = getNoQuestLevelRewardMsg(player); + } + break; + } + case 5: + { + if (player.getLevel() >= MIN_LEVEL) + { + if (chance < 2) + { + giveItems(player, GIANT_TRACKERS_ADVANCED_SUPPLY_BOX, 1); + } + else if (chance < 20) + { + giveItems(player, GIANT_TRACKERS_BASIC_SUPPLY_BOX, 1); + } + else if (chance < 100) + { + giveItems(player, GIANT_TRACKERS_INTERMEDIATE_SUPPLY_BOX, 1); + } + addExpAndSp(player, 11_073_888_000L, 26_577_180); + addFactionPoints(player, Faction.GIANT_TRACKERS, 200); + qs.exitQuest(QuestType.DAILY, true); + htmltext = event; + } + else + { + htmltext = getNoQuestLevelRewardMsg(player); + } + break; + } + } + break; + } + } + return htmltext; + } + + @Override + public String onTalk(Npc npc, PlayerInstance player) + { + final QuestState qs = getQuestState(player, true); + String htmltext = getNoQuestMsg(player); + + switch (qs.getState()) + { + case State.CREATED: + { + htmltext = "34219-01.htm"; + } + case State.STARTED: + { + switch (qs.getCond()) + { + case 1: + { + if (player.getFactionLevel(Faction.GIANT_TRACKERS) >= 3) + { + htmltext = "34219-04a.htm"; + break; + } + htmltext = "34219-04.htm"; + break; + } + case 2: + { + htmltext = "34219-08.html"; + break; + } + case 3: + { + htmltext = "34219-08a.html"; + break; + } + case 4: + case 5: + { + htmltext = "34219-09.html"; + break; + } + } + break; + } + case State.COMPLETED: + { + if (!qs.isNowAvailable()) + { + htmltext = getAlreadyCompletedMsg(player, QuestType.DAILY); + } + else + { + qs.setState(State.CREATED); + htmltext = "34219-01.htm"; + } + break; + } + } + return htmltext; + } + + @Override + public String onKill(Npc npc, PlayerInstance killer, boolean isSummon) + { + final QuestState qs = PARTY_QUEST ? getRandomPartyMemberState(killer, -1, 3, npc) : getQuestState(killer, false); + if ((qs != null) && (qs.getCond() > 1)) + { + switch (qs.getCond()) + { + case 2: + { + final int killedGhosts = qs.getInt("AncientGhosts") + 1; + qs.set("AncientGhosts", killedGhosts); + playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET); + + if (killedGhosts >= 200) + { + qs.setCond(4, true); + } + break; + } + case 3: + { + final int killedGhosts = qs.getInt("AncientGhosts") + 1; + qs.set("AncientGhosts", killedGhosts); + playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET); + + if (killedGhosts >= 400) + { + qs.setCond(5, true); + } + break; + } + } + } + return super.onKill(npc, killer, isSummon); + } + + @Override + public Set getNpcLogList(PlayerInstance player) + { + final QuestState qs = getQuestState(player, false); + if ((qs != null) && (qs.getCond() > 1)) + { + final Set holder = new HashSet<>(); + holder.add(new NpcLogListHolder(KILLING_NPCSTRING_ID, true, qs.getInt("AncientGhosts"))); + return holder; + } + return super.getNpcLogList(player); + } +} diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/QuestMasterHandler.java b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/QuestMasterHandler.java index 61d358c1b0..3ffddb995c 100644 --- a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/QuestMasterHandler.java +++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/QuestMasterHandler.java @@ -205,6 +205,7 @@ import quests.Q00830_TheWayOfTheGiantsPawn.Q00830_TheWayOfTheGiantsPawn; import quests.Q00831_SayhasScheme.Q00831_SayhasScheme; import quests.Q00833_DevilsTreasureTauti.Q00833_DevilsTreasureTauti; import quests.Q00835_PitiableMelisa.Q00835_PitiableMelisa; +import quests.Q00842_CaptiveDemons.Q00842_CaptiveDemons; import quests.Q00901_HowLavasaurusesAreMade.Q00901_HowLavasaurusesAreMade; import quests.Q00902_ReclaimOurEra.Q00902_ReclaimOurEra; import quests.Q00903_TheCallOfAntharas.Q00903_TheCallOfAntharas; @@ -723,7 +724,7 @@ public class QuestMasterHandler Q00839_RequestFromTheUnworldlyVisitors.class, // TODO: Not done. Q00840_RequestFromTheKingdomsRoyalGuard.class, // TODO: Not done. Q00841_ContaminationContainment.class, // TODO: Not done. - Q00842_CaptiveDemons.class, // TODO: Not done. + Q00842_CaptiveDemons.class, Q00843_GiantEvolutionControl.class, // TODO: Not done. Q00844_GiantsTreasure.class, // TODO: Not done. Q00845_SabotageTheEmbryoSupplies.class, // TODO: Not done. diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/not_done/Q00842_CaptiveDemons.java b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/not_done/Q00842_CaptiveDemons.java deleted file mode 100644 index 7be5418b76..0000000000 --- a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/not_done/Q00842_CaptiveDemons.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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.not_done; - -import org.l2jmobius.Config; -import org.l2jmobius.gameserver.model.quest.Quest; - -/** - * @author Mobius - */ -public class Q00842_CaptiveDemons extends Quest -{ - private static final int START_NPC = 34219; - - public Q00842_CaptiveDemons() - { - super(842); - addStartNpc(START_NPC); - addTalkId(START_NPC); - addCondMinLevel(Config.PLAYER_MAXIMUM_LEVEL, getNoQuestMsg(null)); - } -} diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/MissingQuests.txt b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/MissingQuests.txt index 0e064d4be9..0ad22dfc47 100644 --- a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/MissingQuests.txt +++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/MissingQuests.txt @@ -120,7 +120,6 @@ 839 Request from the Unworldly Visitors 840 Request from the Kingdom's Royal Guard 841 Contamination Containment -842 Captive Demons 843 Giant Evolution Control 844 Giant's Treasure 845 Sabotage the Embryo Supplies diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-00.htm b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-00.htm new file mode 100644 index 0000000000..7e05a96b57 --- /dev/null +++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-00.htm @@ -0,0 +1,6 @@ +Sthor:
+I don't think you'll be able to complete this. You seem passionate, but you don't have enough experience.
+Please come back when you've become stronger.
+Unworldly Visitors faction level should be 1
+(Only characters above Lv. 100.) + \ No newline at end of file diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-01.htm b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-01.htm new file mode 100644 index 0000000000..5e8419301f --- /dev/null +++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-01.htm @@ -0,0 +1,6 @@ +Sthor:
+Ah, adventurer! There you are again. How about helping us some more? if you do, you can deepen the mutual trust with us and Ferin.
+What do you say? if you don't remember what to do, I can tell you again. + + + \ No newline at end of file diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-01a.htm b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-01a.htm new file mode 100644 index 0000000000..1c36e1dbab --- /dev/null +++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-01a.htm @@ -0,0 +1,6 @@ +Sthor:
+Ah, adventurer! There you are again. How about helping us some more?
+What do you say? If you don't remember what the mission was, I can tell you again.
+ + + \ No newline at end of file diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-01b.htm b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-01b.htm new file mode 100644 index 0000000000..df0ca9ef86 --- /dev/null +++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-01b.htm @@ -0,0 +1,6 @@ +Sthor:
+Adventurer! Good to see you. Since you've helped us so much already, how about helping us some more?
+What do you say? If you don't remember what the mission was, I can tell you again.
+ + + \ No newline at end of file diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-01c.htm b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-01c.htm new file mode 100644 index 0000000000..148f512567 --- /dev/null +++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-01c.htm @@ -0,0 +1,5 @@ +Sthor:
+I've been waiting for you, adventurer. Well since you are here now, will you listen to me? I know I can trust you, but if you complete this mission, we'll become better allies and your pockets will get heavier. What do you say? Or do you need me to explain the mission again?
+ + + \ No newline at end of file diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-02.htm b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-02.htm new file mode 100644 index 0000000000..3b66a89018 --- /dev/null +++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-02.htm @@ -0,0 +1,4 @@ +Sthor:
+We've begun an investigation in the Garden of Spirits starting from here. However, we are being threatened by the spirits there, so something must be done.
+ + \ No newline at end of file diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-03.htm b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-03.htm new file mode 100644 index 0000000000..60850328af --- /dev/null +++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-03.htm @@ -0,0 +1,6 @@ +Sthor:
+We know of a way to defeat those spirits, at least temporarily. This way, we'll be able to put the spirits at rest, even if it's just for a little while.
+Of course, we will give you a reward for your help. And there is one more thing. While you are helping us, you'll build trust with us. The more we trust you, the more rewards we will give you, and there are some secret missions that we only give to those we trust.
+That's about it.
+ + \ No newline at end of file diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-04.htm b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-04.htm new file mode 100644 index 0000000000..e578d5f519 --- /dev/null +++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-04.htm @@ -0,0 +1,7 @@ +Sthor:
+Good. Let me tell you what to do. Just choose the mission that you are capable of doing.
+Basic Mission - Collect 200 Mutated Spirit's Souls. +Intermediate Mission - Collect 400 Mutated Spirit's Souls.
+ + + \ No newline at end of file diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-04.html b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-04.html new file mode 100644 index 0000000000..4b95d66e11 --- /dev/null +++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-04.html @@ -0,0 +1,6 @@ +Sthor:
+This isn't the first time we've met? You've completed a mission before? I see... Well, I don't really have a good memory.
+If you have completed a mission before, then that means you must have a Mark of Trust. What? You don't have one?
+Then you are either a liar, or you haven't been here in a long time. My trust is something you must continously try to maintain. Will you listen to me?
+ + \ No newline at end of file diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-04a.htm b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-04a.htm new file mode 100644 index 0000000000..3ca5bb885a --- /dev/null +++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-04a.htm @@ -0,0 +1,7 @@ +Sthor:
+Good. Let me tell you what to do. Just choose the mission that you are capable of doing.
+Basic Mission - Collect 200 Mutated Spirit's Souls. +Intermediate Mission - Collect 400 Mutated Spirit's Souls.
+ + + \ No newline at end of file diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-05.htm b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-05.htm new file mode 100644 index 0000000000..7f904dcb50 --- /dev/null +++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-05.htm @@ -0,0 +1,3 @@ +Sthor:
+Alright. Here's the mission. Hunt the Kerberos Leger, Kerberos Fort, Kerberos Nero, Fury Sylph Barrena, Fury Sylph Labido, Fury Sylph Purka, Fury Kerberos Leger, and the Fury Kerberos Nero, and collect their Mutated Spirit's Souls as proof.
You can get rewards only if you bring at least 200. Of course, you'll get more rewards if you bring more. + \ No newline at end of file diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-05.html b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-05.html new file mode 100644 index 0000000000..1e608eed6b --- /dev/null +++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-05.html @@ -0,0 +1,3 @@ +Sthor:
+Your Unworldly Visitors Faction Level Must be 3 or above may undertake this mission. + \ No newline at end of file diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-06.html b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-06.html new file mode 100644 index 0000000000..3efafca5f4 --- /dev/null +++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-06.html @@ -0,0 +1,6 @@ +Sthor:
+You have chosen the basic mission to collect 200 Mutated Spirit's Souls. Once you have selected the difficulty of the mission, you must meet the requirements in order to complete it. Choose wisely.
+Are you sure you want to proceed with this mission?
+ + + \ No newline at end of file diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-06a.html b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-06a.html new file mode 100644 index 0000000000..d58a28d8dc --- /dev/null +++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-06a.html @@ -0,0 +1,6 @@ +Sthor:
+You have chosen the intermediate mission to collect 400 Mutated Spirit's Souls. Once you have selected the difficulty of the mission, you must meet the requirements in order to complete it. Choose wisely.
+Are you sure you want to proceed with this mission?
+ + + \ No newline at end of file diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-07.html b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-07.html new file mode 100644 index 0000000000..00db026769 --- /dev/null +++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-07.html @@ -0,0 +1,4 @@ +Sthor:
+Good. Left me explain the details. Go to the Garden of Spirits, defeat the Kerberos Lager, Kerberos Fort, Kerberos Nero, Fury Sylph Barrena, Fury Sylph Labido, Fury Sylph Purka, Fury Kerberos Leger, and Fury Kerberos Nero, and put them to rest.
+As evidence, please bring back 200 Mutated Spirit's Souls. It should be manageable. + \ No newline at end of file diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-07a.html b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-07a.html new file mode 100644 index 0000000000..31e8d782cb --- /dev/null +++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-07a.html @@ -0,0 +1,4 @@ +Sthor:
+Good. Left me explain the details. Go to the Garden of Spirits, defeat the Kerberos Lager, Kerberos Fort, Kerberos Nero, Fury Sylph Barrena, Fury Sylph Labido, Fury Sylph Purka, Fury Kerberos Leger, and Fury Kerberos Nero, and put them to rest.
+As evidence, please bring back 400 Mutated Spirit's Souls. It should be manageable. + \ No newline at end of file diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-07c.html b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-07c.html new file mode 100644 index 0000000000..aaef92163e --- /dev/null +++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-07c.html @@ -0,0 +1,5 @@ +Sthor:
+You want to finish already? Well, I can still give you a reward... But it won't be something good. Are you sure?
+ + + \ No newline at end of file diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-08.html b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-08.html new file mode 100644 index 0000000000..c0a54e48e6 --- /dev/null +++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-08.html @@ -0,0 +1,3 @@ +Sthor:
+Go to the Garden of Spirits and defeat all type monsters until you collect 200 Mutated Spirit's Souls. + \ No newline at end of file diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-08a.html b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-08a.html new file mode 100644 index 0000000000..4a88756bea --- /dev/null +++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-08a.html @@ -0,0 +1,3 @@ +Sthor:
+Go to the Garden of Spirits and defeat all type monsters until you collect 400 Mutated Spirit's Souls. + \ No newline at end of file diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-09.html b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-09.html new file mode 100644 index 0000000000..dda8741dc7 --- /dev/null +++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-09.html @@ -0,0 +1,6 @@ +Sthor:
+Toy have collected all of the Mutated Spirit's Souls. You have completed the mission successfully.
+I would like to congratulate you on completing the mission. Here's your reward. If you have a Faction Amity Token, I can give You more rewards.
+ + + \ No newline at end of file diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-09a.html b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-09a.html new file mode 100644 index 0000000000..bcc45279f1 --- /dev/null +++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-09a.html @@ -0,0 +1,4 @@ +Sthor:
+You completed the mission!
+ + \ No newline at end of file diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-09c.html b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-09c.html new file mode 100644 index 0000000000..06bbf3dd00 --- /dev/null +++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-09c.html @@ -0,0 +1,4 @@ +Sthor:
+You completed the mission!
+ + \ No newline at end of file diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-10.html b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-10.html new file mode 100644 index 0000000000..482c458ebf --- /dev/null +++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-10.html @@ -0,0 +1,4 @@ +Sthor:
+Here is your reward. This will also help to improve the trust between you and us at the Unworldly Visitors.
+As long as you don't forget us, that is. We thank you for your hard work. + \ No newline at end of file diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-10a.html b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-10a.html new file mode 100644 index 0000000000..4beb6b1f42 --- /dev/null +++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-10a.html @@ -0,0 +1,3 @@ +Sthor:
+Here's your reward. We'll be able to maintain our trust. As long as you don't forget about us, that is. + \ No newline at end of file diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-10b.html b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-10b.html new file mode 100644 index 0000000000..e3a6b53369 --- /dev/null +++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-10b.html @@ -0,0 +1,3 @@ +Sthor:
+Here's your reward, I'll remember how you've helped us all those times. Here's a higher level Mark of Trust. Thank you for all of your help. + \ No newline at end of file diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-10c.html b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-10c.html new file mode 100644 index 0000000000..53dc6d1f75 --- /dev/null +++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-10c.html @@ -0,0 +1,3 @@ +Sthor:
+Here's your reward for helping us. Although you didn't get all the Marks, I still remember how you helped us. I have no doubt the trust between us has deepened even more. + \ No newline at end of file diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q00842_CaptiveDemons/Q00842_CaptiveDemons.java b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q00842_CaptiveDemons/Q00842_CaptiveDemons.java new file mode 100644 index 0000000000..7c1f2a688f --- /dev/null +++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q00842_CaptiveDemons/Q00842_CaptiveDemons.java @@ -0,0 +1,301 @@ +/* + * 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.Q00842_CaptiveDemons; + +import java.util.HashSet; +import java.util.Set; + +import org.l2jmobius.gameserver.enums.Faction; +import org.l2jmobius.gameserver.enums.QuestSound; +import org.l2jmobius.gameserver.enums.QuestType; +import org.l2jmobius.gameserver.model.actor.Npc; +import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; +import org.l2jmobius.gameserver.model.holders.NpcLogListHolder; +import org.l2jmobius.gameserver.model.quest.Quest; +import org.l2jmobius.gameserver.model.quest.QuestState; +import org.l2jmobius.gameserver.model.quest.State; +import org.l2jmobius.gameserver.network.NpcStringId; + +/** + * Captive Demons (842) + * @URL https://l2wiki.com/Captive_Demons + * @author Dmitri + */ +public class Q00842_CaptiveDemons extends Quest +{ + // NPC + private static final int STHOR = 34219; + // Monsters + private static final int[] MONSTERS = + { + 23735, // Captive Familiar Spirit + 23736, // Captive Hell Demon + 23737, // Captive Succubus + 23738 // Captive Phantom + }; + // Items + private static final int GIANT_TRACKERS_BASIC_SUPPLY_BOX = 47184; + private static final int GIANT_TRACKERS_INTERMEDIATE_SUPPLY_BOX = 47185; + private static final int GIANT_TRACKERS_ADVANCED_SUPPLY_BOX = 47186; + // Misc + private static final int KILLING_NPCSTRING_ID = NpcStringId.DEFEATING_THE_CAPTIVE_DEMONS.getId(); + private static final boolean PARTY_QUEST = true; + private static final int MIN_LEVEL = 100; + + public Q00842_CaptiveDemons() + { + super(842); + addStartNpc(STHOR); + addTalkId(STHOR); + addKillId(MONSTERS); + addCondMinLevel(MIN_LEVEL, "34219-00.htm"); + addFactionLevel(Faction.GIANT_TRACKERS, 1, "34219-00.htm"); + } + + @Override + public String onAdvEvent(String event, Npc npc, PlayerInstance player) + { + String htmltext = null; + final QuestState qs = getQuestState(player, false); + if (qs == null) + { + return htmltext; + } + + switch (event) + { + case "34219-02.htm": + case "34219-03.htm": + case "34219-04.htm": + case "34219-04a.htm": + case "34219-06.html": + case "34219-06a.html": + { + htmltext = event; + break; + } + case "select_mission": + { + qs.startQuest(); + if (player.getFactionLevel(Faction.GIANT_TRACKERS) >= 3) + { + htmltext = "34219-04a.htm"; + break; + } + htmltext = "34219-04.htm"; + break; + } + case "return": + { + if (player.getFactionLevel(Faction.GIANT_TRACKERS) >= 3) + { + htmltext = "34219-04a.htm"; + break; + } + htmltext = "34219-04.htm"; + break; + } + case "34219-07.html": + { + qs.setCond(2, true); + htmltext = event; + break; + } + case "34219-07a.html": + { + qs.setCond(3, true); + htmltext = event; + break; + } + case "34219-10.html": + { + final int chance = getRandom(100); + switch (qs.getCond()) + { + case 4: + { + if (player.getLevel() >= MIN_LEVEL) + { + if (chance < 2) + { + giveItems(player, GIANT_TRACKERS_ADVANCED_SUPPLY_BOX, 1); + } + else if (chance < 20) + { + giveItems(player, GIANT_TRACKERS_INTERMEDIATE_SUPPLY_BOX, 1); + } + else if (chance < 100) + { + giveItems(player, GIANT_TRACKERS_BASIC_SUPPLY_BOX, 1); + } + addExpAndSp(player, 5_536_944_000L, 13_288_590); + addFactionPoints(player, Faction.GIANT_TRACKERS, 100); + qs.exitQuest(QuestType.DAILY, true); + htmltext = event; + } + else + { + htmltext = getNoQuestLevelRewardMsg(player); + } + break; + } + case 5: + { + if (player.getLevel() >= MIN_LEVEL) + { + if (chance < 2) + { + giveItems(player, GIANT_TRACKERS_ADVANCED_SUPPLY_BOX, 1); + } + else if (chance < 20) + { + giveItems(player, GIANT_TRACKERS_BASIC_SUPPLY_BOX, 1); + } + else if (chance < 100) + { + giveItems(player, GIANT_TRACKERS_INTERMEDIATE_SUPPLY_BOX, 1); + } + addExpAndSp(player, 11_073_888_000L, 26_577_180); + addFactionPoints(player, Faction.GIANT_TRACKERS, 200); + qs.exitQuest(QuestType.DAILY, true); + htmltext = event; + } + else + { + htmltext = getNoQuestLevelRewardMsg(player); + } + break; + } + } + break; + } + } + return htmltext; + } + + @Override + public String onTalk(Npc npc, PlayerInstance player) + { + final QuestState qs = getQuestState(player, true); + String htmltext = getNoQuestMsg(player); + + switch (qs.getState()) + { + case State.CREATED: + { + htmltext = "34219-01.htm"; + } + case State.STARTED: + { + switch (qs.getCond()) + { + case 1: + { + if (player.getFactionLevel(Faction.GIANT_TRACKERS) >= 3) + { + htmltext = "34219-04a.htm"; + break; + } + htmltext = "34219-04.htm"; + break; + } + case 2: + { + htmltext = "34219-08.html"; + break; + } + case 3: + { + htmltext = "34219-08a.html"; + break; + } + case 4: + case 5: + { + htmltext = "34219-09.html"; + break; + } + } + break; + } + case State.COMPLETED: + { + if (!qs.isNowAvailable()) + { + htmltext = getAlreadyCompletedMsg(player, QuestType.DAILY); + } + else + { + qs.setState(State.CREATED); + htmltext = "34219-01.htm"; + } + break; + } + } + return htmltext; + } + + @Override + public String onKill(Npc npc, PlayerInstance killer, boolean isSummon) + { + final QuestState qs = PARTY_QUEST ? getRandomPartyMemberState(killer, -1, 3, npc) : getQuestState(killer, false); + if ((qs != null) && (qs.getCond() > 1)) + { + switch (qs.getCond()) + { + case 2: + { + final int killedGhosts = qs.getInt("AncientGhosts") + 1; + qs.set("AncientGhosts", killedGhosts); + playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET); + + if (killedGhosts >= 200) + { + qs.setCond(4, true); + } + break; + } + case 3: + { + final int killedGhosts = qs.getInt("AncientGhosts") + 1; + qs.set("AncientGhosts", killedGhosts); + playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET); + + if (killedGhosts >= 400) + { + qs.setCond(5, true); + } + break; + } + } + } + return super.onKill(npc, killer, isSummon); + } + + @Override + public Set getNpcLogList(PlayerInstance player) + { + final QuestState qs = getQuestState(player, false); + if ((qs != null) && (qs.getCond() > 1)) + { + final Set holder = new HashSet<>(); + holder.add(new NpcLogListHolder(KILLING_NPCSTRING_ID, true, qs.getInt("AncientGhosts"))); + return holder; + } + return super.getNpcLogList(player); + } +} diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/QuestMasterHandler.java b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/QuestMasterHandler.java index 0cdd83ebb2..b4b160a5b5 100644 --- a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/QuestMasterHandler.java +++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/QuestMasterHandler.java @@ -176,6 +176,7 @@ import quests.Q00830_TheWayOfTheGiantsPawn.Q00830_TheWayOfTheGiantsPawn; import quests.Q00831_SayhasScheme.Q00831_SayhasScheme; import quests.Q00833_DevilsTreasureTauti.Q00833_DevilsTreasureTauti; import quests.Q00835_PitiableMelisa.Q00835_PitiableMelisa; +import quests.Q00842_CaptiveDemons.Q00842_CaptiveDemons; import quests.Q00901_HowLavasaurusesAreMade.Q00901_HowLavasaurusesAreMade; import quests.Q00902_ReclaimOurEra.Q00902_ReclaimOurEra; import quests.Q00903_TheCallOfAntharas.Q00903_TheCallOfAntharas; @@ -652,7 +653,7 @@ public class QuestMasterHandler Q00839_RequestFromTheUnworldlyVisitors.class, // TODO: Not done. Q00840_RequestFromTheKingdomsRoyalGuard.class, // TODO: Not done. Q00841_ContaminationContainment.class, // TODO: Not done. - Q00842_CaptiveDemons.class, // TODO: Not done. + Q00842_CaptiveDemons.class, Q00843_GiantEvolutionControl.class, // TODO: Not done. Q00844_GiantsTreasure.class, // TODO: Not done. Q00845_SabotageTheEmbryoSupplies.class, // TODO: Not done. diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/not_done/Q00842_CaptiveDemons.java b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/not_done/Q00842_CaptiveDemons.java deleted file mode 100644 index 7be5418b76..0000000000 --- a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/not_done/Q00842_CaptiveDemons.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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.not_done; - -import org.l2jmobius.Config; -import org.l2jmobius.gameserver.model.quest.Quest; - -/** - * @author Mobius - */ -public class Q00842_CaptiveDemons extends Quest -{ - private static final int START_NPC = 34219; - - public Q00842_CaptiveDemons() - { - super(842); - addStartNpc(START_NPC); - addTalkId(START_NPC); - addCondMinLevel(Config.PLAYER_MAXIMUM_LEVEL, getNoQuestMsg(null)); - } -} diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/MissingQuests.txt b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/MissingQuests.txt index b7f16b72a1..a5c104e390 100644 --- a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/MissingQuests.txt +++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/MissingQuests.txt @@ -129,7 +129,6 @@ 839 Request from the Unworldly Visitors 840 Request from the Kingdom's Royal Guard 841 Contamination Containment -842 Captive Demons 843 Giant Evolution Control 844 Giant's Treasure 845 Sabotage the Embryo Supplies diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-00.htm b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-00.htm new file mode 100644 index 0000000000..7e05a96b57 --- /dev/null +++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-00.htm @@ -0,0 +1,6 @@ +Sthor:
+I don't think you'll be able to complete this. You seem passionate, but you don't have enough experience.
+Please come back when you've become stronger.
+Unworldly Visitors faction level should be 1
+(Only characters above Lv. 100.) + \ No newline at end of file diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-01.htm b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-01.htm new file mode 100644 index 0000000000..5e8419301f --- /dev/null +++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-01.htm @@ -0,0 +1,6 @@ +Sthor:
+Ah, adventurer! There you are again. How about helping us some more? if you do, you can deepen the mutual trust with us and Ferin.
+What do you say? if you don't remember what to do, I can tell you again. + + + \ No newline at end of file diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-01a.htm b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-01a.htm new file mode 100644 index 0000000000..1c36e1dbab --- /dev/null +++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-01a.htm @@ -0,0 +1,6 @@ +Sthor:
+Ah, adventurer! There you are again. How about helping us some more?
+What do you say? If you don't remember what the mission was, I can tell you again.
+ + + \ No newline at end of file diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-01b.htm b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-01b.htm new file mode 100644 index 0000000000..df0ca9ef86 --- /dev/null +++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-01b.htm @@ -0,0 +1,6 @@ +Sthor:
+Adventurer! Good to see you. Since you've helped us so much already, how about helping us some more?
+What do you say? If you don't remember what the mission was, I can tell you again.
+ + + \ No newline at end of file diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-01c.htm b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-01c.htm new file mode 100644 index 0000000000..148f512567 --- /dev/null +++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-01c.htm @@ -0,0 +1,5 @@ +Sthor:
+I've been waiting for you, adventurer. Well since you are here now, will you listen to me? I know I can trust you, but if you complete this mission, we'll become better allies and your pockets will get heavier. What do you say? Or do you need me to explain the mission again?
+ + + \ No newline at end of file diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-02.htm b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-02.htm new file mode 100644 index 0000000000..3b66a89018 --- /dev/null +++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-02.htm @@ -0,0 +1,4 @@ +Sthor:
+We've begun an investigation in the Garden of Spirits starting from here. However, we are being threatened by the spirits there, so something must be done.
+ + \ No newline at end of file diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-03.htm b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-03.htm new file mode 100644 index 0000000000..60850328af --- /dev/null +++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-03.htm @@ -0,0 +1,6 @@ +Sthor:
+We know of a way to defeat those spirits, at least temporarily. This way, we'll be able to put the spirits at rest, even if it's just for a little while.
+Of course, we will give you a reward for your help. And there is one more thing. While you are helping us, you'll build trust with us. The more we trust you, the more rewards we will give you, and there are some secret missions that we only give to those we trust.
+That's about it.
+ + \ No newline at end of file diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-04.htm b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-04.htm new file mode 100644 index 0000000000..e578d5f519 --- /dev/null +++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-04.htm @@ -0,0 +1,7 @@ +Sthor:
+Good. Let me tell you what to do. Just choose the mission that you are capable of doing.
+Basic Mission - Collect 200 Mutated Spirit's Souls. +Intermediate Mission - Collect 400 Mutated Spirit's Souls.
+ + + \ No newline at end of file diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-04.html b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-04.html new file mode 100644 index 0000000000..4b95d66e11 --- /dev/null +++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-04.html @@ -0,0 +1,6 @@ +Sthor:
+This isn't the first time we've met? You've completed a mission before? I see... Well, I don't really have a good memory.
+If you have completed a mission before, then that means you must have a Mark of Trust. What? You don't have one?
+Then you are either a liar, or you haven't been here in a long time. My trust is something you must continously try to maintain. Will you listen to me?
+ + \ No newline at end of file diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-04a.htm b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-04a.htm new file mode 100644 index 0000000000..3ca5bb885a --- /dev/null +++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-04a.htm @@ -0,0 +1,7 @@ +Sthor:
+Good. Let me tell you what to do. Just choose the mission that you are capable of doing.
+Basic Mission - Collect 200 Mutated Spirit's Souls. +Intermediate Mission - Collect 400 Mutated Spirit's Souls.
+ + + \ No newline at end of file diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-05.htm b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-05.htm new file mode 100644 index 0000000000..7f904dcb50 --- /dev/null +++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-05.htm @@ -0,0 +1,3 @@ +Sthor:
+Alright. Here's the mission. Hunt the Kerberos Leger, Kerberos Fort, Kerberos Nero, Fury Sylph Barrena, Fury Sylph Labido, Fury Sylph Purka, Fury Kerberos Leger, and the Fury Kerberos Nero, and collect their Mutated Spirit's Souls as proof.
You can get rewards only if you bring at least 200. Of course, you'll get more rewards if you bring more. + \ No newline at end of file diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-05.html b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-05.html new file mode 100644 index 0000000000..1e608eed6b --- /dev/null +++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-05.html @@ -0,0 +1,3 @@ +Sthor:
+Your Unworldly Visitors Faction Level Must be 3 or above may undertake this mission. + \ No newline at end of file diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-06.html b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-06.html new file mode 100644 index 0000000000..3efafca5f4 --- /dev/null +++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-06.html @@ -0,0 +1,6 @@ +Sthor:
+You have chosen the basic mission to collect 200 Mutated Spirit's Souls. Once you have selected the difficulty of the mission, you must meet the requirements in order to complete it. Choose wisely.
+Are you sure you want to proceed with this mission?
+ + + \ No newline at end of file diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-06a.html b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-06a.html new file mode 100644 index 0000000000..d58a28d8dc --- /dev/null +++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-06a.html @@ -0,0 +1,6 @@ +Sthor:
+You have chosen the intermediate mission to collect 400 Mutated Spirit's Souls. Once you have selected the difficulty of the mission, you must meet the requirements in order to complete it. Choose wisely.
+Are you sure you want to proceed with this mission?
+ + + \ No newline at end of file diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-07.html b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-07.html new file mode 100644 index 0000000000..00db026769 --- /dev/null +++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-07.html @@ -0,0 +1,4 @@ +Sthor:
+Good. Left me explain the details. Go to the Garden of Spirits, defeat the Kerberos Lager, Kerberos Fort, Kerberos Nero, Fury Sylph Barrena, Fury Sylph Labido, Fury Sylph Purka, Fury Kerberos Leger, and Fury Kerberos Nero, and put them to rest.
+As evidence, please bring back 200 Mutated Spirit's Souls. It should be manageable. + \ No newline at end of file diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-07a.html b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-07a.html new file mode 100644 index 0000000000..31e8d782cb --- /dev/null +++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-07a.html @@ -0,0 +1,4 @@ +Sthor:
+Good. Left me explain the details. Go to the Garden of Spirits, defeat the Kerberos Lager, Kerberos Fort, Kerberos Nero, Fury Sylph Barrena, Fury Sylph Labido, Fury Sylph Purka, Fury Kerberos Leger, and Fury Kerberos Nero, and put them to rest.
+As evidence, please bring back 400 Mutated Spirit's Souls. It should be manageable. + \ No newline at end of file diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-07c.html b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-07c.html new file mode 100644 index 0000000000..aaef92163e --- /dev/null +++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-07c.html @@ -0,0 +1,5 @@ +Sthor:
+You want to finish already? Well, I can still give you a reward... But it won't be something good. Are you sure?
+ + + \ No newline at end of file diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-08.html b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-08.html new file mode 100644 index 0000000000..c0a54e48e6 --- /dev/null +++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-08.html @@ -0,0 +1,3 @@ +Sthor:
+Go to the Garden of Spirits and defeat all type monsters until you collect 200 Mutated Spirit's Souls. + \ No newline at end of file diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-08a.html b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-08a.html new file mode 100644 index 0000000000..4a88756bea --- /dev/null +++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-08a.html @@ -0,0 +1,3 @@ +Sthor:
+Go to the Garden of Spirits and defeat all type monsters until you collect 400 Mutated Spirit's Souls. + \ No newline at end of file diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-09.html b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-09.html new file mode 100644 index 0000000000..dda8741dc7 --- /dev/null +++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-09.html @@ -0,0 +1,6 @@ +Sthor:
+Toy have collected all of the Mutated Spirit's Souls. You have completed the mission successfully.
+I would like to congratulate you on completing the mission. Here's your reward. If you have a Faction Amity Token, I can give You more rewards.
+ + + \ No newline at end of file diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-09a.html b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-09a.html new file mode 100644 index 0000000000..bcc45279f1 --- /dev/null +++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-09a.html @@ -0,0 +1,4 @@ +Sthor:
+You completed the mission!
+ + \ No newline at end of file diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-09c.html b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-09c.html new file mode 100644 index 0000000000..06bbf3dd00 --- /dev/null +++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-09c.html @@ -0,0 +1,4 @@ +Sthor:
+You completed the mission!
+ + \ No newline at end of file diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-10.html b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-10.html new file mode 100644 index 0000000000..482c458ebf --- /dev/null +++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-10.html @@ -0,0 +1,4 @@ +Sthor:
+Here is your reward. This will also help to improve the trust between you and us at the Unworldly Visitors.
+As long as you don't forget us, that is. We thank you for your hard work. + \ No newline at end of file diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-10a.html b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-10a.html new file mode 100644 index 0000000000..4beb6b1f42 --- /dev/null +++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-10a.html @@ -0,0 +1,3 @@ +Sthor:
+Here's your reward. We'll be able to maintain our trust. As long as you don't forget about us, that is. + \ No newline at end of file diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-10b.html b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-10b.html new file mode 100644 index 0000000000..e3a6b53369 --- /dev/null +++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-10b.html @@ -0,0 +1,3 @@ +Sthor:
+Here's your reward, I'll remember how you've helped us all those times. Here's a higher level Mark of Trust. Thank you for all of your help. + \ No newline at end of file diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-10c.html b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-10c.html new file mode 100644 index 0000000000..53dc6d1f75 --- /dev/null +++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-10c.html @@ -0,0 +1,3 @@ +Sthor:
+Here's your reward for helping us. Although you didn't get all the Marks, I still remember how you helped us. I have no doubt the trust between us has deepened even more. + \ No newline at end of file diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q00842_CaptiveDemons/Q00842_CaptiveDemons.java b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q00842_CaptiveDemons/Q00842_CaptiveDemons.java new file mode 100644 index 0000000000..7c1f2a688f --- /dev/null +++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q00842_CaptiveDemons/Q00842_CaptiveDemons.java @@ -0,0 +1,301 @@ +/* + * 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.Q00842_CaptiveDemons; + +import java.util.HashSet; +import java.util.Set; + +import org.l2jmobius.gameserver.enums.Faction; +import org.l2jmobius.gameserver.enums.QuestSound; +import org.l2jmobius.gameserver.enums.QuestType; +import org.l2jmobius.gameserver.model.actor.Npc; +import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; +import org.l2jmobius.gameserver.model.holders.NpcLogListHolder; +import org.l2jmobius.gameserver.model.quest.Quest; +import org.l2jmobius.gameserver.model.quest.QuestState; +import org.l2jmobius.gameserver.model.quest.State; +import org.l2jmobius.gameserver.network.NpcStringId; + +/** + * Captive Demons (842) + * @URL https://l2wiki.com/Captive_Demons + * @author Dmitri + */ +public class Q00842_CaptiveDemons extends Quest +{ + // NPC + private static final int STHOR = 34219; + // Monsters + private static final int[] MONSTERS = + { + 23735, // Captive Familiar Spirit + 23736, // Captive Hell Demon + 23737, // Captive Succubus + 23738 // Captive Phantom + }; + // Items + private static final int GIANT_TRACKERS_BASIC_SUPPLY_BOX = 47184; + private static final int GIANT_TRACKERS_INTERMEDIATE_SUPPLY_BOX = 47185; + private static final int GIANT_TRACKERS_ADVANCED_SUPPLY_BOX = 47186; + // Misc + private static final int KILLING_NPCSTRING_ID = NpcStringId.DEFEATING_THE_CAPTIVE_DEMONS.getId(); + private static final boolean PARTY_QUEST = true; + private static final int MIN_LEVEL = 100; + + public Q00842_CaptiveDemons() + { + super(842); + addStartNpc(STHOR); + addTalkId(STHOR); + addKillId(MONSTERS); + addCondMinLevel(MIN_LEVEL, "34219-00.htm"); + addFactionLevel(Faction.GIANT_TRACKERS, 1, "34219-00.htm"); + } + + @Override + public String onAdvEvent(String event, Npc npc, PlayerInstance player) + { + String htmltext = null; + final QuestState qs = getQuestState(player, false); + if (qs == null) + { + return htmltext; + } + + switch (event) + { + case "34219-02.htm": + case "34219-03.htm": + case "34219-04.htm": + case "34219-04a.htm": + case "34219-06.html": + case "34219-06a.html": + { + htmltext = event; + break; + } + case "select_mission": + { + qs.startQuest(); + if (player.getFactionLevel(Faction.GIANT_TRACKERS) >= 3) + { + htmltext = "34219-04a.htm"; + break; + } + htmltext = "34219-04.htm"; + break; + } + case "return": + { + if (player.getFactionLevel(Faction.GIANT_TRACKERS) >= 3) + { + htmltext = "34219-04a.htm"; + break; + } + htmltext = "34219-04.htm"; + break; + } + case "34219-07.html": + { + qs.setCond(2, true); + htmltext = event; + break; + } + case "34219-07a.html": + { + qs.setCond(3, true); + htmltext = event; + break; + } + case "34219-10.html": + { + final int chance = getRandom(100); + switch (qs.getCond()) + { + case 4: + { + if (player.getLevel() >= MIN_LEVEL) + { + if (chance < 2) + { + giveItems(player, GIANT_TRACKERS_ADVANCED_SUPPLY_BOX, 1); + } + else if (chance < 20) + { + giveItems(player, GIANT_TRACKERS_INTERMEDIATE_SUPPLY_BOX, 1); + } + else if (chance < 100) + { + giveItems(player, GIANT_TRACKERS_BASIC_SUPPLY_BOX, 1); + } + addExpAndSp(player, 5_536_944_000L, 13_288_590); + addFactionPoints(player, Faction.GIANT_TRACKERS, 100); + qs.exitQuest(QuestType.DAILY, true); + htmltext = event; + } + else + { + htmltext = getNoQuestLevelRewardMsg(player); + } + break; + } + case 5: + { + if (player.getLevel() >= MIN_LEVEL) + { + if (chance < 2) + { + giveItems(player, GIANT_TRACKERS_ADVANCED_SUPPLY_BOX, 1); + } + else if (chance < 20) + { + giveItems(player, GIANT_TRACKERS_BASIC_SUPPLY_BOX, 1); + } + else if (chance < 100) + { + giveItems(player, GIANT_TRACKERS_INTERMEDIATE_SUPPLY_BOX, 1); + } + addExpAndSp(player, 11_073_888_000L, 26_577_180); + addFactionPoints(player, Faction.GIANT_TRACKERS, 200); + qs.exitQuest(QuestType.DAILY, true); + htmltext = event; + } + else + { + htmltext = getNoQuestLevelRewardMsg(player); + } + break; + } + } + break; + } + } + return htmltext; + } + + @Override + public String onTalk(Npc npc, PlayerInstance player) + { + final QuestState qs = getQuestState(player, true); + String htmltext = getNoQuestMsg(player); + + switch (qs.getState()) + { + case State.CREATED: + { + htmltext = "34219-01.htm"; + } + case State.STARTED: + { + switch (qs.getCond()) + { + case 1: + { + if (player.getFactionLevel(Faction.GIANT_TRACKERS) >= 3) + { + htmltext = "34219-04a.htm"; + break; + } + htmltext = "34219-04.htm"; + break; + } + case 2: + { + htmltext = "34219-08.html"; + break; + } + case 3: + { + htmltext = "34219-08a.html"; + break; + } + case 4: + case 5: + { + htmltext = "34219-09.html"; + break; + } + } + break; + } + case State.COMPLETED: + { + if (!qs.isNowAvailable()) + { + htmltext = getAlreadyCompletedMsg(player, QuestType.DAILY); + } + else + { + qs.setState(State.CREATED); + htmltext = "34219-01.htm"; + } + break; + } + } + return htmltext; + } + + @Override + public String onKill(Npc npc, PlayerInstance killer, boolean isSummon) + { + final QuestState qs = PARTY_QUEST ? getRandomPartyMemberState(killer, -1, 3, npc) : getQuestState(killer, false); + if ((qs != null) && (qs.getCond() > 1)) + { + switch (qs.getCond()) + { + case 2: + { + final int killedGhosts = qs.getInt("AncientGhosts") + 1; + qs.set("AncientGhosts", killedGhosts); + playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET); + + if (killedGhosts >= 200) + { + qs.setCond(4, true); + } + break; + } + case 3: + { + final int killedGhosts = qs.getInt("AncientGhosts") + 1; + qs.set("AncientGhosts", killedGhosts); + playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET); + + if (killedGhosts >= 400) + { + qs.setCond(5, true); + } + break; + } + } + } + return super.onKill(npc, killer, isSummon); + } + + @Override + public Set getNpcLogList(PlayerInstance player) + { + final QuestState qs = getQuestState(player, false); + if ((qs != null) && (qs.getCond() > 1)) + { + final Set holder = new HashSet<>(); + holder.add(new NpcLogListHolder(KILLING_NPCSTRING_ID, true, qs.getInt("AncientGhosts"))); + return holder; + } + return super.getNpcLogList(player); + } +} diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/QuestMasterHandler.java b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/QuestMasterHandler.java index 1495f8b2a6..c8d2423f90 100644 --- a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/QuestMasterHandler.java +++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/QuestMasterHandler.java @@ -176,6 +176,7 @@ import quests.Q00830_TheWayOfTheGiantsPawn.Q00830_TheWayOfTheGiantsPawn; import quests.Q00831_SayhasScheme.Q00831_SayhasScheme; import quests.Q00833_DevilsTreasureTauti.Q00833_DevilsTreasureTauti; import quests.Q00835_PitiableMelisa.Q00835_PitiableMelisa; +import quests.Q00842_CaptiveDemons.Q00842_CaptiveDemons; import quests.Q00901_HowLavasaurusesAreMade.Q00901_HowLavasaurusesAreMade; import quests.Q00902_ReclaimOurEra.Q00902_ReclaimOurEra; import quests.Q00903_TheCallOfAntharas.Q00903_TheCallOfAntharas; @@ -671,7 +672,7 @@ public class QuestMasterHandler Q00839_RequestFromTheUnworldlyVisitors.class, // TODO: Not done. Q00840_RequestFromTheKingdomsRoyalGuard.class, // TODO: Not done. Q00841_ContaminationContainment.class, // TODO: Not done. - Q00842_CaptiveDemons.class, // TODO: Not done. + Q00842_CaptiveDemons.class, Q00843_GiantEvolutionControl.class, // TODO: Not done. Q00844_GiantsTreasure.class, // TODO: Not done. Q00845_SabotageTheEmbryoSupplies.class, // TODO: Not done. diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/not_done/Q00842_CaptiveDemons.java b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/not_done/Q00842_CaptiveDemons.java deleted file mode 100644 index 7be5418b76..0000000000 --- a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/not_done/Q00842_CaptiveDemons.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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.not_done; - -import org.l2jmobius.Config; -import org.l2jmobius.gameserver.model.quest.Quest; - -/** - * @author Mobius - */ -public class Q00842_CaptiveDemons extends Quest -{ - private static final int START_NPC = 34219; - - public Q00842_CaptiveDemons() - { - super(842); - addStartNpc(START_NPC); - addTalkId(START_NPC); - addCondMinLevel(Config.PLAYER_MAXIMUM_LEVEL, getNoQuestMsg(null)); - } -} diff --git a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/quests/MissingQuests.txt b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/quests/MissingQuests.txt index 11ec344f3d..a3f16542f2 100644 --- a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/quests/MissingQuests.txt +++ b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/quests/MissingQuests.txt @@ -131,7 +131,6 @@ 838 Request from the Mother Tree Guardians 839 Request from the Unworldly Visitors 840 Request from the Kingdom's Royal Guard -842 Captive Demons 843 Giant Evolution Control 844 Giant's Treasure 845 Sabotage the Embryo Supplies diff --git a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-00.htm b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-00.htm new file mode 100644 index 0000000000..7e05a96b57 --- /dev/null +++ b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-00.htm @@ -0,0 +1,6 @@ +Sthor:
+I don't think you'll be able to complete this. You seem passionate, but you don't have enough experience.
+Please come back when you've become stronger.
+Unworldly Visitors faction level should be 1
+(Only characters above Lv. 100.) + \ No newline at end of file diff --git a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-01.htm b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-01.htm new file mode 100644 index 0000000000..5e8419301f --- /dev/null +++ b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-01.htm @@ -0,0 +1,6 @@ +Sthor:
+Ah, adventurer! There you are again. How about helping us some more? if you do, you can deepen the mutual trust with us and Ferin.
+What do you say? if you don't remember what to do, I can tell you again. + + + \ No newline at end of file diff --git a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-01a.htm b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-01a.htm new file mode 100644 index 0000000000..1c36e1dbab --- /dev/null +++ b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-01a.htm @@ -0,0 +1,6 @@ +Sthor:
+Ah, adventurer! There you are again. How about helping us some more?
+What do you say? If you don't remember what the mission was, I can tell you again.
+ + + \ No newline at end of file diff --git a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-01b.htm b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-01b.htm new file mode 100644 index 0000000000..df0ca9ef86 --- /dev/null +++ b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-01b.htm @@ -0,0 +1,6 @@ +Sthor:
+Adventurer! Good to see you. Since you've helped us so much already, how about helping us some more?
+What do you say? If you don't remember what the mission was, I can tell you again.
+ + + \ No newline at end of file diff --git a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-01c.htm b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-01c.htm new file mode 100644 index 0000000000..148f512567 --- /dev/null +++ b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-01c.htm @@ -0,0 +1,5 @@ +Sthor:
+I've been waiting for you, adventurer. Well since you are here now, will you listen to me? I know I can trust you, but if you complete this mission, we'll become better allies and your pockets will get heavier. What do you say? Or do you need me to explain the mission again?
+ + + \ No newline at end of file diff --git a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-02.htm b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-02.htm new file mode 100644 index 0000000000..3b66a89018 --- /dev/null +++ b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-02.htm @@ -0,0 +1,4 @@ +Sthor:
+We've begun an investigation in the Garden of Spirits starting from here. However, we are being threatened by the spirits there, so something must be done.
+ + \ No newline at end of file diff --git a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-03.htm b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-03.htm new file mode 100644 index 0000000000..60850328af --- /dev/null +++ b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-03.htm @@ -0,0 +1,6 @@ +Sthor:
+We know of a way to defeat those spirits, at least temporarily. This way, we'll be able to put the spirits at rest, even if it's just for a little while.
+Of course, we will give you a reward for your help. And there is one more thing. While you are helping us, you'll build trust with us. The more we trust you, the more rewards we will give you, and there are some secret missions that we only give to those we trust.
+That's about it.
+ + \ No newline at end of file diff --git a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-04.htm b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-04.htm new file mode 100644 index 0000000000..e578d5f519 --- /dev/null +++ b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-04.htm @@ -0,0 +1,7 @@ +Sthor:
+Good. Let me tell you what to do. Just choose the mission that you are capable of doing.
+Basic Mission - Collect 200 Mutated Spirit's Souls. +Intermediate Mission - Collect 400 Mutated Spirit's Souls.
+ + + \ No newline at end of file diff --git a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-04.html b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-04.html new file mode 100644 index 0000000000..4b95d66e11 --- /dev/null +++ b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-04.html @@ -0,0 +1,6 @@ +Sthor:
+This isn't the first time we've met? You've completed a mission before? I see... Well, I don't really have a good memory.
+If you have completed a mission before, then that means you must have a Mark of Trust. What? You don't have one?
+Then you are either a liar, or you haven't been here in a long time. My trust is something you must continously try to maintain. Will you listen to me?
+ + \ No newline at end of file diff --git a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-04a.htm b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-04a.htm new file mode 100644 index 0000000000..3ca5bb885a --- /dev/null +++ b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-04a.htm @@ -0,0 +1,7 @@ +Sthor:
+Good. Let me tell you what to do. Just choose the mission that you are capable of doing.
+Basic Mission - Collect 200 Mutated Spirit's Souls. +Intermediate Mission - Collect 400 Mutated Spirit's Souls.
+ + + \ No newline at end of file diff --git a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-05.htm b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-05.htm new file mode 100644 index 0000000000..7f904dcb50 --- /dev/null +++ b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-05.htm @@ -0,0 +1,3 @@ +Sthor:
+Alright. Here's the mission. Hunt the Kerberos Leger, Kerberos Fort, Kerberos Nero, Fury Sylph Barrena, Fury Sylph Labido, Fury Sylph Purka, Fury Kerberos Leger, and the Fury Kerberos Nero, and collect their Mutated Spirit's Souls as proof.
You can get rewards only if you bring at least 200. Of course, you'll get more rewards if you bring more. + \ No newline at end of file diff --git a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-05.html b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-05.html new file mode 100644 index 0000000000..1e608eed6b --- /dev/null +++ b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-05.html @@ -0,0 +1,3 @@ +Sthor:
+Your Unworldly Visitors Faction Level Must be 3 or above may undertake this mission. + \ No newline at end of file diff --git a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-06.html b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-06.html new file mode 100644 index 0000000000..3efafca5f4 --- /dev/null +++ b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-06.html @@ -0,0 +1,6 @@ +Sthor:
+You have chosen the basic mission to collect 200 Mutated Spirit's Souls. Once you have selected the difficulty of the mission, you must meet the requirements in order to complete it. Choose wisely.
+Are you sure you want to proceed with this mission?
+ + + \ No newline at end of file diff --git a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-06a.html b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-06a.html new file mode 100644 index 0000000000..d58a28d8dc --- /dev/null +++ b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-06a.html @@ -0,0 +1,6 @@ +Sthor:
+You have chosen the intermediate mission to collect 400 Mutated Spirit's Souls. Once you have selected the difficulty of the mission, you must meet the requirements in order to complete it. Choose wisely.
+Are you sure you want to proceed with this mission?
+ + + \ No newline at end of file diff --git a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-07.html b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-07.html new file mode 100644 index 0000000000..00db026769 --- /dev/null +++ b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-07.html @@ -0,0 +1,4 @@ +Sthor:
+Good. Left me explain the details. Go to the Garden of Spirits, defeat the Kerberos Lager, Kerberos Fort, Kerberos Nero, Fury Sylph Barrena, Fury Sylph Labido, Fury Sylph Purka, Fury Kerberos Leger, and Fury Kerberos Nero, and put them to rest.
+As evidence, please bring back 200 Mutated Spirit's Souls. It should be manageable. + \ No newline at end of file diff --git a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-07a.html b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-07a.html new file mode 100644 index 0000000000..31e8d782cb --- /dev/null +++ b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-07a.html @@ -0,0 +1,4 @@ +Sthor:
+Good. Left me explain the details. Go to the Garden of Spirits, defeat the Kerberos Lager, Kerberos Fort, Kerberos Nero, Fury Sylph Barrena, Fury Sylph Labido, Fury Sylph Purka, Fury Kerberos Leger, and Fury Kerberos Nero, and put them to rest.
+As evidence, please bring back 400 Mutated Spirit's Souls. It should be manageable. + \ No newline at end of file diff --git a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-07c.html b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-07c.html new file mode 100644 index 0000000000..aaef92163e --- /dev/null +++ b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-07c.html @@ -0,0 +1,5 @@ +Sthor:
+You want to finish already? Well, I can still give you a reward... But it won't be something good. Are you sure?
+ + + \ No newline at end of file diff --git a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-08.html b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-08.html new file mode 100644 index 0000000000..c0a54e48e6 --- /dev/null +++ b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-08.html @@ -0,0 +1,3 @@ +Sthor:
+Go to the Garden of Spirits and defeat all type monsters until you collect 200 Mutated Spirit's Souls. + \ No newline at end of file diff --git a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-08a.html b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-08a.html new file mode 100644 index 0000000000..4a88756bea --- /dev/null +++ b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-08a.html @@ -0,0 +1,3 @@ +Sthor:
+Go to the Garden of Spirits and defeat all type monsters until you collect 400 Mutated Spirit's Souls. + \ No newline at end of file diff --git a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-09.html b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-09.html new file mode 100644 index 0000000000..dda8741dc7 --- /dev/null +++ b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-09.html @@ -0,0 +1,6 @@ +Sthor:
+Toy have collected all of the Mutated Spirit's Souls. You have completed the mission successfully.
+I would like to congratulate you on completing the mission. Here's your reward. If you have a Faction Amity Token, I can give You more rewards.
+ + + \ No newline at end of file diff --git a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-09a.html b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-09a.html new file mode 100644 index 0000000000..bcc45279f1 --- /dev/null +++ b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-09a.html @@ -0,0 +1,4 @@ +Sthor:
+You completed the mission!
+ + \ No newline at end of file diff --git a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-09c.html b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-09c.html new file mode 100644 index 0000000000..06bbf3dd00 --- /dev/null +++ b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-09c.html @@ -0,0 +1,4 @@ +Sthor:
+You completed the mission!
+ + \ No newline at end of file diff --git a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-10.html b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-10.html new file mode 100644 index 0000000000..482c458ebf --- /dev/null +++ b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-10.html @@ -0,0 +1,4 @@ +Sthor:
+Here is your reward. This will also help to improve the trust between you and us at the Unworldly Visitors.
+As long as you don't forget us, that is. We thank you for your hard work. + \ No newline at end of file diff --git a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-10a.html b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-10a.html new file mode 100644 index 0000000000..4beb6b1f42 --- /dev/null +++ b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-10a.html @@ -0,0 +1,3 @@ +Sthor:
+Here's your reward. We'll be able to maintain our trust. As long as you don't forget about us, that is. + \ No newline at end of file diff --git a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-10b.html b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-10b.html new file mode 100644 index 0000000000..e3a6b53369 --- /dev/null +++ b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-10b.html @@ -0,0 +1,3 @@ +Sthor:
+Here's your reward, I'll remember how you've helped us all those times. Here's a higher level Mark of Trust. Thank you for all of your help. + \ No newline at end of file diff --git a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-10c.html b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-10c.html new file mode 100644 index 0000000000..53dc6d1f75 --- /dev/null +++ b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/quests/Q00842_CaptiveDemons/34219-10c.html @@ -0,0 +1,3 @@ +Sthor:
+Here's your reward for helping us. Although you didn't get all the Marks, I still remember how you helped us. I have no doubt the trust between us has deepened even more. + \ No newline at end of file diff --git a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/quests/Q00842_CaptiveDemons/Q00842_CaptiveDemons.java b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/quests/Q00842_CaptiveDemons/Q00842_CaptiveDemons.java new file mode 100644 index 0000000000..7c1f2a688f --- /dev/null +++ b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/quests/Q00842_CaptiveDemons/Q00842_CaptiveDemons.java @@ -0,0 +1,301 @@ +/* + * 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.Q00842_CaptiveDemons; + +import java.util.HashSet; +import java.util.Set; + +import org.l2jmobius.gameserver.enums.Faction; +import org.l2jmobius.gameserver.enums.QuestSound; +import org.l2jmobius.gameserver.enums.QuestType; +import org.l2jmobius.gameserver.model.actor.Npc; +import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; +import org.l2jmobius.gameserver.model.holders.NpcLogListHolder; +import org.l2jmobius.gameserver.model.quest.Quest; +import org.l2jmobius.gameserver.model.quest.QuestState; +import org.l2jmobius.gameserver.model.quest.State; +import org.l2jmobius.gameserver.network.NpcStringId; + +/** + * Captive Demons (842) + * @URL https://l2wiki.com/Captive_Demons + * @author Dmitri + */ +public class Q00842_CaptiveDemons extends Quest +{ + // NPC + private static final int STHOR = 34219; + // Monsters + private static final int[] MONSTERS = + { + 23735, // Captive Familiar Spirit + 23736, // Captive Hell Demon + 23737, // Captive Succubus + 23738 // Captive Phantom + }; + // Items + private static final int GIANT_TRACKERS_BASIC_SUPPLY_BOX = 47184; + private static final int GIANT_TRACKERS_INTERMEDIATE_SUPPLY_BOX = 47185; + private static final int GIANT_TRACKERS_ADVANCED_SUPPLY_BOX = 47186; + // Misc + private static final int KILLING_NPCSTRING_ID = NpcStringId.DEFEATING_THE_CAPTIVE_DEMONS.getId(); + private static final boolean PARTY_QUEST = true; + private static final int MIN_LEVEL = 100; + + public Q00842_CaptiveDemons() + { + super(842); + addStartNpc(STHOR); + addTalkId(STHOR); + addKillId(MONSTERS); + addCondMinLevel(MIN_LEVEL, "34219-00.htm"); + addFactionLevel(Faction.GIANT_TRACKERS, 1, "34219-00.htm"); + } + + @Override + public String onAdvEvent(String event, Npc npc, PlayerInstance player) + { + String htmltext = null; + final QuestState qs = getQuestState(player, false); + if (qs == null) + { + return htmltext; + } + + switch (event) + { + case "34219-02.htm": + case "34219-03.htm": + case "34219-04.htm": + case "34219-04a.htm": + case "34219-06.html": + case "34219-06a.html": + { + htmltext = event; + break; + } + case "select_mission": + { + qs.startQuest(); + if (player.getFactionLevel(Faction.GIANT_TRACKERS) >= 3) + { + htmltext = "34219-04a.htm"; + break; + } + htmltext = "34219-04.htm"; + break; + } + case "return": + { + if (player.getFactionLevel(Faction.GIANT_TRACKERS) >= 3) + { + htmltext = "34219-04a.htm"; + break; + } + htmltext = "34219-04.htm"; + break; + } + case "34219-07.html": + { + qs.setCond(2, true); + htmltext = event; + break; + } + case "34219-07a.html": + { + qs.setCond(3, true); + htmltext = event; + break; + } + case "34219-10.html": + { + final int chance = getRandom(100); + switch (qs.getCond()) + { + case 4: + { + if (player.getLevel() >= MIN_LEVEL) + { + if (chance < 2) + { + giveItems(player, GIANT_TRACKERS_ADVANCED_SUPPLY_BOX, 1); + } + else if (chance < 20) + { + giveItems(player, GIANT_TRACKERS_INTERMEDIATE_SUPPLY_BOX, 1); + } + else if (chance < 100) + { + giveItems(player, GIANT_TRACKERS_BASIC_SUPPLY_BOX, 1); + } + addExpAndSp(player, 5_536_944_000L, 13_288_590); + addFactionPoints(player, Faction.GIANT_TRACKERS, 100); + qs.exitQuest(QuestType.DAILY, true); + htmltext = event; + } + else + { + htmltext = getNoQuestLevelRewardMsg(player); + } + break; + } + case 5: + { + if (player.getLevel() >= MIN_LEVEL) + { + if (chance < 2) + { + giveItems(player, GIANT_TRACKERS_ADVANCED_SUPPLY_BOX, 1); + } + else if (chance < 20) + { + giveItems(player, GIANT_TRACKERS_BASIC_SUPPLY_BOX, 1); + } + else if (chance < 100) + { + giveItems(player, GIANT_TRACKERS_INTERMEDIATE_SUPPLY_BOX, 1); + } + addExpAndSp(player, 11_073_888_000L, 26_577_180); + addFactionPoints(player, Faction.GIANT_TRACKERS, 200); + qs.exitQuest(QuestType.DAILY, true); + htmltext = event; + } + else + { + htmltext = getNoQuestLevelRewardMsg(player); + } + break; + } + } + break; + } + } + return htmltext; + } + + @Override + public String onTalk(Npc npc, PlayerInstance player) + { + final QuestState qs = getQuestState(player, true); + String htmltext = getNoQuestMsg(player); + + switch (qs.getState()) + { + case State.CREATED: + { + htmltext = "34219-01.htm"; + } + case State.STARTED: + { + switch (qs.getCond()) + { + case 1: + { + if (player.getFactionLevel(Faction.GIANT_TRACKERS) >= 3) + { + htmltext = "34219-04a.htm"; + break; + } + htmltext = "34219-04.htm"; + break; + } + case 2: + { + htmltext = "34219-08.html"; + break; + } + case 3: + { + htmltext = "34219-08a.html"; + break; + } + case 4: + case 5: + { + htmltext = "34219-09.html"; + break; + } + } + break; + } + case State.COMPLETED: + { + if (!qs.isNowAvailable()) + { + htmltext = getAlreadyCompletedMsg(player, QuestType.DAILY); + } + else + { + qs.setState(State.CREATED); + htmltext = "34219-01.htm"; + } + break; + } + } + return htmltext; + } + + @Override + public String onKill(Npc npc, PlayerInstance killer, boolean isSummon) + { + final QuestState qs = PARTY_QUEST ? getRandomPartyMemberState(killer, -1, 3, npc) : getQuestState(killer, false); + if ((qs != null) && (qs.getCond() > 1)) + { + switch (qs.getCond()) + { + case 2: + { + final int killedGhosts = qs.getInt("AncientGhosts") + 1; + qs.set("AncientGhosts", killedGhosts); + playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET); + + if (killedGhosts >= 200) + { + qs.setCond(4, true); + } + break; + } + case 3: + { + final int killedGhosts = qs.getInt("AncientGhosts") + 1; + qs.set("AncientGhosts", killedGhosts); + playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET); + + if (killedGhosts >= 400) + { + qs.setCond(5, true); + } + break; + } + } + } + return super.onKill(npc, killer, isSummon); + } + + @Override + public Set getNpcLogList(PlayerInstance player) + { + final QuestState qs = getQuestState(player, false); + if ((qs != null) && (qs.getCond() > 1)) + { + final Set holder = new HashSet<>(); + holder.add(new NpcLogListHolder(KILLING_NPCSTRING_ID, true, qs.getInt("AncientGhosts"))); + return holder; + } + return super.getNpcLogList(player); + } +} diff --git a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/quests/QuestMasterHandler.java b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/quests/QuestMasterHandler.java index 25dc2b01c0..5a7fa7a889 100644 --- a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/quests/QuestMasterHandler.java +++ b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/quests/QuestMasterHandler.java @@ -90,6 +90,7 @@ import quests.Q00830_TheWayOfTheGiantsPawn.Q00830_TheWayOfTheGiantsPawn; import quests.Q00831_SayhasScheme.Q00831_SayhasScheme; import quests.Q00833_DevilsTreasureTauti.Q00833_DevilsTreasureTauti; import quests.Q00835_PitiableMelisa.Q00835_PitiableMelisa; +import quests.Q00842_CaptiveDemons.Q00842_CaptiveDemons; import quests.Q00901_HowLavasaurusesAreMade.Q00901_HowLavasaurusesAreMade; import quests.Q00903_TheCallOfAntharas.Q00903_TheCallOfAntharas; import quests.Q00905_RefinedDragonBlood.Q00905_RefinedDragonBlood; @@ -342,7 +343,7 @@ public class QuestMasterHandler Q00838_RequestFromTheMotherTreeGuardians.class, // TODO: Not done. Q00839_RequestFromTheUnworldlyVisitors.class, // TODO: Not done. Q00840_RequestFromTheKingdomsRoyalGuard.class, // TODO: Not done. - Q00842_CaptiveDemons.class, // TODO: Not done. + Q00842_CaptiveDemons.class, Q00843_GiantEvolutionControl.class, // TODO: Not done. Q00844_GiantsTreasure.class, // TODO: Not done. Q00845_SabotageTheEmbryoSupplies.class, // TODO: Not done. diff --git a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/quests/not_done/Q00842_CaptiveDemons.java b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/quests/not_done/Q00842_CaptiveDemons.java deleted file mode 100644 index 7be5418b76..0000000000 --- a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/quests/not_done/Q00842_CaptiveDemons.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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.not_done; - -import org.l2jmobius.Config; -import org.l2jmobius.gameserver.model.quest.Quest; - -/** - * @author Mobius - */ -public class Q00842_CaptiveDemons extends Quest -{ - private static final int START_NPC = 34219; - - public Q00842_CaptiveDemons() - { - super(842); - addStartNpc(START_NPC); - addTalkId(START_NPC); - addCondMinLevel(Config.PLAYER_MAXIMUM_LEVEL, getNoQuestMsg(null)); - } -}