Test of the Healer
- ID
- 226
- Название
- Test of the Healer
- start_npcs_json
- [30473]
- npc_ids_json
- [27123,27124,27125,27126,27127,27134,30327,30424,30428,30473,30658,30659,30660,30661,30662,30663,30664,30665,30674]
- constants_json
- {"BANDELLOS":30473,"SORIUS":30327,"ALLANA":30424,"PERRIN":30428,"GUPU":30658,"ORPHAN_GIRL":30659,"WINDY_SHAORING":30660,"MYSTERIOUS_DARKELF":30661,"PIPER_LONGBOW":30662,"SLEIN_SHINING_BLADE":30663,"KAIN_FLYING_KNIFE":30664,"KRISTINA":30665,"DAURIN_HAMMERCRUSH":30674,"LETO_LIZARDMAN_LEADER":27123,"LETO_LIZARDMAN_ASSASSIN":27124,"LETO_LIZARDMAN_SNIPER":27125,"LETO_LIZARDMAN_WIZARD":27126,"LETO_LIZARDMAN_LORD":27127,"TATOMA":27134,"REPORT_OF_PERRIN":2810,"KRISTINA_LETTER":2811,"PICTURE_OF_WINDY":2812,"GOLDEN_STATUE":2813,"WINDY_PEBBLES":2814,"ORDER_OF_SORIUS":2815,"SECRET_LETTER_1":2816,"SECRET_LETTER_2":2817,"SECRET_LETTER_3":2818,"SECRET_LETTER_4":2819,"MARK_OF_HEALER":2820,"DIMENSIONAL_DIAMOND":7562}
- Статус разбора
- metadata_only; dynamic Java conditions/rewards retained in source; unresolved starts: []
- Источник
- game/data/scripts/quests/Q00226_TestOfTheHealer/Q00226_TestOfTheHealer.java
NPC квеста
| ID | Название | Старт квеста | Уровень |
|---|---|---|---|
| 27123 | Leto Lizardman Leader | Нет | 38 |
| 27124 | Leto Lizardman Assassin | Нет | 37 |
| 27125 | Leto Lizardman Sniper | Нет | 36 |
| 27126 | Leto Lizardman Wizard | Нет | 39 |
| 27127 | Leto Lizardman Lord | Нет | 40 |
| 27134 | Tatoma | Нет | 32 |
| 30327 | Sorius | Нет | 70 |
| 30424 | Allana | Нет | 70 |
| 30428 | Perrin | Нет | 70 |
| 30473 | Bandellos | Да | 70 |
| 30658 | Gupu | Нет | 70 |
| 30659 | Orphan Girl | Нет | 70 |
| 30660 | Windy Shaoring | Нет | 70 |
| 30661 | Mysterious Dark Elf | Нет | 70 |
| 30662 | Piper Longbow | Нет | 70 |
| 30663 | Slein Shining Blade | Нет | 70 |
| 30664 | Cain Flying Knife | Нет | 70 |
| 30665 | Kristina | Нет | 70 |
| 30674 | Daurin Hammercrush | Нет | 70 |
Условия уровней: выражения из Java
else if (player.getLevel() < 39)
Выдача предметов, адены и опыта: выражения из Java
giveItems(player, REPORT_OF_PERRIN, 1); giveItems(player, DIMENSIONAL_DIAMOND, DF_REWARD_39.get(player.getPlayerClass().getId())); giveItems(player, MARK_OF_HEALER, 1); addExpAndSp(player, 134839, 50000); giveItems(player, PICTURE_OF_WINDY, 1); giveItems(player, WINDY_PEBBLES, 1); giveItems(player, KRISTINA_LETTER, 1); giveItems(player, MARK_OF_HEALER, 1); addExpAndSp(player, 118304, 26250); giveItems(player, GOLDEN_STATUE, 1); giveItems(player, ORDER_OF_SORIUS, 1); giveItems(player, SECRET_LETTER_1, 1); giveItems(player, SECRET_LETTER_2, 1); giveItems(player, SECRET_LETTER_3, 1); giveItems(player, SECRET_LETTER_4, 1);
Квесты содержат динамические условия Java. Выражения выдачи включают промежуточные предметы, варианты и случайные награды; это не гарантированная награда. Константы приведены выше. Полные условия — в исходнике.
Тексты квеста
[30327-01.htm] Master Sorius: I have heard from Priest Bandellos. We will help in any way we can in your investigation. What we know so far is that it seems that the followers of Shilen kidnapped the girl. Meet the Dwarf called Daurin Hammercrush in the northwest part of Turek Orc Barracks. He is our spy who set off ahead of us.
[30327-02.htm] Master Sorius: Hurry up! I cannot guarantee the child's safety! There is one of our spies who set off ahead of us. Meet the Dwarf called Daurin Hammercrush in the northwest part of Turek Orc Barracks.
[30327-03.htm] Master Sorius: Good job, indeed. I will inform Priest Bandellos of your success... You are taking the Trial of the Healer, are you not?
[30327-04.htm] Master Sorius: Please go see Priest Bandellos right away!
[30424-01.htm] Allana: How could I have possibly incited Perrin? I remember mentioning in conversation a girl with strange powers who grew up with me in the orphanage. Soon afterward, Perrin asked me about her. I told him everything I knew... We were in an orphanage near Gludio Castle...
[30424-02.htm] Allana: We grew up together in an orphanage near Gludio Castle that was operated by a Dwarven Father.
[30428-01.htm] Perrin: Ah, the saint! Oh, yes, you have the right person for any question you may have about the saint... You must be a representative of the shrine. I've been expecting you. If you like, I could let you take her with you. Better than just having a meeting with her, huh? But, one condition... We have had quite a few expenses in our search for and protection of the saint... I was hoping that the shrine would compensate us... It comes to about 100,000 adena... "Tell me the truth or you will get hurt!"
[30428-02.htm] Perrin: Hey, that is not fair! You can't talk to me like that even if you are a representative of the shrine! If that's your attitude, I have someone that wants to meet you... Hey, Tatoma! Come over here and teach this child a lesson! My young friend, I would like to introduce you Tatoma, the elder brother of the famous Tamil. He is much stronger than his brother! This would not have been necessary if you had only given us the money...
[30428-03.htm] Perrin: Hey, hey! Easy there...! OK, if 100,000 is too much how about 90,000... 80,000... OK, let's make it half, 50,000! Don't look at me like that... Please, at least 1,000 adena... Stop it! OK, OK! The truth! I have only heard of the saint! At one time I was seeing a girl named Allana... She told me that she knew a way that we could make a lot of money! I was just... Oh, rats!
[30428-04.htm] Perrin: Please, that is all I know! You should ask Allana for the details! She lives near the harbor! I am very busy, so please excuse me.
[30473-01.htm] Priest Bandellos: It is not the will of Einhasad that you take the Test of the Healer right now. A more suitable test awaits you elsewhere... May the grace of moonlight shine upon your path... (This quest may only be undertaken by Clerics, Oracles, or Elven Knights.)
[30473-02.htm] Priest Bandellos: The Mark of the Healer is reserved for those who understand the healing and purifying power of light. These properties of light transcend all tribal distinctions. One day you will be tested to determine if you are worthy to receive this mark. You are not ready for this test yet. Don't be discouraged, your time will come. Come back to see me when you have more experience, and we will discuss the Mark of the Healer... (This quest may only be undertaken by a character of level 39 and above.)
[30473-03.htm] Priest Bandellos: The Mark of the Healer is reserved for those who understand the healing and purifying power of light. These properties of light transcend all tribal distinctions. If you wish to take the challenge, I have but one favor I must ask... "I will challenge the Test of the Healer"
[30473-04.htm] Priest Bandellos: There is a very old prophecy that says a day will come when all the people of this world will suffer under an overwhelming dark energy. In those days a girl will be born, a perfect representative of Einhasad, sent to purify this wicked world. And now a child is born, a girl who claims to be the One. Whether she is authentic or not, the church cannot ignore this. You must examine this matter carefully. This shall be your test. You must go and see Perrin at the Gludin Harbor. He is said to be protecting the holy child.
[30473-04a.htm] Priest Bandellos: An ancient prophecy says that one day, when darkness fills the world as water does a bowl, and the groaning of the people can be heard in the rocks of the land itself, there will be born a girl-child, sent by Einhasad, who will cleanse the world. Now comes word that the long-awaited one may have finally arrived, a girl who claims that she is the very one mentioned in the prophecy. We must determine the truth of that claim. Your task is to investigate this matter in detail. First, visit Perrin in Gludin Village, who is currently protecting this supposed "saint." Before you go, take this Dimension Diamond. You can trade it to the village gatekeeper for something special that may help you on your journey.
[30473-05.htm] Priest Bandellos: Have you any news of the child? I wish I could tell you to take your time, but this is of the utmost urgency. If you don't have the time, you may give up, someone else will take up the cause...
[30473-06.htm] Priest Bandellos: I don't like the way this is looking. I must send a guard to protect the child immediately. And I must report this to the High Priest at once! Master Sorius has told me of your great contribution to this effort. He was very complimentary of your skills. You have certainly earned this Mark of the Healer. Thank you again, I hope this helps you on your journey.
[30473-07.htm] Priest Bandellos: I don't like the way this is looking. I must send a guard to protect the child immediately. And I must report this to the High Priest at once! Master Sorius has told me of your great contribution to this effort. He was very complimentary of your skills. There may come a day when I shall need your help again... I hope you keep your skills sharp for that day. Hmmmm, what is that you're holding in your hands...It looks familiar... It reminds me of something that was lost from the church recently. Do you mind if I have a look at it? Show the Golden Statue
[30473-08.htm] Priest Bandellos: Oh my, this is it! This is the holy statue that was stolen from us by bandits when we were on our way to the Gludio shrine! I hate to ask, but could you possibly return this relic to our shrine? We have been lost without it. Hand over the Golden Statue
[30473-09.htm] Priest Bandellos: Thank you. Now take this Mark of the Healer. May the blessings of Einhasad be upon you... We will never forget the help that you have given to us and to our shrine.
[30658-01.htm] Father Gupu: Ah, It seems you are talking about Kristina... But you're too late! She was recently kidnapped by some strange men that broke into the orphanage! Curse the fiends! What is this world coming to! And what have they done with Windy? No no, Ari, father is not mad! After Kristina's kidnapping, the Elf masters of the Town of Gludio came to help search for her, and now you. And all of them ignoring the fact that the orphanage is in ruins and the children are starving! If only I had 100,000 adena, I would be able to buy beds for these children... Say you will donate that amount Pretend that you did not hear anything
[30658-02.htm] Father Gupu: Really? Are you really going to make a donation? Sob...! Thank you! I gladly accept! Children, say thank you... Wait, Windy is missing! I'm sorry, but could you please look for a little girl? She often goes to play in the Wastelands... She looks like... There should be a picture somewhere... Yes, she looks like this. The Wastelands is too dangerous of a place for a little girl...
[30658-03.htm] Father Gupu: No no, its all right. I wasn't expecting anything from you.
[30658-04.htm] Father Gupu: That little girl causes such mischief! Oh Windy! Where are you! I hope she's not lost in the Wastelands all alone! Please, go and find her for me!
[30658-05.htm] Father Gupu: No no, I can tell by your clothes that you can't afford to give a donation. Forget about it...!
[30658-06.htm] Father Gupu: Thank you so much. Windy has just returned! She must be inside washing up! Windy! You little rascal! Do you know how worried I was?! Pull one more stunt like that, and you'll get a spanking you will never forget! Thank you for finding this child. Making a donation and finding a lost child... We are truly in your debt. Oh yes, by the way, Windy asked me to give this to you. It looks like a trinket that she picked up while playing in the Wastelands... Ask about the saint.
[30658-07.htm] Father Gupu: I don't know... I have no idea what's going on. Why don't you ask the Elves from Gludio Castle? I think they said they were from the Town of Gludio... And one of them was named Sorius.
[30659-01.htm] Orphan Girl: Kristina? What a wonderfully strange person she is! Just the other day I sprained my ankle while trying to catch a frog. It hurt so bad that I started to cry, and then Kristina came and touched my ankle and it stopped hurting! It was a miracle!
[30659-02.htm] Orphan Girl: Father told us that he hated boys! He said that he had the most beautiful girls in the whole world!
[30659-03.htm] Orphan Girl: The saint? The prophecy? I've never heard of them...I am so hungry.. ...and cold... I just want some nice hot potatoes. Sob...
[30659-04.htm] Orphan Girl: Please help me, Warrior! Oh, Kristina... Poor Kristina... Strange people came and took her away... I was so frightened... I watched from behind a tree, trembling in fear. Sob... Poor Kristina...
[30659-05.htm] Orphan Girl: Please help me, Warrior! Kristina was kidnapped by the lizardmen! They were being bossed around by some Dark Elves...!
[30660-01.htm] Windy Shaoring: Don't scare my friends! This place is safe. I prefer to hang around with basilisks and my monster-eyed friends rather than my grumpy father! "How did you make friends with the monsters?"
[30660-02.htm] Windy Shaoring: ...What are you talking about? Those monsters say hello to me, and I say hello back to them. That's how you make friends, you know. Can't you hear what the monsters are saying, Mystic? "You should go back home now!"
[30660-03.htm] Windy Shaoring: The principal always gets mad at me and never lets me play with my monster friends. But now I am hungry and miss my orphan friends. I shall go back. Here, take this present from me. My monster friend gave it to me. Isn't it pretty?
[30660-04.htm] Windy Shaoring: I want to say good-bye to my friends. A good child must be polite. You can go on ahead. My friends will take me to the orphanage.
[30661-01.htm] Mysterious Dark Elf: I carry out the will of Shilen. Those who dare to stand in my way will be brought down with no mercy! I knew that you were tracking me... I suppose you are in the middle of the examination. So, does your future depend on capturing me? Ha! Who do I have to thank for this honor? Sorry to say, but this is a matter of life and death for me as well. I won't make things too easy for you. Soldiers, kill this man!
[30661-02.htm] Mysterious Dark Elf: Too bad! It doesn't make any difference in performing Shilen's will! Soldiers, kill that man!
[30661-03.htm] Mysterious Dark Elf: Oh... It's rather surprising that you have actually managed to follow me up until now. I'm sorry to say but I can't let you live any longer. If you are still alive in five minutes, I shall give you the title of Shillien Elder.
[30661-04.htm] Mysterious Dark Elf: Urrgh... The magic that held the saint contained is undone! How dare you disrupt the holy ceremony of Shilen...! I will never forgive you!
[30662-01.htm] Piper Longbow: My name is Piper. I was sent by Daurin to help you. I have been following a mysterious Dark Elf, he is nearby. Did you hear that? Let's investigate...
[30662-02.htm] Piper Longbow: I think he saw us coming and ran away... Why was he at the altar? It seemed important, he may come back.
[30662-03.htm] Piper Longbow: I have found the saint that you were looking for! She is in a tent near the Altar of Rites! Go and see her now!
[30663-01.htm] Slein Shining Blade: I am Slein, envoy of Daurin! I have been following a Dark Elf stranger around here. Come and help me catch him!
[30663-02.htm] Slein Shining Blade: Damn, those Dark Elves are slippery! He is returning to his comrades! We must prepare for an onslaught!
[30663-03.htm] Slein Shining Blade: My colleagues have located the Saintess that you were looking for! She is currently in a tent near the Initiation Altar of the Dark Elves! She will surely have an explanation for all of this...
[30664-01.htm] Kein Flying Knife: I am Kein. Daurin has asked me to assist you. The target is in that direction.
[30664-02.htm] Kein Flying Knife: Escape is unlikely, he could not have gotten far! Search the area nearby.
[30664-03.htm] Kein Flying Knife: First, meet with the saint. My colleagues tell me that she is in a tent near the Altar of Rites. She will know the truth about the incident.
[30665-01.htm] Saint Kristina: Thank you! Finally! I can move around! "Please visit Master Sorius with me."
[30665-02.htm] Saint Kristina: I overheard the Dark Elf who kidnapped me say that the goddess is waking up, although I do not know what that means. But I know one thing for sure, it was my destiny to be kidnapped and brought here... I will stay here. The time has not yet come for my return to the shrine. It is now my duty to spread the word of light in this forest of darkness. The Dark Elves deserve to know the truth of Einhasad. To survive the Chaotic Chronicle we must all join together. Please take this letter to Master Sorius.
[30665-03.htm] Saint Kristina: Please, you must help me! You were sent by Priest Bandellos, weren't you? The Dark Elf who kidnapped me cast an evil spell and I can't move at all! I beg you. Please set me free!
[30665-04.htm] Saint Kristina: Did you give my letter to Master Sorius? Please take it to him right away! I implore you!
[30674-01.htm] Daurin Hammercrush: Hey, are you the one I am supposed to meet here? Have you heard? Leto Lizardmen are hiding in that house over there! Being alone, I couldn't take any action, I had to just follow them here. "Leave the rest to me."
[30674-02.htm] Daurin Hammercrush: Those damn Leto Lizardmen! They must've been expecting us! Attack!
[30674-02a.htm] Daurin Hammercrush: What are you waiting for?! Catch them before they get away.
[30674-03.htm] Daurin Hammercrush: Hmm...what does this say? 'Perform the ritual at the Obelisk of Shilen'.. I think they took the girl to the obelisk in the Dark Forest. Then the Dark Elves are involved in this case? Curse them! There are many obelisks in the Dark Forest... We can't figure out which obelisk they are at with only this?! In any case, we have to track them as soon as possible. We must save the holy maiden before she becomes sacrificed. I am a Dwarf and slow on my feet, so you should leave first. I will send swift supporters to aid you, so hurry! They must be going to a place with an altar...! I will inform Sorius about the situation.
[30674-04.htm] Daurin Hammercrush: Hey, what are you waiting for? The victim is a young girl! What if the Dark Elves do something unspeakable to her? You must find her quickly! They must have taken her to a place like an altar...
Исходник условий и наград (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.Q00226_TestOfTheHealer;
import org.l2jmobius.gameserver.entity.World;
import org.l2jmobius.gameserver.entity.actor.Npc;
import org.l2jmobius.gameserver.entity.actor.Player;
import org.l2jmobius.gameserver.entity.actor.enums.player.PlayerClass;
import org.l2jmobius.gameserver.mechanics.script.Quest;
import org.l2jmobius.gameserver.mechanics.script.QuestSound;
import org.l2jmobius.gameserver.mechanics.script.QuestState;
import org.l2jmobius.gameserver.mechanics.script.State;
import org.l2jmobius.gameserver.network.serverpackets.SocialAction;
public class Q00226_TestOfTheHealer extends Quest
{
// NPCs
private static final int BANDELLOS = 30473;
private static final int SORIUS = 30327;
private static final int ALLANA = 30424;
private static final int PERRIN = 30428;
private static final int GUPU = 30658;
private static final int ORPHAN_GIRL = 30659;
private static final int WINDY_SHAORING = 30660;
private static final int MYSTERIOUS_DARKELF = 30661;
private static final int PIPER_LONGBOW = 30662;
private static final int SLEIN_SHINING_BLADE = 30663;
private static final int KAIN_FLYING_KNIFE = 30664;
private static final int KRISTINA = 30665;
private static final int DAURIN_HAMMERCRUSH = 30674;
// Monsters
private static final int LETO_LIZARDMAN_LEADER = 27123;
private static final int LETO_LIZARDMAN_ASSASSIN = 27124;
private static final int LETO_LIZARDMAN_SNIPER = 27125;
private static final int LETO_LIZARDMAN_WIZARD = 27126;
private static final int LETO_LIZARDMAN_LORD = 27127;
private static final int TATOMA = 27134;
// Items
private static final int REPORT_OF_PERRIN = 2810;
private static final int KRISTINA_LETTER = 2811;
private static final int PICTURE_OF_WINDY = 2812;
private static final int GOLDEN_STATUE = 2813;
private static final int WINDY_PEBBLES = 2814;
private static final int ORDER_OF_SORIUS = 2815;
private static final int SECRET_LETTER_1 = 2816;
private static final int SECRET_LETTER_2 = 2817;
private static final int SECRET_LETTER_3 = 2818;
private static final int SECRET_LETTER_4 = 2819;
// Rewards
private static final int MARK_OF_HEALER = 2820;
private static final int DIMENSIONAL_DIAMOND = 7562;
// Misc
private Npc _tatoma;
private Npc _letoLeader;
public Q00226_TestOfTheHealer()
{
super(226, "Test of the Healer");
registerQuestItems(REPORT_OF_PERRIN, KRISTINA_LETTER, PICTURE_OF_WINDY, GOLDEN_STATUE, WINDY_PEBBLES, ORDER_OF_SORIUS, SECRET_LETTER_1, SECRET_LETTER_2, SECRET_LETTER_3, SECRET_LETTER_4);
addStartNpc(BANDELLOS);
addTalkId(BANDELLOS, SORIUS, ALLANA, PERRIN, GUPU, ORPHAN_GIRL, WINDY_SHAORING, MYSTERIOUS_DARKELF, PIPER_LONGBOW, SLEIN_SHINING_BLADE, KAIN_FLYING_KNIFE, KRISTINA, DAURIN_HAMMERCRUSH);
addKillId(LETO_LIZARDMAN_LEADER, LETO_LIZARDMAN_ASSASSIN, LETO_LIZARDMAN_SNIPER, LETO_LIZARDMAN_WIZARD, LETO_LIZARDMAN_LORD, TATOMA);
}
@Override
public String onEvent(String event, Npc npc, Player player)
{
String htmltext = event;
final QuestState st = getQuestState(player, false);
if (st == null)
{
return htmltext;
}
switch (event)
{
case "30473-04.htm":
{
st.startQuest();
giveItems(player, REPORT_OF_PERRIN, 1);
if (!player.getVariables().getBoolean("secondClassChange39", false))
{
htmltext = "30473-04a.htm";
giveItems(player, DIMENSIONAL_DIAMOND, DF_REWARD_39.get(player.getPlayerClass().getId()));
player.getVariables().set("secondClassChange39", true);
}
break;
}
case "30473-09.htm":
{
takeItems(player, GOLDEN_STATUE, 1);
giveItems(player, MARK_OF_HEALER, 1);
addExpAndSp(player, 134839, 50000);
player.broadcastPacket(new SocialAction(player.getObjectId(), 3));
st.exitQuest(false, true);
break;
}
case "30428-02.htm":
{
st.setCond(2, true);
if (_tatoma == null)
{
_tatoma = addSpawn(TATOMA, -93254, 147559, -2679, 0, false, 0);
startQuestTimer("tatoma_despawn", 200000, null, player, false);
}
break;
}
case "30658-02.htm":
{
if (getQuestItemsCount(player, 57) >= 100000)
{
st.setCond(7, true);
takeItems(player, 57, 100000);
giveItems(player, PICTURE_OF_WINDY, 1);
}
else
{
htmltext = "30658-05.htm";
}
break;
}
case "30658-03.htm":
{
st.set("gupu", "1");
break;
}
case "30658-07.htm":
{
st.setCond(9, true);
break;
}
case "30660-03.htm":
{
st.setCond(8, true);
takeItems(player, PICTURE_OF_WINDY, 1);
giveItems(player, WINDY_PEBBLES, 1);
break;
}
case "30674-02.htm":
{
st.setCond(11, true);
playSound(player, QuestSound.ITEMSOUND_QUEST_BEFORE_BATTLE);
takeItems(player, ORDER_OF_SORIUS, 1);
if (_letoLeader == null)
{
_letoLeader = addSpawn(LETO_LIZARDMAN_LEADER, -97441, 106585, -3405, 0, false, 0);
startQuestTimer("leto_leader_despawn", 200000, null, player, false);
}
break;
}
case "30665-02.htm":
{
st.setCond(22, true);
takeItems(player, SECRET_LETTER_1, 1);
takeItems(player, SECRET_LETTER_2, 1);
takeItems(player, SECRET_LETTER_3, 1);
takeItems(player, SECRET_LETTER_4, 1);
giveItems(player, KRISTINA_LETTER, 1);
break;
}
case "tatoma_despawn":
{
_tatoma.deleteMe();
_tatoma = null;
return null;
}
case "leto_leader_despawn":
{
_letoLeader.deleteMe();
_letoLeader = null;
return null;
}
}
return htmltext;
}
@Override
public String onTalk(Npc npc, Player player)
{
String htmltext = getNoQuestMsg(player);
final QuestState st = getQuestState(player, true);
switch (st.getState())
{
case State.CREATED:
{
if ((player.getPlayerClass() != PlayerClass.KNIGHT) && (player.getPlayerClass() != PlayerClass.ELVEN_KNIGHT) && (player.getPlayerClass() != PlayerClass.CLERIC) && (player.getPlayerClass() != PlayerClass.ORACLE))
{
htmltext = "30473-01.htm";
}
else if (player.getLevel() < 39)
{
htmltext = "30473-02.htm";
}
else
{
htmltext = "30473-03.htm";
}
break;
}
case State.STARTED:
{
final int cond = st.getCond();
switch (npc.getId())
{
case BANDELLOS:
{
if (cond < 23)
{
htmltext = "30473-05.htm";
}
else
{
if (!hasQuestItems(player, GOLDEN_STATUE))
{
htmltext = "30473-06.htm";
giveItems(player, MARK_OF_HEALER, 1);
addExpAndSp(player, 118304, 26250);
player.broadcastPacket(new SocialAction(player.getObjectId(), 3));
st.exitQuest(false, true);
}
else
{
htmltext = "30473-07.htm";
}
}
break;
}
case PERRIN:
{
if (cond < 3)
{
htmltext = "30428-01.htm";
}
else if (cond == 3)
{
htmltext = "30428-03.htm";
st.setCond(4, true);
takeItems(player, REPORT_OF_PERRIN, 1);
}
else
{
htmltext = "30428-04.htm";
}
break;
}
case ORPHAN_GIRL:
{
htmltext = "30659-0" + getRandom(1, 5) + ".htm";
break;
}
case ALLANA:
{
if (cond == 4)
{
htmltext = "30424-01.htm";
st.setCond(5, true);
}
else if (cond > 4)
{
htmltext = "30424-02.htm";
}
break;
}
case GUPU:
{
if ((st.getInt("gupu") == 1) && (cond != 9))
{
htmltext = "30658-07.htm";
st.setCond(9, true);
}
else if (cond == 5)
{
htmltext = "30658-01.htm";
st.setCond(6, true);
}
else if (cond == 6)
{
htmltext = "30658-01.htm";
}
else if (cond == 7)
{
htmltext = "30658-04.htm";
}
else if (cond == 8)
{
htmltext = "30658-06.htm";
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
takeItems(player, WINDY_PEBBLES, 1);
giveItems(player, GOLDEN_STATUE, 1);
}
else if (cond > 8)
{
htmltext = "30658-07.htm";
}
break;
}
case WINDY_SHAORING:
{
if (cond == 7)
{
htmltext = "30660-01.htm";
}
else if (hasQuestItems(player, WINDY_PEBBLES))
{
htmltext = "30660-04.htm";
}
break;
}
case SORIUS:
{
if (cond == 9)
{
htmltext = "30327-01.htm";
st.setCond(10, true);
giveItems(player, ORDER_OF_SORIUS, 1);
}
else if ((cond > 9) && (cond < 22))
{
htmltext = "30327-02.htm";
}
else if (cond == 22)
{
htmltext = "30327-03.htm";
st.setCond(23, true);
takeItems(player, KRISTINA_LETTER, 1);
}
else if (cond == 23)
{
htmltext = "30327-04.htm";
}
break;
}
case DAURIN_HAMMERCRUSH:
{
if (cond == 10)
{
htmltext = "30674-01.htm";
}
else if (cond == 11)
{
htmltext = "30674-02a.htm";
if (_letoLeader == null)
{
_letoLeader = addSpawn(LETO_LIZARDMAN_LEADER, -97441, 106585, -3405, 0, false, 0);
startQuestTimer("leto_leader_despawn", 200000, null, player, false);
}
}
else if (cond == 12)
{
htmltext = "30674-03.htm";
st.setCond(13, true);
}
else if (cond > 12)
{
htmltext = "30674-04.htm";
}
break;
}
case PIPER_LONGBOW:
case SLEIN_SHINING_BLADE:
case KAIN_FLYING_KNIFE:
{
if ((cond == 13) || (cond == 14))
{
htmltext = npc.getId() + "-01.htm";
}
else if ((cond > 14) && (cond < 19))
{
htmltext = npc.getId() + "-02.htm";
}
else if ((cond > 18) && (cond < 22))
{
htmltext = npc.getId() + "-03.htm";
st.setCond(21, true);
}
break;
}
case MYSTERIOUS_DARKELF:
{
if (cond == 13)
{
htmltext = "30661-01.htm";
st.setCond(14);
playSound(player, QuestSound.ITEMSOUND_QUEST_BEFORE_BATTLE);
addSpawn(LETO_LIZARDMAN_ASSASSIN, player, true, 300000);
addSpawn(LETO_LIZARDMAN_ASSASSIN, player, true, 300000);
addSpawn(LETO_LIZARDMAN_ASSASSIN, player, true, 300000);
}
else if (cond == 14)
{
htmltext = "30661-01.htm";
checkSpawn(LETO_LIZARDMAN_ASSASSIN, 3, player);
}
else if (cond == 15)
{
htmltext = "30661-02.htm";
st.setCond(16);
playSound(player, QuestSound.ITEMSOUND_QUEST_BEFORE_BATTLE);
addSpawn(LETO_LIZARDMAN_SNIPER, player, true, 300000);
addSpawn(LETO_LIZARDMAN_SNIPER, player, true, 300000);
addSpawn(LETO_LIZARDMAN_SNIPER, player, true, 300000);
}
else if (cond == 16)
{
htmltext = "30661-02.htm";
checkSpawn(LETO_LIZARDMAN_SNIPER, 3, player);
}
else if (cond == 17)
{
htmltext = "30661-03.htm";
st.setCond(18);
playSound(player, QuestSound.ITEMSOUND_QUEST_BEFORE_BATTLE);
addSpawn(LETO_LIZARDMAN_WIZARD, player, true, 300000);
addSpawn(LETO_LIZARDMAN_WIZARD, player, true, 300000);
addSpawn(LETO_LIZARDMAN_LORD, player, true, 300000);
}
else if (cond == 18)
{
htmltext = "30661-03.htm";
checkSpawn(LETO_LIZARDMAN_WIZARD, 2, player);
checkSpawn(LETO_LIZARDMAN_LORD, 1, player);
}
else if (cond == 19)
{
htmltext = "30661-04.htm";
st.setCond(20, true);
}
else if ((cond == 20) || (cond == 21))
{
htmltext = "30661-04.htm";
}
break;
}
case KRISTINA:
{
if ((cond > 18) && (cond < 22))
{
htmltext = "30665-01.htm";
}
else if (cond > 21)
{
htmltext = "30665-04.htm";
}
else
{
htmltext = "30665-03.htm";
}
break;
}
}
break;
}
case State.COMPLETED:
{
htmltext = getAlreadyCompletedMsg(player);
break;
}
}
return htmltext;
}
@Override
public void onKill(Npc npc, Player player, boolean isPet)
{
final QuestState st = getQuestState(player, false);
if ((st == null) || !st.isStarted())
{
return;
}
final int cond = st.getCond();
switch (npc.getId())
{
case TATOMA:
{
if ((cond == 1) || (cond == 2))
{
st.setCond(3, true);
}
_tatoma = null;
cancelQuestTimer("tatoma_despawn", null, player);
break;
}
case LETO_LIZARDMAN_LEADER:
{
if ((cond == 10) || (cond == 11))
{
st.setCond(12, true);
giveItems(player, SECRET_LETTER_1, 1);
}
_letoLeader = null;
cancelQuestTimer("leto_leader_despawn", null, player);
break;
}
case LETO_LIZARDMAN_ASSASSIN:
{
if ((cond == 13) || (cond == 14))
{
st.setCond(15, true);
giveItems(player, SECRET_LETTER_2, 1);
}
break;
}
case LETO_LIZARDMAN_SNIPER:
{
if ((cond == 15) || (cond == 16))
{
st.setCond(17, true);
giveItems(player, SECRET_LETTER_3, 1);
}
break;
}
case LETO_LIZARDMAN_LORD:
{
if ((cond == 17) || (cond == 18))
{
st.setCond(19, true);
giveItems(player, SECRET_LETTER_4, 1);
}
break;
}
}
}
private void checkSpawn(int npcId, int count, Player player)
{
int found = 0;
while (found < count)
{
found = 0;
for (Npc nearby : World.getVisibleObjects(player, Npc.class))
{
if (nearby.getId() == npcId)
{
found++;
}
}
if (found < count)
{
addSpawn(npcId, player, true, 300000);
}
}
}
}