This commit is contained in:
4
trunk/dist/game/data/scripts/quests/Q00311_ExpulsionOfEvilSpirits/32655-01.htm
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q00311_ExpulsionOfEvilSpirits/32655-01.htm
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Cheiren:<br>
|
||||
Us beacon watchers have been observing the Ragna Orcs for quite some time now. We've done all we can since the sparks of rebellion first erupted from their lands, but our efforts to control them have been fruitless so far.<br>
|
||||
<a action="bypass -h Quest Q00311_ExpulsionOfEvilSpirits 32655-03.htm">"Please tell me what happened."</a>
|
||||
</body></html>
|
||||
6
trunk/dist/game/data/scripts/quests/Q00311_ExpulsionOfEvilSpirits/32655-02.htm
vendored
Normal file
6
trunk/dist/game/data/scripts/quests/Q00311_ExpulsionOfEvilSpirits/32655-02.htm
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
<html><body>Cheiren:<br>
|
||||
We Beacon Watchers have long watched the movements of the Ragna Orcs. Despite our efforts, though, rebellion seems inevitable.<br>
|
||||
We have failed...<br>
|
||||
Ah, but this is none of your concern. If you value your life, take my advice and leave this area as quickly as you can!<br>
|
||||
(Only characters who are level 80 and higher may undertake this quest.)
|
||||
</body></html>
|
||||
6
trunk/dist/game/data/scripts/quests/Q00311_ExpulsionOfEvilSpirits/32655-03.htm
vendored
Normal file
6
trunk/dist/game/data/scripts/quests/Q00311_ExpulsionOfEvilSpirits/32655-03.htm
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
<html><body>Cheiren:<br>
|
||||
In their arrogance, the Ragna Orcs summoned the power of the evil spirit Kasha. Now Kasha has corrupted them, making them even more vicious and dangerous.<br>
|
||||
Unless we can stop them, all the Orc tribes will be in grave danger...<br>
|
||||
Will you help us?<br>
|
||||
<a action="bypass -h Quest Q00311_ExpulsionOfEvilSpirits 32655-04.htm">Say yes.</a>
|
||||
</body></html>
|
||||
5
trunk/dist/game/data/scripts/quests/Q00311_ExpulsionOfEvilSpirits/32655-04.htm
vendored
Normal file
5
trunk/dist/game/data/scripts/quests/Q00311_ExpulsionOfEvilSpirits/32655-04.htm
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
<html><body>Cheiren:<br>
|
||||
Let me tell you about the mission.<br>
|
||||
Hunt <font color="LEVEL">Ragna Orcs</font> and the <font color="LEVEL">Evil Spirit of Baranka, the Destroyer of Baranka</font>. Since they are possessed by evil spirits emanating from the <font color="LEVEL">Ragna Orc Amulets</font> they wear, you must retrieve those accursed pendants. The more you bring me, the higher your reward.<br>
|
||||
Some Ragna Orcs carry the <font color="LEVEL">Soul Core Containing Evil Spirit</font> instead of an amulet. If you collect 10 of those, you may challenge the Leader of the Ragna Orcs to a duel. Do not do so lightly!
|
||||
</body></html>
|
||||
7
trunk/dist/game/data/scripts/quests/Q00311_ExpulsionOfEvilSpirits/32655-05.html
vendored
Normal file
7
trunk/dist/game/data/scripts/quests/Q00311_ExpulsionOfEvilSpirits/32655-05.html
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
<html><body>Cheiren:<br>
|
||||
What's holding you back? If you're not up for this mission, you'd better let me know now...<br>
|
||||
Otherwise, go hunt <font color="LEVEL">Ragna Orcs</font> and the <font color="LEVEL">Evil Spirit of Baranka, the Destroyer of Baranka</font>. Since they are possessed by evil spirits emanating from the <font color="LEVEL">Ragna Orc Amulets</font> they wear, you must retrieve those accursed pendants. The more you bring me, the higher your reward.<br>
|
||||
Some Ragna Orcs carry the <font color="LEVEL">Soul Core Containing Evil Spirit</font> instead of an amulet. If you collect 10 of those, you may challenge the Leader of the Ragna Orcs to a duel. Do not do so lightly!<br>
|
||||
<a action="bypass -h Quest Q00311_ExpulsionOfEvilSpirits 32655-13.html">Say you want to quit.</a><br>
|
||||
<a action="bypass -h Quest Q00311_ExpulsionOfEvilSpirits 32655-15.html">Keep hunting.</a>
|
||||
</body></html>
|
||||
5
trunk/dist/game/data/scripts/quests/Q00311_ExpulsionOfEvilSpirits/32655-06.html
vendored
Normal file
5
trunk/dist/game/data/scripts/quests/Q00311_ExpulsionOfEvilSpirits/32655-06.html
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
<html><body>Cheiren:<br>
|
||||
How did you do? If you present proof of the courage that you displayed, I will give you a fitting reward.<br>
|
||||
<a action="bypass -h npc_%objectId%_multisell 2010">Receive reward for the Ragna Orc's Amulet.</a><br>
|
||||
<a action="bypass -h Quest Q00311_ExpulsionOfEvilSpirits 32655-11.html">Receive reward for 10 Soul Cores Containing Evil Spirits.</a>
|
||||
</body></html>
|
||||
7
trunk/dist/game/data/scripts/quests/Q00311_ExpulsionOfEvilSpirits/32655-11.html
vendored
Normal file
7
trunk/dist/game/data/scripts/quests/Q00311_ExpulsionOfEvilSpirits/32655-11.html
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
<html><body>Cheiren:<br>
|
||||
You have brought back 10 Soul Cores! If I combine the power of these cores with this pendant... like... so. This is the <font color="LEVEL">Guardian Spirit's Pendant</font>! This item is absolutely necessary to stand against <font color="LEVEL">Varangka</font>, the chief of the Ragna Orcs. Without this item, you will not be able to endure his evil powers.<br>
|
||||
Go west to Kasha's Altar and defeat him, and the power of the evil spirits in this place will be greatly decreased.<br>
|
||||
<a action="bypass -h npc_%objectId%_multisell 2010">Settle other items.</a><br>
|
||||
<a action="bypass -h Quest Q00311_ExpulsionOfEvilSpirits 32655-13.html">Say that you are quitting the mission.</a><br>
|
||||
<a action="bypass -h Quest Q00311_ExpulsionOfEvilSpirits 32655-15.html">Continue the mission.</a>
|
||||
</body></html>
|
||||
7
trunk/dist/game/data/scripts/quests/Q00311_ExpulsionOfEvilSpirits/32655-12.html
vendored
Normal file
7
trunk/dist/game/data/scripts/quests/Q00311_ExpulsionOfEvilSpirits/32655-12.html
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
<html><body>Cheiren:<br>
|
||||
There must be at least 10 Soul Cores Containing Evil Spirits. You did not bring back 10.<br>
|
||||
Is there anything else?<br>
|
||||
<a action="bypass -h npc_%objectId%_multisell 2010">Settle other items.</a><br>
|
||||
<a action="bypass -h Quest Q00311_ExpulsionOfEvilSpirits 32655-13.html">Say that you are quitting the mission.</a><br>
|
||||
<a action="bypass -h Quest Q00311_ExpulsionOfEvilSpirits 32655-15.html">Continue the mission.</a>
|
||||
</body></html>
|
||||
4
trunk/dist/game/data/scripts/quests/Q00311_ExpulsionOfEvilSpirits/32655-13.html
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q00311_ExpulsionOfEvilSpirits/32655-13.html
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Cheiren:<br>
|
||||
You want to leave? Very well. I must respect your decision, and I thank you for your service.<br>
|
||||
If we Orcs survive this threat, you will always be welcome at our hearths...
|
||||
</body></html>
|
||||
3
trunk/dist/game/data/scripts/quests/Q00311_ExpulsionOfEvilSpirits/32655-14.html
vendored
Normal file
3
trunk/dist/game/data/scripts/quests/Q00311_ExpulsionOfEvilSpirits/32655-14.html
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><body>Cheiren:<br>
|
||||
Are you sure you want to stop? You still have items you haven't traded yet. Why not do so first?
|
||||
</body></html>
|
||||
3
trunk/dist/game/data/scripts/quests/Q00311_ExpulsionOfEvilSpirits/32655-15.html
vendored
Normal file
3
trunk/dist/game/data/scripts/quests/Q00311_ExpulsionOfEvilSpirits/32655-15.html
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><body>Cheiren:<br>
|
||||
I'm counting on you! Do not fail us!
|
||||
</body></html>
|
||||
176
trunk/dist/game/data/scripts/quests/Q00311_ExpulsionOfEvilSpirits/Q00311_ExpulsionOfEvilSpirits.java
vendored
Normal file
176
trunk/dist/game/data/scripts/quests/Q00311_ExpulsionOfEvilSpirits/Q00311_ExpulsionOfEvilSpirits.java
vendored
Normal file
@@ -0,0 +1,176 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2014 L2J DataPack
|
||||
*
|
||||
* This file is part of L2J DataPack.
|
||||
*
|
||||
* L2J DataPack 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.
|
||||
*
|
||||
* L2J DataPack 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.Q00311_ExpulsionOfEvilSpirits;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import com.l2jserver.gameserver.enums.QuestSound;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.quest.Quest;
|
||||
import com.l2jserver.gameserver.model.quest.QuestState;
|
||||
|
||||
/**
|
||||
* Expulsion of Evil Spirits (311)
|
||||
* @author Zoey76
|
||||
*/
|
||||
public final class Q00311_ExpulsionOfEvilSpirits extends Quest
|
||||
{
|
||||
// NPC
|
||||
private static final int CHAIREN = 32655;
|
||||
// Items
|
||||
private static final int PROTECTION_SOULS_PENDANT = 14848;
|
||||
private static final int SOUL_CORE_CONTAINING_EVIL_SPIRIT = 14881;
|
||||
private static final int RAGNA_ORCS_AMULET = 14882;
|
||||
// Misc
|
||||
private static final int MIN_LEVEL = 80;
|
||||
private static final int SOUL_CORE_COUNT = 10;
|
||||
private static final int RAGNA_ORCS_KILLS_COUNT = 100;
|
||||
private static final int RAGNA_ORCS_AMULET_COUNT = 10;
|
||||
// Monsters
|
||||
private static final Map<Integer, Double> MONSTERS = new HashMap<>();
|
||||
static
|
||||
{
|
||||
MONSTERS.put(22691, 0.694); // Ragna Orc
|
||||
MONSTERS.put(22692, 0.716); // Ragna Orc Warrior
|
||||
MONSTERS.put(22693, 0.736); // Ragna Orc Hero
|
||||
MONSTERS.put(22694, 0.712); // Ragna Orc Commander
|
||||
MONSTERS.put(22695, 0.698); // Ragna Orc Healer
|
||||
MONSTERS.put(22696, 0.692); // Ragna Orc Shaman
|
||||
MONSTERS.put(22697, 0.640); // Ragna Orc Seer
|
||||
MONSTERS.put(22698, 0.716); // Ragna Orc Archer
|
||||
MONSTERS.put(22699, 0.752); // Ragna Orc Sniper
|
||||
MONSTERS.put(22701, 0.716); // Varangka's Dre Vanul
|
||||
MONSTERS.put(22702, 0.662); // Varangka's Destroyer
|
||||
}
|
||||
|
||||
public Q00311_ExpulsionOfEvilSpirits()
|
||||
{
|
||||
super(311, Q00311_ExpulsionOfEvilSpirits.class.getSimpleName(), "Expulsion of Evil Spirits");
|
||||
addStartNpc(CHAIREN);
|
||||
addTalkId(CHAIREN);
|
||||
addKillId(MONSTERS.keySet());
|
||||
registerQuestItems(SOUL_CORE_CONTAINING_EVIL_SPIRIT, RAGNA_ORCS_AMULET);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
final QuestState qs = getQuestState(player, false);
|
||||
if (qs == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
String htmltext = null;
|
||||
if (player.getLevel() < MIN_LEVEL)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
switch (event)
|
||||
{
|
||||
case "32655-03.htm":
|
||||
case "32655-15.html":
|
||||
{
|
||||
htmltext = event;
|
||||
break;
|
||||
}
|
||||
case "32655-04.htm":
|
||||
{
|
||||
qs.startQuest();
|
||||
htmltext = event;
|
||||
break;
|
||||
}
|
||||
case "32655-11.html":
|
||||
{
|
||||
if (getQuestItemsCount(player, SOUL_CORE_CONTAINING_EVIL_SPIRIT) >= SOUL_CORE_COUNT)
|
||||
{
|
||||
takeItems(player, SOUL_CORE_CONTAINING_EVIL_SPIRIT, SOUL_CORE_COUNT);
|
||||
giveItems(player, PROTECTION_SOULS_PENDANT, 1);
|
||||
htmltext = event;
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "32655-12.html";
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "32655-13.html":
|
||||
{
|
||||
if (!hasQuestItems(player, SOUL_CORE_CONTAINING_EVIL_SPIRIT) && (getQuestItemsCount(player, RAGNA_ORCS_AMULET) >= RAGNA_ORCS_AMULET_COUNT))
|
||||
{
|
||||
qs.exitQuest(true, true);
|
||||
htmltext = event;
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "32655-14.html";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
|
||||
{
|
||||
final QuestState qs = getRandomPartyMemberState(killer, 1, 2, npc);
|
||||
if (qs != null)
|
||||
{
|
||||
final int count = qs.getMemoStateEx(1) + 1;
|
||||
if ((count >= RAGNA_ORCS_KILLS_COUNT) && (getRandom(20) < ((count % 100) + 1)))
|
||||
{
|
||||
qs.setMemoStateEx(1, 0);
|
||||
qs.giveItems(SOUL_CORE_CONTAINING_EVIL_SPIRIT, 1);
|
||||
qs.playSound(QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
||||
}
|
||||
else
|
||||
{
|
||||
qs.setMemoStateEx(1, count);
|
||||
}
|
||||
|
||||
qs.giveItemRandomly(npc, RAGNA_ORCS_AMULET, 1, 0, MONSTERS.get(npc.getId()), true);
|
||||
}
|
||||
return super.onKill(npc, killer, isSummon);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onTalk(L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
final QuestState qs = getQuestState(player, true);
|
||||
String htmltext = getNoQuestMsg(player);
|
||||
if (qs == null)
|
||||
{
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
if (qs.isCreated())
|
||||
{
|
||||
htmltext = (player.getLevel() >= MIN_LEVEL) ? "32655-01.htm" : "32655-02.htm";
|
||||
}
|
||||
else if (qs.isStarted())
|
||||
{
|
||||
htmltext = !hasQuestItems(player, SOUL_CORE_CONTAINING_EVIL_SPIRIT, RAGNA_ORCS_AMULET) ? "32655-05.html" : "32655-06.html";
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user