Saga of the Spectral Master
- ID
- 93
- Название
- Saga of the Spectral Master
- start_npcs_json
- []
- npc_ids_json
- []
- constants_json
- {}
- Статус разбора
- metadata_only; dynamic Java conditions/rewards retained in source; unresolved starts: []
- Источник
- game/data/scripts/quests/Q00093_SagaOfTheSpectralMaster/Q00093_SagaOfTheSpectralMaster.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 Magister Fairen: Well, shall I check your records? Let's see, you were educated at the Temple of Shilen, obtained a certificate of Dark Wizard from the Altar of Rites in the Dark Forest, passed the Test of the Summoner with flying colors, and even attained the Recommendation of Galatea! Your records are awesome! You won't have any problem! In fact, I've got you in mind for a very special position... I'm thinking of recommending that you be made a Spectral Master! It won't be easy, but your skills are extraordinary! Will you take the challenge? "I'll do it."
[0-010.htm] Grand Magister Fairen: You've come close to the ultimate knowledge, but you still don't understand it. Even the most profound knowledge is useless unless you make it your own! Your objective is right in front of you. Work a little bit harder! (Only characters of level 76 or above may transfer to the Spectral Master class. Don't stop Quest until completing the Occupation Change.)
[0-02.htm] Grand Magister Fairen: Well, shall I check your records? Let's see, you were educated at the Temple of Shilen, obtained a certificate of Dark Wizard from the Altar of Rites in the Dark Forest, passed the Test of the Summoner with flying colors, and even obtained a Recommendation from Galatea! Your records are awesome! Unfortunately, it's come to our attention that your research activities have slowed down since you were promoted to Phantom Summoner. Work harder! Eventually, I'll recommend that you become a candidate for Spectral Master, the ultimate summoner! Do your best! (Only characters of level 76 or above and of the Phantom Summoner class may undertake this quest.)
[0-03.htm] Grand Magister Fairen: Honestly, she and I have had some problems... She's away from the Ivory Tower for the moment. You can probably find her in Aden Castle Town. Take this report that Noctisse left here along with you. It tells all about the spirit that protects one of the six tablets. You should read it since you'll eventually have to face it. You should get going! Good luck!
[0-04.htm] Grand Magister Fairen: Visit Summoner, Noctisse, in Aden Castle Town. She'll teach you several important things about the pilgrimage of the tablets. Read the report that I gave you. It will tell you about difficulties you're bound to face in the future. Good luck!
[0-05.htm] Grand Magister Fairen: No book or scroll speaks of the ultimate summoning spell. It's secrets have always been in the domain of the gods, far from the grasp of mere Humans. The secret is supposedly written only on six ancient tablets, hidden by the gods in secluded areas and protected by formidable beasts! Once you've overcome all the difficulties that the gods could imagine, and learned the knowledge contained in the six tablets, you'll become a Spectral Master. Someone has already left on the pilgrimage before you. Summoner Noctisse is a young woman who's advancing rather quickly, like a bright new star, shining in the dawn sky. I'm sure she could tell you a few things about the pilgrimage of tablets if you approached her right. She has has a somewhat notorious personality! "Where can I find her?"
[0-06.htm] Grand Magister Fairen: Welcome back, pilgrim of vision! On behalf of all the summoners of the Ivory Tower, I congratulate you on safely completing the pilgrimage of the six tablets and obtaining the ultimate knowledge! "Now what?"
[0-07.htm] Grand Magister Fairen: You've achieved the enlightenment of sacred knowledge! My only role now is to confer the proper title upon the possessor of the knowledge. I hereby bestow upon you the title of Spectral Master! Welcome to the family, my brother! I pray that you reach new levels of enlightenment! Don't let it go to your head. You never know when somebody might come along and burst your bubble! Let's get together again sometime.
[0-08.htm] Grand Magister Fairen: You've obtained the ultimate knowledge, but haven't yet made it entirely your own. Like food, knowledge must be digested to become truly yours. You're very close to achieving your objectives. Work harder! (Only characters of level 76 or above may transfer to the Spectral Master class. Don't abandon the quest until class transfer is complete.)
[0-09.htm] Grand Magister Fairen: You now possess the sacred knowledge and are advancing towards the ultimate summoning technique! I'll grant you your well-deserved title now! I hereby bestow upon you the title of Spectral Master! Welcome to the family, my brother! I pray that you reach new levels of enlightenment. But don't let it go to your head! You never know when someone might come along and burst your bubble!
[1-01.htm] Magister Kamilen: So you're a friend of Noctisse? You need the medicine to cure her illness, huh? Severe coughing, high fever, chills... I think it's Sea of Spores fever. It's not going to be easy to cure. What? Grand Magister Fairen gave the poison? Oh, don't listen to everything Noctisse says. He's severely delusional. Do you really think Fairen would try to kill his student? "Please give me the medicine."
[1-02.htm] Magister Kamilen: Are you still here? We have to make the medicine quickly to cure Noctisse's fever! Please get me the ice crystal from the hot springs area. I need it to make the medicine. Chef Jeremy at the hot springs resort knows where to get it.
[1-03.htm] Magister Kamilen: You brought the ice crystal! Now I can make the medicine to cure Noctisse. People are talking about you. You killed Bumbalump, the monster of the hot springs area, huh? I heard it was a yeti with an enormous body. How did you kill it? "Is the medicine ready yet?"
[1-04.htm] Magister Kamilen: Why are you waiting when your friend is suffering? Take the medicine I gave you and go back to Summoner Noctisse.
[1-05.htm] Magister Kamilen: I need some Ice Crystals from the hot springs area to make the medicine to cure Sea of Spores Fever. I realize it's a lot of trouble, but could you get some for me? Go to the hot springs area and meet Chef Jeremy. Help him get some soy sauce, and he'll tell you where to find the ice crystals. Good luck!
[1-06.htm] Magister Kamilen: In a hurry? Don't worry. It's ready. Here you are. Give this medicine to Summoner Noctisse. Tell her not to be so paranoid. It only makes her tired. Goodbye!
[10-01.htm] Tablet of Vision: You can feel the presence of the Stone of Commune near the tablet. You feel you can find out its exact location if you lay your hands on the tablet. Lay hands on the tablet.
[10-02.htm] Tablet of Vision: As you are about to lay your hands on the tablet, you can feel something behind you. And a new creature that you haven't seen before appears.
[10-03.htm] Tablet of Vision: You need the Stone of Commune to decipher the hieroglyphs on the tablet. Speak with the Mysterious Servitor about the Stone of Commune.
[10-04.htm] Tablet of Vision: Someone is currently communing with the tablet. Try again later.
[10-05.htm] Tablet of Vision: The tablet is inscribed with indecipherable hieroglyphs. The letters emit a dim light and the tablet seems to manifest strong magical powers. Use the Stone of Commune.
[10-06.htm] Tablet of Vision: As you hold the Stone of Commune and concentrate on it, the tablet gets surrounded by bright light. You hear several hundred people simultaneously reading scriptures, and new knowledge starts to enter your mind. On one hand, you feel like you understand everything. On the other hand, you feel that you don't understand anything. You hear someone's low-pitched laughter. And you hear a man's voice. "You now have one more successor that you like." A blonde woman replies. "No, he's like a baby who just started walking. But he will no longer need his mother's protection..." All images disappear, and you start to recognize the surrounding environment. You are starting to understand the knowledge you have gained from the tablet little by little. The pilgrimage of the tablet seems to have ended. Return to Ivory Tower and see Magister Fairen.
[10-07.htm] Tablet of Vision: Nothing happens any more even when you lay your hands on the tablet. Now that you have finished your pilgrimage of the tablet, return to Ivory Tower and see Magister Fairen.
[11-01.htm] Summoner Noctisse: I've been waiting for you. Much has happened since you left. That crafty old bastard wants to kill me! You must believe me! Last night, he sent a summoner to make an attempt on my life! You must complete the pilgrimage of the tablet first! I have some new information. I found the fifth Stone of Commune, but it grows weaker. It's this stone that you felt. Isn't it weaker than before? There are two more stones. One is in the Imperial Tomb and the other at the Wall of Argos. Enter the Four Sepulchers at the heart of the cemetery. If you go to the Wall of Argos, find the Shrine of the Loyal in the northeastern part of the valley. And... "Tell me more."
[11-02.htm] Summoner Noctisse: You must defeat the Archon of Halisha to get the fifth Stone of Commune. You can find him at the Imperial Tomb or the Wall of Argos. Enter one of the Sepulchers at the cemetery to find him, or slay his minions at the Shrine of the Loyal by the wall and he'll appear. You must defeat him to get the stone. Good luck, my friend!
[11-03.htm] Summoner Noctisse: There are two ways to find the evil Archon of Halisha to get the fifth Stone of Commune. Find him in one of the Sepulchers at the Imperial Tomb, or at the Shrine of the Loyal at the Wall of Argos. Go now, and good luck.
[2-01.htm] Summoner Noctisse: Did Fairen send you here? Cough. What is that old man planning this time...? Are you working to become a Spectral Master like me? Cough, cough... Damn it! Fairen must have fed me some kind of drug. That old man is scared of becoming a has-been. That's why he's trying to stop a young mage with superior skills like me! He's trying to remove me because he's jealous of my talent! You should watch out, too. You'll never know when Fairen attacks! Cough. I'll help you. We young mages have to stick together, right? Let me tell you about the pilgrimage of tablets. Where should I start? "From the beginning."
[2-02.htm] Summoner Noctisse: Cough, hack! I have a favor to ask. Go to Goddard Castle Town and see Dark Elf Magister Kamilen. Ask him to make a medicine to cure this damn fever. Tell him I sent you, he won't refuse. If I don't cure this disease, I could die tomorrow! Then I couldn't help your tablet pilgrimage. Please hurry. Cough, cough, hack...
[2-03.htm] Summoner Noctisse: Cough, hack... Is this the medicine Kamilen made? Let me see... Ah...! I feel better already! My strength is returning. He's excellent in dealing with herbs and potions. Thank you! You saved my life. In return, I'll teach you all I know about the tablet pilgrimage. You already heard about the Tablet of Vision, that nobody can read the inscriptions. Well, I found out how to read the tablet! The gods don't want us to learn the highest level of magic because they think their creatures would become arrogant and self-righteous, as did Emperor Baium and Demon Beleth. Even the giants fought them for their power! The tablet was used to teach the magic to the giants, and had the most profound principles written on it. It was broken into six pieces and the inscription changed into characters of the god's so creatures like us couldn't comprehend them. The knowledge was hidden from us, but there is a way! "How?"
[2-04.htm] Summoner Noctisse: What are you waiting for? Follow the lead of this Stone of Commune to find the first Tablet of Vision! If you don't know it well, use the Map. Good luck, my friend!
[2-05.htm] Summoner Noctisse: Cough, hack. Ahhh! Damn it! I can't help you at all in this condition. I have a favor to ask. Please go to Goddard Castle Town and see Dark Elf Magister Kamilen. Ask him to make a medicine to cure this damn fever. Tell him I sent you and he won't refuse. I trust you! Cough, cough!
[2-06.htm] Summoner Noctisse: The answer is in this stone! It's called the Stone of Commune. If you use the power contained in it, you can understand the god's characters written on the Tablet of Vision. Also, hold the stone and you'll intuitively sense where the tablet is hidden. Aren't you curious who made this? I don't know yet, but one thing is clear - someone is helping the Dark Elves use the knowledge forbidden by the gods! We can't let this opportunity pass to explore the true power of magic! Take this stone. I don't need it anymore. Follow the directions given by the stone and you'll find the first Tablet of Vision. Good luck, my friend!
[3-01.htm] Grand Magister Fairen: Did you meet Noctisse? Did she tell you that I was trying to kill her? Ha! Sure she did! Listen to me carefully! Noctisse is very ambitious! She stops at nothing in her quest for power! In fact, she even stole the documents about the pilgrimage of tablets from me! She's ruthless, I tell you! You must be careful of her! I'm sure she'll try to use you to discover the secrets of the tablets... Mind my words! "Tell me about the fourth Stone of Commune."
[3-02.htm] Grand Magister Fairen: First you must meet with Messenger Wahkan of the Ketra Orcs.They've been hiring mercenaries, and this is a great opportunity to gain their trust! Soul Guide Asefa, the Chief Shaman of the Ketra Orcs has a Divine Stone of Wisdom that we simply must have! If things don't go well with the Ketras, you should try the Varka Silenos tribe. They also have a stone. Good luck!
[3-03.htm] Grand Magister Fairen: First, meet Messenger Naran Ashanuk of the Varka Silenos tribe. They've been hiring mercenaries, and this is a great opportunity to gain their trust! Soul Guide Udan Mardui, the Chief Shaman of the Varka Silenos has a Divine Stone of Wisdom that we simply must have! If things don't go well with the Varkas, try the Ketra Orcs. They also have a stone.
[3-04.htm] Grand Magister Fairen: To create the fourth Stone of Commune, you must get a Divine Stone of Wisdom from the Ketra Orcs or the Varka Silenos. Gaining their trust won't be easy, but you must do it! Good luck!
[3-05.htm] Grand Magister Fairen: This rock that's worshipped by savages is called the Divine Stone of Wisdom. It's a fragment of the fourth Stone of Commune that we've been looking for! Now I'll put it together with the other pieces I already have... "Do it."
[3-06.htm] Grand Magister Fairen: What are you still doing here? Take the Stone of Commune to the fourth Tablet of Vision. It should guide you there, but if not, just look at the Map!
[3-07.htm] Grand Magister Fairen: The power that you felt comes from this small stone that I have. It's the fragment of the fourth Stone of Commune. To activate it properly, we must find the remainder of the pieces and assemble them. The other fragments of the Stone of Commune are worshiped by the barbarians of this area as the Divine Stone of Wisdom. As far as I know, Ketra Orcs and Varka Silenos have them. You must gain their trust first and attain the stone by some means or other. But, both tribes are notorious for being rough and belligerent. I don't know which tribe you should approach... "I'll go to Ketra Orcs." "I'll go to Varka Silenos."
[3-08.htm] Grand Magister Fairen: The two fragments fit together perfectly! Take this Stone of Commune and find the fourth Tablet of Vision. You must work diligently to become a Spectral Master, and become a role model for our family and all the summoners of the Ivory Tower!
[4-01.htm] Mysterious Servitor: Ggguh! Ggguh! Don't let him get away!
[4-010.htm] Mysterious Servitor: Think hard before deciding who's your friend and who's your enemy! Take this, it came from him. I must return to my master! "Wait!"
[4-011.htm] Mysterious Servitor: Think hard before deciding who's your friend and who's your enemy! Take this, it came from him. I must return to my master!
[4-02.htm] Mysterious Servitor: Ggguh! Ggguh! Don't let him get away!
[4-03.htm] Mysterious Servitor: Ggguh! He escaped! I should have finished him once and for all!
[4-04.htm] Mysterious Servitor: Ggguh! Ggguh! Don't let him get away!
[4-05.htm] Mysterious Servitor: Ggguh! Ggguh! Don't let him get away!
[4-06.htm] Mysterious Servitor: Ggguh! Ggguh! Don't let him get away! You got him! "Who's your master?"
[4-07.htm] Mysterious Servitor: Ggguh! What? "Who is your master?"
[4-08.htm] Mysterious Servitor: He's about to run! Ggguh! Commune with the tablet!
[4-09.htm] Mysterious Servitor: Hurry! Ggguh! Commune with the stone tablet!
[5-01.htm] Tablet of Vision: Hieroglyphics are engraved on the tablet. They emit a dim light, with a mysterious and powerful magic. Use the stone.
[5-02.htm] Tablet of Vision: The Tablet of Vision becomes overwhelmed by bright lights. While you are holding the stone to work on it, you start to acquire a new sense of knowledge as you hear the voices of thousands reading scriptures in the background. You now realize the truth of the world and yet understand nothing. One of the voices is a familiar female whisper. But it quickly disappears. Slowly, you begin to visualize where the next Stone of Commune is... in the valley of dust... you see a second Tablet of Vision... and a female warrior in platinum armor. She is holding the stone... She unfolds her wings and flies away... and she's not alone... In an instant, the images disappear and then the stone goes completely dark.
[5-03.htm] Tablet of Vision: You visualize the stone once again when touching the Tablet. In the yellow-brown valley... you see a female warrior with platinum wings... She is holding the stone in her hand. You are compelled to go forth and find the stone right now!
[6-01.htm] Tablet of Vision: You must have the Stone of Commune to access this Tablet of Vision. The stone is being held by one of the female warriors with platinum wings.
[6-02.htm] Tablet of Vision: Hieroglyphics are engraved on the tablet. They emit a dim light, with a mysterious and powerful magic. Use the stone.
[6-03.htm] Tablet of Vision: The Tablet of Vision becomes overwhelmed by bright lights. While you are holding the stone to work on it, you start to acquire a new sense of knowledge as you hear the voices of thousands reading scriptures in the background. You now realize the truth of the world and yet understand nothing. One of the voices is a familiar female whisper. But it quickly disappears. Slowly, you sense the stone. You see the third Tablet of Vision and an angel with two pairs of wings. She is holding the stone in her hand... In an instant, the images disappear and then the stone goes completely dark.
[6-04.htm] Tablet of Vision: You recall your visions, and see the third Tablet of the Vision and a female warrior with wings... She is holding the stone in her hand. You are compelled to go forth and find the stone right now!
[7-01.htm] Tablet of Vision: The Stone of Commune exists near the tablet. Putting your hands on the tablet will reveal the location of the stone. Put your hands on the tablet. Patrol the area.
[7-02.htm] Tablet of Vision: Putting your hands on the tablet, your entire body is knocked back by something powerful but invisible. Then, it begins to appear.
[7-03.htm] Tablet of Vision: The Tablet of Vision is inaccessible without the Stone of Commune. Defeat Vision Guardian Shakiel, and take it from him.
[7-04.htm] Tablet of Vision: Someone else is currently communing with the Tablet of Vision. Come back later.
[7-05.htm] Tablet of Vision: Ancient, indecipherable hieroglyphs are engraved upon the tablet. They emit a mysterious, dim light. There is something magical and powerful in the tablet. Commune with the Tablet of Vision.
[7-06.htm] Tablet of Vision: The Tablet of Vision begins to be wrapped up in brightness. Thunderous chanting clogs your mind and yet gives you understand of something.... something that cannot be understood! You hear a familiar woman's voice whispering again. The location of the next Stone of Commune is gradually becoming clear...The Shrine in Goddard Castle Town...There is Grand Magister Fairen... Grand Magister Fairen has the Stone of Commune! The vision disappears slowly, and there is the Tablet of Vision, no longer emitting light.
[7-07.htm] Tablet of Vision: Putting your hands on the tablet, the location of the Stone of Commune again becomes clear. Grand Magister Fairen has the fourth Stone of Commune. Go and get it from him!
[8-01.htm] Tablet of Vision: Ancient, indecipherable hieroglyphs are engraved upon the tablet. They emit a mysterious, dim light. There is something magical and powerful in the tablet. Commune with the Tablet of Vision.
[8-02.htm] Tablet of Vision: The Tablet of Vision becomes overwhelmed by bright lights. While you are holding the stone to work on it, you start to acquire a new sense of knowledge as you hear the voices of thousands reading scriptures in the background. You now realize the truth of the world and yet understand nothing. Before your eyes, a beautiful blonde woman and a knight wearing black armor appear, but soon vanish. Slowly, you sense the existance of the next Stone of Commune... Aden Castle Town... Summoner Noctisse has the Stone of Commune in her hands. The radiance from the Tablet of Vision begins to diminish. The vision slowly fades away, and soon the light from the stone is gone.
[8-03.htm] Tablet of Vision: The moment you touch the tablet, the location of the next Stone of Commune is once again revealed to you. Noctisse, a Summoner in the temple of Aden Castle Town, has it! The Tablet of Vision commands you to go there!
[9-01.htm] Tablet of Vision: To decode the figures in the tablet, the Stone of Commune is needed. The fifth Stone of Commune is in the possession of the Archon of Halisha! You can find him at the Sepulchers or the Shrine of the Feudal Lords at the northeastern part of the Wall of Argos, and defeat low-grade evils.
[9-02.htm] Tablet of Vision: Ancient, indecipherable hieroglyphs are engraved upon the tablet. They emit a mysterious, dim light. There is something magical and powerful in the tablet. Commune with the Tablet of Vision.
[9-03.htm] Tablet of Vision: The Tablet of Vision becomes overwhelmed by bright lights. While you are holding the stone to work on it, you start to acquire a new sense of knowledge as you hear the voices of thousands reading scriptures in the background. You now realize the truth of the world and yet understand nothing. There is a vision of a beautiful blonde woman and a knight with black armor. The vision disappears. Slowly, you begin to visualize where the next Stone of Commune is...A vision appears...The sixth Tablet of Vision hidden in the wilds. Standing in front of the sixth tablet is the unfamiliar shadow of a human without legs...and the Stone of Commune, held in his hands, emits a dim light. In an instant, the images disappear and then the stone goes completely dark.
[9-04.htm] Tablet of Vision: Putting your hands on the tablet, the location of the Stone of Commune again becomes clear. The sixth Stone of Commune is hidden in the wilderness and there are ominious signs of a person's presence ...He is holding the Stone of Commune in his hands...Go and get the stone from him!
Исходник условий и наград (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.Q00093_SagaOfTheSpectralMaster;
import quests.AbstractSagaQuest;
/**
* Saga of the Spectral Master (93)
* @author Emperorc
*/
public class Q00093_SagaOfTheSpectralMaster extends AbstractSagaQuest
{
public Q00093_SagaOfTheSpectralMaster()
{
super(93, "Saga of the Spectral Master");
_npc = new int[]
{
30175,
31287,
31613,
30175,
31632,
31646,
31649,
31653,
31654,
31655,
31656,
31613
};
_items = new int[]
{
7080,
7606,
7081,
7508,
7291,
7322,
7353,
7384,
7415,
7446,
7112,
0
};
_mob = new int[]
{
27315,
27242,
27312
};
_classId = new int[]
{
111
};
_prevClass = new int[]
{
0x29
};
_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));
}
}
}
}