Addition of quest Utilize the Darkness - Seed of Destruction (779).

Contributed by gigilo1968.
This commit is contained in:
MobiusDev
2018-06-17 13:53:43 +00:00
parent 4f9bf81f74
commit 67e94d8224
48 changed files with 880 additions and 4 deletions

View File

@@ -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

View File

@@ -0,0 +1,4 @@
<html><body>Sergeant Allenos:<br>
Scary place, huh? I know. But lucky you -- you can run away if you want!<br>
(Only characters between level 93 and 97 may enter)
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Sergeant Allenos:<br>
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!<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00779_UtilizeTheDarknessSeedOfDestruction 32526-02.htm">"How? Let me in on it."</Button>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Sergeant Allenos:<br>
Dragonkin carry <font color="LEVEL">Tiat's Charms</font>, 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.<br>
But not every one of them carries one. But fear not, friend! If it doesn't exist, we'll make it exist! Hahaha!<br>
Well? Interested?<br><Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00779_UtilizeTheDarknessSeedOfDestruction 32526-03.htm">"I have no idea what you're saying, but sure."</Button>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Sergeant Allenos:<br>
You see, you can create a Tiat's Charm with multiple <font color="LEVEL">Tiat's Totems</font> taken from the Dragonkin! You just bring me the totems, and and I'll give you 1 <font color="LEVEL">Tiat's Charm</font> for 5 of them. <br>
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.
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Sergeant Allenos:<br>
At least 50, remember.
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Sergeant Allenos:<br>
Hm, you seem pleased. Do you have some stuff for me?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00779_UtilizeTheDarknessSeedOfDestruction 32526-06.html">"Yeah, let's trade."</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00779_UtilizeTheDarknessSeedOfDestruction 32526-08.html">"I'll be back with some more."</Button>
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Sergeant Allenos:<br>
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!
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Sergeant Allenos:<br>
Wow, you're a beast! I've never seen such a number in a while.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00779_UtilizeTheDarknessSeedOfDestruction 32526-06.html">"Yeah, give me my exchange."</Button>
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Sergeant Allenos:<br>
Sure, whatever you want. Just don't try to overdo it!
</body></html>

View File

@@ -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 <http://www.gnu.org/licenses/>.
*/
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);
}
}

View File

@@ -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,