Quest Energy of Sadness and Anger (10832).

Contributed by gigilo1968.
This commit is contained in:
MobiusDev 2017-01-06 10:08:22 +00:00
parent ed9568a40d
commit 5c058a59f0
12 changed files with 247 additions and 2 deletions

View File

@ -122,7 +122,6 @@
10806 The Dimensional Warp, Part 6
10807 The Dimensional Warp, Part 7
10809 The Hero's Journey: Blazing Swamp
10832 Energy of Sadness and Anger
10833 Put the Queen of Spirits to Sleep
10836 Disappeared Clan Member
10837 Looking for the Blackbird Clan Member

View File

@ -0,0 +1,4 @@
<html><body>Magister Belas:<br>
You think you are enough? Well, I can't agree to that.<br>
(This quest is for characters level 100 and higher who have completed the "Unbelievable Sight" quest.)
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Magister Belas:<br>
I've done some research with the items we got from defeating El Floato. It looks like the spirits have been affected by the same power that forcefully brought the Garden of Spirits. In other words, they've been forcefully awakened and are now unstable. In order to stabilize themselves, they are affecting their surroundings negatively.<br>
<Button ALIGN=LEFT ICON="Normal" action="bypass -h Quest Q10832_EnergyOfSadnessAndAnger 34056-02.htm">"Interesting. Go on."</Button>
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Magister Belas:<br>
However, that's just a description of the phenomena. It doesn't help us in finding out how to go back to our realm. It might be more effective if a creature with a more powerful energy is defeated. <br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10832_EnergyOfSadnessAndAnger 34056-03.htm">"I see."</Button>
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Magister Belas:<br>
You might think that I'm stubborn. But please understand where I'm coming from. Will you help me? Even if it might be dangerous.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10832_EnergyOfSadnessAndAnger 34056-04.htm">"Alright."</Button>
</body></html>

View File

@ -0,0 +1,3 @@
<html><body>Magister Belas:<br>
Defeat <font color="LEVEL">Harpe</font> in the Garden of Spirits to can obtain <font color="LEVEL">Sad Energy</font> and <font color="LEVEL">Angry Energy</font>. If you bring me those, I'll be able to find out about their sadness and anger. It will be really helpful for my research.
</body></html>

View File

@ -0,0 +1,3 @@
<html><body>Magister Belas:<br>
It's said that when you defeat <font color="LEVEL">Harpe</font>, you can obtain <font color="LEVEL">Sad Energy</font> and <font color="LEVEL">Angry Energy</font>. If you bring me those, I'll be able to find out about their sadness and anger. It will be really helpful for my research.
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Magister Belas:<br>
Did you finish the mission? Great.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10832_EnergyOfSadnessAndAnger 34056-07.html">"Yes."</Button>
</body></html>

View File

@ -0,0 +1,3 @@
<html><body>Magister Belas:<br>
Great. Ferin will know what to do after seeing the results of the investigation. Go talk to Ferin. Keep in mind that you must build trust first.
</body></html>

View File

@ -0,0 +1,211 @@
/*
* 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.Q10832_EnergyOfSadnessAndAnger;
import com.l2jmobius.gameserver.enums.QuestSound;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.ListenerRegisterType;
import com.l2jmobius.gameserver.model.events.annotations.Id;
import com.l2jmobius.gameserver.model.events.annotations.RegisterEvent;
import com.l2jmobius.gameserver.model.events.annotations.RegisterType;
import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerItemAdd;
import com.l2jmobius.gameserver.model.quest.Quest;
import com.l2jmobius.gameserver.model.quest.QuestState;
import com.l2jmobius.gameserver.model.quest.State;
import quests.Q10831_UnbelievableSight.Q10831_UnbelievableSight;
/**
* Energy of Sadness and Anger (10832)
* @URL https://l2wiki.com/Energy_of_Sadness_and_Anger
* @author Gigi
*/
public final class Q10832_EnergyOfSadnessAndAnger extends Quest
{
// NPC
private static final int BELAS = 34056;
// Monsters
private static final int HARPE = 23561;
private static final int HARPE1 = 23562;
private static final int KERBEROS_LAGER = 23550;
private static final int KERBEROS_FORT = 23551;
private static final int KERBEROS_NERO = 23552;
private static final int FURY_SYLPH_BARRENA = 23553;
private static final int FURY_SYLPH_TEMPTRESS = 23555;
private static final int FURY_SYLPH_PURKA = 23556;
private static final int FURY_KERBEROS_LEGER = 23557;
private static final int FURY_KERBEROS_NERO = 23558;
// Items
private static final int MARK_OF_TRUST_MID_GRADE = 45843;
private static final int SAD_ENERGY = 45837;
private static final int ANGRY_ENERGY = 45838;
private static final int SOE = 46158;
// Misc
private static final int MIN_LEVEL = 100;
public Q10832_EnergyOfSadnessAndAnger()
{
super(10832);
addStartNpc(BELAS);
addTalkId(BELAS);
addKillId(HARPE, HARPE1);
addKillId(KERBEROS_LAGER, KERBEROS_FORT, KERBEROS_NERO, FURY_SYLPH_BARRENA, FURY_SYLPH_TEMPTRESS, FURY_SYLPH_PURKA, FURY_KERBEROS_LEGER, FURY_KERBEROS_NERO);
registerQuestItems(SAD_ENERGY, ANGRY_ENERGY);
addCondMinLevel(MIN_LEVEL, "34056-00.htm");
addCondCompletedQuest(Q10831_UnbelievableSight.class.getSimpleName(), "34056-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 "34056-02.htm":
case "34056-03.htm":
{
htmltext = event;
break;
}
case "34056-04.htm":
{
qs.startQuest();
htmltext = event;
break;
}
case "34056-07.html":
{
giveItems(player, SOE, 1);
addExpAndSp(player, 7909920000L, 18983760);
qs.exitQuest(false, true);
htmltext = event;
break;
}
}
return htmltext;
}
@Override
public String onTalk(L2Npc npc, L2PcInstance player)
{
final QuestState qs = getQuestState(player, true);
String htmltext = getNoQuestMsg(player);
switch (qs.getState())
{
case State.CREATED:
{
if (!hasQuestItems(player, MARK_OF_TRUST_MID_GRADE))
{
htmltext = "noItem.htm";
break;
}
htmltext = "34056-01.htm";
break;
}
case State.STARTED:
{
if (qs.isCond(1))
{
htmltext = "34056-05.html";
}
else
{
htmltext = "34056-06.html";
}
break;
}
case State.COMPLETED:
{
htmltext = getAlreadyCompletedMsg(player);
break;
}
}
return htmltext;
}
@Override
public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
{
final QuestState qs = getQuestState(killer, false);
if ((qs != null) && qs.isCond(1))
{
switch (npc.getId())
{
case KERBEROS_LAGER:
case KERBEROS_FORT:
case KERBEROS_NERO:
{
final L2Npc mob = addSpawn(HARPE, npc.getX(), npc.getY(), npc.getZ(), 0, true, 120000);
addAttackPlayerDesire(mob, killer, 5);
break;
}
case FURY_SYLPH_BARRENA:
case FURY_SYLPH_TEMPTRESS:
case FURY_SYLPH_PURKA:
case FURY_KERBEROS_LEGER:
case FURY_KERBEROS_NERO:
{
final L2Npc mob = addSpawn(HARPE1, npc.getX(), npc.getY(), npc.getZ(), 0, true, 120000);
addAttackPlayerDesire(mob, killer, 5);
break;
}
case HARPE:
{
if ((getRandom(100) < 2) && !hasQuestItems(killer, ANGRY_ENERGY))
{
giveItems(killer, ANGRY_ENERGY, 1);
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
break;
}
case HARPE1:
{
if ((getRandom(100) < 2) && !hasQuestItems(killer, SAD_ENERGY))
{
giveItems(killer, SAD_ENERGY, 1);
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
break;
}
}
}
return super.onKill(npc, killer, isSummon);
}
@RegisterEvent(EventType.ON_PLAYER_ITEM_ADD)
@RegisterType(ListenerRegisterType.ITEM)
@Id(ANGRY_ENERGY)
@Id(SAD_ENERGY)
public void onItemAdd(OnPlayerItemAdd event)
{
final L2PcInstance player = event.getActiveChar();
final QuestState qs = getQuestState(player, false);
if ((qs != null) && (qs.isCond(1)) && (hasQuestItems(player, ANGRY_ENERGY)) && (hasQuestItems(player, SAD_ENERGY)))
{
qs.setCond(2, true);
}
}
}

View File

@ -0,0 +1,4 @@
<html><body>Magister Belas:<br>
We don't have enough trust in you.<br>
(This quest may only be undertaken by characters with a Mark of Trust (Mid-grade).)
</body></html>

View File

@ -411,6 +411,7 @@ import quests.Q10827_StepUpToLead.Q10827_StepUpToLead;
import quests.Q10829_InSearchOfTheCause.Q10829_InSearchOfTheCause;
import quests.Q10830_TheLostGardenOfSpirits.Q10830_TheLostGardenOfSpirits;
import quests.Q10831_UnbelievableSight.Q10831_UnbelievableSight;
import quests.Q10832_EnergyOfSadnessAndAnger.Q10832_EnergyOfSadnessAndAnger;
/**
* @author NosBit
@ -812,7 +813,8 @@ public class QuestMasterHandler
Q10827_StepUpToLead.class,
Q10829_InSearchOfTheCause.class,
Q10830_TheLostGardenOfSpirits.class,
Q10831_UnbelievableSight.class
Q10831_UnbelievableSight.class,
Q10832_EnergyOfSadnessAndAnger.class
};
public static void main(String[] args)