ZURSULUS L2

Saga of the Doomcryer

ID
78
Название
Saga of the Doomcryer
start_npcs_json
[]
npc_ids_json
[]
constants_json
{}
Статус разбора
metadata_only; dynamic Java conditions/rewards retained in source; unresolved starts: []
Источник
game/data/scripts/quests/Q00078_SagaOfTheDoomcryer/Q00078_SagaOfTheDoomcryer.java

NPC квеста

Записей нет.

Условия уровней: выражения из Java

if (player.getLevel() < 76)
if (player.getLevel() < 76)
if (player.getLevel() >= 76)

Выдача предметов, адены и опыта: выражения из Java

giveItems(player, _items[10], 1);
addExpAndSp(player, 2299404, 0);
giveAdena(player, 5000000, true);
giveItems(player, 6622, 1);
giveItems(player, _items[1], 1);
giveItems(player, _items[4], 1);
giveItems(player, _items[7], 1);
giveItems(player, _items[9], 1);
giveItems(player, _items[9], 1);
giveItems(player, _items[8], 1);
giveItems(player, _items[5], 1);
giveItems(player, _items[6], 1);
giveItems(player, _items[8], 1);
addExpAndSp(player, 2299404, 0);
giveAdena(player, 5000000, true);
giveItems(player, 6622, 1); // XXX rewardItems?
giveItems(player, _items[3], getRandom(1, 4));

Квесты содержат динамические условия Java. Выражения выдачи включают промежуточные предметы, варианты и случайные награды; это не гарантированная награда. Константы приведены выше. Полные условия — в исходнике.

Тексты квеста

[0-01.htm] Grand Seer Rahorakti: Beware the coming eternal winter! Beware, oh child of fire! You who speak with dead souls... Certainly you've heard of it from them! Have you laid in provisions for an eternity? "Oh no! What can I do?" [0-010.htm] Grand Seer Rahorakti: With the eternal winter bearing down upon us, you shall lead based upon what you learn from the dead souls. (Only a character at level 76 or above may transfer class. Be careful. You cannot change occupation if you stop Quest!) [0-02.htm] Grand Seer Rahorakti: You're actually real? I thought all those stories about you were only legends! You definitely aren't ready for the eternal winter yet. Shield the precious flame in your heart! Listen to your dead souls! (This quest may only be undertaken by a Warcryer of level 76 or above.) [0-03.htm] Grand Seer Rahorakti: Tarkai Zu Dudamara! A wandering Warcryer and a seer of webs! He rides on a web, and you can actually trace his path by looking at the webs he leaves behind! He visited me a while back and told me to prepare for the eternal winter. Unless I misunderstood him, you're the one he was talking about... You'll weave the coat that'll last all winter! Take this book that Tarkai left here, and proudly walk the path of a Warcryer! Follow the trail first blazed by Tarkai! The Dudamara totem spirit will show you the way. [0-04.htm] Grand Seer Rahorakti: The Dudamara totem spirit can tell you where Tarkai is! Tejakar Oroka! [0-05.htm] Grand Seer Rahorakti: Everyone is in an uproar about the coming winter! How do you prepare for something that might last forever?! Look at the Humans and the Dwarves! They have nice, thick winter coats and logs in their fireplaces! And meanwhile we, the keepers of the eternal fire, are threatened with extinction! We can't survive the endless winter without preparation! We should look to the Humans and Dwarves for an answer! Have you heard anything from Tarkai? "What do you mean?" [0-06.htm] Grand Seer Rahorakti: Is this the one he requested? The flame that we need to sustain us through the endless winter! Along with countless dead souls... I can't just stand by and do nothing! I'll analyze the reports from you seers of the battlefield and manage the deployment of dead souls. It won't be easy for you guides of dead souls... Warcryer! Can you understand the minds of dead souls and speak on their behalf? "Maybe I can do it with Sharuhi's help." [0-07.htm] Grand Seer Rahorakti: If you can commune with even one dead soul, you will transcend the power of a Warcryer! Now your power will exceed that of the one who can communicate with 99 dead souls! You will communicate with all dead souls at once, and your cries will ring out every place you go! You'll become like a lamp, shining brightly, guiding everyone along the path as the winter approaches! The ancestors and dead souls will commune with all Orcs through you! Your roars shall pierce the most severe winter, oh Doom Cryer! [0-08.htm] Grand Seer Rahorakti: If you can commune with even one dead soul, you will transcend the power of a Warcryer! Now your power will exceed even that of the one who can communicate with 99 dead souls! You'll actually communicate with all dead souls at once, and your cries will ring out every place you go! But I fear that you lack the strength to get us through the winter. Develop your mind and body to endure the rigors of winter. (Only a character at level 76 or above may transfer class. Be careful. You cannot change occupation if you stop Quest!) [0-09.htm] Grand Seer Rahorakti: If you can commune with even one dead soul, you will transcend the power of a Warcryer! Now your power will exceed that of the one who can communicate with 99 dead souls! You will communicate with all dead souls at once, and your cries will ring out every place you go! You'll become like a lamp, shining brightly, guiding everyone along the path as the winter approaches! The ancestors and dead souls will commune with all Orcs through you! Your roars shall pierce the most severe winter, oh Doom Cryer! [1-01.htm] Chef Donath: Bitter Cold Vodka? Isn't that the Orcish liquor made by mixing the flames of Pa'agrio with the power of 99 dead spirits? You can't just ask me to make such a.... "Well you see, it's like this..." [1-02.htm] Chef Donath: Genuine Bitter Cold Vodka is practically impossible to make, but I can get pretty close! I'll need a divine ingredient known as an ice crystal. Chef Jeremy can tell you where to find one. I can't make Bitter Cold Vodka without it! [1-03.htm] Chef Donath: You've brought the ice crystal! Excellent! Now I can make the Bitter Cold Vodka! I must warn you however, the power of the spirits within the liquor is not very strong, and over time, it loses its effect. Is that acceptable? "That's OK." [1-04.htm] Chef Donath: A dead spirit might notice the difference... But without the flames of Pa'agrio and 99 dead spirits, this is the best I can do! Here you go! [1-05.htm] Chef Donath: Hmm... if that's what you want, I'll do it, but only if you're sure that's what you really want! I should be able to get pretty close to the original. It'll do for a simple ritual, but not for a formal religious rite. I must have a divine ingredient known as an ice crystal! Chef Jeremy can tell you where to get one. I can't make Bitter Cold Vodka without it. [1-06.htm] Chef Donath: If you say so, that's good enough for me! All right! Making this liquor always makes me nervous! Here you go! [10-01.htm] Tablet of Vision: You hear fighting as you approach. Powerful forces of light and dark, oppression and domination. Pain and rejection by the one who once ruled the land. The totem spirit rejects the wisdom of the spidersilk. ...A dream? The tablet is before you. Step closer to the tablet. [10-02.htm] Tablet of Vision: Tarkai screams and the lizard totem spirit attacks. [10-03.htm] Tablet of Vision: Tarkai takes a look and smiles. [10-04.htm] Tablet of Vision: You feel a presence and hear the sound of swordplay. [10-05.htm] Tablet of Vision: The Stone of Commune emits light as you approach the tablet. Commune with the Tablet of Vision. [10-06.htm] Tablet of Vision: Vast amounts of knowledge rush into your mind. You hear the sound of distant laughter. A voice whispers, "Another Hero is born." The lady in blue disagrees... As the power of a king rises, so does the darkness that surrounds him. There are 99 souls in the world related to Orcs, on the ground, in the tribe and in the seal. Tarkai is the only seer to prepare for the coming winter. He believes this isn't enough, so new souls must be conjured. Speak with Great Seer Rahorakti. [10-07.htm] Tablet of Vision: Further communion with this tablet would be futile. Speak with Rahorakti in Rune Castle Town. [11-01.htm] Seer Skahi: Tejakar Duda-Mara! You returned as the spider foretold. Tarkai asked me to guide you with these stones. Did you let Sharuhi escape? It will be difficult to follow Tarkai, but someone must pave the way! "I must tell you of the vision of a snowstorm." [11-02.htm] Seer Skahi: Find the Archon of Halisha inside the Four Sepulchers at the Human Imperial Tomb. If entering is too difficult, go to the Shrine of the Loyal and fight Halisha's minions. He'll show up if you kill enough of them! Defeat him and get the Stone of Commune. [11-03.htm] Seer Skahi: May we be the light in the darkness of the coming winter. The power of the ancient Orcs that you seek was created by the gods, but stolen by devils. Find the Archon of Halisha inside the Four Sepulchers at the Human Imperial Tomb! If entering is too difficult, go to the Shrine of the Loyal and fight Halisha's minions! He'll show up if you kill enough of them. Defeat him and get the Stone of Commune! [2-01.htm] Duda-Mara Totem Spirit: Ah, yes, Tarkai! That punk told me what happened! Can you become a red-hot live fire that will last throughout the winter, one that can warm everyone up during the long, cold winter? "I think so." [2-02.htm] Duda-Mara Totem Spirit: I guess you haven't met Donath yet. He's the only one who can make Bitter Cold Vodka without using the power of dead spirits. [2-03.htm] Duda-Mara Totem Spirit: Did you bring the liquor for the ritual? This will do! It's different from the one Kakai has, it should satisfy the spirits. You want to know where Tarkai went? Here, give me your hand. "OK." [2-04.htm] Duda-Mara Totem Spirit: I granted Tarkai's request. If you want to find him, first you must go to the Tablet of Vision. [2-05.htm] Duda-Mara Totem Spirit: Oh, really? OK, go ahead and tell me... First, see if you can find any ritual liquor! But don't get it from Kakai's warehouse. If you want to become a hot roaring fire that will last throughout the winter, you must first learn to soothe the spirits while in peril, get it? I've heard of a chef named Donath in the northern part of Goddard Territory near the hot springs that makes Bitter Cold Vodka. [2-06.htm] Duda-Mara Totem Spirit: Take this stone that the god of fire himself entrusted to me! It contains many powers... The greatest of all is the power to recover forgotten memories from the era of heroes... The memories are stored in Tablets of Vision, distributed throughout the world... You'll find the first just south of the Tower of Insolence. When you've communed with all the stone tablets, you'll know whether or not you'll endure the coming winter. Now, go! [3-01.htm] Seer Skahi: The spidersilk of Duda-Mara told me you would come. This won't be our only meeting. "Where's Tarkai?" [3-02.htm] Seer Skahi: Go to the Ketra Orc outpost and see Messenger Wahkan. Gain their trust by lending your strength. Show the spirit of a warrior! If you feel betrayed, there is another way. [3-03.htm] Seer Skahi: Meet Varka's Messenger Naran Ashanuk in the Varka Silenos stronghold. Gain their trust by lending your strength! To fight the betrayer Orcs is the spirit of a warrior! If your suffering is too great, there is another way! [3-04.htm] Seer Skahi: Warrior, you must bring the Divine Stone of Wisdom! To get it you must choose sides in this war. Find Messenger Wahkan of the Ketra Orcs or Messenger Naran Ashanuk of the Varka Silenos. [3-05.htm] Seer Skahi: Warrior, you have shown the qualities of a king and passed the test by getting the Divine Stone of Wisdom! Don't forget the people you helped or the blood you spilled. Never forget that Duda-Mara's spidersilk protects you. Hand me the stone! "Here's the stone." [3-06.htm] Seer Skahi: Go to the northe of the Varka Silenos Barracks and commune with the Tablet! [3-07.htm] Seer Skahi: Tarkai gave me your instructions. The Human soul you released can't rest in peace, you must find him again! Here's your test. The Ketra Orcs, a lower race who betrayed us long ago, and the Varka Silenos are at war. They each have a Divine Stone of Wisdom, but you must earn their absolute trust to get it. Bring either stone to pass the test. Which side do you choose? The Ketra Orcs The Varka Silenos [3-08.htm] Seer Skahi: The power is restored in this Stone of Commune! Take it to the tablet in the Varka Silenos barracks. May the eternal flame watch over you. [4-01.htm] Tarkai Zu Duda-Mara: You must use all your abilities to defeat this soul on my behalf. [4-010.htm] Tarkai Zu Duda-Mara: This is a pilgrimage to find the power the gods left for those who would step beyond their limitations. Secret teachings from ancient times. Take this to the last tablet and you will understand what to do in the coming winter and the meaning of worship. I must go. You'll be the seed of flame to keep us warm in winter. "Thank you." [4-011.htm] Tarkai Zu Duda-Mara: This is a pilgrimage to find the power the gods left for those who would step beyond their limitations. Secret teachings from ancient times. Take this to the last tablet and you will understand what to do in the coming winter and the meaning of worship. [4-02.htm] Tarkai Zu Duda-Mara: Stand back! This isn't your fight. Don't interfere! [4-03.htm] Tarkai Zu Duda-Mara: You choose to keep your distance? This will be a harsh winter if we don't stick together. [4-04.htm] Tarkai Zu Duda-Mara: Sharuhi's soul is on a rampage! We must fight against his wrath! [4-05.htm] Tarkai Zu Duda-Mara: This is not your fight! Stand back! [4-06.htm] Tarkai Zu Duda-Mara: Sharuhi has been defeated! It's soul will help the Orc races through you, the seed of flame. I place this in your hands. "Thank you." [4-07.htm] Tarkai Zu Duda-Mara: I've defeated Sharuhi! It's soul will help the Orc races through you, the seed of flame. I place this in your hands. "Thank you." [4-08.htm] Tarkai Mu Duda-Mara: Look beside the burning seed of flame for the Tablet of Vision. It will teach you. [4-09.htm] Tarkai Mu Duda-Mara: Is the seed of flame burning yet? The Tablet of Vision beside it will teach you. [5-01.htm] Tablet of Vision: The Stone of Commune starts emitting light as soon as you near the Tablet of Vision. Commune with the Tablet of Vision. [5-02.htm] Tablet of Vision: Countless thoughts beyond comprehension sear painfully into your brain. A female voice seems to float on by as if the wind were singing...You sense that the next Stone of Commune is held by many warriors in a place south of the Valley of Saints. [5-03.htm] Tablet of Vision: Further communion with this tablet is futile. Now you must go to the Valley of Saints. The next Stone of Commune is being held by the Guardians of Forbidden Knowledge there. [6-01.htm] Tablet of Vision: The hieroglyphs on the tablet are indecipherable. The Guardians of Forbidden Knowledge possess the Stone of Commune for this Tablet of Vision. [6-02.htm] Tablet of Vision: The Stone of Commune starts emitting light as soon as you near the Tablet of Vision. Commune with the Tablet of Vision. [6-03.htm] Tablet of Vision: Countless thoughts beyond comprehension sear painfully into your brain. You hear the faint whisper of a woman's voice. A vision appears of a small lizard, trapped in a box. The harder he struggles, the tighter his prison becomes. This is a closed totem. Mudaha misrepresented himself to Varanka as Sharuhi Mouth, and received unspeakable powers that are forbidden to Warcryers! Alas, the power of the totem eventually grew too strong for Mudaha, and now he struggles just to keep the power in check! You can find him inside the maze at the Wall of Argos. That Stone of Commune will be the end of him. [6-04.htm] Tablet of Vision: Further communion with this tablet is futile. Find the Warcryer who pretended to be Sharuhi! His power is overwhelming! Prepare yourself for battle and find him at the Wall of Argos! [7-01.htm] Tablet of Vision: As you near the Tablet of Vision, you sense a presence. It has an eternal, primal ferocity. To escape unending torture, the insane totem spirit is striking out blindly at everything around it. He was eaten by a vicious creature when he tried to enforce the unenforceable. He seeks a way to remove the extra power since he can not control it. Have you read any books about possession? Fierce attacks are coming! "I want to avoid that." [7-02.htm] Tablet of Vision: Mudaha, slavering and deranged, once claimed to be the Warcryer Sharuhi! [7-03.htm] Tablet of Vision: The hieroglyphs are indecipherable. Mudaha's attack continues! [7-04.htm] Tablet of Vision: You sense a disturbance near the tablet. The time hasn't yet come for you to prove yourself. [7-05.htm] Tablet of Vision: The Stone of Commune starts emitting light as soon as you near the Tablet of Vision. Commune with the Tablet of Vision. [7-06.htm] Tablet of Vision: Countless thoughts beyond comprehension sear painfully into your brain. You hear the faint whisper of a woman's voice. The temptation of Varangkam brought forth the ability to maintain control over the spirit. Ghosts are divine and full of power. Ironically, they can still be quite helpful yet difficult to control. As such, there is much stryfe between the seer and the ghost. You see Sharuhi going out of Mudaha's body. He becomes a spirit and protects the land... The person that was overlooked is Goddard Castle Town's seer, Skahi. Go find him. [7-07.htm] Tablet of Vision: Further communion with this tablet is futile. Get the next Stone of Commune from Seer Skahi in Goddard Castle Town. [8-01.htm] Tablet of Vision: The Stone of Commune starts emitting light as you approach the Tablet of Vision. Commune with the Tablet of Vision. [8-02.htm] Tablet of Vision: Countless thoughts beyond comprehension sear painfully into your brain. A vision appears of a mysterious dark knight. Sharuhi got what was coming to him. Prepare for the coming winter! Walk through the snow bravely, leading your comrades to safety! What will be there in the end? You see a man who walks in the dark, using only one Spidersilk to guide him. This is what Seer Skahi was talking about! Tarkai gave him the stone and told him someone was following him. Speak with Seer Skahi. [8-03.htm] Tablet of Vision: Further communion with this tablet would be pointless at this time. Speak with Seer Skahi in Goddard Castle Town. [9-01.htm] Tablet of Vision: The tablet is still and dark. The Stone of Commune that can access this tablet may be obtained at the Imperial Tomb or the Shrine of the Loyal. [9-02.htm] Tablet of Vision: The Stone of Commune starts emitting light as you approach the Tablet of Vision. Commune with the Tablet of Vision. [9-03.htm] Tablet of Vision: A sharp blast of knowlege courses through your cranium! A vision appears of a black knight! And Mudaha, the former follower of Sharuhi! He channeled the very spirit of Sharuhi, and no other Warcryer could beat him! After a while his name became synonomous with Sharuhi's. But now, only memories engraved in spidersilk are left to speak of those days. Sharuhi trembles in loneliness. But he won't listen to other Warcryers! Find him and make a Contract! Conjure the 100th spirit and channel it into the consciousness of Oroka. That is what you must do! Tarkai's request makes sense now. Find the lizard totem Sharuhi! You must find the Tablet of Vision in the Forest of the Dead! [9-04.htm] Tablet of Vision: Further communion with this tablet would be futile. Find the lizard totem Sharuhi in the Forest of the Dead!
Исходник условий и наград (Java)
/*
 * 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.Q00078_SagaOfTheDoomcryer;

import quests.AbstractSagaQuest;

/**
 * Saga of the Doomcryer (78)
 * @author Emperorc
 */
public class Q00078_SagaOfTheDoomcryer extends AbstractSagaQuest
{
	public Q00078_SagaOfTheDoomcryer()
	{
		super(78, "Saga of the Doomcryer");
		_npc = new int[]
		{
			31336,
			31624,
			31589,
			31290,
			31642,
			31646,
			31649,
			31650,
			31654,
			31655,
			31657,
			31290
		};
		_items = new int[]
		{
			7080,
			7539,
			7081,
			7493,
			7276,
			7307,
			7338,
			7369,
			7400,
			7431,
			7101,
			0
		};
		_mob = new int[]
		{
			27295,
			27227,
			27285
		};
		_classId = new int[]
		{
			116
		};
		_prevClass = new int[]
		{
			0x34
		};
		_x = new int[]
		{
			191046,
			46087,
			46066
		};
		_y = new int[]
		{
			-40640,
			-36372,
			-36396
		};
		_z = new int[]
		{
			-3042,
			-1685,
			-1685
		};
		_text = new String[]
		{
			"PLAYERNAME! Pursued to here! However, I jumped out of the Banshouren boundaries! You look at the giant as the sign of power!",
			"... Oh ... good! So it was ... let's begin!",
			"I do not have the patience ..! I have been a giant force ...! Cough chatter ah ah ah!",
			"Paying homage to those who disrupt the orderly will be PLAYERNAME's death!",
			"Now, my soul freed from the shackles of the millennium, Halixia, to the back side I come ...",
			"Why do you interfere others' battles?",
			"This is a waste of time.. Say goodbye...!",
			"...That is the enemy",
			"...Goodness! PLAYERNAME you are still looking?",
			"PLAYERNAME ... Not just to whom the victory. Only personnel involved in the fighting are eligible to share in the victory.",
			"Your sword is not an ornament. Don't you think, PLAYERNAME?",
			"Goodness! I no longer sense a battle there now.",
			"let...",
			"Only engaged in the battle to bar their choice. Perhaps you should regret.",
			"The human nation was foolish to try and fight a giant's strength.",
			"Must...Retreat... Too...Strong.",
			"PLAYERNAME. Defeat...by...retaining...and...Mo...Hacker",
			"....! Fight...Defeat...It...Fight...Defeat...It..."
		};
		registerNPCs();
	}
}


// Shared quest dependency: AbstractSagaQuest.java
/*
 * Copyright (c) 2013 L2jMobius
 * 
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 * 
 * The above copyright notice and this permission notice shall be
 * included in all copies or substantial portions of the Software.
 * 
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
 * IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 */
package quests;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.l2jmobius.gameserver.config.PlayerConfig;
import org.l2jmobius.gameserver.entity.World;
import org.l2jmobius.gameserver.entity.WorldObject;
import org.l2jmobius.gameserver.entity.actor.Creature;
import org.l2jmobius.gameserver.entity.actor.Npc;
import org.l2jmobius.gameserver.entity.actor.Player;
import org.l2jmobius.gameserver.entity.groups.Party;
import org.l2jmobius.gameserver.mechanics.script.Quest;
import org.l2jmobius.gameserver.mechanics.script.QuestState;
import org.l2jmobius.gameserver.mechanics.skill.Skill;
import org.l2jmobius.gameserver.network.enums.ChatType;
import org.l2jmobius.gameserver.network.serverpackets.MagicSkillUse;
import org.l2jmobius.gameserver.network.serverpackets.NpcSay;

public abstract class AbstractSagaQuest extends Quest
{
	protected int[] _npc = {};
	protected int[] _items = {};
	protected int[] _mob = {};
	protected int[] _classId = {};
	protected int[] _prevClass = {};
	protected int[] _x = {};
	protected int[] _y = {};
	protected int[] _z = {};
	protected String[] _text = {};
	private static final Map<Npc, Integer> SPAWN_LIST = new HashMap<>();
	// @formatter:off
	private static final int[][] QUEST_CLASSES =
	{
		{ 0x7f }, { 0x80, 0x81 }, { 0x82 }, { 0x05 }, { 0x14 }, { 0x15 },
		{ 0x02 }, { 0x03 }, { 0x2e }, { 0x30 }, { 0x33 }, { 0x34 }, { 0x08 },
		{ 0x17 }, { 0x24 }, { 0x09 }, { 0x18 }, { 0x25 }, { 0x10 }, { 0x11 },
		{ 0x1e }, { 0x0c }, { 0x1b }, { 0x28 }, { 0x0e }, { 0x1c }, { 0x29 },
		{ 0x0d }, { 0x06 }, { 0x22 }, { 0x21 }, { 0x2b }, { 0x37 }, { 0x39 }
	};
	// @formatter:on
	private static final int[] ARCHON_HALISHA_NORM =
	{
		18212,
		18214,
		18215,
		18216,
		18218
	};
	
	public AbstractSagaQuest(int questId, String description)
	{
		super(questId, description);
	}
	
	public void registerNPCs()
	{
		addStartNpc(_npc[0]);
		addAttackId(_mob[2]);
		addAttackId(_mob[1]);
		addSkillSeeId(_mob[1]);
		addFirstTalkId(_npc[4]);
		addTalkId(_npc);
		addKillId(_mob);
		final int[] questItemIds = _items.clone();
		questItemIds[0] = 0;
		questItemIds[2] = 0; // remove Ice Crystal and Divine Stone of Wisdom
		registerQuestItems(questItemIds);
		for (int archonMinion = 21646; archonMinion < 21652; archonMinion++)
		{
			addKillId(archonMinion);
		}
		
		addKillId(ARCHON_HALISHA_NORM);
		for (int guardianAngel = 27214; guardianAngel < 27217; guardianAngel++)
		{
			addKillId(guardianAngel);
		}
	}
	
	@Override
	public String onEvent(String event, Npc npc, Player player)
	{
		final QuestState st = getQuestState(player, false);
		if (st == null)
		{
			return null;
		}
		
		String htmltext = null;
		switch (event)
		{
			case "0-011.htm":
			case "0-012.htm":
			case "0-013.htm":
			case "0-014.htm":
			case "0-015.htm":
			{
				htmltext = event;
				break;
			}
			case "accept":
			{
				st.startQuest();
				giveItems(player, _items[10], 1);
				htmltext = "0-03.htm";
				break;
			}
			case "0-1":
			{
				if (player.getLevel() < 76)
				{
					htmltext = "0-02.htm";
					if (st.isCreated())
					{
						st.exitQuest(true);
					}
				}
				else
				{
					htmltext = "0-05.htm";
				}
				break;
			}
			case "0-2":
			{
				if (player.getLevel() < 76)
				{
					takeItems(player, _items[10], -1);
					st.setCond(20, true);
					htmltext = "0-08.htm";
				}
				else
				{
					takeItems(player, _items[10], -1);
					addExpAndSp(player, 2299404, 0);
					giveAdena(player, 5000000, true);
					giveItems(player, 6622, 1);
					final int playerClass = getPlayerClass(player);
					final int prevClass = getPrevClass(player);
					player.setPlayerClass(playerClass);
					if (!player.isSubClassActive() && (player.getBaseClass() == prevClass))
					{
						player.setBaseClass(playerClass);
					}
					
					player.broadcastUserInfo();
					cast(npc, player, 4339, 1);
					st.exitQuest(false);
					htmltext = "0-07.htm";
				}
				break;
			}
			case "1-3":
			{
				st.setCond(3);
				htmltext = "1-05.htm";
				break;
			}
			case "1-4":
			{
				st.setCond(4);
				takeItems(player, _items[0], 1);
				if (_items[11] != 0)
				{
					takeItems(player, _items[11], 1);
				}
				
				giveItems(player, _items[1], 1);
				htmltext = "1-06.htm";
				break;
			}
			case "2-1":
			{
				st.setCond(2);
				htmltext = "2-05.htm";
				break;
			}
			case "2-2":
			{
				st.setCond(5);
				takeItems(player, _items[1], 1);
				giveItems(player, _items[4], 1);
				htmltext = "2-06.htm";
				break;
			}
			case "3-5":
			{
				htmltext = "3-07.htm";
				break;
			}
			case "3-6":
			{
				st.setCond(11);
				htmltext = "3-02.htm";
				break;
			}
			case "3-7":
			{
				st.setCond(12);
				htmltext = "3-03.htm";
				break;
			}
			case "3-8":
			{
				st.setCond(13);
				takeItems(player, _items[2], 1);
				giveItems(player, _items[7], 1);
				htmltext = "3-08.htm";
				break;
			}
			case "4-1":
			{
				htmltext = "4-010.htm";
				break;
			}
			case "4-2":
			{
				giveItems(player, _items[9], 1);
				st.setCond(18, true);
				htmltext = "4-011.htm";
				break;
			}
			case "4-3":
			{
				giveItems(player, _items[9], 1);
				st.setCond(18, true);
				autoChat(npc, _text[13].replace("PLAYERNAME", player.getName()));
				st.set("Quest0", "0");
				cancelQuestTimer("Mob_2 has despawned", npc, player);
				deleteSpawn(npc);
				return null;
			}
			case "5-1":
			{
				st.setCond(6, true);
				takeItems(player, _items[4], 1);
				cast(npc, player, 4546, 1);
				htmltext = "5-02.htm";
				break;
			}
			case "6-1":
			{
				st.setCond(8, true);
				st.set("spawned", "0");
				takeItems(player, _items[5], 1);
				cast(npc, player, 4546, 1);
				htmltext = "6-03.htm";
				break;
			}
			case "7-1":
			{
				if (st.getInt("spawned") == 1)
				{
					htmltext = "7-03.htm";
				}
				else if (st.getInt("spawned") == 0)
				{
					final Npc mob1 = addSpawn(_mob[0], _x[0], _y[0], _z[0], -1);
					st.set("spawned", "1");
					startQuestTimer("Mob_1 Timer 1", 500, mob1, player);
					startQuestTimer("Mob_1 has despawned", 300000, mob1, player);
					addSpawn(st, mob1);
					htmltext = "7-02.htm";
				}
				else
				{
					htmltext = "7-04.htm";
				}
				break;
			}
			case "7-2":
			{
				st.setCond(10, true);
				takeItems(player, _items[6], 1);
				cast(npc, player, 4546, 1);
				htmltext = "7-06.htm";
				break;
			}
			case "8-1":
			{
				st.setCond(14, true);
				takeItems(player, _items[7], 1);
				cast(npc, player, 4546, 1);
				htmltext = "8-02.htm";
				break;
			}
			case "9-1":
			{
				st.setCond(17, true);
				st.set("Quest0", "0");
				st.set("Tab", "0");
				takeItems(player, _items[8], 1);
				cast(npc, player, 4546, 1);
				htmltext = "9-03.htm";
				break;
			}
			case "10-1":
			{
				if (st.getInt("Quest0") == 0)
				{
					final Npc mob3 = addSpawn(_mob[2], _x[1], _y[1], _z[1], -1);
					final Npc mob2 = addSpawn(_npc[4], _x[2], _y[2], _z[2], -1);
					addSpawn(st, mob3);
					addSpawn(st, mob2);
					st.set("Mob_2", String.valueOf(mob2.getObjectId()));
					st.set("Quest0", "1");
					st.set("Quest1", "45");
					startQuestTimer("Mob_3 Timer 1", 500, mob3, player, true);
					startQuestTimer("Mob_3 has despawned", 59000, mob3, player);
					startQuestTimer("Mob_2 Timer 1", 500, mob2, player);
					startQuestTimer("Mob_2 has despawned", 60000, mob2, player);
					htmltext = "10-02.htm";
				}
				else if (st.getInt("Quest1") == 45)
				{
					htmltext = "10-03.htm";
				}
				else
				{
					htmltext = "10-04.htm";
				}
				break;
			}
			case "10-2":
			{
				st.setCond(19, true);
				takeItems(player, _items[9], 1);
				cast(npc, player, 4546, 1);
				htmltext = "10-06.htm";
				break;
			}
			case "11-9":
			{
				st.setCond(15);
				htmltext = "11-03.htm";
				break;
			}
			case "Mob_1 Timer 1":
			{
				autoChat(npc, _text[0].replace("PLAYERNAME", player.getName()));
				return null;
			}
			case "Mob_1 has despawned":
			{
				autoChat(npc, _text[1].replace("PLAYERNAME", player.getName()));
				st.set("spawned", "0");
				deleteSpawn(npc);
				return null;
			}
			case "Archon Hellisha has despawned":
			{
				autoChat(npc, _text[6].replace("PLAYERNAME", player.getName()));
				st.set("spawned", "0");
				deleteSpawn(npc);
				return null;
			}
			case "Mob_3 Timer 1":
			{
				final Npc mob2 = findSpawn(player, World.findObject(st.getInt("Mob_2")).asNpc());
				if ((World.getFirstVisibleObject(npc, Npc.class, it -> it == mob2) != null))
				{
					npc.asAttackable().addDamageHate(mob2, 0, 99999);
					npc.getAI().setIntentionAttack(mob2);
					mob2.getAI().setIntentionAttack(npc);
					autoChat(npc, _text[14].replace("PLAYERNAME", player.getName()));
					cancelQuestTimer("Mob_3 Timer 1", npc, player);
				}
				
				return null;
			}
			case "Mob_3 has despawned":
			{
				autoChat(npc, _text[15].replace("PLAYERNAME", player.getName()));
				st.set("Quest0", "2");
				deleteSpawn(npc);
				return null;
			}
			case "Mob_2 Timer 1":
			{
				autoChat(npc, _text[7].replace("PLAYERNAME", player.getName()));
				startQuestTimer("Mob_2 Timer 2", 1500, npc, player);
				if (st.getInt("Quest1") == 45)
				{
					st.set("Quest1", "0");
				}
				
				return null;
			}
			case "Mob_2 Timer 2":
			{
				autoChat(npc, _text[8].replace("PLAYERNAME", player.getName()));
				startQuestTimer("Mob_2 Timer 3", 10000, npc, player);
				return null;
			}
			case "Mob_2 Timer 3":
			{
				if (st.getInt("Quest0") == 0)
				{
					startQuestTimer("Mob_2 Timer 3", 13000, npc, player);
					if (getRandomBoolean())
					{
						autoChat(npc, _text[9].replace("PLAYERNAME", player.getName()));
					}
					else
					{
						autoChat(npc, _text[10].replace("PLAYERNAME", player.getName()));
					}
				}
				
				return null;
			}
			case "Mob_2 has despawned":
			{
				st.set("Quest1", String.valueOf(st.getInt("Quest1") + 1));
				if ((st.getInt("Quest0") == 1) || (st.getInt("Quest0") == 2) || (st.getInt("Quest1") > 3))
				{
					st.set("Quest0", "0");
					
					// TODO: This "if" will never be true.
					if (st.getInt("Quest0") == 1)
					{
						autoChat(npc, _text[11].replace("PLAYERNAME", player.getName()));
					}
					else
					{
						autoChat(npc, _text[12].replace("PLAYERNAME", player.getName()));
					}
					
					deleteSpawn(npc);
				}
				else
				{
					startQuestTimer("Mob_2 has despawned", 1000, npc, player);
				}
				
				return null;
			}
		}
		
		return htmltext;
	}
	
	@Override
	public void onAttack(Npc npc, Player player, int damage, boolean isSummon)
	{
		final QuestState st2 = findRightState(npc);
		if (st2 != null)
		{
			final int cond = st2.getCond();
			final QuestState st = getQuestState(player, false);
			final int npcId = npc.getId();
			if ((npcId == _mob[2]) && (st == st2) && (cond == 17))
			{
				int quest0 = st.getInt("Quest0") + 1;
				if (quest0 == 1)
				{
					autoChat(npc, _text[16].replace("PLAYERNAME", player.getName()));
				}
				
				if (quest0 > 15)
				{
					quest0 = 1;
					autoChat(npc, _text[17].replace("PLAYERNAME", player.getName()));
					cancelQuestTimer("Mob_3 has despawned", npc, st2.getPlayer());
					st.set("Tab", "1");
					deleteSpawn(npc);
				}
				
				st.set("Quest0", Integer.toString(quest0));
			}
			else if ((npcId == _mob[1]) && (cond == 15) && ((st != st2) || player.isInParty()))
			{
				autoChat(npc, _text[5].replace("PLAYERNAME", player.getName()));
				cancelQuestTimer("Archon Hellisha has despawned", npc, st2.getPlayer());
				st2.set("spawned", "0");
				deleteSpawn(npc);
			}
		}
	}
	
	@Override
	public String onFirstTalk(Npc npc, Player player)
	{
		String htmltext = "";
		final QuestState st = getQuestState(player, false);
		final int npcId = npc.getId();
		if ((st != null) && (npcId == _npc[4]))
		{
			final int cond = st.getCond();
			if (cond == 17)
			{
				final QuestState st2 = findRightState(npc);
				if (st2 != null)
				{
					player.setLastQuestNpcObject(npc.getObjectId());
					final int tab = st.getInt("Tab");
					final int quest0 = st.getInt("Quest0");
					if (st == st2)
					{
						if (tab == 1)
						{
							if (quest0 == 0)
							{
								htmltext = "4-04.htm";
							}
							else if (quest0 == 1)
							{
								htmltext = "4-06.htm";
							}
						}
						else if (quest0 == 0)
						{
							htmltext = "4-01.htm";
						}
						else if (quest0 == 1)
						{
							htmltext = "4-03.htm";
						}
					}
					else if (tab == 1)
					{
						if (quest0 == 0)
						{
							htmltext = "4-05.htm";
						}
						else if (quest0 == 1)
						{
							htmltext = "4-07.htm";
						}
					}
					else if (quest0 == 0)
					{
						htmltext = "4-02.htm";
					}
				}
			}
			else if (cond == 18)
			{
				htmltext = "4-08.htm";
			}
		}
		
		if (htmltext.isEmpty())
		{
			npc.showChatWindow(player);
		}
		
		return htmltext;
	}
	
	@Override
	public void onKill(Npc npc, Player player, boolean isSummon)
	{
		final int npcId = npc.getId();
		QuestState st = getQuestState(player, false);
		for (int archonMinion = 21646; archonMinion < 21652; archonMinion++)
		{
			if (npcId == archonMinion)
			{
				final Party party = player.getParty();
				if (party != null)
				{
					final List<QuestState> partyQuestMembers = new ArrayList<>();
					for (Player player1 : party.getMembers())
					{
						final QuestState st1 = findQuest(player1);
						if ((st1 != null) && st1.isCond(15) && player1.isInsideRadius2D(player, PlayerConfig.ALT_PARTY_RANGE))
						{
							partyQuestMembers.add(st1);
						}
					}
					
					if (!partyQuestMembers.isEmpty())
					{
						final QuestState st2 = partyQuestMembers.get(getRandom(partyQuestMembers.size()));
						giveHalishaMark(st2);
					}
				}
				else
				{
					final QuestState st1 = findQuest(player);
					if ((st1 != null) && st1.isCond(15))
					{
						giveHalishaMark(st1);
					}
				}
				return;
			}
		}
		
		for (int element : ARCHON_HALISHA_NORM)
		{
			if (npcId == element)
			{
				final QuestState st1 = findQuest(player);
				if ((st1 != null) && st1.isCond(15))
				{
					// This is just a guess....not really sure what it actually says, if anything
					autoChat(npc, _text[4].replace("PLAYERNAME", st1.getPlayer().getName()));
					giveItems(player, _items[8], 1);
					takeItems(player, _items[3], -1);
					st1.setCond(16, true);
				}
				return;
			}
		}
		
		for (int guardianAngel = 27214; guardianAngel < 27217; guardianAngel++)
		{
			if (npcId == guardianAngel)
			{
				final QuestState st1 = findQuest(player);
				if ((st1 != null) && st1.isCond(6))
				{
					final int kills = st1.getInt("kills");
					if (kills < 9)
					{
						st1.set("kills", Integer.toString(kills + 1));
					}
					else
					{
						giveItems(player, _items[5], 1);
						st.setCond(7, true);
					}
				}
				return;
			}
		}
		
		if ((st != null) && (npcId != _mob[2]))
		{
			final QuestState st2 = findRightState(npc);
			if (st2 != null)
			{
				final int cond = st.getCond();
				if ((npcId == _mob[0]) && (cond == 8))
				{
					if (!player.isInParty() && (st == st2))
					{
						autoChat(npc, _text[12].replace("PLAYERNAME", player.getName()));
						giveItems(player, _items[6], 1);
						st.setCond(9, true);
					}
					
					cancelQuestTimer("Mob_1 has despawned", npc, st2.getPlayer());
					st2.set("spawned", "0");
					deleteSpawn(npc);
				}
				else if ((npcId == _mob[1]) && (cond == 15))
				{
					if (!player.isInParty())
					{
						if (st == st2)
						{
							autoChat(npc, _text[4].replace("PLAYERNAME", player.getName()));
							giveItems(player, _items[8], 1);
							takeItems(player, _items[3], -1);
							st.setCond(16, true);
						}
						else
						{
							autoChat(npc, _text[5].replace("PLAYERNAME", player.getName()));
						}
					}
					
					cancelQuestTimer("Archon Hellisha has despawned", npc, st2.getPlayer());
					st2.set("spawned", "0");
					deleteSpawn(npc);
				}
			}
		}
		else if (npcId == _mob[0])
		{
			st = findRightState(npc);
			if (st != null)
			{
				cancelQuestTimer("Mob_1 has despawned", npc, st.getPlayer());
				st.set("spawned", "0");
				deleteSpawn(npc);
			}
		}
		else if (npcId == _mob[1])
		{
			st = findRightState(npc);
			if (st != null)
			{
				cancelQuestTimer("Archon Hellisha has despawned", npc, st.getPlayer());
				st.set("spawned", "0");
				deleteSpawn(npc);
			}
		}
		else if (npcId == _mob[2])
		{
			st = findRightState(npc);
			if (st != null)
			{
				st.setCond(18, true);
				autoChat(npc, _text[13].replace("PLAYERNAME", player.getName()));
				st.set("Quest0", "0");
				cancelQuestTimer("Mob_2 has despawned", npc, player);
				deleteSpawn(npc);
			}
		}
	}
	
	@Override
	public void onSkillSee(Npc npc, Player player, Skill skill, List<WorldObject> targets, boolean isSummon)
	{
		if (SPAWN_LIST.containsKey(npc) && (SPAWN_LIST.get(npc) != player.getObjectId()))
		{
			final Player questPlayer = World.findObject(SPAWN_LIST.get(npc)).asPlayer();
			if (questPlayer == null)
			{
				return;
			}
			
			for (WorldObject obj : targets)
			{
				if ((obj == questPlayer) || (obj == npc))
				{
					final QuestState st2 = findRightState(npc);
					if (st2 == null)
					{
						return;
					}
					
					autoChat(npc, _text[5].replace("PLAYERNAME", player.getName()));
					cancelQuestTimer("Archon Hellisha has despawned", npc, st2.getPlayer());
					st2.set("spawned", "0");
					deleteSpawn(npc);
				}
			}
		}
	}
	
	@Override
	public String onTalk(Npc npc, Player player)
	{
		final QuestState st = getQuestState(player, true);
		String htmltext = getNoQuestMsg(player);
		final int npcId = npc.getId();
		if ((npcId == _npc[0]) && st.isCompleted())
		{
			htmltext = getAlreadyCompletedMsg(player);
		}
		else if (player.getPlayerClass().getId() == getPrevClass(player))
		{
			switch (st.getCond())
			{
				case 0:
				{
					if (npcId == _npc[0])
					{
						htmltext = "0-01.htm";
					}
					break;
				}
				case 1:
				{
					if (npcId == _npc[0])
					{
						htmltext = "0-04.htm";
					}
					else if (npcId == _npc[2])
					{
						htmltext = "2-01.htm";
					}
					break;
				}
				case 2:
				{
					if (npcId == _npc[2])
					{
						htmltext = "2-02.htm";
					}
					else if (npcId == _npc[1])
					{
						htmltext = "1-01.htm";
					}
					break;
				}
				case 3:
				{
					if ((npcId == _npc[1]) && hasQuestItems(player, _items[0]))
					{
						if ((_items[11] == 0) || hasQuestItems(player, _items[11]))
						{
							htmltext = "1-03.htm";
						}
						else
						{
							htmltext = "1-02.htm";
						}
					}
					break;
				}
				case 4:
				{
					if (npcId == _npc[1])
					{
						htmltext = "1-04.htm";
					}
					else if (npcId == _npc[2])
					{
						htmltext = "2-03.htm";
					}
					break;
				}
				case 5:
				{
					if (npcId == _npc[2])
					{
						htmltext = "2-04.htm";
					}
					else if (npcId == _npc[5])
					{
						htmltext = "5-01.htm";
					}
					break;
				}
				case 6:
				{
					if (npcId == _npc[5])
					{
						htmltext = "5-03.htm";
					}
					else if (npcId == _npc[6])
					{
						htmltext = "6-01.htm";
					}
					break;
				}
				case 7:
				{
					if (npcId == _npc[6])
					{
						htmltext = "6-02.htm";
					}
					break;
				}
				case 8:
				{
					if (npcId == _npc[6])
					{
						htmltext = "6-04.htm";
					}
					else if (npcId == _npc[7])
					{
						htmltext = "7-01.htm";
					}
					break;
				}
				case 9:
				{
					if (npcId == _npc[7])
					{
						htmltext = "7-05.htm";
					}
					break;
				}
				case 10:
				{
					if (npcId == _npc[7])
					{
						htmltext = "7-07.htm";
					}
					else if (npcId == _npc[3])
					{
						htmltext = "3-01.htm";
					}
					break;
				}
				case 11:
				case 12:
				{
					if (npcId == _npc[3])
					{
						if (hasQuestItems(player, _items[2]))
						{
							htmltext = "3-05.htm";
						}
						else
						{
							htmltext = "3-04.htm";
						}
					}
					break;
				}
				case 13:
				{
					if (npcId == _npc[3])
					{
						htmltext = "3-06.htm";
					}
					else if (npcId == _npc[8])
					{
						htmltext = "8-01.htm";
					}
					break;
				}
				case 14:
				{
					if (npcId == _npc[8])
					{
						htmltext = "8-03.htm";
					}
					else if (npcId == _npc[11])
					{
						htmltext = "11-01.htm";
					}
					break;
				}
				case 15:
				{
					if (npcId == _npc[11])
					{
						htmltext = "11-02.htm";
					}
					else if (npcId == _npc[9])
					{
						htmltext = "9-01.htm";
					}
					break;
				}
				case 16:
				{
					if (npcId == _npc[9])
					{
						htmltext = "9-02.htm";
					}
					break;
				}
				case 17:
				{
					if (npcId == _npc[9])
					{
						htmltext = "9-04.htm";
					}
					else if (npcId == _npc[10])
					{
						htmltext = "10-01.htm";
					}
					break;
				}
				case 18:
				{
					if (npcId == _npc[10])
					{
						htmltext = "10-05.htm";
					}
					break;
				}
				case 19:
				{
					if (npcId == _npc[10])
					{
						htmltext = "10-07.htm";
					}
					else if (npcId == _npc[0])
					{
						htmltext = "0-06.htm";
					}
					break;
				}
				case 20:
				{
					if (npcId == _npc[0])
					{
						if (player.getLevel() >= 76)
						{
							htmltext = "0-09.htm";
							
							st.exitQuest(false);
							addExpAndSp(player, 2299404, 0);
							giveAdena(player, 5000000, true);
							giveItems(player, 6622, 1); // XXX rewardItems?
							final int playerClass = getPlayerClass(player);
							final int prevClass = getPrevClass(player);
							player.setPlayerClass(playerClass);
							if (!player.isSubClassActive() && (player.getBaseClass() == prevClass))
							{
								player.setBaseClass(playerClass);
							}
							
							player.broadcastUserInfo();
							cast(npc, player, 4339, 1);
						}
						else
						{
							htmltext = "0-010.htm";
						}
					}
					break;
				}
			}
		}
		
		return htmltext;
	}
	
	private QuestState findQuest(Player player)
	{
		final QuestState st = getQuestState(player, false);
		if (st != null)
		{
			if (getId() == 68)
			{
				for (int q = 0; q < 2; q++)
				{
					if (player.getPlayerClass().getId() == QUEST_CLASSES[1][q])
					{
						return st;
					}
				}
			}
			else if (player.getPlayerClass().getId() == QUEST_CLASSES[getId() - 67][0])
			{
				return st;
			}
		}
		
		return null;
	}
	
	private void autoChat(Npc npc, String text)
	{
		npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.GENERAL, npc.getId(), text));
	}
	
	private void cast(Npc npc, Creature target, int skillId, int level)
	{
		target.broadcastSkillPacket(new MagicSkillUse(target, target, skillId, level, 6000, 1), target);
		target.broadcastSkillPacket(new MagicSkillUse(npc, npc, skillId, level, 6000, 1), npc);
	}
	
	private void addSpawn(QuestState st, Npc mob)
	{
		SPAWN_LIST.put(mob, st.getPlayer().getObjectId());
	}
	
	private static Npc findSpawn(Player player, Npc npc)
	{
		if (SPAWN_LIST.containsKey(npc) && (SPAWN_LIST.get(npc) == player.getObjectId()))
		{
			return npc;
		}
		
		return null;
	}
	
	private void deleteSpawn(Npc npc)
	{
		if (SPAWN_LIST.remove(npc) != null)
		{
			npc.deleteMe();
		}
	}
	
	private QuestState findRightState(Npc npc)
	{
		Player player = null;
		QuestState st = null;
		final Integer spawned = SPAWN_LIST.get(npc);
		if (spawned != null)
		{
			player = World.getPlayer(spawned);
			if (player != null)
			{
				st = player.getQuestState(getName());
			}
		}
		
		return st;
	}
	
	private int getPlayerClass(Player player)
	{
		if (player.getPlayerClass().getId() == 0x81)
		{
			return _classId[1];
		}
		
		return _classId[0];
	}
	
	private int getPrevClass(Player player)
	{
		if (player.getPlayerClass().getId() == 0x81)
		{
			if (_prevClass.length == 1)
			{
				return -1;
			}
			
			return _prevClass[1];
		}
		
		return _prevClass[0];
	}
	
	private void giveHalishaMark(QuestState st)
	{
		if (st.getInt("spawned") == 0)
		{
			final Player player = st.getPlayer();
			if (getQuestItemsCount(player, _items[3]) >= 700)
			{
				takeItems(player, _items[3], 20);
				final int xx = st.getPlayer().getX();
				final int yy = st.getPlayer().getY();
				final int zz = st.getPlayer().getZ();
				final Npc archon = addSpawn(_mob[1], xx, yy, zz, -1);
				addSpawn(st, archon);
				st.set("spawned", "1");
				startQuestTimer("Archon Hellisha has despawned", 600000, archon, player);
				autoChat(archon, _text[13].replace("PLAYERNAME", st.getPlayer().getName()));
				archon.asAttackable().addDamageHate(st.getPlayer(), 0, 99999);
				archon.getAI().setIntentionAttack(st.getPlayer());
			}
			else
			{
				giveItems(player, _items[3], getRandom(1, 4));
			}
		}
	}
}