Saga of the Soultaker
- ID
- 94
- Название
- Saga of the Soultaker
- start_npcs_json
- []
- npc_ids_json
- []
- constants_json
- {}
- Статус разбора
- metadata_only; dynamic Java conditions/rewards retained in source; unresolved starts: []
- Источник
- game/data/scripts/quests/Q00094_SagaOfTheSoultaker/Q00094_SagaOfTheSoultaker.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] Hardin: So, you want to be a Soultaker, eh? Well, you came at just the right time! First, you must accomplish a task to prove that you're worthy. Have you met a necromancer by the name of Hindemith? He was sent to spy on the followers of Lich King Akron, but it's been rumored that he's become a follower of that wicked despot! I haven't heard from him at all since the rumors started. Our guild is under increasing pressure to deal with Hindemith, one way or the other. Would you look into this matter for us? He's been seen around the Tablet of Vision. You should join those who have undertaken the Pilgrimage of Tablet of Vision. You'll likely find Hindemith among them. "What is the Pilgrimage of Tablets of Vision?"
[0-010.htm] Hardin: You're not ready to transfer classes. Come back when you've improved your strength and ability and I'll make you a Soultaker. (Only a character of level 76 or above may become a Soultaker. Don't abandon the quest until class transfer is complete.)
[0-02.htm] Hardin: Hmm... A Soultaker, eh? You're not ready yet. Come back when you've had more training. (The quest may only be undertaken by a Necromancer of level 76 or above.)
[0-03.htm] Hardin: Excellent! Well, as I said, Hindemith has been seen near the Tablet of Vision. I believe that he's undertaken the Pilgrimage of the Tablets of Vision! Join that pilgrimage and find out what he's up to. First, visit High Priest Gregory in Goddard Castle Town. He'll tell you what to do next. Take a copy of our guild bulletin with you. Good luck!
[0-04.htm] Hardin: Please find out what you can about a necromancer named Hindemith who's been seen near the Tablet of Vision. A while back he was sent to spy on the followers of Lich King Akron. Word has come to me that he has actually allied with that wicked despot! I think Hindemith has undertaken the Pilgrimage of the Tablets of Vision. Join that pilgrimage and find out what he's up to. First, visit High Priest Gregory in Goddard Castle Town. He'll tell you what to do next. Pick up a guild bulletin on your way out!
[0-05.htm] Hardin: In order for a Necromancer to become a Soultaker, you must shed your mortal perspective and attain the consciousness of the gods. Long ago, the gods sealed this power and dispersed it throughout the world in order to keep Humans from reaching their full potential. You must reclaim this long-denied knowledge one tablet at a time. The Tablets of Vision hold the secret to this power. Find all six tablets and you will become more powerful than you can imagine. All Soultakers must complete the Pilgrimage of the Tablets of Vision. Keep an eye out for Hindemith while you're at it... I've heard rumors that he's joined forces with Lich King Akron! "I'll help you."
[0-06.htm] Hardin: Ah, you're back! Do you bring news of Hindemith? "Hindemith hasn't allied with Lich King Akron."
[0-07.htm] Hardin: I knew it! Hindemith couldn't have done such a thing! This should relieve the pressure our guild has been under, and get Hindemith out from under a cloud as well. By the way, while you were doing this, you've completed your own Pilgrimage of the Tablets of Vision. Henceforth you shall be known as a Soultaker! Congratulations!
[0-08.htm] Hardin: I knew it! He would never have done such a thing! This will surely put the false rumors about him to rest once and for all. By the way, congratulations on completing the Pilgrimage of the Tablets of Vision! You've shown that you've got what it takes to be a Soultaker, but... You don't yet have the strength and ability you need to do a class transfer. Come back when you're ready and I'll make you a Soultaker! (Only a character of level 76 or above may become a Soultaker. Don't abandon the quest until class transfer is complete.)
[0-09.htm] Hardin: Thanks for your hard work. Great job! Congratulations on becoming a Soultaker.
[1-01.htm] Information Broker Bavarin: High Priest Gregory of Goddard Castle Town? Yes, I remember him. He asked me for some information once. In fact, I still haven't given it to him. It was more work than I expected it to be... It won't be cheap! "What do you want for it?"
[1-02.htm] Information Broker Bavarin: Bring me some ice crystals and I'll give you the report for the Truth Scholar. Speak with Chef Jeremy, who's getting ready for a cooking contest. He can tell you where to find some.
[1-03.htm] Information Broker Bavarin: So, this is the ice crystal that I've heard so much about! Well, hand it over! "Here you go."
[1-04.htm] Information Broker Bavarin: Take the report to High Priest Gregory of Goddard Castle Town.
[1-05.htm] Information Broker Bavarin: You can find ice crystals that continuously generate cold in this hot springs area. Bring me some of them. My back has been bothering me lately, and I want to make an ice pack. Speak with Chef Jeremy, who's getting ready for a cooking contest. He can tell you where to find some ice crystals.
[1-06.htm] Information Broker Bavarin: Oh, that feels great! My back feels better already! Take this report to High Priest Gregory of Goddard Castle Town.
[10-01.htm] Tablet of Vision: Someone nearby has the Stone of Commune. Examine the area.
[10-02.htm] Tablet of Vision: You see two figures. It's Hindemith and Lich King Akron! Icarus has the Stone of Commune!
[10-03.htm] Tablet of Vision: Listen to Hindemith first.
[10-04.htm] Tablet of Vision: Someone nearby has the Stone of Commune, but it's too noisy right now. Wait until it quiets down.
[10-05.htm] Tablet of Vision: The tablet is covered with indecipherable hieroglyphs. Commune with the Tablet of Vision.
[10-06.htm] Tablet of Vision: A sharp blast of knowlege courses through your cranium! You hear the sound of distant laughter. A man announces the birth of another Hero. The woman in blue disagrees... This is the last time she'll see the child! Communion with the six Tablets of Vision is complete. You've already listened to Hindemith. Go back to Hardin.
[10-07.htm] Tablet of Vision: Further communion with this tablet would be futile. You've already listened to Hindemith. Go back to Hardin.
[11-01.htm] High Priest Gregory: Oh, you're back! Did you find Hindemith? I suppose he'd already been there, eh? His pilgrimage of the stone tablets is nearing fulfillment. Once he's completed it, it will be impossible to find him! You must find him quickly! I'll search for him as well... I do have the Stone of Commune, but you can't have it. I'll need it to find Hindemith. I can tell you how to find your own stone, however... "How can I get a Stone of Commune?"
[11-02.htm] High Priest Gregory: Get your next Stone of Commune from the Archon of Halisha inside the Four Sepulchers. You must form a party before you attempt this! If you have trouble forming a party, go to the Shrine of the Loyal and attack the Archon's minions. Their deaths will provide marks of Halisha. Collect 700 of them and the beast himself will appear! Halisha's minions are known as Grave Scarabs, Scavenger Scarabs, Grave Ants, Scavenger Ants, Shrine Knights and Shrine Guards.
[11-03.htm] High Priest Gregory: Get your next Stone of Commune from the Archon of Halisha inside the Four Sepulchers. You must form a party before you attempt this! If you have trouble forming a party, go to the Shrine of the Loyal and attack the Archon's minions. Their deaths will provide marks of Halisha. Collect 700 of them and the beast himself will appear! Halisha's minions are known as Grave Scarabs, Scavenger Scarabs, Grave Ants, Scavenger Ants, Shrine Knights and Shrine Guards.
[2-01.htm] High Priest Gregory: Ah, I heard that you were coming! Do you remember when Lich King Akron's gang slaughtered the priests of Goddard Castle Town, and then murdered the party sent out to search for them? I heard that Hindemith was seen with the gang at the site of the massacre, but why would he do such a thing? I'm determined to get to the bottom of this, but as you can see, I can't just pick up and leave! Would you help me? By the way... "What?"
[2-02.htm] High Priest Gregory: Have you been to the hot springs resort yet? Please go there and speak with Information Broker Bavarin. Bring me the report I asked him for, then I'll tell you exactly what you need to do to find Hindemith.
[2-03.htm] High Priest Gregory: Ah, the report! Let me see that! Oh no! It seems my worst fears about Hindemith are true! He's actually joined Lich King Akron's gang! First, I suppose I should tell you about the pilgrimage that Hindemith is believed to have undertaken. It's the quest to become a Soultaker. This test requires the pilgrim to absorb knowledge from six stone Tablets of Vision. This process of absorption is known as communing. Each Tablet of Vision has a corresponding Stone of Commune. These stones are essential to the process. It seems the best way to find Hindemith would be to follow the path that he's chosen. I will now give you the first Stone of Commune. Go to the place where Hindemith was seen last and use it to commune with the Tablet of Vision there. Your new path will then open before you! "What do you mean?"
[2-04.htm] High Priest Gregory: Try communicating with the Tablet of Vision south of the Tower of Insolence using the Stone of Commune that I gave you. The path will then be revealed to you.
[2-05.htm] High Priest Gregory: Before you start after Hindemith, I need you to do something for me. Go see Information Broker Bavarin at the hot springs and get the report I asked him to prepare. Bring it to me and I'll tell you how to find Hindemith.
[2-06.htm] High Priest Gregory: Stones of commune and Tablets of Vision have a magical mutual attraction. You can use this force to locate the Tablets of Vision. Put simply, when you have a Stone of Commune, the location of the corresponding Tablet of Vision will appear in your mind. Once you find the next stone, you will see where to find the next tablet. This is the path that Hindemith has chosen, and you will likely find him there. This process will become clearer to you as you move along. Now, take the Stone of Commune I gave you and find the first Tablet of Vision south of the Tower of Insolence!
[3-01.htm] High Priest Gregory: Ah, you're back! Do you bring news of Hindemith? Yes! So Waldstein saw him recently, eh? Well, now we can be certain that he's on the Pilgrimage of the Tablets of Vision. You're sure to meet up with him if you continue that path. I have a part of the next Stone of Commune, but must have the other piece in order to complete it. "Where can I find the other piece?"
[3-02.htm] High Priest Gregory: Then visit the Ketra Orcs to get the missing fragment, the Divine Stone of Wisdom. If you earn the trust of Asefa, guide of dead souls, through Ketra's Messenger Wahkan and prove to her your wisdom, you'll find it. If you change your mind halfway, you can get it from the best Shaman of Varka Silenos, Soul Guide Udan Mardui through Varka's Messenger Naran Ashanuk. Just bring it to me.
[3-03.htm] High Priest Gregory: Then visit the Varka Silenos to get the missing fragment, the Divine Stone of Wisdom. If you earn the Soul Guide Udan Mardui through Varka's Messenger Naran Ashanuk and prove to her your wisdom, you'll find it. If you change your mind halfway, you can get it from the best Shaman of Ketra Orcs, Soul Guide Asefa through through Ketra's Messenger Wahkan, just bring it to me.
[3-04.htm] High Priest Gregory: Go to the Ketra Orcs or the Varka Silenos to get the missing fragment, the Divine Stone of Wisdom . They both know the mysterious knowledge of the stone, but not its exact use. They'll give it to the wisest of the tribe. So, it is presented as some kind of mark for ‘the wisest man of the tribe.' If you earn the trust of Asefa, guide of dead souls, through Ketra's Messenger Wahkan and prove to her your wisdom, you'll find it. Or, you can get the Divine Stone of Wisdom from Soul Guide Udan Mardui through Varka's Messenger Naran Ashanuk by gaining his trust and proving your wisdom. Either way is fine.
[3-05.htm] High Priest Gregory: Ah, the Divine Stone of Wisdom! Good job! I heard that Hindemith was seen yesterday in the Varka Silenos stronghold and the Ketra Orc advance base. He must've been looking for the Stone of Commune, too! He may be nearing the Tablet of Vision as we speak! We must hurry! Shall I join these two stones together? "Yes, by all means!"
[3-06.htm] High Priest Gregory: Take the Stone of Commune to the Tablet of Vision north of the Varka Silenos barracks. If you hurry, you may find Hindemith there!
[3-07.htm] High Priest Gregory: Asefa is the chief shaman and guide of dead souls of the Ketra Orcs. Udan Mardui holds the same position among the Varka Silenos. Each of them possesses a Divine Stone of Wisdom which is a fragment of this Stone of Commune. Bring one of the stones to me. Both tribes seem vaguely aware that the stone contains powerful magic and mysterious knowledge, but they have no idea how to access it! They actually give it away as a prize to the person they think is smartest among them! Prove your wisdom to Asefa of the Ketra Orcs or Udan Mardui of the Varka Silenos and they will give you the stone. Which tribe would you prefer to obtain the stone from? "I'll deal with the Ketra Orcs." "I'll deal with the Varka Silenos."
[3-08.htm] High Priest Gregory: The Stone of Commune is now complete. Go find the Tablet of Vision north of the Varka Silenos barracks. If you hurry, you may find Hindemith there!
[4-01.htm] Hindemith Truevoice: If I keep this up, he'll get away! Somebody help me!
[4-010.htm] Hindemith Truevoice: Did you say you were sent by Master Hardin? Tell him not to worry. As you now know, contrary to rumors, I would never actually join the gang of Lich King Akron! I couldn't afford to arouse their suspicious by trying to contact my master... Yes, that's right! Take this Stone of Commune that I took from Lich King Akron to the last stone tablet and commune with it. You've gone through many trials up to now, haven't you? Surely you've done what you need to do in order to transfer class. I'll bet the next time I see you, you'll be a Soultaker! Now I'm off after Akron! "Wait!"
[4-011.htm] Hindemith Truevoice: Did you say you were sent by Master Hardin? Tell him not to worry. As you now know, contrary to rumors, I would never actually join the gang of Lich King Akron! I couldn't afford to arouse their suspicious by trying to contact my master... Yes, that's right! Take this Stone of Commune that I took from Lich King Akron to the last stone tablet and commune with it. You've gone through many trials up to now, haven't you? Surely you've done what you need to do in order to transfer class. I'll bet the next time I see you, you'll be a Soultaker! Now I'm off after Akron!
[4-02.htm] Hindemith Truevoice: I'd better do something quick or he'll get away!
[4-03.htm] Hindemith Truevoice: Oh no, I've lost him again! I must catch him!
[4-04.htm] Hindemith Truevoice: If I keep this up he'll get away! Somebody, please help me!
[4-05.htm] Hindemith Truevoice: I'd better do something quick or he'll get away!
[4-06.htm] Hindemith Truevoice: Huff puff! Thanks for helping me out! I'm Hindemith! Master Hardin sent me to find out what Lich King Akron is up to. I needed to examine his stronghold closely, so I went undercover and joined the gang of the Lich King himself! I'm sure that set tongues wagging back home! I recently joined the king on the Pilgrimage of the Stone Tablets. Akron is very interested in the power of the Tablets of Vision. Naturally, I couldn't allow the power of the last Tablet of Vision to fall into his hands! Without thinking of the consequences, I foolishly attacked him and exposed my true identity! "Tell me more."
[4-07.htm] Hindemith Truevoice: Huff puff! Thanks for helping me out! I'm Hindemith! Master Hardin sent me to find out what Lich King Akron is up to. I needed to examine his stronghold closely, so I went undercover and joined the gang of the Lich King himself! I'm sure that set tongues wagging back home! I recently joined the king on the Pilgrimage of the Stone Tablets. Akron is very interested in the power of the Tablets of Vision. Naturally, I couldn't allow the power of the last Tablet of Vision to fall into his hands! Without thinking of the consequences, I foolishly attacked him and exposed my true identity! Listen to him.
[4-08.htm] Hindemith Truevoice: Oh no! He's a handful, alright! Take the Stone of Commune I gave you and commune with the Tablet of Vision.
[4-09.htm] Hindemith Truevoice: Whew! I'm going to follow Akron a while longer. Take the Stone of Commune to the Tablet of Vision and commune with it.
[5-01.htm] Tablet of Vision: There is no sign of Hindemith. The tablet is covered with indecipherable hieroglyphs. I wish to respond to the Tablet.
[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 she were quietly laughing at you... You sense the location of the next Stone of Commune... It is being held by the Guardians of Forbidden Knowledge beside the Tablet of Vision in the southern Valley of the Saints
[5-03.htm] Tablet of Vision: Further communion with this tablet is futile. It seems that there is no sign of Hindemith. You must go and find the next Stone of Commune. You sense that the next stone is being held by the Guardians of Forbidden Knowledge beside the Tablet of Vision in the southern Valley of the Saints.
[6-01.htm] Tablet of Vision: You must have a certain Stone of Commune to access this Tablet of Vision. You sense that one of the Guardians of Forbidden Knowledge protecting this tablet has the Stone of Commune.
[6-02.htm] Tablet of Vision: There is no sign of Hindemith, only a bit of ash on the ground. The Tablet of Vision is engraved with unreadable hieroglyphs. Commune with the Tablet of Vision.
[6-03.htm] Tablet of Vision: Countless thoughts beyond comprehension sear painfully into your brain. A female voice seems to float on by as if she were quietly laughing at you... You sense the location of the next Stone of Commune... It is being held by someone with wings beside the Tablet of Vision along the southeastern Wall of the Argos.
[6-04.htm] Tablet of Vision: Further communion with this tablet is futile. It seems that there is no sign of Hindemith. You must go and find the next Stone of Commune. You sense that the next stone is being held by someone beside the Tablet of Vision along the southeastern Wall of the Argos.
[7-01.htm] Tablet of Vision: There are many footprints on the ground and signs of an explosion. Did a fight happen here? These ashes are the same as the ones I found at the last tablet. Could it be Cursed Bone powder? Hmm... The color's not quite right... Someone nearby has the Stone of Commune. Examine the area.
[7-02.htm] Tablet of Vision: Archangel Iconoclasis? Isn't he the one with the wings? I sense that he has the Stone of Commune.
[7-03.htm] Tablet of Vision: The time has come to get the first Stone of Commune. Destroy Iconoclasis and take his stone.
[7-04.htm] Tablet of Vision: Someone nearby must have the Stone of Commune! It's too noisy now. Try again later when things quiet down a bit.
[7-05.htm] Tablet of Vision: The footprints, the signs of an explosion and the silver Cursed Bone powder indicate that this was the site of the battle between Hindemith and Iconoclasis! It seems that Hindemith already left on his pilgrimage. The Tablet of Vision is engraved with incomprehensible hieroglyphs. Commune with the Tablet of Vision.
[7-06.htm] Tablet of Vision: Countless thoughts beyond comprehension sear painfully into your brain. A vision appears of a woman in blue. Suddenly the location of the next Stone of Commune becomes clear. High Priest Gregory in Goddard Castle Town has it! Get it from him!
[7-07.htm] Tablet of Vision: Further communion with this tablet is futile. You must find the next Stone of Commune! High Priest Gregory of Goddard Castle Town has it.
[8-01.htm] Tablet of Vision: Hindemith is nowhere to be found! Only this strange, silver Cursed Bone powder scattered around the tablet. He must have already left to find the next Stone of Commune. Commune with the Tablet of Vision.
[8-02.htm] Tablet of Vision: Countless thoughts beyond comprehension sear painfully into your brain. You hear a man's voice lingering in the air... The location of the next Stone of Commune is revealed to me! The next Stone of Commune... I can feel that High Priest Gregory of Goddard Castle Town has it. Let's go to Gregory.
[8-03.htm] Tablet of Vision: Further communion with this tablet would be futile. Get the next Stone of Commune from High Priest Gregory of Goddard Castle Town.
[9-01.htm] Tablet of Vision: The Tablet of Vision is useless without a Stone of Commune. Kill the Archon of Halisha and take it from him.
[9-02.htm] Tablet of Vision: There's no sign of Hindemith, just the silvery bone powder scattered around the tablet. He must've gone to find the next Stone of Commune. 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! The location of the next Stone of Commune flashes into your mind! Near the next Tablet of Vision in the northern part of the Forest of the Dead, a suspicious figure seems to have the next Stone of Commune. This may be your last chance to meet Hindemith! Hurry!
[9-04.htm] Tablet of Vision: Communing with this tablet is completed. It's time to find the next Stone of Commune. Near the Tablet of Vision in the northern part of the Forest of the Dead, it seems a suspicious figure has the Stone of Commune. This may be your last chance to meet Hindemith! Hurry!
Исходник условий и наград (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.Q00094_SagaOfTheSoultaker;
import quests.AbstractSagaQuest;
/**
* Saga of the Soultaker (94)
* @author Emperorc
*/
public class Q00094_SagaOfTheSoultaker extends AbstractSagaQuest
{
public Q00094_SagaOfTheSoultaker()
{
super(94, "Saga of the Soultaker");
_npc = new int[]
{
30832,
31623,
31279,
31279,
31645,
31646,
31648,
31650,
31654,
31655,
31657,
31279
};
_items = new int[]
{
7080,
7533,
7081,
7509,
7292,
7323,
7354,
7385,
7416,
7447,
7085,
0
};
_mob = new int[]
{
27257,
27243,
27265
};
_classId = new int[]
{
95
};
_prevClass = new int[]
{
0x0d
};
_x = new int[]
{
191046,
46066,
46087
};
_y = new int[]
{
-40640,
-36396,
-36372
};
_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));
}
}
}
}