Merged with released L2J-Unity files.
This commit is contained in:
@@ -1,4 +0,0 @@
|
||||
<html><body>Evil Altar:<br>
|
||||
Upon close examination, you discover a place under the altar where the crystal will easily fit.<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00016_TheComingDarkness 31512-01.html">Place the crystal in the space under the altar.</Button>
|
||||
</body></html>
|
@@ -1,3 +1,4 @@
|
||||
<html><body>Evil Altar:<br>
|
||||
The altar makes an ominous sound as the seal loosens and the crystal disappears. Try the next altar.
|
||||
<html><body>Evil Altar:<br>
|
||||
Upon close examination, you discover a place under the altar where the crystal will easily fit.<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00016_TheComingDarkness 31512-02.htm">Place the crystal in the space under the altar</Button>
|
||||
</body></html>
|
3
trunk/dist/game/data/scripts/quests/Q00016_TheComingDarkness/31512-02.htm
vendored
Normal file
3
trunk/dist/game/data/scripts/quests/Q00016_TheComingDarkness/31512-02.htm
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><body>Evil Altar:<br>
|
||||
The altar makes an ominous sound as the seal loosens and the crystal disappears. Try the next altar.
|
||||
</body></html>
|
3
trunk/dist/game/data/scripts/quests/Q00016_TheComingDarkness/31512-03.html
vendored
Normal file
3
trunk/dist/game/data/scripts/quests/Q00016_TheComingDarkness/31512-03.html
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><body>Evil Altar:<br>
|
||||
There is space at the altar, but the crystal is missing. You must return to the Heirarch.
|
||||
</body></html>
|
3
trunk/dist/game/data/scripts/quests/Q00016_TheComingDarkness/31512-04.html
vendored
Normal file
3
trunk/dist/game/data/scripts/quests/Q00016_TheComingDarkness/31512-04.html
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><body>Evil Altar:<br>
|
||||
The altar looks the same as the seal loosens, but feels different. Fear washes over you.
|
||||
</body></html>
|
@@ -1,4 +0,0 @@
|
||||
<html><body>Evil Altar:<br>
|
||||
As with the previous altar, there is a space underneath where the crystal will easily fit.<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00016_TheComingDarkness 31513-01.html">Place the crystal in the space under the altar.</Button>
|
||||
</body></html>
|
@@ -1,4 +1,4 @@
|
||||
<html><body>Evil Altar:<br>
|
||||
The seal is loosening! The power is getting stronger.<br>
|
||||
Find the next altar.
|
||||
<html><body>Evil Altar:<br>
|
||||
As with the previous altar, there is a space underneath where the crystal will easily fit.<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00016_TheComingDarkness 31513-02.htm">Place the crystal in the space under the altar</Button>
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/quests/Q00016_TheComingDarkness/31513-02.htm
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q00016_TheComingDarkness/31513-02.htm
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Evil Altar:<br>
|
||||
The seal is loosening! The power is getting stronger.<br>
|
||||
Find the next altar.
|
||||
</body></html>
|
3
trunk/dist/game/data/scripts/quests/Q00016_TheComingDarkness/31513-03.html
vendored
Normal file
3
trunk/dist/game/data/scripts/quests/Q00016_TheComingDarkness/31513-03.html
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><body>Evil Altar:<br>
|
||||
There is space at the altar, but the crystal is missing. You must return to the Heirarch.
|
||||
</body></html>
|
3
trunk/dist/game/data/scripts/quests/Q00016_TheComingDarkness/31513-04.html
vendored
Normal file
3
trunk/dist/game/data/scripts/quests/Q00016_TheComingDarkness/31513-04.html
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><body>Evil Altar:<br>
|
||||
The altar looks the same as the seal continues to loosen, but it feels different.
|
||||
</body></html>
|
@@ -1,4 +0,0 @@
|
||||
<html><body>Evil Altar:<br>
|
||||
Upon close examination, you discover a place under the altar where the crystal will easily fit.<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00016_TheComingDarkness 31514-01.html">Place the crystal in the space under the altar.</Button>
|
||||
</body></html>
|
@@ -1,4 +1,4 @@
|
||||
<html><body>Evil Altar:<br>
|
||||
The power is growing stronger as the seal loosens.<br>
|
||||
Find the next altar.
|
||||
<html><body>Evil Altar:<br>
|
||||
Upon close examination, you discover a place under the altar where the crystal will easily fit.<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00016_TheComingDarkness 31514-02.htm">Place the crystal in the space under the altar</Button>
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/quests/Q00016_TheComingDarkness/31514-02.htm
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q00016_TheComingDarkness/31514-02.htm
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Evil Altar:<br>
|
||||
The power is growing stronger as the seal loosens.<br>
|
||||
Find the next altar.
|
||||
</body></html>
|
3
trunk/dist/game/data/scripts/quests/Q00016_TheComingDarkness/31514-03.html
vendored
Normal file
3
trunk/dist/game/data/scripts/quests/Q00016_TheComingDarkness/31514-03.html
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><body>Evil Altar:<br>
|
||||
There is space at the altar, but the crystal is missing. You must return to the Heirarch.
|
||||
</body></html>
|
3
trunk/dist/game/data/scripts/quests/Q00016_TheComingDarkness/31514-04.html
vendored
Normal file
3
trunk/dist/game/data/scripts/quests/Q00016_TheComingDarkness/31514-04.html
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><body>Evil Altar:<br>
|
||||
The seal is loosening. Your faith is being tested.
|
||||
</body></html>
|
@@ -1,4 +0,0 @@
|
||||
<html><body>Evil Altar:<br>
|
||||
Upon close examination, you discover a place under the altar where the crystal will easily fit.<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00016_TheComingDarkness 31515-01.html">Place the crystal in the space under the altar.</Button>
|
||||
</body></html>
|
@@ -1,4 +1,4 @@
|
||||
<html><body>Evil Altar:<br>
|
||||
The power is growing stronger as the seal loosens.<br>
|
||||
Find the next altar.
|
||||
<html><body>Evil Altar:<br>
|
||||
Upon close examination, you discover a place under the altar where the crystal will easily fit.<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00016_TheComingDarkness 31515-02.htm">Place the crystal in the space under the altar</Button>
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/quests/Q00016_TheComingDarkness/31515-02.htm
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q00016_TheComingDarkness/31515-02.htm
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Evil Altar:<br>
|
||||
The power is growing stronger as the seal loosens.<br>
|
||||
Find the next altar.
|
||||
</body></html>
|
3
trunk/dist/game/data/scripts/quests/Q00016_TheComingDarkness/31515-03.html
vendored
Normal file
3
trunk/dist/game/data/scripts/quests/Q00016_TheComingDarkness/31515-03.html
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><body>Evil Altar:<br>
|
||||
There is space at the altar, but the crystal is missing. You must return to the Heirarch.
|
||||
</body></html>
|
3
trunk/dist/game/data/scripts/quests/Q00016_TheComingDarkness/31515-04.html
vendored
Normal file
3
trunk/dist/game/data/scripts/quests/Q00016_TheComingDarkness/31515-04.html
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><body>Evil Altar:<br>
|
||||
The seal is almost removed and the power is growing stronger. If you continue, you won't be able to stop it.
|
||||
</body></html>
|
@@ -1,4 +0,0 @@
|
||||
<html><body>Evil Altar:<br>
|
||||
Upon close examination, you discover a place under the altar where the crystal will easily fit.<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00016_TheComingDarkness 31516-01.html">Place the crystal in the space under the altar.</Button>
|
||||
</body></html>
|
@@ -1,4 +1,4 @@
|
||||
<html><body>Evil Altar:<br>
|
||||
The seal is almost loose, and it emanates great power.<br>
|
||||
Visit the Tetrarch in the neighborhood.
|
||||
<html><body>Evil Altar:<br>
|
||||
Upon close examination, you discover a place under the altar where the crystal will easily fit.<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00016_TheComingDarkness 31516-02.htm">Place the crystal in the space under the altar</Button>
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/quests/Q00016_TheComingDarkness/31516-02.htm
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q00016_TheComingDarkness/31516-02.htm
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Evil Altar:<br>
|
||||
The seal is almost loose, and it emanates great power.<br>
|
||||
Visit the Tetrarch in the neighborhood.
|
||||
</body></html>
|
3
trunk/dist/game/data/scripts/quests/Q00016_TheComingDarkness/31516-03.html
vendored
Normal file
3
trunk/dist/game/data/scripts/quests/Q00016_TheComingDarkness/31516-03.html
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><body>Evil Altar:<br>
|
||||
There is space at the altar, but the crystal is missing. You must return to the Heirarch.
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/quests/Q00016_TheComingDarkness/31516-04.html
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q00016_TheComingDarkness/31516-04.html
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Evil Altar:<br>
|
||||
The seal is removed.<br1>
|
||||
Visit the Heirarch in the neighborhood.
|
||||
</body></html>
|
@@ -1,4 +0,0 @@
|
||||
<html><body>Hierarch:<br>
|
||||
You're very well prepared! I wish all of us could be as well prepared as you! You've chosen a path that holds many trials, one that your brothers have traveled before you! Do you have the faith you'll need to complete your journey?<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00016_TheComingDarkness 31517-02.htm">"I have enough faith."</Button>
|
||||
</body></html>
|
@@ -1,4 +1,4 @@
|
||||
<html><body>Hierarch:<br>
|
||||
Brother, you've been with us for a long time! You've earned our trust, and therefore I believe you're ready for an important mission!<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00016_TheComingDarkness 31517-01.htm">"I'm ready!"</Button>
|
||||
<html><body>Hierarch:<br>
|
||||
Brother, you've been with us for a long time! You've earned our trust, and therefore I believe you're ready for an important mission!<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00016_TheComingDarkness 31517-02.htm">"I'm ready!"</Button>
|
||||
</body></html>
|
@@ -1,4 +1,4 @@
|
||||
<html><body>Hierarch:<br>
|
||||
Very well. Based on the trust we have for you, brother, I'll give you a mission. Use these five crystals of binding to break open the seals that have been placed throughout this region. Watch the altar carefully; you'll discover how to use these crystals. I'll wait here until you break all the seals and return.<br>
|
||||
First, you must go to the altar near the entrance of the Valley of Saints. Your mission begins there. Good luck!
|
||||
<html><body>Hierarch:<br>
|
||||
You're very well prepared! I wish all of us could be as well prepared as you! You've chosen a path that holds many trials, one that your brothers have traveled before you! Do you have the faith you'll need to complete your journey?<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00016_TheComingDarkness 31517-03.htm">"I have enough faith."</Button>
|
||||
</body></html>
|
@@ -1,3 +0,0 @@
|
||||
<html><body>Hierarch:<br>
|
||||
You haven't finished your job yet! Come back when you've broken the seal. I'll be waiting.
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/quests/Q00016_TheComingDarkness/31517-03.htm
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q00016_TheComingDarkness/31517-03.htm
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Hierarch:<br>
|
||||
Very well. Based on the trust we have for you, brother, I'll give you a mission. Use these five crystals of sealing to break open the seals that have been placed throughout this region. Watch the altar carefully; you'll discover how to use these crystals. I'll wait here until you break all the seals and return.<br1>
|
||||
First, you must go to the altar near the entrance of the Valley of Saints. Your mission begins there. Good luck!
|
||||
</body></html>
|
@@ -1,3 +0,0 @@
|
||||
<html><body>Hierarch:<br>
|
||||
You've done well! Welcome to the brotherhood! You're now a member of the Benandanti Cartel! I'll see that you're well-rewarded!
|
||||
</body></html>
|
@@ -1,3 +1,3 @@
|
||||
<html><body>Hierarch:<br>
|
||||
Quest Light and Darkness need to be finished first.
|
||||
<html><body>Hierarch:<br>
|
||||
You haven't finished your job yet! Come back when you've broken the seal. I'll be waiting.
|
||||
</body></html>
|
@@ -1,4 +1,3 @@
|
||||
<html><body>Hierarch:<br>
|
||||
We've spent much time together, dear brother, but I regret to tell you that you're not yet ready! Try again when your faith and conviction are more firmly established.<br>
|
||||
(Only characters of level 62 and above may undertake this quest.)
|
||||
<html><body>Hierarch:<br>
|
||||
You've done well! Welcome to the brotherhood! You're now a member of the Benandanti Cartel! I'll see that you're well-rewarded!
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/quests/Q00016_TheComingDarkness/31517-06.html
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q00016_TheComingDarkness/31517-06.html
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Hierarch:<br>
|
||||
Where are the crystals of sealing? How could you betray us, your brothers?<br>
|
||||
Very well, you are no longer our brother! We cast you out in the name of Triol! May the rest of your days be filled with pain and agony...
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/quests/Q00016_TheComingDarkness/31517-07.html
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q00016_TheComingDarkness/31517-07.html
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Hierarch:<br>
|
||||
We've spent much time together, dear brother, but I regret to tell you that you're not yet ready! Try again when your faith and conviction are more firmly established.<br>
|
||||
(Only characters of level 62 and above may undertake this quest.)
|
||||
</body></html>
|
@@ -1,147 +1,302 @@
|
||||
/*
|
||||
* 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.Q00016_TheComingDarkness;
|
||||
|
||||
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 quests.Q00017_LightAndDarkness.Q00017_LightAndDarkness;
|
||||
|
||||
/**
|
||||
* The Coming Darkness (16)<br>
|
||||
* Original jython script by disKret.<br>
|
||||
* TODO: Zoey76: This quest is still not retail like, Altars AI is incomplete.
|
||||
* @author nonom
|
||||
*/
|
||||
public class Q00016_TheComingDarkness extends Quest
|
||||
{
|
||||
// NPCs
|
||||
private static final int HIERARCH = 31517;
|
||||
private static final int EVIL_ALTAR_1 = 31512;
|
||||
private static final int EVIL_ALTAR_2 = 31513;
|
||||
private static final int EVIL_ALTAR_3 = 31514;
|
||||
private static final int EVIL_ALTAR_4 = 31515;
|
||||
private static final int EVIL_ALTAR_5 = 31516;
|
||||
// Item
|
||||
private static final int CRYSTAL_OF_SEAL = 7167;
|
||||
|
||||
public Q00016_TheComingDarkness()
|
||||
{
|
||||
super(16, Q00016_TheComingDarkness.class.getSimpleName(), "The Coming Darkness");
|
||||
addStartNpc(HIERARCH);
|
||||
addTalkId(HIERARCH, EVIL_ALTAR_1, EVIL_ALTAR_2, EVIL_ALTAR_3, EVIL_ALTAR_4, EVIL_ALTAR_5);
|
||||
registerQuestItems(CRYSTAL_OF_SEAL);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
final String htmltext = event;
|
||||
final QuestState qs = getQuestState(player, false);
|
||||
if (qs == null)
|
||||
{
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
final int cond = qs.getCond();
|
||||
switch (event)
|
||||
{
|
||||
case "31517-02.htm":
|
||||
{
|
||||
qs.startQuest();
|
||||
giveItems(player, CRYSTAL_OF_SEAL, 5);
|
||||
break;
|
||||
}
|
||||
case "31512-01.html":
|
||||
case "31513-01.html":
|
||||
case "31514-01.html":
|
||||
case "31515-01.html":
|
||||
case "31516-01.html":
|
||||
{
|
||||
final int npcId = Integer.parseInt(event.replace("-01.html", ""));
|
||||
if ((cond == (npcId - 31511)) && hasQuestItems(player, CRYSTAL_OF_SEAL))
|
||||
{
|
||||
takeItems(player, CRYSTAL_OF_SEAL, 1);
|
||||
qs.setCond(cond + 1, true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onTalk(L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
String htmltext = getNoQuestMsg(player);
|
||||
final QuestState qs = getQuestState(player, true);
|
||||
if (qs == null)
|
||||
{
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
final QuestState qs2 = player.getQuestState(Q00017_LightAndDarkness.class.getSimpleName());
|
||||
if ((qs2 != null) && !qs2.isCompleted())
|
||||
{
|
||||
return "31517-04.html";
|
||||
}
|
||||
|
||||
switch (qs.getState())
|
||||
{
|
||||
case State.COMPLETED:
|
||||
{
|
||||
htmltext = getAlreadyCompletedMsg(player);
|
||||
break;
|
||||
}
|
||||
case State.CREATED:
|
||||
{
|
||||
htmltext = (player.getLevel() >= 62) ? "31517-00.htm" : "31517-05.html";
|
||||
break;
|
||||
}
|
||||
case State.STARTED:
|
||||
{
|
||||
final int npcId = npc.getId();
|
||||
if (npcId == HIERARCH)
|
||||
{
|
||||
if (qs.isCond(6))
|
||||
{
|
||||
addExpAndSp(player, 865187, 69172);
|
||||
qs.exitQuest(false, true);
|
||||
htmltext = "31517-03.html";
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "31517-02a.html";
|
||||
}
|
||||
}
|
||||
else if ((npcId - 31511) == qs.getCond())
|
||||
{
|
||||
htmltext = npcId + "-00.html";
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = npcId + "-01.html";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
}
|
||||
/*
|
||||
* 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.Q00016_TheComingDarkness;
|
||||
|
||||
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 quests.Q00017_LightAndDarkness.Q00017_LightAndDarkness;
|
||||
|
||||
/**
|
||||
* The Coming Darkness (16)
|
||||
* @author Gladicek
|
||||
*/
|
||||
public final class Q00016_TheComingDarkness extends Quest
|
||||
{
|
||||
// NPCs
|
||||
private static final int HIERARCH = 31517;
|
||||
private static final int EVIL_ALTAR_1 = 31512;
|
||||
private static final int EVIL_ALTAR_2 = 31513;
|
||||
private static final int EVIL_ALTAR_3 = 31514;
|
||||
private static final int EVIL_ALTAR_4 = 31515;
|
||||
private static final int EVIL_ALTAR_5 = 31516;
|
||||
// Item
|
||||
private static final int CRYSTAL_OF_SEAL = 7167;
|
||||
// Misc
|
||||
private static final int MIN_LEVEL = 62;
|
||||
|
||||
public Q00016_TheComingDarkness()
|
||||
{
|
||||
super(16);
|
||||
addStartNpc(HIERARCH);
|
||||
addTalkId(HIERARCH, EVIL_ALTAR_1, EVIL_ALTAR_2, EVIL_ALTAR_3, EVIL_ALTAR_4, EVIL_ALTAR_5);
|
||||
registerQuestItems(CRYSTAL_OF_SEAL);
|
||||
addCondMinLevel(MIN_LEVEL, "31517-07.html");
|
||||
addCondCompletedQuest(Q00017_LightAndDarkness.class.getSimpleName(), "");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
String htmltext = event;
|
||||
final QuestState qs = getQuestState(player, false);
|
||||
if (qs == null)
|
||||
{
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
switch (event)
|
||||
{
|
||||
case "31517-03.htm":
|
||||
{
|
||||
qs.startQuest();
|
||||
giveItems(player, CRYSTAL_OF_SEAL, 5);
|
||||
break;
|
||||
}
|
||||
case "31512-02.htm":
|
||||
{
|
||||
if (qs.isCond(1))
|
||||
{
|
||||
if (hasQuestItems(player, CRYSTAL_OF_SEAL))
|
||||
{
|
||||
qs.setMemoState(1);
|
||||
qs.setCond(2);
|
||||
takeItems(player, CRYSTAL_OF_SEAL, 1);
|
||||
htmltext = event;
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "31512-03.html";
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "31513-02.htm":
|
||||
{
|
||||
if (qs.isCond(2))
|
||||
{
|
||||
if (hasQuestItems(player, CRYSTAL_OF_SEAL))
|
||||
{
|
||||
qs.setMemoState(2);
|
||||
qs.setCond(3);
|
||||
takeItems(player, CRYSTAL_OF_SEAL, 1);
|
||||
htmltext = event;
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "31513-03.html";
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "31514-02.htm":
|
||||
{
|
||||
if (qs.isCond(3))
|
||||
{
|
||||
if (hasQuestItems(player, CRYSTAL_OF_SEAL))
|
||||
{
|
||||
qs.setMemoState(3);
|
||||
qs.setCond(4);
|
||||
takeItems(player, CRYSTAL_OF_SEAL, 1);
|
||||
htmltext = event;
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "31514-03.html";
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "31515-02.htm":
|
||||
{
|
||||
if (qs.isCond(4))
|
||||
{
|
||||
if (hasQuestItems(player, CRYSTAL_OF_SEAL))
|
||||
{
|
||||
qs.setMemoState(4);
|
||||
qs.setCond(5);
|
||||
takeItems(player, CRYSTAL_OF_SEAL, 1);
|
||||
htmltext = event;
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "31515-03.html";
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "31516-02.htm":
|
||||
{
|
||||
if (qs.isCond(5))
|
||||
{
|
||||
if (hasQuestItems(player, CRYSTAL_OF_SEAL))
|
||||
{
|
||||
qs.setMemoState(5);
|
||||
qs.setCond(6);
|
||||
takeItems(player, CRYSTAL_OF_SEAL, 1);
|
||||
htmltext = event;
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "31516-03.html";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onTalk(L2Npc npc, L2PcInstance player, boolean isSimulated)
|
||||
{
|
||||
String htmltext = getNoQuestMsg(player);
|
||||
final QuestState qs = getQuestState(player, true);
|
||||
|
||||
switch (qs.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
if (npc.getId() == HIERARCH)
|
||||
{
|
||||
htmltext = "31517-01.html";
|
||||
}
|
||||
break;
|
||||
}
|
||||
case State.STARTED:
|
||||
{
|
||||
switch (npc.getId())
|
||||
{
|
||||
case HIERARCH:
|
||||
{
|
||||
if ((qs.getCond() >= 1) && (qs.getCond() <= 5))
|
||||
{
|
||||
if (hasQuestItems(player, CRYSTAL_OF_SEAL))
|
||||
{
|
||||
htmltext = "31517-04.html";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!isSimulated)
|
||||
{
|
||||
qs.exitQuest(true, true);
|
||||
}
|
||||
htmltext = "31517-06.html";
|
||||
}
|
||||
break;
|
||||
}
|
||||
else if (qs.isCond(6))
|
||||
{
|
||||
if (!isSimulated)
|
||||
{
|
||||
addExpAndSp(player, 1_795_524, 79);
|
||||
qs.exitQuest(false, true);
|
||||
}
|
||||
htmltext = "31517-05.html";
|
||||
}
|
||||
}
|
||||
break;
|
||||
case EVIL_ALTAR_1:
|
||||
{
|
||||
if (qs.isCond(1))
|
||||
{
|
||||
htmltext = "31512-01.html";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (qs.isMemoState(1))
|
||||
{
|
||||
htmltext = "31512-04.html";
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case EVIL_ALTAR_2:
|
||||
{
|
||||
if (qs.isCond(2))
|
||||
{
|
||||
htmltext = "31513-01.html";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (qs.isMemoState(2))
|
||||
{
|
||||
htmltext = "31513-04.html";
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case EVIL_ALTAR_3:
|
||||
{
|
||||
if (qs.isCond(3))
|
||||
{
|
||||
htmltext = "31514-01.html";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (qs.isMemoState(3))
|
||||
{
|
||||
htmltext = "31514-04.html";
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case EVIL_ALTAR_4:
|
||||
{
|
||||
if (qs.isCond(4))
|
||||
{
|
||||
htmltext = "31515-01.html";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (qs.isMemoState(4))
|
||||
{
|
||||
htmltext = "31515-04.html";
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case EVIL_ALTAR_5:
|
||||
{
|
||||
if (qs.isCond(5))
|
||||
{
|
||||
htmltext = "31516-01.html";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (qs.isMemoState(5))
|
||||
{
|
||||
htmltext = "31516-04.html";
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
htmltext = getAlreadyCompletedMsg(player);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user