Saga of the Duelist
- ID
- 73
- Название
- Saga of the Duelist
- start_npcs_json
- []
- npc_ids_json
- []
- constants_json
- {}
- Статус разбора
- metadata_only; dynamic Java conditions/rewards retained in source; unresolved starts: []
- Источник
- game/data/scripts/quests/Q00073_SagaOfTheDuelist/Q00073_SagaOfTheDuelist.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 Master Sedrick: You learn quickly! Your skills remind me of Duelist Kaien of Oren! By the way, do you know Kaien? He's the best gladiator ever! But I've been hearing some strange stories about him lately. "What have you heard?"
[0-010.htm] Grand Master Sedrick: You have a resolve like Kaien's, but you're skills are still lacking. Work a little bit harder. You don't want to end up like Iron! (Only a character of level 76 or above is allowed to do a class transfer. Be careful. You cannot change occupation if you stop Quest!)
[0-02.htm] Grand Master Bernhard: Thank you, but I'm afraid you're not ready to meet him yet. He says that only a warrior who seeks his absolute limits will understand what he says. Do you understand that? I don't! (This quest may only be undertaken by Gladiators of level 76 or above.)
[0-03.htm] Grand Master Sedrick: He's watched the games for generations! He says that only a warrior who seeks to venture beyond the horizon will understand him. If you knew Iron's history, you'd understand... But he criticized the Duelists and chose Sword Master Iron as the worst! I couldn't understand! See the Arena Manager at the Coliseum to find out more. He's the one who's pursuing this issue! Take this document about Iron to him. I'm curious to find out what he thinks.
[0-04.htm] Grand Master Sedrick: See the Arena Manager at the Coliseum. His stories of the countless duels he's witnessed are worth listening to!
[0-05.htm] Grand Master Sedrick: He said that the title of Duelist is nothing but a sham! He also said that becoming a Duelist is not a popularity contest. He says that Swordmaster Iron, with his incredible reputation, shouldn't even be called a Duelist! He called him a fake! Will you go and see him for me? "I'll do it."
[0-06.htm] Grand Master Sedrick: You remind me of Kaien, Duelist of Oren, who strived for high ideals. When he couldn't reach them, he quit. "Anything else?"
[0-07.htm] Grand Master Sedrick: Kain said, a Duelist is covered in scars and fights on. You would be worthy of the title!
[0-08.htm] Grand Master Sedrick: He said that the path of a Duelist is like walking a mountain pass made of countless sharp blades. You must sharpen your skills more. (Only a character of level 76 or above is allowed to do class transfer. Be careful. You cannot change occupation if you stop Quest!)
[0-09.htm] Grand Master Sedrick: You obviously seek your absolute limit. Kaien said a Duelist is covered in scars and fights on. You would be worthy of the title!
[1-01.htm] Master Chef Donath: Ah, the legendary last meal of Duelists! Is it for you? The last dish... Did you know that dish actually contains the resolve one feels before going into mortal combat? And, of course, the ingredients must be gathered by the Duelist himself. Consuming food gathered at great risk allows the warrior to absorb the power of his opponent! If the meal is for you, you should collect and bring back the ingredients by yourself! "How do I gather the ingredients?"
[1-02.htm] Master Chef Donath: Did you bring the high quality meat I requested? Don't ask him for it directly! That son of a gun won't give it to you! Offer to deliver some to the village for him, and then steal a piece of it! Ask Chef Jeremy for the ice crystal. Bring both of those things to me when you get them.
[1-03.htm] Master Chef Donath: Did you bring the meat and the ice crystal? I'm going to get started. It isn't going to be easy! You can wait if you want to. Maybe you could practice your skills or something! A certain amount of sacrifice by the chef is necessary, but you risked your life obtaining the ingredients, so I'll do my part! "I'll wait."
[1-04.htm] Master Chef Donath: What an extravagant feast, worthy of a Duelist! You haven't tasted it yet? Do you have a match scheduled tomorrow? This dish tastes best at the Coliseum of Aden, right before a fight!
[1-05.htm] Master Chef Donath: First, bring me some meat! Umm... The pastureland of Rune would be a good place to start. Speak with the beast herder. Make sure you get a piece of Top Quality Meat! Oh, you can't just come out and ask him for it either! The guy's a real jerk! You should offer to deliver some of his meat to the village, and then steal a piece of it! I'll also need an ice crystal. I need it to sterilize the meat and preserve it. You can get one from Chef Jeremy. He's nearby. He'll most likely ask you to do him a favor in exchange. After you get both ingredients, bring them to me. I'll start getting ready.
[1-06.htm] Master Chef Donath: ..... You've waited for a long time for this! Here's the appetizer... and the main course... and over here, the dessert! Did you know that I made this food without using any fire whatsoever? I cooked it with the ice crystal! It's a very mysterious and difficult process! I'm exhausted! Why aren't you eating? Do you plan to share it with someone? If so, you'd better get it where you're going quickly, before it spoils! I've heard that people like to eat this food at the Coliseum of Aden before a match. Is that what it's for?
[10-01.htm] Tablet of Vision: There's a disturbance near the tablet. Iron may be stronger than the warrior, but that doesn't guarantee the outcome of this battle. He bears the scars of countless battles, as do I. Is that the tablet, or is it an illusion? The sound of clashing swords snaps you out of your torpor. Examine the area.
[10-02.htm] Tablet of Vision: This devil you fight is the one that tempted Sword Master Iron with eternal life and defeated him.
[10-03.htm] Tablet of Vision: Talk with Kain van Halter.
[10-04.htm] Tablet of Vision: Come back when it's your turn to fight.
[10-05.htm] Tablet of Vision: The Stone of Commune emits light as you get closer to the tablet. Commune with the Tablet of Vision.
[10-06.htm] Tablet of Vision: Countless thoughts beyond comprehension sear painfully into your brain. It seems that I heard someone laughing. The man said. "One more hero you wanted is born here again." A lady with blue clothes answered. "No, he is just a baby who starts toddling. But, he won't be raised under his mother's protection anymore." You are right. Defeat is Mother of Victory. I forgot this natural truth for such a long time, didn't I? What you can get something from Victory, that's because you staked your own life and resolution on it. Nothing ventured, nothing gained. Can the Victory without losing anything be called Victory...? To fight by staking everything in any fighting at any time. The resolution is the mark of a Duelist! Now, go back to Grand Master Sedrick of Aden Castle Town, and finish the pilgrimage.
[10-07.htm] Tablet of Vision: Further communion with this tablet would be futile. Go back to Grand Master Sedrick in Aden Castle Town and finish the pilgrimage.
[11-01.htm] Master Felix: You seek the Stone of Commune? Are you the powerful Knight I envisioned would come to help me? "Maybe so."
[11-02.htm] Master Felix: To get the Stone of Commune, you must kill the Archon of Halisha. Find him by entering the Sepulchers or by hunting down about 700 monsters at the Shrine of the Loyal.
[11-03.htm] Master Felix: Let me tell you. The devil Halisha made the Imperial Tomb its home during the Elmoreden era. Feudal lords paid tribute to dead emperors there. One of the devil's minions, the Archon of Halisha, has the stone. It can be found somewhere inside the Four Sepulchers. If it proves too difficult to enter the Sepulcher, there is another way. Go to the corner of the Wall of Argos at the entrance of the grave, and find the Shrine of the Loyal. The Archon will appear after you slay about 700 monsters at the shrine. The stone tablet matching the Stone of Commune is at the corner of the Wall of Argos. Either way is treacherous, but I have faith in you!
[2-01.htm] Arena Director: Does the horizon beckon you to explore what lies beyond it? You could, you know... The title of Duelist is only awarded to those who venture beyond the horizon. They all paid homage to the tablet and obtained power after achieving true enlightenment. Their wins and losses in battle, as well as their titles, are all meaningless now! These days, the tablet is almost forgotten, and the rank of Duelist risks being turned into a popularity contest.. There is much I could tell you about becoming a Duelist... "Please do!"
[2-02.htm] Arena Director: There's a dish that legend says Duelists ate before every battle.. Bring it to me and I'll tell you everything I know! A master chef called Donath or something can probably make it. You know, I wouldn't be telling you this if I didn't think that you showed real potential!
[2-03.htm] Arena Director: Ah, the legendary gourmet delight! This is the first time I've eaten it! Good. But I suppose I should finish my story first... Would you care to join me for dinner? Now, what is a Duelist? Nothing but the most legendary of all warriors! Duelists refine their skills to the utmost, and then go even further with the help of the goddess! They've traveled all over the world, studied the tablet of wisdom and achieved enlightenment. "What can you tell me about Sword Master Iron?"
[2-04.htm] Arena Director: Now do you better understand what it means to be a Duelist? The Tablet of Vision can be found south of the Tower of Insolence. Your journey starts there.
[2-05.htm] Arena Director: Okay. First you must go to Goddard and get the gourmet meal that was eaten by the Duelists before competitions and bring it to me. There's a great chef there who can make it for you. I think his name was Donath or something. Bring it to me, I'll tell you everything I know about Duelists.
[2-06.htm] Arena Director: Iron... He was truly a master swordsman, but he never managed to become a Duelist. While on his pilgrimage, he obtained a mysterious power. He was able to defeat all opponents without even breaking a sweat. And then suddenly, he disappeared! From that day on, there were no more Duelists named... Grand Master Sedrick tried... He selected a few candidates whose skills were about equal to yours, and was about to name them all Duelists! I put a stop to that! Now, take this Stone of Pilgrimage! You'll need it to earn the title of Duelist. Take it to the Stone of Commune south of the Ivory Tower. You'll find what it truly means to be a Duelist.
[3-01.htm] Grand Magister Valdis: Hmm... The Stone of Commune, eh? Well, I'll give it to you if you're qualified to have it! But I need it to write my book, "Trial of Heroes - Rewards of the Legendary Pilgrimage". Do you have anything of equal value you want to trade? Will you help me? Let's see... If the legend is true, you must be on the pilgrimage! "I'm on the pilgrimage."
[3-02.htm] Grand Magister Valdis: Killing alone won't win you a stone. First, go to the Ketra Orcs advance base and meet with Wahkan, Messenger of Ketra. He'll help you form an alliance. Fight hard alongside them to win their trust. Or you could change your mind and fight for the Varka Silenos, I don't care!
[3-03.htm] Grand Magister Valdis: Just killing won't win you a stone. First, you must go to the Varka Silenos stronghold and meet with Naran Ashanuk, their messenger. He'll help you to form an alliance with them. You must win their trust by proving yourself in battle. Or, if you want, you can approach the Ketra Orcs.
[3-04.htm] Grand Magister Valdis: Have you forgotten what you need to do? You shouldn't doubt your abilities! Or did you really forget where to go? To help the Ketra Orcs, go to their advance base in the northern part of Goddard Castle Town and meet their messenger Wahkan. To help the Varka Silenos, go to their stronghold in the western part of Goddard Castle Town and meet with Naran Ashanuk, their messenger.
[3-05.htm] Grand Magister Valdis: Have you brought the Divine Stone of Wisdom? Let me see it! If it's real, it will resonate with this fragment of the Stone of Commune and give me information. If not, it's a fake. I certainly don't mean to imply that you're trying to trick me, I simply must follow procedures! Let's see if it works! "Go ahead."
[3-06.htm] Grand Magister Valdis: The stone tablet linked to that Stone of Commune is north of the Varka Silenos stronghold. Go there!
[3-07.htm] Grand Magister Valdis: What a surprise! Maybe you are guided by the goddess! You wouldn't know of that, would you? So, you're a Duelist? Maybe you can meet King Van Halter someday. Alas, he is away so much he may lose his throne soon! If you're a pilgrim, get the Divine Stone of Wisdom and bring it to me. I heard that the Ketra Orcs and the Varka Silenos of Goddard Territory each have one. Which side will you choose? The Ketra Orcs The Varka Silenos
[3-08.htm] Grand Magister Valdis: Hmm.. There aren't many records of this. Just a few visions... I must find out more! To find out everything I can, I must communicate with the tablet... I'm not a pilgrim, so this won't work for me. This is a genuine Stone of Commune! Take this to the Tablet of Vision north of the Varka Silenos stronghold.
[4-01.htm] Kain Van Halter: Are you a Gladiator, too? I feel awkward asking you to do this... But would you help me take this guy down? I know it's against our principles, but this guy is way too powerful for me to handle alone. Besides, this isn't a regular arena!
[4-010.htm] Kain Van Halter: I see you're making the Pilgrimage of the Duelist! I've heard that what is written on the stone tablet isn't that important! You should try your best every time you fight. Think of every strike as your last... That sort of thinking produces miracles! Well, I must be going... Here, take this last Stone of Commune. I don't need it. You can probably put it to good use. Good luck! "Thank you!"
[4-011.htm] Kain Van Halter: I see you're making the Pilgrimage of the Duelist! I've heard that what is written on the stone tablet isn't that important! You should always try your best everytime you fight. Think of every strike as your last... That sort of thinking produces miracles! Well, I must be going... Here, take this last Stone of Commune. I don't need it. I'll bet you can put it to good use! Good luck!
[4-02.htm] Kain Van Halter: Sorry, I'm busy now! Step back, it's too dangerous!
[4-03.htm] Kain Van Halter: Humph! What do you want? I'm in a bad mood! He was in the palm of my hand and I let him get away!
[4-04.htm] Kain Van Halter: Your skills are impressive! Aren't you proud to have the opportunity to fight such a powerful opponent? Now raise your weapon and attack that thing! You can't live forever, right? A fight isn't worth fighting without some risk! If you die, it only means your time is up!
[4-05.htm] Kain Van Halter: Can't you see how busy I am? Watch and learn, buddy! I'm gonna make mincemeat out of this guy!
[4-06.htm] Kain Van Halter: Humph! He got away! Oh well, let me introduce myself. I'm Kain. Don't worry about my last name! I forgot it years ago! Did you hear what that guy was saying? All that rubbish about eternal life blah blah blah! You shouldn't be manipulated by such gibberish! Well, if you want to believe that garbage, go right ahead, but all that will be left of you will be rotting flesh and maggots! Ha! I met a guy once named Swordsmaster Iron who believed all that crap! I just ignored him... Have you met him? "I've met him."
[4-07.htm] Kain Van Halter: Humph! He got away! Oh well, let me introduce myself. I'm Kain. Don't worry about my last name! I forgot it years ago! Did you hear what that guy was saying? All that rubbish about eternal life, blah blah blah! Don't be manipulated by such gibberish! Well, if you want to believe that garbage, go right ahead, but all that will be left of you will be rotting flesh and maggots! Ha! I met a guy once named Swordsmaster Iron who believed all that crap! I just ignored him... Have you met him? "Yes, I have."
[4-08.htm] Kain Van Halter: Huh? Isn't that the Stone of Commune? You haven't communed with it yet, have you? I finally met a worthy opponent, and I'm busy dealing with him. Why don't you take care of your own business now.
[4-09.htm] Kain Van Halter: Well, since you have the Stone of Commune, go ahead and use it with the Tablet of Vision. I'll train myself in the meantime.
[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 warriors near the Wall of Argos in the Valley of Saints.
[5-03.htm] Tablet of Vision: Further communion with this tablet is futile. The next Stone of Commune is being held by the Guardians of Forbidden Knowledge in the Northeast Valley of the Saints. Kill the guardians and take the stone!
[6-01.htm] Tablet of Vision: The tablet has incomprehensible hieroglyphs engraved upon it. Guardians of Forbidden Knowledge have the Stone of Commune .
[6-02.htm] Tablet of Vision: When you go near the tablet, the Stone of Commune begins to emit light. Commune with the tablet.
[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 series of visions appear... Of an ancient Sword Master named Iron who aspired to become a Duelist, and eventually sold his soul to a demon. Now he stands before the monument to prevent any other Duelist from challenging his power. You'll find him at the southeast corner of the Ketra Orc Outpost.
[6-04.htm] Tablet of Vision: Further communion with this tablet would be futile. A warrior, ready for a challenge, awaits you at the Tablet of Vision in the Ketra Orc Outpost. Get going!
[7-01.htm] Tablet of Vision: As you near the Tablet of Vision, you sense a presence. It's the one who sold out to the demon for absolute power! Sadly, he underestimated his own potential. No amount of worldly acclaim was enough for him. You have a book with the story of his terrible end with you! Have you read it? Can you defeat the Sword Master? "I have no choice!"
[7-02.htm] Tablet of Vision: He had absolute power, but if the outcome is already known, what's the point? Eternal life is no substitute for dignity. The title of Sword Master is a heavy burden. He forgot why he took up the sword in the first place!
[7-03.htm] Tablet of Vision: The time has come to examine the Tablet of Vision, but don't take your eyes off of Iron for a second! You'll need all your skills against him!
[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. A vision appears of a man, smiling down upon the Stone of Commune! It appears he's in a vast library. It's Valdis, Grand Magister of Rune Castle Town Library!
[7-07.htm] Tablet of Vision: Further communion with this tablet is futile. You must get the next Stone of Commune from Valdis, the Grand Magister of Rune Castle Town Library.
[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... He has the Stone of Commune, and is seeking help with some imminent threat. Speak with Master Felix in Goddard Castle Town.
[8-03.htm] Tablet of Vision: Further communion with this tablet would be pointless at this time. Speak with Master Felix 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 can be found at the Wall of Argos or the Imperial Tomb.
[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 there's the demon who corrupted the Ancient Sword Master Iron while he was on the Pilgrimage of the Duelist! He promised him eternal life and invincibility in battle! And now he's fighting a Gladiator in the Forest of the Dead in Rune Territory!
[9-04.htm] Tablet of Vision: Further communion with this tablet would be futile. The next Stone of Commune is in the hand of a Duelist who will confront the devil in the Forest of the Dead in Rune Territory. What could've been the source of Iron's prideful behavior? The next tablet might have the answer.
Исходник условий и наград (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.Q00073_SagaOfTheDuelist;
import quests.AbstractSagaQuest;
/**
* @author Emperorc
*/
public class Q00073_SagaOfTheDuelist extends AbstractSagaQuest
{
public Q00073_SagaOfTheDuelist()
{
super(73, "Saga of the Duelist");
_npc = new int[]
{
30849,
31624,
31226,
31331,
31639,
31646,
31647,
31653,
31654,
31655,
31656,
31277
};
_items = new int[]
{
7080,
7537,
7081,
7488,
7271,
7302,
7333,
7364,
7395,
7426,
7096,
7546
};
_mob = new int[]
{
27289,
27222,
27281
};
_classId = new int[]
{
88
};
_prevClass = new int[]
{
0x02
};
_x = new int[]
{
164650,
47429,
47391
};
_y = new int[]
{
-74121,
-56923,
-56929
};
_z = new int[]
{
-2871,
-2383,
-2370
};
_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));
}
}
}
}