diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/MissingQuests.txt b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/MissingQuests.txt index 0ae3bdef6e..898f7f64aa 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/MissingQuests.txt +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/MissingQuests.txt @@ -11,7 +11,6 @@ 769 The Truth Concealed in Beauty 770 Maintaining the Field Business 771 Partaking in the Purification Campaign -779 Utilize the Darkness - Seed of Destruction 780 Utilize the Darkness - Seed of Infinity 781 Utilize the Darkness - Seed of Annihilation 782 Utilize the Darkness - Seed of Hellfire diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-00.htm b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-00.htm new file mode 100644 index 0000000000..411884a3c8 --- /dev/null +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-00.htm @@ -0,0 +1,4 @@ +Sergeant Allenos:
+Scary place, huh? I know. But lucky you -- you can run away if you want!
+(Only characters between level 93 and 97 may enter) + \ No newline at end of file diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-01.htm b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-01.htm new file mode 100644 index 0000000000..adb0129192 --- /dev/null +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-01.htm @@ -0,0 +1,4 @@ +Sergeant Allenos:
+Have you met Special Product Broker Kirklan at the Keucereus Alliance Base yet? He said fighting creatures at the Seed of Destruction can make you rich!
+ + \ No newline at end of file diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-02.htm b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-02.htm new file mode 100644 index 0000000000..daa0f62623 --- /dev/null +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-02.htm @@ -0,0 +1,5 @@ +Sergeant Allenos:
+Dragonkin carry Tiat's Charms, which apparently carry the power of the Seed within. You can trade it for good stuff through Special Product Broker Kirklan at the Keucereus Alliance Base.
+But not every one of them carries one. But fear not, friend! If it doesn't exist, we'll make it exist! Hahaha!
+Well? Interested?
+ \ No newline at end of file diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-03.htm b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-03.htm new file mode 100644 index 0000000000..a2f3ff2c69 --- /dev/null +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-03.htm @@ -0,0 +1,4 @@ +Sergeant Allenos:
+You see, you can create a Tiat's Charm with multiple Tiat's Totems taken from the Dragonkin! You just bring me the totems, and and I'll give you 1 Tiat's Charm for 5 of them.
+But don't bring me tiny little amounts, ok? Bring at least 50 at a time or something. Also, don't try to get more than 500, because I can't accommodate stuff like that. + \ No newline at end of file diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-04.html b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-04.html new file mode 100644 index 0000000000..61d019c84c --- /dev/null +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-04.html @@ -0,0 +1,3 @@ +Sergeant Allenos:
+At least 50, remember. + \ No newline at end of file diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-05.html b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-05.html new file mode 100644 index 0000000000..21f6c95c7a --- /dev/null +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-05.html @@ -0,0 +1,5 @@ +Sergeant Allenos:
+Hm, you seem pleased. Do you have some stuff for me?
+ + + \ No newline at end of file diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-06.html b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-06.html new file mode 100644 index 0000000000..3f7479028e --- /dev/null +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-06.html @@ -0,0 +1,3 @@ +Sergeant Allenos:
+Here you are. Take these to Special Product Broker Kirklan at the Keucereus Alliance Base, and you can get things you need. Utilizing the darkness can be a win-win for everyone! + \ No newline at end of file diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-07.html b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-07.html new file mode 100644 index 0000000000..f1ceb32d53 --- /dev/null +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-07.html @@ -0,0 +1,4 @@ +Sergeant Allenos:
+Wow, you're a beast! I've never seen such a number in a while.
+ + \ No newline at end of file diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-08.html b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-08.html new file mode 100644 index 0000000000..a51bf2cc94 --- /dev/null +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-08.html @@ -0,0 +1,3 @@ +Sergeant Allenos:
+Sure, whatever you want. Just don't try to overdo it! + \ No newline at end of file diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/Q00779_UtilizeTheDarknessSeedOfDestruction.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/Q00779_UtilizeTheDarknessSeedOfDestruction.java new file mode 100644 index 0000000000..706ef45d41 --- /dev/null +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/Q00779_UtilizeTheDarknessSeedOfDestruction.java @@ -0,0 +1,183 @@ +/* + * 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.Q00779_UtilizeTheDarknessSeedOfDestruction; + +import com.l2jmobius.Config; +import com.l2jmobius.gameserver.enums.QuestSound; +import com.l2jmobius.gameserver.enums.QuestType; +import com.l2jmobius.gameserver.model.actor.L2Npc; +import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; +import com.l2jmobius.gameserver.model.quest.Quest; +import com.l2jmobius.gameserver.model.quest.QuestState; +import com.l2jmobius.gameserver.model.quest.State; +import com.l2jmobius.gameserver.util.Util; + +/** + * Utilize the Darkness - Seed of Destruction (779) + * @URL https://l2wiki.com/Utilize_the_Darkness_-_Seed_of_Destruction + * @author Gigi + * @date 2018-06-17 - [12:11:48] + */ +public class Q00779_UtilizeTheDarknessSeedOfDestruction extends Quest +{ + // NPCs + private static final int ALLENOS = 32526; + private static final int[] MOBS = + { + 22536, // Royal Guard Captain + 22537, // Dragontroop Spellshifter + 22538, // Dragontroop Commander + 22539, // Dragontroop Commando + 22540, // Dragontroop Centurion + 22541, // Dragontroop Infantry + 22542, // Dragontroop Archmage + 22543, // Dragontroop Wizard + 22544, // Dragontroop Magic Blader + 22546, // Berserker + 22547, // Dragontroop Healer + 22548, // Dragontroop Lancer + 22550, // Savage Warrior + 22551, // Priest of Darkness + 22552 // Mutated Drake + }; + // Misc + private static final int MIN_LEVEL = 93; + private static final int MAX_LEVEL = 97; + // Item + private static final int TIATS_TOTEM = 38579; + private static final int TIATS_CHARM = 38575; + + public Q00779_UtilizeTheDarknessSeedOfDestruction() + { + super(779); + addStartNpc(ALLENOS); + addTalkId(ALLENOS); + addKillId(MOBS); + registerQuestItems(TIATS_TOTEM); + addCondLevel(MIN_LEVEL, MAX_LEVEL, "32526-00.htm"); + } + + @Override + public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) + { + String htmltext = null; + final QuestState qs = getQuestState(player, false); + if (qs == null) + { + return htmltext; + } + switch (event) + { + case "32526-02.htm": + case "32526-08.html": + { + htmltext = event; + break; + } + case "32526-03.htm": + { + qs.startQuest(); + htmltext = event; + break; + } + case "32526-06.html": + { + if (qs.isCond(2) && (player.getLevel() >= MIN_LEVEL)) + { + final long itemCount = getQuestItemsCount(player, TIATS_TOTEM); + giveItems(player, TIATS_CHARM, (int) (itemCount / 5)); + } + qs.exitQuest(QuestType.DAILY, true); + htmltext = event; + break; + } + } + return htmltext; + } + + @Override + public String onTalk(L2Npc npc, L2PcInstance player) + { + String htmltext = getNoQuestMsg(player); + final QuestState qs = getQuestState(player, true); + switch (qs.getState()) + { + case State.COMPLETED: + { + if (!qs.isNowAvailable()) + { + htmltext = getAlreadyCompletedMsg(player, QuestType.DAILY); + break; + } + qs.setState(State.CREATED); + } + case State.CREATED: + { + htmltext = "32526-01.htm"; + break; + } + case State.STARTED: + { + switch (qs.getCond()) + { + case 1: + { + htmltext = "32526-04.html"; + break; + } + case 2: + { + if (getQuestItemsCount(player, TIATS_TOTEM) >= 500) + { + htmltext = "32526-07.html"; + break; + } + htmltext = "32526-05.html"; + break; + } + } + break; + } + } + return htmltext; + } + + @Override + public void actionForEachPlayer(L2PcInstance player, L2Npc npc, boolean isSummon) + { + final QuestState qs = getQuestState(player, false); + if ((qs != null) && qs.isStarted() && Util.checkIfInRange(Config.ALT_PARTY_RANGE, npc, player, false)) + { + if ((getQuestItemsCount(player, TIATS_TOTEM) < 500) && (getRandom(100) < 20)) + { + giveItems(player, TIATS_TOTEM, 1); + playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET); + } + if ((getQuestItemsCount(player, TIATS_TOTEM) == 50)) + { + qs.setCond(2, true); + } + } + } + + @Override + public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon) + { + executeForEachPlayer(killer, npc, isSummon, true, false); + return super.onKill(npc, killer, isSummon); + } +} diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/QuestMasterHandler.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/QuestMasterHandler.java index 9850f795b2..ec7f54da66 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/QuestMasterHandler.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/QuestMasterHandler.java @@ -212,6 +212,7 @@ import quests.Q00775_RetrievingTheChaosFragment.Q00775_RetrievingTheChaosFragmen import quests.Q00776_SlayDarkLordEkimus.Q00776_SlayDarkLordEkimus; import quests.Q00777_SlayDarkLordTiat.Q00777_SlayDarkLordTiat; import quests.Q00778_OperationRoaringFlame.Q00778_OperationRoaringFlame; +import quests.Q00779_UtilizeTheDarknessSeedOfDestruction.Q00779_UtilizeTheDarknessSeedOfDestruction; import quests.Q00784_TheQuietKiller.Q00784_TheQuietKiller; import quests.Q00785_ASuspiciousIngredient.Q00785_ASuspiciousIngredient; import quests.Q00786_AwaitingTheVoiceOfTheGods.Q00786_AwaitingTheVoiceOfTheGods; @@ -651,6 +652,7 @@ public class QuestMasterHandler Q00776_SlayDarkLordEkimus.class, Q00777_SlayDarkLordTiat.class, Q00778_OperationRoaringFlame.class, + Q00779_UtilizeTheDarknessSeedOfDestruction.class, Q00784_TheQuietKiller.class, Q00785_ASuspiciousIngredient.class, Q00786_AwaitingTheVoiceOfTheGods.class, diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/MissingQuests.txt b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/MissingQuests.txt index 9b8b6b0881..50e69176d6 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/MissingQuests.txt +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/MissingQuests.txt @@ -15,7 +15,6 @@ 769 The Truth Concealed in Beauty 770 Maintaining the Field Business 771 Partaking in the Purification Campaign -779 Utilize the Darkness - Seed of Destruction 780 Utilize the Darkness - Seed of Infinity 781 Utilize the Darkness - Seed of Annihilation 782 Utilize the Darkness - Seed of Hellfire diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-00.htm b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-00.htm new file mode 100644 index 0000000000..411884a3c8 --- /dev/null +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-00.htm @@ -0,0 +1,4 @@ +Sergeant Allenos:
+Scary place, huh? I know. But lucky you -- you can run away if you want!
+(Only characters between level 93 and 97 may enter) + \ No newline at end of file diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-01.htm b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-01.htm new file mode 100644 index 0000000000..adb0129192 --- /dev/null +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-01.htm @@ -0,0 +1,4 @@ +Sergeant Allenos:
+Have you met Special Product Broker Kirklan at the Keucereus Alliance Base yet? He said fighting creatures at the Seed of Destruction can make you rich!
+ + \ No newline at end of file diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-02.htm b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-02.htm new file mode 100644 index 0000000000..daa0f62623 --- /dev/null +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-02.htm @@ -0,0 +1,5 @@ +Sergeant Allenos:
+Dragonkin carry Tiat's Charms, which apparently carry the power of the Seed within. You can trade it for good stuff through Special Product Broker Kirklan at the Keucereus Alliance Base.
+But not every one of them carries one. But fear not, friend! If it doesn't exist, we'll make it exist! Hahaha!
+Well? Interested?
+ \ No newline at end of file diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-03.htm b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-03.htm new file mode 100644 index 0000000000..a2f3ff2c69 --- /dev/null +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-03.htm @@ -0,0 +1,4 @@ +Sergeant Allenos:
+You see, you can create a Tiat's Charm with multiple Tiat's Totems taken from the Dragonkin! You just bring me the totems, and and I'll give you 1 Tiat's Charm for 5 of them.
+But don't bring me tiny little amounts, ok? Bring at least 50 at a time or something. Also, don't try to get more than 500, because I can't accommodate stuff like that. + \ No newline at end of file diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-04.html b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-04.html new file mode 100644 index 0000000000..61d019c84c --- /dev/null +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-04.html @@ -0,0 +1,3 @@ +Sergeant Allenos:
+At least 50, remember. + \ No newline at end of file diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-05.html b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-05.html new file mode 100644 index 0000000000..21f6c95c7a --- /dev/null +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-05.html @@ -0,0 +1,5 @@ +Sergeant Allenos:
+Hm, you seem pleased. Do you have some stuff for me?
+ + + \ No newline at end of file diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-06.html b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-06.html new file mode 100644 index 0000000000..3f7479028e --- /dev/null +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-06.html @@ -0,0 +1,3 @@ +Sergeant Allenos:
+Here you are. Take these to Special Product Broker Kirklan at the Keucereus Alliance Base, and you can get things you need. Utilizing the darkness can be a win-win for everyone! + \ No newline at end of file diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-07.html b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-07.html new file mode 100644 index 0000000000..f1ceb32d53 --- /dev/null +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-07.html @@ -0,0 +1,4 @@ +Sergeant Allenos:
+Wow, you're a beast! I've never seen such a number in a while.
+ + \ No newline at end of file diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-08.html b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-08.html new file mode 100644 index 0000000000..a51bf2cc94 --- /dev/null +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-08.html @@ -0,0 +1,3 @@ +Sergeant Allenos:
+Sure, whatever you want. Just don't try to overdo it! + \ No newline at end of file diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/Q00779_UtilizeTheDarknessSeedOfDestruction.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/Q00779_UtilizeTheDarknessSeedOfDestruction.java new file mode 100644 index 0000000000..706ef45d41 --- /dev/null +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/Q00779_UtilizeTheDarknessSeedOfDestruction.java @@ -0,0 +1,183 @@ +/* + * 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.Q00779_UtilizeTheDarknessSeedOfDestruction; + +import com.l2jmobius.Config; +import com.l2jmobius.gameserver.enums.QuestSound; +import com.l2jmobius.gameserver.enums.QuestType; +import com.l2jmobius.gameserver.model.actor.L2Npc; +import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; +import com.l2jmobius.gameserver.model.quest.Quest; +import com.l2jmobius.gameserver.model.quest.QuestState; +import com.l2jmobius.gameserver.model.quest.State; +import com.l2jmobius.gameserver.util.Util; + +/** + * Utilize the Darkness - Seed of Destruction (779) + * @URL https://l2wiki.com/Utilize_the_Darkness_-_Seed_of_Destruction + * @author Gigi + * @date 2018-06-17 - [12:11:48] + */ +public class Q00779_UtilizeTheDarknessSeedOfDestruction extends Quest +{ + // NPCs + private static final int ALLENOS = 32526; + private static final int[] MOBS = + { + 22536, // Royal Guard Captain + 22537, // Dragontroop Spellshifter + 22538, // Dragontroop Commander + 22539, // Dragontroop Commando + 22540, // Dragontroop Centurion + 22541, // Dragontroop Infantry + 22542, // Dragontroop Archmage + 22543, // Dragontroop Wizard + 22544, // Dragontroop Magic Blader + 22546, // Berserker + 22547, // Dragontroop Healer + 22548, // Dragontroop Lancer + 22550, // Savage Warrior + 22551, // Priest of Darkness + 22552 // Mutated Drake + }; + // Misc + private static final int MIN_LEVEL = 93; + private static final int MAX_LEVEL = 97; + // Item + private static final int TIATS_TOTEM = 38579; + private static final int TIATS_CHARM = 38575; + + public Q00779_UtilizeTheDarknessSeedOfDestruction() + { + super(779); + addStartNpc(ALLENOS); + addTalkId(ALLENOS); + addKillId(MOBS); + registerQuestItems(TIATS_TOTEM); + addCondLevel(MIN_LEVEL, MAX_LEVEL, "32526-00.htm"); + } + + @Override + public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) + { + String htmltext = null; + final QuestState qs = getQuestState(player, false); + if (qs == null) + { + return htmltext; + } + switch (event) + { + case "32526-02.htm": + case "32526-08.html": + { + htmltext = event; + break; + } + case "32526-03.htm": + { + qs.startQuest(); + htmltext = event; + break; + } + case "32526-06.html": + { + if (qs.isCond(2) && (player.getLevel() >= MIN_LEVEL)) + { + final long itemCount = getQuestItemsCount(player, TIATS_TOTEM); + giveItems(player, TIATS_CHARM, (int) (itemCount / 5)); + } + qs.exitQuest(QuestType.DAILY, true); + htmltext = event; + break; + } + } + return htmltext; + } + + @Override + public String onTalk(L2Npc npc, L2PcInstance player) + { + String htmltext = getNoQuestMsg(player); + final QuestState qs = getQuestState(player, true); + switch (qs.getState()) + { + case State.COMPLETED: + { + if (!qs.isNowAvailable()) + { + htmltext = getAlreadyCompletedMsg(player, QuestType.DAILY); + break; + } + qs.setState(State.CREATED); + } + case State.CREATED: + { + htmltext = "32526-01.htm"; + break; + } + case State.STARTED: + { + switch (qs.getCond()) + { + case 1: + { + htmltext = "32526-04.html"; + break; + } + case 2: + { + if (getQuestItemsCount(player, TIATS_TOTEM) >= 500) + { + htmltext = "32526-07.html"; + break; + } + htmltext = "32526-05.html"; + break; + } + } + break; + } + } + return htmltext; + } + + @Override + public void actionForEachPlayer(L2PcInstance player, L2Npc npc, boolean isSummon) + { + final QuestState qs = getQuestState(player, false); + if ((qs != null) && qs.isStarted() && Util.checkIfInRange(Config.ALT_PARTY_RANGE, npc, player, false)) + { + if ((getQuestItemsCount(player, TIATS_TOTEM) < 500) && (getRandom(100) < 20)) + { + giveItems(player, TIATS_TOTEM, 1); + playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET); + } + if ((getQuestItemsCount(player, TIATS_TOTEM) == 50)) + { + qs.setCond(2, true); + } + } + } + + @Override + public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon) + { + executeForEachPlayer(killer, npc, isSummon, true, false); + return super.onKill(npc, killer, isSummon); + } +} diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/QuestMasterHandler.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/QuestMasterHandler.java index 63ff0b4906..934c65d498 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/QuestMasterHandler.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/QuestMasterHandler.java @@ -206,6 +206,7 @@ import quests.Q00775_RetrievingTheChaosFragment.Q00775_RetrievingTheChaosFragmen import quests.Q00776_SlayDarkLordEkimus.Q00776_SlayDarkLordEkimus; import quests.Q00777_SlayDarkLordTiat.Q00777_SlayDarkLordTiat; import quests.Q00778_OperationRoaringFlame.Q00778_OperationRoaringFlame; +import quests.Q00779_UtilizeTheDarknessSeedOfDestruction.Q00779_UtilizeTheDarknessSeedOfDestruction; import quests.Q00783_VestigeOfTheMagicPower.Q00783_VestigeOfTheMagicPower; import quests.Q00784_TheQuietKiller.Q00784_TheQuietKiller; import quests.Q00785_ASuspiciousIngredient.Q00785_ASuspiciousIngredient; @@ -678,6 +679,7 @@ public class QuestMasterHandler Q00776_SlayDarkLordEkimus.class, Q00777_SlayDarkLordTiat.class, Q00778_OperationRoaringFlame.class, + Q00779_UtilizeTheDarknessSeedOfDestruction.class, Q00783_VestigeOfTheMagicPower.class, Q00784_TheQuietKiller.class, Q00785_ASuspiciousIngredient.class, 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 540906e4ba..d5668a0ef0 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 @@ -11,7 +11,6 @@ 766 10-day Adventure 773 To Calm the Flood 774 Dreaming of peace -779 Utilize the Darkness - Seed of Destruction 780 Utilize the Darkness - Seed of Infinity 781 Utilize the Darkness - Seed of Annihilation 782 Utilize the Darkness - Seed of Hellfire diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-00.htm b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-00.htm new file mode 100644 index 0000000000..411884a3c8 --- /dev/null +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-00.htm @@ -0,0 +1,4 @@ +Sergeant Allenos:
+Scary place, huh? I know. But lucky you -- you can run away if you want!
+(Only characters between level 93 and 97 may enter) + \ No newline at end of file diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-01.htm b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-01.htm new file mode 100644 index 0000000000..adb0129192 --- /dev/null +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-01.htm @@ -0,0 +1,4 @@ +Sergeant Allenos:
+Have you met Special Product Broker Kirklan at the Keucereus Alliance Base yet? He said fighting creatures at the Seed of Destruction can make you rich!
+ + \ No newline at end of file diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-02.htm b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-02.htm new file mode 100644 index 0000000000..daa0f62623 --- /dev/null +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-02.htm @@ -0,0 +1,5 @@ +Sergeant Allenos:
+Dragonkin carry Tiat's Charms, which apparently carry the power of the Seed within. You can trade it for good stuff through Special Product Broker Kirklan at the Keucereus Alliance Base.
+But not every one of them carries one. But fear not, friend! If it doesn't exist, we'll make it exist! Hahaha!
+Well? Interested?
+ \ No newline at end of file diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-03.htm b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-03.htm new file mode 100644 index 0000000000..a2f3ff2c69 --- /dev/null +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-03.htm @@ -0,0 +1,4 @@ +Sergeant Allenos:
+You see, you can create a Tiat's Charm with multiple Tiat's Totems taken from the Dragonkin! You just bring me the totems, and and I'll give you 1 Tiat's Charm for 5 of them.
+But don't bring me tiny little amounts, ok? Bring at least 50 at a time or something. Also, don't try to get more than 500, because I can't accommodate stuff like that. + \ No newline at end of file diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-04.html b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-04.html new file mode 100644 index 0000000000..61d019c84c --- /dev/null +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-04.html @@ -0,0 +1,3 @@ +Sergeant Allenos:
+At least 50, remember. + \ No newline at end of file diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-05.html b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-05.html new file mode 100644 index 0000000000..21f6c95c7a --- /dev/null +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-05.html @@ -0,0 +1,5 @@ +Sergeant Allenos:
+Hm, you seem pleased. Do you have some stuff for me?
+ + + \ No newline at end of file diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-06.html b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-06.html new file mode 100644 index 0000000000..3f7479028e --- /dev/null +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-06.html @@ -0,0 +1,3 @@ +Sergeant Allenos:
+Here you are. Take these to Special Product Broker Kirklan at the Keucereus Alliance Base, and you can get things you need. Utilizing the darkness can be a win-win for everyone! + \ No newline at end of file diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-07.html b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-07.html new file mode 100644 index 0000000000..f1ceb32d53 --- /dev/null +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-07.html @@ -0,0 +1,4 @@ +Sergeant Allenos:
+Wow, you're a beast! I've never seen such a number in a while.
+ + \ No newline at end of file diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-08.html b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-08.html new file mode 100644 index 0000000000..a51bf2cc94 --- /dev/null +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-08.html @@ -0,0 +1,3 @@ +Sergeant Allenos:
+Sure, whatever you want. Just don't try to overdo it! + \ No newline at end of file diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/Q00779_UtilizeTheDarknessSeedOfDestruction.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/Q00779_UtilizeTheDarknessSeedOfDestruction.java new file mode 100644 index 0000000000..706ef45d41 --- /dev/null +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/Q00779_UtilizeTheDarknessSeedOfDestruction.java @@ -0,0 +1,183 @@ +/* + * 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.Q00779_UtilizeTheDarknessSeedOfDestruction; + +import com.l2jmobius.Config; +import com.l2jmobius.gameserver.enums.QuestSound; +import com.l2jmobius.gameserver.enums.QuestType; +import com.l2jmobius.gameserver.model.actor.L2Npc; +import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; +import com.l2jmobius.gameserver.model.quest.Quest; +import com.l2jmobius.gameserver.model.quest.QuestState; +import com.l2jmobius.gameserver.model.quest.State; +import com.l2jmobius.gameserver.util.Util; + +/** + * Utilize the Darkness - Seed of Destruction (779) + * @URL https://l2wiki.com/Utilize_the_Darkness_-_Seed_of_Destruction + * @author Gigi + * @date 2018-06-17 - [12:11:48] + */ +public class Q00779_UtilizeTheDarknessSeedOfDestruction extends Quest +{ + // NPCs + private static final int ALLENOS = 32526; + private static final int[] MOBS = + { + 22536, // Royal Guard Captain + 22537, // Dragontroop Spellshifter + 22538, // Dragontroop Commander + 22539, // Dragontroop Commando + 22540, // Dragontroop Centurion + 22541, // Dragontroop Infantry + 22542, // Dragontroop Archmage + 22543, // Dragontroop Wizard + 22544, // Dragontroop Magic Blader + 22546, // Berserker + 22547, // Dragontroop Healer + 22548, // Dragontroop Lancer + 22550, // Savage Warrior + 22551, // Priest of Darkness + 22552 // Mutated Drake + }; + // Misc + private static final int MIN_LEVEL = 93; + private static final int MAX_LEVEL = 97; + // Item + private static final int TIATS_TOTEM = 38579; + private static final int TIATS_CHARM = 38575; + + public Q00779_UtilizeTheDarknessSeedOfDestruction() + { + super(779); + addStartNpc(ALLENOS); + addTalkId(ALLENOS); + addKillId(MOBS); + registerQuestItems(TIATS_TOTEM); + addCondLevel(MIN_LEVEL, MAX_LEVEL, "32526-00.htm"); + } + + @Override + public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) + { + String htmltext = null; + final QuestState qs = getQuestState(player, false); + if (qs == null) + { + return htmltext; + } + switch (event) + { + case "32526-02.htm": + case "32526-08.html": + { + htmltext = event; + break; + } + case "32526-03.htm": + { + qs.startQuest(); + htmltext = event; + break; + } + case "32526-06.html": + { + if (qs.isCond(2) && (player.getLevel() >= MIN_LEVEL)) + { + final long itemCount = getQuestItemsCount(player, TIATS_TOTEM); + giveItems(player, TIATS_CHARM, (int) (itemCount / 5)); + } + qs.exitQuest(QuestType.DAILY, true); + htmltext = event; + break; + } + } + return htmltext; + } + + @Override + public String onTalk(L2Npc npc, L2PcInstance player) + { + String htmltext = getNoQuestMsg(player); + final QuestState qs = getQuestState(player, true); + switch (qs.getState()) + { + case State.COMPLETED: + { + if (!qs.isNowAvailable()) + { + htmltext = getAlreadyCompletedMsg(player, QuestType.DAILY); + break; + } + qs.setState(State.CREATED); + } + case State.CREATED: + { + htmltext = "32526-01.htm"; + break; + } + case State.STARTED: + { + switch (qs.getCond()) + { + case 1: + { + htmltext = "32526-04.html"; + break; + } + case 2: + { + if (getQuestItemsCount(player, TIATS_TOTEM) >= 500) + { + htmltext = "32526-07.html"; + break; + } + htmltext = "32526-05.html"; + break; + } + } + break; + } + } + return htmltext; + } + + @Override + public void actionForEachPlayer(L2PcInstance player, L2Npc npc, boolean isSummon) + { + final QuestState qs = getQuestState(player, false); + if ((qs != null) && qs.isStarted() && Util.checkIfInRange(Config.ALT_PARTY_RANGE, npc, player, false)) + { + if ((getQuestItemsCount(player, TIATS_TOTEM) < 500) && (getRandom(100) < 20)) + { + giveItems(player, TIATS_TOTEM, 1); + playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET); + } + if ((getQuestItemsCount(player, TIATS_TOTEM) == 50)) + { + qs.setCond(2, true); + } + } + } + + @Override + public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon) + { + executeForEachPlayer(killer, npc, isSummon, true, false); + return super.onKill(npc, killer, isSummon); + } +} 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 a65951b09c..92394b6703 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 @@ -180,6 +180,7 @@ import quests.Q00775_RetrievingTheChaosFragment.Q00775_RetrievingTheChaosFragmen import quests.Q00776_SlayDarkLordEkimus.Q00776_SlayDarkLordEkimus; import quests.Q00777_SlayDarkLordTiat.Q00777_SlayDarkLordTiat; import quests.Q00778_OperationRoaringFlame.Q00778_OperationRoaringFlame; +import quests.Q00779_UtilizeTheDarknessSeedOfDestruction.Q00779_UtilizeTheDarknessSeedOfDestruction; import quests.Q00783_VestigeOfTheMagicPower.Q00783_VestigeOfTheMagicPower; import quests.Q00787_TheRoleOfAWatcher.Q00787_TheRoleOfAWatcher; import quests.Q00790_ObtainingFerinsTrust.Q00790_ObtainingFerinsTrust; @@ -617,6 +618,7 @@ public class QuestMasterHandler Q00776_SlayDarkLordEkimus.class, Q00777_SlayDarkLordTiat.class, Q00778_OperationRoaringFlame.class, + Q00779_UtilizeTheDarknessSeedOfDestruction.class, Q00783_VestigeOfTheMagicPower.class, Q00787_TheRoleOfAWatcher.class, Q00790_ObtainingFerinsTrust.class, 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 b1251c6786..6f3acaed7b 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 @@ -64,7 +64,6 @@ 766 10-day Adventure 773 To Calm the Flood 774 Dreaming of peace -779 Utilize the Darkness - Seed of Destruction 780 Utilize the Darkness - Seed of Infinity 781 Utilize the Darkness - Seed of Annihilation 782 Utilize the Darkness - Seed of Hellfire diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-00.htm b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-00.htm new file mode 100644 index 0000000000..411884a3c8 --- /dev/null +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-00.htm @@ -0,0 +1,4 @@ +Sergeant Allenos:
+Scary place, huh? I know. But lucky you -- you can run away if you want!
+(Only characters between level 93 and 97 may enter) + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-01.htm b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-01.htm new file mode 100644 index 0000000000..adb0129192 --- /dev/null +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-01.htm @@ -0,0 +1,4 @@ +Sergeant Allenos:
+Have you met Special Product Broker Kirklan at the Keucereus Alliance Base yet? He said fighting creatures at the Seed of Destruction can make you rich!
+ + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-02.htm b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-02.htm new file mode 100644 index 0000000000..daa0f62623 --- /dev/null +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-02.htm @@ -0,0 +1,5 @@ +Sergeant Allenos:
+Dragonkin carry Tiat's Charms, which apparently carry the power of the Seed within. You can trade it for good stuff through Special Product Broker Kirklan at the Keucereus Alliance Base.
+But not every one of them carries one. But fear not, friend! If it doesn't exist, we'll make it exist! Hahaha!
+Well? Interested?
+ \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-03.htm b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-03.htm new file mode 100644 index 0000000000..a2f3ff2c69 --- /dev/null +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-03.htm @@ -0,0 +1,4 @@ +Sergeant Allenos:
+You see, you can create a Tiat's Charm with multiple Tiat's Totems taken from the Dragonkin! You just bring me the totems, and and I'll give you 1 Tiat's Charm for 5 of them.
+But don't bring me tiny little amounts, ok? Bring at least 50 at a time or something. Also, don't try to get more than 500, because I can't accommodate stuff like that. + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-04.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-04.html new file mode 100644 index 0000000000..61d019c84c --- /dev/null +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-04.html @@ -0,0 +1,3 @@ +Sergeant Allenos:
+At least 50, remember. + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-05.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-05.html new file mode 100644 index 0000000000..21f6c95c7a --- /dev/null +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-05.html @@ -0,0 +1,5 @@ +Sergeant Allenos:
+Hm, you seem pleased. Do you have some stuff for me?
+ + + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-06.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-06.html new file mode 100644 index 0000000000..3f7479028e --- /dev/null +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-06.html @@ -0,0 +1,3 @@ +Sergeant Allenos:
+Here you are. Take these to Special Product Broker Kirklan at the Keucereus Alliance Base, and you can get things you need. Utilizing the darkness can be a win-win for everyone! + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-07.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-07.html new file mode 100644 index 0000000000..f1ceb32d53 --- /dev/null +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-07.html @@ -0,0 +1,4 @@ +Sergeant Allenos:
+Wow, you're a beast! I've never seen such a number in a while.
+ + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-08.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-08.html new file mode 100644 index 0000000000..a51bf2cc94 --- /dev/null +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/32526-08.html @@ -0,0 +1,3 @@ +Sergeant Allenos:
+Sure, whatever you want. Just don't try to overdo it! + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/Q00779_UtilizeTheDarknessSeedOfDestruction.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/Q00779_UtilizeTheDarknessSeedOfDestruction.java new file mode 100644 index 0000000000..706ef45d41 --- /dev/null +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00779_UtilizeTheDarknessSeedOfDestruction/Q00779_UtilizeTheDarknessSeedOfDestruction.java @@ -0,0 +1,183 @@ +/* + * 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.Q00779_UtilizeTheDarknessSeedOfDestruction; + +import com.l2jmobius.Config; +import com.l2jmobius.gameserver.enums.QuestSound; +import com.l2jmobius.gameserver.enums.QuestType; +import com.l2jmobius.gameserver.model.actor.L2Npc; +import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; +import com.l2jmobius.gameserver.model.quest.Quest; +import com.l2jmobius.gameserver.model.quest.QuestState; +import com.l2jmobius.gameserver.model.quest.State; +import com.l2jmobius.gameserver.util.Util; + +/** + * Utilize the Darkness - Seed of Destruction (779) + * @URL https://l2wiki.com/Utilize_the_Darkness_-_Seed_of_Destruction + * @author Gigi + * @date 2018-06-17 - [12:11:48] + */ +public class Q00779_UtilizeTheDarknessSeedOfDestruction extends Quest +{ + // NPCs + private static final int ALLENOS = 32526; + private static final int[] MOBS = + { + 22536, // Royal Guard Captain + 22537, // Dragontroop Spellshifter + 22538, // Dragontroop Commander + 22539, // Dragontroop Commando + 22540, // Dragontroop Centurion + 22541, // Dragontroop Infantry + 22542, // Dragontroop Archmage + 22543, // Dragontroop Wizard + 22544, // Dragontroop Magic Blader + 22546, // Berserker + 22547, // Dragontroop Healer + 22548, // Dragontroop Lancer + 22550, // Savage Warrior + 22551, // Priest of Darkness + 22552 // Mutated Drake + }; + // Misc + private static final int MIN_LEVEL = 93; + private static final int MAX_LEVEL = 97; + // Item + private static final int TIATS_TOTEM = 38579; + private static final int TIATS_CHARM = 38575; + + public Q00779_UtilizeTheDarknessSeedOfDestruction() + { + super(779); + addStartNpc(ALLENOS); + addTalkId(ALLENOS); + addKillId(MOBS); + registerQuestItems(TIATS_TOTEM); + addCondLevel(MIN_LEVEL, MAX_LEVEL, "32526-00.htm"); + } + + @Override + public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) + { + String htmltext = null; + final QuestState qs = getQuestState(player, false); + if (qs == null) + { + return htmltext; + } + switch (event) + { + case "32526-02.htm": + case "32526-08.html": + { + htmltext = event; + break; + } + case "32526-03.htm": + { + qs.startQuest(); + htmltext = event; + break; + } + case "32526-06.html": + { + if (qs.isCond(2) && (player.getLevel() >= MIN_LEVEL)) + { + final long itemCount = getQuestItemsCount(player, TIATS_TOTEM); + giveItems(player, TIATS_CHARM, (int) (itemCount / 5)); + } + qs.exitQuest(QuestType.DAILY, true); + htmltext = event; + break; + } + } + return htmltext; + } + + @Override + public String onTalk(L2Npc npc, L2PcInstance player) + { + String htmltext = getNoQuestMsg(player); + final QuestState qs = getQuestState(player, true); + switch (qs.getState()) + { + case State.COMPLETED: + { + if (!qs.isNowAvailable()) + { + htmltext = getAlreadyCompletedMsg(player, QuestType.DAILY); + break; + } + qs.setState(State.CREATED); + } + case State.CREATED: + { + htmltext = "32526-01.htm"; + break; + } + case State.STARTED: + { + switch (qs.getCond()) + { + case 1: + { + htmltext = "32526-04.html"; + break; + } + case 2: + { + if (getQuestItemsCount(player, TIATS_TOTEM) >= 500) + { + htmltext = "32526-07.html"; + break; + } + htmltext = "32526-05.html"; + break; + } + } + break; + } + } + return htmltext; + } + + @Override + public void actionForEachPlayer(L2PcInstance player, L2Npc npc, boolean isSummon) + { + final QuestState qs = getQuestState(player, false); + if ((qs != null) && qs.isStarted() && Util.checkIfInRange(Config.ALT_PARTY_RANGE, npc, player, false)) + { + if ((getQuestItemsCount(player, TIATS_TOTEM) < 500) && (getRandom(100) < 20)) + { + giveItems(player, TIATS_TOTEM, 1); + playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET); + } + if ((getQuestItemsCount(player, TIATS_TOTEM) == 50)) + { + qs.setCond(2, true); + } + } + } + + @Override + public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon) + { + executeForEachPlayer(killer, npc, isSummon, true, false); + return super.onKill(npc, killer, isSummon); + } +} 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 971bed40ee..56283865a3 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 @@ -180,6 +180,7 @@ import quests.Q00775_RetrievingTheChaosFragment.Q00775_RetrievingTheChaosFragmen import quests.Q00776_SlayDarkLordEkimus.Q00776_SlayDarkLordEkimus; import quests.Q00777_SlayDarkLordTiat.Q00777_SlayDarkLordTiat; import quests.Q00778_OperationRoaringFlame.Q00778_OperationRoaringFlame; +import quests.Q00779_UtilizeTheDarknessSeedOfDestruction.Q00779_UtilizeTheDarknessSeedOfDestruction; import quests.Q00783_VestigeOfTheMagicPower.Q00783_VestigeOfTheMagicPower; import quests.Q00787_TheRoleOfAWatcher.Q00787_TheRoleOfAWatcher; import quests.Q00790_ObtainingFerinsTrust.Q00790_ObtainingFerinsTrust; @@ -614,6 +615,7 @@ public class QuestMasterHandler Q00776_SlayDarkLordEkimus.class, Q00777_SlayDarkLordTiat.class, Q00778_OperationRoaringFlame.class, + Q00779_UtilizeTheDarknessSeedOfDestruction.class, Q00783_VestigeOfTheMagicPower.class, Q00787_TheRoleOfAWatcher.class, Q00790_ObtainingFerinsTrust.class,