Test of the Searcher
- ID
- 225
- Название
- Test of the Searcher
- start_npcs_json
- [30690]
- npc_ids_json
- [20144,20551,20555,20781,27092,27093,30291,30420,30627,30628,30690,30728,30729,30730]
- constants_json
- {"ALEX":30291,"TYRA":30420,"TREE":30627,"STRONG_WOODEN_CHEST":30628,"LUTHER":30690,"LEIRYNN":30728,"BORYS":30729,"JAX":30730,"HANGMAN_TREE":20144,"ROAD_SCAVENGER":20551,"GIANT_FUNGUS":20555,"DELU_LIZARDMAN_SHAMAN":20781,"DELU_CHIEF_KALKIS":27093,"NEER_BODYGUARD":27092,"LUTHER_LETTER":2784,"ALEX_WARRANT":2785,"LEIRYNN_ORDER_1":2786,"DELU_TOTEM":2787,"LEIRYNN_ORDER_2":2788,"CHIEF_KALKI_FANG":2789,"LEIRYNN_REPORT":2790,"STRANGE_MAP":2791,"LAMBERT_MAP":2792,"ALEX_LETTER":2793,"ALEX_ORDER":2794,"WINE_CATALOG":2795,"TYRA_CONTRACT":2796,"RED_SPORE_DUST":2797,"MALRUKIAN_WINE":2798,"OLD_ORDER":2799,"JAX_DIARY":2800,"TORN_MAP_PIECE_1":2801,"TORN_MAP_PIECE_2":2802,"SOLT_MAP":2803,"MAKEL_MAP":2804,"COMBINED_MAP":2805,"RUSTED_KEY":2806,"GOLD_BAR":2807,"ALEX_RECOMMEND":2808,"MARK_OF_SEARCHER":2809,"DIMENSIONAL_DIAMOND":7562}
- Статус разбора
- metadata_only; dynamic Java conditions/rewards retained in source; unresolved starts: []
- Источник
- game/data/scripts/quests/Q00225_TestOfTheSearcher/Q00225_TestOfTheSearcher.java
NPC квеста
| ID | Название | Старт квеста | Уровень |
|---|---|---|---|
| 20144 | Hangman Tree | Нет | 35 |
| 20551 | Road Scavenger | Нет | 37 |
| 20555 | Giant Fungus | Нет | 40 |
| 20781 | Delu Lizardman Shaman | Нет | 35 |
| 27092 | Neer Bodyguard | Нет | 33 |
| 27093 | Delu Chief Kalkis | Нет | 37 |
| 30291 | Alex | Нет | 70 |
| 30420 | Tyra | Нет | 70 |
| 30627 | Tree | Нет | 70 |
| 30628 | Strong Wooden Chest | Нет | 70 |
| 30690 | Luther | Да | 70 |
| 30728 | Leirynn | Нет | 70 |
| 30729 | Borys | Нет | 70 |
| 30730 | Jax | Нет | 70 |
Условия уровней: выражения из Java
else if (player.getLevel() < 39)
Выдача предметов, адены и опыта: выражения из Java
giveItems(player, LUTHER_LETTER, 1); giveItems(player, DIMENSIONAL_DIAMOND, DF_REWARD_39.get(player.getPlayerClass().getId())); giveItems(player, ALEX_LETTER, 1); giveItems(player, ALEX_ORDER, 1); giveItems(player, LAMBERT_MAP, 1); giveItems(player, TYRA_CONTRACT, 1); giveItems(player, JAX_DIARY, 1); giveItems(player, RUSTED_KEY, 1); giveItems(player, GOLD_BAR, 20); giveItems(player, MARK_OF_SEARCHER, 1); addExpAndSp(player, 37831, 18750); giveItems(player, ALEX_WARRANT, 1); giveItems(player, ALEX_RECOMMEND, 1); giveItems(player, LEIRYNN_ORDER_1, 1); giveItems(player, LEIRYNN_ORDER_2, 1); giveItems(player, LEIRYNN_REPORT, 1); giveItems(player, WINE_CATALOG, 1); giveItems(player, OLD_ORDER, 1); giveItems(player, MALRUKIAN_WINE, 1); giveItems(player, COMBINED_MAP, 1); giveItems(player, DELU_TOTEM, 1); giveItems(player, CHIEF_KALKI_FANG, 1); giveItems(player, STRANGE_MAP, 1); giveItems(player, RED_SPORE_DUST, 1); giveItems(player, TORN_MAP_PIECE_1, 1); giveItems(player, SOLT_MAP, 1); giveItems(player, TORN_MAP_PIECE_2, 1); giveItems(player, MAKEL_MAP, 1);
Квесты содержат динамические условия Java. Выражения выдачи включают промежуточные предметы, варианты и случайные награды; это не гарантированная награда. Константы приведены выше. Полные условия — в исходнике.
Тексты квеста
[30291-01.htm] Alex: Welcome, my friend. If Master Luther sent you here you must be ready to get to work. Floran Village needs more good workers like you. We don't have a guard or even a single skilled person! I have been waiting for you since I received the warrant of appointment. Take this and give it to my adjutant Militia Leirynn... She is a modest lady. I am afraid that work here may not be as easy as you think... I thank you in advance. Ask about the Floran Militia
[30291-01t.htm] Alex: Most of the villagers who are left are the ones lucky enough to have escaped the Lord's tyranny. The troops are not defending the village so the villagers must defend themselves! Strangers and thieves overwhelm us as a sick tyrant oppresses us! These dark days may get darker still...
[30291-02.htm] Alex: What are you still doing here? You must take the warrant I gave you to my adjutant Leirynn. Do whatever she says! Ask about the Floran Militia
[30291-03.htm] Alex: No one understands the situation here better than Leirynn. Follow her instructions explicitly. I know you won't disappoint me.
[30291-04.htm] Alex: Thank you for dealing with the delu Lizardman. I heard of your triumph from Leirynn. What's this, you found a Strange Map? Let me see it... Hmm... Dion territory... I can barely make out this name in the lower corner... 'Lambert'... Where have I heard that...? Oh yes... One of the Lord's royal guards had that name! I was under the impression that he absconded with Duke Ashton's Gold Bar during the farmer's revolt. Inquire about the Gold Bar
[30291-05.htm] Alex: It is said that the source of this gold was relics collected by Duke Ashton's men from ancient ruins. No one has seen this gold since it vanished en route from Gludio to Dion to support the war. It is rumored to be a vast amount, no one really knows. But now we have this Map! Ask about the Map
[30291-06.htm] Alex: I believe this Map will lead us to the prince's gold! I wonder how that delu Lizardman got this? If we can get to the gold before our opponents we will be able to hire soldiers and buy weapons with which to defend the village. Think of this as your last test. You must find the other parts of this Map and get the prince's lost Gold Bar. Whether you are successful or not, I will write you the letter of Recommendation you need. Agree to search for the Gold Bar
[30291-07.htm] Alex: I have a friend named Borys who used to be one of the Lord's royal guards. He was an excellent soldier until the death of his wife sent him into an alcoholic haze and he lost his position. He is in the Town of Gludio now, take this letter and find him. He may be able to tell you more.
[30291-08.htm] Alex: So you still have not met Borys? Go to the Town of Gludio, you will find him there. Tell him Alex sent you, he will be sure to help you. Don't forget to ask him about the prince's lost gold!
[30291-09.htm] Alex: Hmmm, it seems the royal guards hid the gold before it reached the prince! Now we can be sure that the gold exists, our only problem remaining is how to find it. First, of course, we must find the other 3 parts of the Map... I am afraid that the delu lizardmen are also on the search for the gold, and their numbers are increasing... We must find the gold before they do! Please hurry!
[30291-10.htm] Alex: You have found the Map! Good job! Ahhh, the World Map... Hurry to the place marked here and find the lost gold. I have heard from my adjutant Leirynn that the delu lizardmen have sent assassins to retrieve the Map, so be very careful.
[30291-11.htm] Alex: Excellent work, my friend! Isn't it ironic that this gold collected at the behest of such a selfish Lord should be used for the good of the ones he oppressed? We all have you to thank for this. Please take this letter of Recommendation to Master Luther. I am honored to call you my comrade-in-arms. May God smile on your future ...
[30291-12.htm] Alex: You are still here? You are welcome to stay here and fight for Floran's people, however, you must follow your own faith. I pray you find it. If you give the letter of Recommendation to Master Luther, he will bestow upon you the Mark of the Searcher.
[30420-01.htm] Trader Tyra: This Malrukian Wine is of the highest quality. It was made by distilling the spider's poison. The secret recipe is only inherited by the chosen ones, even amongst the Dark Elves. I cannot give it out freely. I shall make you a proposition. If you will find 10 pouches of the Red Spore Dust I shall trade the wine for them. What do you say? Is this acceptable? "I accept the proposal."
[30420-01a.htm] Trader Tyra: You will find the Red Spore Dust within the giant fungus. The giant fungus can be found in the Sea of Spores. If you bring me 10 pouches of the Spore Dust, I shall give you the Malrukian Wine. I wrote this down on the Contract. Here, you sign here... Yes, it's done. May the protection of Shilen be with you.
[30420-02.htm] Trader Tyra: Have you forgetten our Contract? Shall we take a look at the document? 'A bottle of Malrukian Wine shall be traded for 10 pouches of the Red Spore Dust'. There are our signatures, both mine and yours, right there. You will find the Red Spore Dust by killing the giant fungus of the Sea of Spores. I hope you fulfill the Contract soon.
[30420-03.htm] Trader Tyra: You have brought 10 pouches of the Red Spore Dust. I shall give you the Malrukian Wine as promised. Here you go! Enjoy!
[30420-04.htm] Trader Tyra: Did you like the incredible flavor of the Malrukian Wine? Well... Only a Dark Elf can truly appreciate its complex flavor...
[30627-01.htm] Tree: An oak tree which can easily be seen in the northern part of Dion. Dig the root of the tree
[30627-01a.htm] Tree: A wooden box and a rusty key was found.
[30628-01.htm] Strong Wooden Chest: It is a strong wooden chest, locked up tight. Use the rusty key
[30628-01a.htm] Strong Wooden Chest: The box is opened. Twenty Gold Bars are inside.
[30628-02.htm] Strong Wooden Chest: You must insert the correct key in the lock.
[30690-01.htm] Master Luther: Have you come for the Mark of the Searcher? The Mark is reserved for those with proven detection skills. Every year, many Hunters, Scouts, Excavators and even some Assassins come to me in hope of taking the Test of the Searcher, though you seem different from them... Are you sure that you are in the right place? (This quest may only be undertaken by Human Rogue, Elven Scout, Assassin, or Scavenger.)
[30690-02.htm] Master Luther: Have you come for the Mark of the Searcher? This mark is reserved for those who's ability for 'finding hidden things' is recognized. Every year, many Hunters, Scouts, Excavators and even some Assassins come to me in hope of taking the Test of the Searcher, but you do not have enough experience. Come back after you have improved your abilities. (This quest may only be undertaken by a character of level 39 and above.)
[30690-03.htm] Master Luther: Have you come for the Mark of the Searcher? This mark is reserved for those with recognized detection skills. Every year, many Hunters, Scouts, Excavators and even some Assassins come to me in hope of taking the Test of the Searcher. Is this what you seek? Say that you will take the Test of the Searcher
[30690-04.htm] Master Luther: Have you come for the Mark of the Searcher? This mark is reserved for those with recognized detection skills. Every year, many Hunters, Scouts, Excavators and even some Assassins come to me in hope of taking the Test of the Searcher, but a Dwarf like you? Do you happen to be a Bounty Hunter applicant? They are reputed to be the best Hunters among the Dwarves. But even within the Dwarf Guild, such titles are rare... It is said that only those who have proven their hunting skills and acquired the Mark of the Searcher are qualified to be a Bounty Hunter. If you wish to take the examination, I will gladly arrange it for you. Say that you will take the Test of the Searcher
[30690-05.htm] Master Luther: First you must visit Alex in Floran Village. He was once the kingdom's best Scout, and is famous for his activities as King Cadmus' immediate spy and messenger during the war with Gracia. But he grew disillusioned by the royal family and aristocrats at the time of the peasant's uprising and joined the militia corps of Floran. I have heard that they are lacking soldiers and supplies. Go and see him. Alex will test you and write a letter of Recommendation for you if you qualify.
[30690-05a.htm] Master Luther: Visit Alex in Floran Village. Once the best scout in the kingdom, he served as King Cadmus' special messenger and spy during the Grecian War. Disenchanted by the nobility by their actions during the peasant revolt, he now fights alongside the Floran militia. I have heard that he is hard pressed for supplies and manpower, though. Go see him. If he evaluates you and is satisfied, he will let me know. Oh, take this Dimension Diamond. You can trade it to the village gatekeeper for something special that may help you on your journey.
[30690-06.htm] Master Luther: Why are you still here? Alex's militia corps are in dire need of help.. Now go to Floran Village!
[30690-07.htm] Master Luther: How was your visit with Alex? I assume he hasn't given you the letter yet. I would think that he would be in need of your help right now! He must have given you a task...
[30690-08.htm] Master Luther: Ha, I guess Alex grew somewhat attached to you... At the end of the Recommendation letter he joked that he would like me to come up with a reason to send you back to him. I heard that you recovered Ashton's gold from the delu lizardmen! That must have been interesting... So how about it, would you like to go back to see Alex? Ha, just kidding! Here is the Mark of the Searcher. Thank you for the good work you have done!
[30728-01.htm] Militiaman Leirynn: Welcome. Recently a large group of delu lizardmen have gathered, threatening the village. We are badly outnumbered and may have to resort to guerrilla tactics. I realize that this is rather sudden, but could you please find the delu lizardmen's shaman and kill them? There are 10 of them all together.
[30728-02.htm] Militiaman Leirynn: There are some shamans left. You must find all of them and kill them!
[30728-03.htm] Militiaman Leirynn: Thank you so much for your help! One more thing... Apparently the delu lizardmen do not intend to attack the village... They seem to be looking for something... What could be so precious that the whole tribe would be looking for it? I am sure that Delu Chief Kalkis knows something. Could you please go find out what he knows and then kill him? If you follow the path that heads towards the East, you will run into him.
[30728-04.htm] Militiaman Leirynn: Chief Kalkis is the leader of the whole delu tribe. Why would he have brought his whole tribe here to look for something? Find out what they are looking for and kill Chief Kalkis. If you follow the path that heads towards the East, you will run into him.
[30728-05.htm] Militiaman Leirynn: This Map looks somehow familiar but also strange... Seems that it's a nearby area, but its not quite right. I can't make heads or tails of it. Take this Map and report to Captain Alex. You must follow his directions.
[30728-06.htm] Militiaman Leirynn: What are you still doing here? You must take this report to Alex before it is too late. He's waiting for the news. You know, something about that Map really bothers me...
[30728-07.htm] Militiaman Leirynn: I understand that Alex gave you a task. It is very noble for you, an outsider, to help us like this. It is said that you saved our militia from starving... When the time is right, will you join me for dinner?
[30729-01.htm] The drunken fool Boris: Burp. The royal Guards of the Lord? Yeah. They were royal Guards once. The Lord's gold? Of course the stories are true. I heard it all when I was a sentry at the Lord's camp. But I am too thirsty to talk now. The finest Malrukian Wine will do nicely... This wine is only available from the Dark Elves! I heard that the Dark Elf trader named 'Tyra' has a stock of it...
[30729-02.htm] Drunkard Borys: My my...look who's here! Weren't you going to bring me a drink? I hope you brought the Malrukian Wine, the kind that the Dark Elven Trader Tyra sells... If I had a glass of that wine I would probably remember plenty about the gold...
[30729-03.htm] The drunken fool Boris: Ahh... This is it! Outstanding! My tongue is loosed by the fragrant nectar... Obviously the Lord's gold was being transported from Gludin to Dion. The 4 royal Guards carrying the gold schemed to hide it away... The Lord unsuccessfully pursued them. Somehow people got the idea that they perished in an accident.. Actually, one of them, named Rovelt, is still alive. Now he goes by Bodyguard Jax and guards the Dwarf traders. He is probably somewhere in the southern part of the Wastelands now. He will tell you everything if show him this. Take it and go, my young friend.
[30729-04.htm] The drunken fool Boris: Rovelt is now called Bodyguard Jax... He's been hired by the Dwarf traders in the southern part of the Wastelands. Anyway, when you show him the document I gave you he will tell you everything about prince Ashton and the gold.
[30729-05.htm] The drunken fool Boris: Burp...! Haven't you found the gold yet? If you find it you should buy me another drink in gratitude!
[30730-01.htm] Bodyguard Jax: Royal Guards of the Lord? Gold of Prince Ashton? What are you talking about? Are you drunk? Show him the Map of Lambert
[30730-01a.htm] Bodyguard Jax: Where did you find this? I never expected to see this Map again... Ok. I will tell you. Prince intended to hire Soldiers with that gold, The Shark Troop, famous for its inhumanity... Although I didn't owe the villagers anything, I could not allow the innocent people to fall into the shark's mouth. So I instigated my comrades... "Where is the gold?"
[30730-01b.htm] Bodyguard Jax: I buried the gold in Dion's southern forest. We made a map to the place, divided it into 4 pieces, and took 1 piece each. It meant none of us could return there without the others... I first knew the gold was cursed when I heard about the unfortunate deaths of my 3 comrades. So I decided to forget it all and live quietly here. Ask about the dead comrades
[30730-01c.htm] Bodyguard Jax: Solt and I were very close... He died on his way home to Elmoreden. Murdered by thieves called Road Scavengers... Makell was the idealist, he joined the rebel army... In the end, he was caught and executed. His body was hung from a tree as a reminder to others... This tree grew animated, and is now known as the Hangman Tree. Lambert was very much like me, working as a high trader's Guard. He lost his life in battle with a Delu Lizardman. And now you hold the Map! Say you want other pieces
[30730-01d.htm] Bodyguard Jax: My memory is not so good...I will give you my diary instead. If you can find the Maps of Solt and Makell with this, I will give you my portion of the Map. I have quit my job and am trying to come to terms with my past. I have no desire for gold. I just hope that if the gold is found it is used for a good cause...
[30730-02.htm] Bodyguard Jax: You have not found the other portions of the Map yet. Was there something else you wanted to know? Ask about Solt Ask about Makell
[30730-02a.htm] Bodyguard Jax: Solt was murdered on his way home to the Elmoreden Kingdom. He was murdered by thieves called Road Scavengers near the Death Pass. He was my best friend... Such a needless death... Return
[30730-02b.htm] Bodyguard Jax: Makell was incensed by Prince Ashton's tyranny and joined a rebel army of farmers. Eventually he was caught and executed. He was hanged with other rebels. Prince Ashton decreed that his body be hung from a tree as a lesson to others...but the tree itself became animated and is now called Hangman Tree, and roams about the scaffold. Return
[30730-03.htm] Bodyguard Jax: You have found the Maps of Solt and Makell! Now with my portion all 4 pieces are reunited! Let us put them together and hold it close to the candle... These four dots create a cross... Here, the gold is buried in this place! I will mark it on your World Map. No payment is necessary, but I do expect you to use the gold for a good cause as you promised.
[30730-04.htm] Bodyguard Jax: Go now and find the gold! I have heard that there are evil spirits searching for the gold in that area as well. Good luck!
Исходник условий и наград (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.Q00225_TestOfTheSearcher;
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 Q00225_TestOfTheSearcher extends Quest
{
// NPCs
private static final int ALEX = 30291;
private static final int TYRA = 30420;
private static final int TREE = 30627;
private static final int STRONG_WOODEN_CHEST = 30628;
private static final int LUTHER = 30690;
private static final int LEIRYNN = 30728;
private static final int BORYS = 30729;
private static final int JAX = 30730;
// Monsters
private static final int HANGMAN_TREE = 20144;
private static final int ROAD_SCAVENGER = 20551;
private static final int GIANT_FUNGUS = 20555;
private static final int DELU_LIZARDMAN_SHAMAN = 20781;
private static final int DELU_CHIEF_KALKIS = 27093;
private static final int NEER_BODYGUARD = 27092;
// Items
private static final int LUTHER_LETTER = 2784;
private static final int ALEX_WARRANT = 2785;
private static final int LEIRYNN_ORDER_1 = 2786;
private static final int DELU_TOTEM = 2787;
private static final int LEIRYNN_ORDER_2 = 2788;
private static final int CHIEF_KALKI_FANG = 2789;
private static final int LEIRYNN_REPORT = 2790;
private static final int STRANGE_MAP = 2791;
private static final int LAMBERT_MAP = 2792;
private static final int ALEX_LETTER = 2793;
private static final int ALEX_ORDER = 2794;
private static final int WINE_CATALOG = 2795;
private static final int TYRA_CONTRACT = 2796;
private static final int RED_SPORE_DUST = 2797;
private static final int MALRUKIAN_WINE = 2798;
private static final int OLD_ORDER = 2799;
private static final int JAX_DIARY = 2800;
private static final int TORN_MAP_PIECE_1 = 2801;
private static final int TORN_MAP_PIECE_2 = 2802;
private static final int SOLT_MAP = 2803;
private static final int MAKEL_MAP = 2804;
private static final int COMBINED_MAP = 2805;
private static final int RUSTED_KEY = 2806;
private static final int GOLD_BAR = 2807;
private static final int ALEX_RECOMMEND = 2808;
// Rewards
private static final int MARK_OF_SEARCHER = 2809;
private static final int DIMENSIONAL_DIAMOND = 7562;
// Misc
private static Npc _strongWoodenChest; // Used to avoid to spawn multiple instances.
public Q00225_TestOfTheSearcher()
{
super(225, "Test of the Searcher");
registerQuestItems(LUTHER_LETTER, ALEX_WARRANT, LEIRYNN_ORDER_1, DELU_TOTEM, LEIRYNN_ORDER_2, CHIEF_KALKI_FANG, LEIRYNN_REPORT, STRANGE_MAP, LAMBERT_MAP, ALEX_LETTER, ALEX_ORDER, WINE_CATALOG, TYRA_CONTRACT, RED_SPORE_DUST, MALRUKIAN_WINE, OLD_ORDER, JAX_DIARY, TORN_MAP_PIECE_1, TORN_MAP_PIECE_2, SOLT_MAP, MAKEL_MAP, COMBINED_MAP, RUSTED_KEY, GOLD_BAR, ALEX_RECOMMEND);
addStartNpc(LUTHER);
addTalkId(ALEX, TYRA, TREE, STRONG_WOODEN_CHEST, LUTHER, LEIRYNN, BORYS, JAX);
addAttackId(DELU_LIZARDMAN_SHAMAN);
addKillId(HANGMAN_TREE, ROAD_SCAVENGER, GIANT_FUNGUS, DELU_LIZARDMAN_SHAMAN, DELU_CHIEF_KALKIS, NEER_BODYGUARD);
}
@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 "30690-05.htm":
{
st.startQuest();
giveItems(player, LUTHER_LETTER, 1);
if (!player.getVariables().getBoolean("secondClassChange39", false))
{
htmltext = "30690-05a.htm";
giveItems(player, DIMENSIONAL_DIAMOND, DF_REWARD_39.get(player.getPlayerClass().getId()));
player.getVariables().set("secondClassChange39", true);
}
break;
}
case "30291-07.htm":
{
st.setCond(8, true);
takeItems(player, LEIRYNN_REPORT, 1);
takeItems(player, STRANGE_MAP, 1);
giveItems(player, ALEX_LETTER, 1);
giveItems(player, ALEX_ORDER, 1);
giveItems(player, LAMBERT_MAP, 1);
break;
}
case "30420-01a.htm":
{
st.setCond(10, true);
takeItems(player, WINE_CATALOG, 1);
giveItems(player, TYRA_CONTRACT, 1);
break;
}
case "30730-01d.htm":
{
st.setCond(14, true);
takeItems(player, OLD_ORDER, 1);
giveItems(player, JAX_DIARY, 1);
break;
}
case "30627-01a.htm":
{
if (_strongWoodenChest == null)
{
if (st.isCond(16))
{
st.setCond(17, true);
giveItems(player, RUSTED_KEY, 1);
}
_strongWoodenChest = addSpawn(STRONG_WOODEN_CHEST, 10098, 157287, -2406, 0, false, 0);
startQuestTimer("chest_despawn", 300000, null, player, false);
}
break;
}
case "30628-01a.htm":
{
if (!hasQuestItems(player, RUSTED_KEY))
{
htmltext = "30628-02.htm";
}
else
{
st.setCond(18, true);
takeItems(player, RUSTED_KEY, -1);
giveItems(player, GOLD_BAR, 20);
_strongWoodenChest.deleteMe();
_strongWoodenChest = null;
cancelQuestTimer("chest_despawn", null, player);
}
break;
}
case "chest_despawn":
{
_strongWoodenChest.deleteMe();
_strongWoodenChest = 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.ROGUE) && (player.getPlayerClass() != PlayerClass.ELVEN_SCOUT) && (player.getPlayerClass() != PlayerClass.ASSASSIN) && (player.getPlayerClass() != PlayerClass.SCAVENGER))
{
htmltext = "30690-01.htm";
}
else if (player.getLevel() < 39)
{
htmltext = "30690-02.htm";
}
else
{
htmltext = (player.getPlayerClass() == PlayerClass.SCAVENGER) ? "30690-04.htm" : "30690-03.htm";
}
break;
}
case State.STARTED:
{
final int cond = st.getCond();
switch (npc.getId())
{
case LUTHER:
{
if (cond == 1)
{
htmltext = "30690-06.htm";
}
else if ((cond > 1) && (cond < 19))
{
htmltext = "30690-07.htm";
}
else if (cond == 19)
{
htmltext = "30690-08.htm";
takeItems(player, ALEX_RECOMMEND, 1);
giveItems(player, MARK_OF_SEARCHER, 1);
addExpAndSp(player, 37831, 18750);
player.broadcastPacket(new SocialAction(player.getObjectId(), 3));
st.exitQuest(false, true);
}
break;
}
case ALEX:
{
if (cond == 1)
{
htmltext = "30291-01.htm";
st.setCond(2, true);
takeItems(player, LUTHER_LETTER, 1);
giveItems(player, ALEX_WARRANT, 1);
}
else if (cond == 2)
{
htmltext = "30291-02.htm";
}
else if ((cond > 2) && (cond < 7))
{
htmltext = "30291-03.htm";
}
else if (cond == 7)
{
htmltext = "30291-04.htm";
}
else if ((cond > 7) && (cond < 13))
{
htmltext = "30291-08.htm";
}
else if ((cond > 12) && (cond < 16))
{
htmltext = "30291-09.htm";
}
else if ((cond > 15) && (cond < 18))
{
htmltext = "30291-10.htm";
}
else if (cond == 18)
{
htmltext = "30291-11.htm";
st.setCond(19, true);
takeItems(player, ALEX_ORDER, 1);
takeItems(player, COMBINED_MAP, 1);
takeItems(player, GOLD_BAR, -1);
giveItems(player, ALEX_RECOMMEND, 1);
}
else if (cond == 19)
{
htmltext = "30291-12.htm";
}
break;
}
case LEIRYNN:
{
if (cond == 2)
{
htmltext = "30728-01.htm";
st.setCond(3, true);
takeItems(player, ALEX_WARRANT, 1);
giveItems(player, LEIRYNN_ORDER_1, 1);
}
else if (cond == 3)
{
htmltext = "30728-02.htm";
}
else if (cond == 4)
{
htmltext = "30728-03.htm";
st.setCond(5, true);
takeItems(player, DELU_TOTEM, -1);
takeItems(player, LEIRYNN_ORDER_1, 1);
giveItems(player, LEIRYNN_ORDER_2, 1);
}
else if (cond == 5)
{
htmltext = "30728-04.htm";
}
else if (cond == 6)
{
htmltext = "30728-05.htm";
st.setCond(7, true);
takeItems(player, CHIEF_KALKI_FANG, 1);
takeItems(player, LEIRYNN_ORDER_2, 1);
giveItems(player, LEIRYNN_REPORT, 1);
}
else if (cond == 7)
{
htmltext = "30728-06.htm";
}
else if (cond > 7)
{
htmltext = "30728-07.htm";
}
break;
}
case BORYS:
{
if (cond == 8)
{
htmltext = "30729-01.htm";
st.setCond(9, true);
takeItems(player, ALEX_LETTER, 1);
giveItems(player, WINE_CATALOG, 1);
}
else if ((cond > 8) && (cond < 12))
{
htmltext = "30729-02.htm";
}
else if (cond == 12)
{
htmltext = "30729-03.htm";
st.setCond(13, true);
takeItems(player, MALRUKIAN_WINE, 1);
takeItems(player, WINE_CATALOG, 1);
giveItems(player, OLD_ORDER, 1);
}
else if (cond == 13)
{
htmltext = "30729-04.htm";
}
else if (cond > 13)
{
htmltext = "30729-05.htm";
}
break;
}
case TYRA:
{
if (cond == 9)
{
htmltext = "30420-01.htm";
}
else if (cond == 10)
{
htmltext = "30420-02.htm";
}
else if (cond == 11)
{
htmltext = "30420-03.htm";
st.setCond(12, true);
takeItems(player, RED_SPORE_DUST, -1);
takeItems(player, TYRA_CONTRACT, 1);
giveItems(player, MALRUKIAN_WINE, 1);
}
else if (cond > 11)
{
htmltext = "30420-04.htm";
}
break;
}
case JAX:
{
if (cond == 13)
{
htmltext = "30730-01.htm";
}
else if (cond == 14)
{
htmltext = "30730-02.htm";
}
else if (cond == 15)
{
htmltext = "30730-03.htm";
st.setCond(16, true);
takeItems(player, LAMBERT_MAP, 1);
takeItems(player, MAKEL_MAP, 1);
takeItems(player, JAX_DIARY, 1);
takeItems(player, SOLT_MAP, 1);
giveItems(player, COMBINED_MAP, 1);
}
else if (cond > 15)
{
htmltext = "30730-04.htm";
}
break;
}
case TREE:
{
if ((cond == 16) || (cond == 17))
{
htmltext = "30627-01.htm";
}
break;
}
case STRONG_WOODEN_CHEST:
{
if (cond == 17)
{
htmltext = "30628-01.htm";
}
break;
}
}
break;
}
case State.COMPLETED:
{
htmltext = getAlreadyCompletedMsg(player);
break;
}
}
return htmltext;
}
@Override
public void onAttack(Npc npc, Player attacker, int damage, boolean isPet)
{
final QuestState st = getQuestState(attacker, false);
if (st == null)
{
return;
}
if (hasQuestItems(attacker, LEIRYNN_ORDER_1) && !npc.isScriptValue(1))
{
npc.setScriptValue(1);
addSpawn(NEER_BODYGUARD, npc, false, 200000);
}
}
@Override
public void onKill(Npc npc, Player player, boolean isPet)
{
final QuestState st = getQuestState(player, false);
if ((st == null) || !st.isStarted())
{
return;
}
switch (npc.getId())
{
case DELU_LIZARDMAN_SHAMAN:
{
if (st.isCond(3))
{
giveItems(player, DELU_TOTEM, 1);
if (getQuestItemsCount(player, DELU_TOTEM) >= 10)
{
st.setCond(4, true);
}
else
{
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
}
break;
}
case DELU_CHIEF_KALKIS:
{
if (st.isCond(5))
{
st.setCond(6, true);
giveItems(player, CHIEF_KALKI_FANG, 1);
giveItems(player, STRANGE_MAP, 1);
}
break;
}
case GIANT_FUNGUS:
{
if (st.isCond(10))
{
giveItems(player, RED_SPORE_DUST, 1);
if (getQuestItemsCount(player, RED_SPORE_DUST) >= 10)
{
st.setCond(11, true);
}
else
{
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
}
break;
}
case ROAD_SCAVENGER:
{
if (st.isCond(14) && !hasQuestItems(player, SOLT_MAP) && getRandomBoolean())
{
giveItems(player, TORN_MAP_PIECE_1, 1);
if (getQuestItemsCount(player, TORN_MAP_PIECE_1) >= 4)
{
takeItems(player, TORN_MAP_PIECE_1, -1);
giveItems(player, SOLT_MAP, 1);
if (hasQuestItems(player, MAKEL_MAP))
{
st.setCond(15, true);
}
}
else
{
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
}
break;
}
case HANGMAN_TREE:
{
if (st.isCond(14) && !hasQuestItems(player, MAKEL_MAP) && getRandomBoolean())
{
giveItems(player, TORN_MAP_PIECE_2, 1);
if (getQuestItemsCount(player, TORN_MAP_PIECE_2) >= 4)
{
takeItems(player, TORN_MAP_PIECE_2, -1);
giveItems(player, MAKEL_MAP, 1);
if (hasQuestItems(player, SOLT_MAP))
{
st.setCond(15, true);
}
}
else
{
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
}
break;
}
}
}
}