Trial of the Guildsman
- ID
- 216
- Название
- Trial of the Guildsman
- start_npcs_json
- [30103]
- npc_ids_json
- [20079,20080,20083,20154,20155,20156,20168,20200,20201,20202,20267,20268,20269,20270,20271,30103,30210,30283,30298,30688]
- constants_json
- {"VALKON":30103,"NORMAN":30210,"ALTRAN":30283,"PINTER":30298,"DUNING":30688,"ANT":20079,"ANT_CAPTAIN":20080,"GRANITE_GOLEM":20083,"MANDRAGORA_SPROUT":20154,"MANDRAGORA_SAPLING":20155,"MANDRAGORA_BLOSSOM":20156,"SILENOS":20168,"STRAIN":20200,"GHOUL":20201,"DEAD_SEEKER":20202,"BREKA_ORC":20267,"BREKA_ORC_ARCHER":20268,"BREKA_ORC_SHAMAN":20269,"BREKA_ORC_OVERLORD":20270,"BREKA_ORC_WARRIOR":20271,"RECIPE_JOURNEYMAN_RING":3024,"RECIPE_AMBER_BEAD":3025,"VALKON_RECOMMENDATION":3120,"MANDRAGORA_BERRY":3121,"ALTRAN_INSTRUCTIONS":3122,"ALTRAN_RECOMMENDATION_1":3123,"ALTRAN_RECOMMENDATION_2":3124,"NORMAN_INSTRUCTIONS":3125,"NORMAN_RECEIPT":3126,"DUNING_INSTRUCTIONS":3127,"DUNING_KEY":3128,"NORMAN_LIST":3129,"GRAY_BONE_POWDER":3130,"GRANITE_WHETSTONE":3131,"RED_PIGMENT":3132,"BRAIDED_YARN":3133,"JOURNEYMAN_GEM":3134,"PINTER_INSTRUCTIONS":3135,"AMBER_BEAD":3136,"AMBER_LUMP":3137,"JOURNEYMAN_DECO_BEADS":3138,"JOURNEYMAN_RING":3139,"MARK_OF_GUILDSMAN":3119,"DIMENSIONAL_DIAMOND":7562}
- Статус разбора
- metadata_only; dynamic Java conditions/rewards retained in source; unresolved starts: []
- Источник
- game/data/scripts/quests/Q00216_TrialOfTheGuildsman/Q00216_TrialOfTheGuildsman.java
NPC квеста
| ID | Название | Старт квеста | Уровень |
|---|---|---|---|
| 20079 | Ant | Нет | 30 |
| 20080 | Ant Captain | Нет | 31 |
| 20083 | Granite Golem | Нет | 33 |
| 20154 | Mandragora Sprout | Нет | 21 |
| 20155 | Mandragora Sapling | Нет | 23 |
| 20156 | Mandragora Blossom | Нет | 25 |
| 20168 | Silenos | Нет | 30 |
| 20200 | Strain | Нет | 31 |
| 20201 | Ghoul | Нет | 32 |
| 20202 | Dead Seeker | Нет | 34 |
| 20267 | Breka Orc | Нет | 31 |
| 20268 | Breka Orc Archer | Нет | 32 |
| 20269 | Breka Orc Shaman | Нет | 34 |
| 20270 | Breka Orc Overlord | Нет | 35 |
| 20271 | Breka Orc Warrior | Нет | 33 |
| 30103 | Valkon | Да | 70 |
| 30210 | Norman | Нет | 70 |
| 30283 | Altran | Нет | 70 |
| 30298 | Pinter | Нет | 70 |
| 30688 | Duning | Нет | 70 |
Условия уровней: выражения из Java
else if (player.getLevel() < 35) htmltext = (player.getLevel() < 36) ? "30298-01.htm" : "30298-02.htm";
Выдача предметов, адены и опыта: выражения из Java
giveItems(player, VALKON_RECOMMENDATION, 1); giveItems(player, DIMENSIONAL_DIAMOND, DF_REWARD_35.get(player.getPlayerClass().getId())); giveItems(player, MARK_OF_GUILDSMAN, 1); addExpAndSp(player, 80993, 12250); giveItems(player, NORMAN_INSTRUCTIONS, 1); giveItems(player, NORMAN_RECEIPT, 1); giveItems(player, NORMAN_LIST, 1); giveItems(player, ALTRAN_INSTRUCTIONS, 1); giveItems(player, ALTRAN_RECOMMENDATION_1, 1); giveItems(player, ALTRAN_RECOMMENDATION_2, 1); giveItems(player, RECIPE_JOURNEYMAN_RING, 1); giveItems(player, PINTER_INSTRUCTIONS, 1); giveItems(player, RECIPE_AMBER_BEAD, 1); giveItems(player, DUNING_INSTRUCTIONS, 1); giveItems(player, JOURNEYMAN_GEM, 7); giveItems(player, JOURNEYMAN_DECO_BEADS, 7); giveItems(player, MANDRAGORA_BERRY, 1); giveItems(player, DUNING_KEY, 1); giveItems(player, GRAY_BONE_POWDER, 5); giveItems(player, GRANITE_WHETSTONE, 7); giveItems(player, RED_PIGMENT, 7); giveItems(player, BRAIDED_YARN, 10); giveItems(player, AMBER_LUMP, 1);
Квесты содержат динамические условия Java. Выражения выдачи включают промежуточные предметы, варианты и случайные награды; это не гарантированная награда. Константы приведены выше. Полные условия — в исходнике.
Тексты квеста
[30103-01.htm] Warehouse Keeper Valkon: I have been in charge of the promotion test of the Dwarf union members for the last 10 years. Among all Dwarf apprentices, only those who pass this test are accepted as full members of Dwarven society. This may not be clear to you since you are not a Dwarf, but within our society there is a complex hierarchy and ranking system. (Quest for Scavengers or Artisans, level 35 and above.)
[30103-02.htm] Warehouse Keeper Valkon: How long will you be an apprentice? Don't you have any ambition? I hope you are not under the impression that you have reached a comfortable level. Shouldn't you work harder and challenge the Trial of the Guildsman? You won't be a true member of Dwarven society until you pass that test. If you are really satisfied being a nobody for the rest of your life, I won't mention it again. (Quest for Scavengers or Artisans, level 35 and above.)
[30103-03.htm] Warehouse Keeper Valkon: How long will you be an apprentice? Don't you have any ambition? I hope you are not under the impression that you have reached a comfortable level. Now listen to me carefully. I shall tell you about Dwarven education. Hear about Dwarven Education
[30103-04.htm] Warehouse Keeper Valkon: Dwarven apprentices will work in the Strip Mine to strengthen their bodies and spirits, as well as learning to protect their own bodies. When they complete basic training they return to the Dwarven Village and accumulate experience while assisting the Elders of the guilds with chores. After they pass the exam given by the guild, and are awarded the title of Scavenger or Artisan, they are no longer considered apprentices. But even that is not enough to become an official guild member. Only when they pass the Trial of the Guildsman will they be accepted as a true guild member. This test is essential if you intend to learn the techniques of a high-level guild member and aspire to the profession of Bounty Hunter or Warsmith. "I will take the Test of the Guildsman."
[30103-05.htm] Warehouse Keeper Valkon: First you must pay the registration fee. The amount will be 2,000 adenas. All fees received are used to support the technical development of the guild and sponsoring Artisans. Pay the registration fee
[30103-05a.htm] Warehouse Keeper Valkon: How embarassing for you! You should have known to bring some money with you... Come back when you get 2,000 adenas.
[30103-06.htm] Warehouse Keeper Valkon: Good! You must first take this badge. It is a mark that lets others know that you are in the midst of taking the Trial of the Guildsman. Many Blacksmiths and Warehouse Chiefs will help you when they see your badge. The content of the test is quite simple. It consists of making seven Journeyman Rings. It may sound simple but the process of making the ring itself will challenge your ability and wit. Why seven rings? Actually... You shall offer one to the yet-to-come King of the Dwarves, and the rest to the six Elders of the guilds. It is a long held tradition that has been kept since the founding of the kingdom and the forming of the guilds. If you wish to learn to make the rings, go and see Blacksmith Altran of Talking Island. Take him this letter. Don't worry, I expect nothing in return. When you complete the seven rings come and see me again. Good luck! Do you have any more advice for me?
[30103-06a.htm] Warehouse Keeper Valkon: Hints? You want to learn the short way through even before trying to solve it out by patiently working hard... Tsk tsk... A young Dwarf shouldn't be like that! "Please give me some hints."
[30103-06b.htm] Warehouse Keeper Valkon: Hmm... What nerves you've got. Hints... Well, yes I just came across one. I heard that Altran used to be a kind man, but perhaps because of his aging, he seems to be a bit fastidious these days. Some say that it is because of the arthritis... Whatever the reason may be, he grumbles a great deal these days... Perhaps he may be pleased to receive a Mandragora Berry which they say it is helpful to arthritis. "Where can I find a Mandragora Berry?"
[30103-06c.htm] Warehouse Keeper Valkon: Must everything be spelled out for you? Some things you must discover on your own!
[30103-06d.htm] Warehouse Keeper Valkon: Very well! First, take this insignia, which signifies that you are performing the Trial of the Guildsman. Many blacksmiths and senior warehouse keepers will assist you when they see it. The trial itself is very straightforward. You must make 7 Journeyman Rings. Don't be fooled by the apparent simplicity, however. The process of making the rings themselves is a critical test of a Dwarf's skill and wit. Why 7 rings, you ask? Well, it's a tradition reaching back to the beginning of the Kingdom and the formation of the guilds themselves. Six of the rings go to the elders of the 6 guilds, while the last is reserved for the King who will return. To obtain the ring design blueprint, visit Blacksmith Altran on Talking Island. I will write a letter of introduction for you, free of charge. When you finish creating all 7 rings, return here. Take this Dimension Diamond. You can trade it for something special from the village gatekeeper. I hope it will help you on your journey. What are youn waiting for? Ask if he has any more hints to give you.
[30103-07.htm] Warehouse Keeper Valkon: It is said that Altran was once a kind man, but perhaps due to his age he has become much more irritable these days. They say that his arthritis is making him a crooked old man... "Do you know of a good remedy for arthritis?"
[30103-07a.htm] Warehouse Keeper Valkon: Some say that the Mandragora Berry is helpful for the pain of arthritis... Yes, this would be an excellent gift to give him. "Where can I find a Mandragora Berry?"
[30103-07b.htm] Warehouse Keeper Valkon: Hey, you! Do I have to tell you everything?! You can do such things for yourself! "Please give me some hints."
[30103-07c.htm] Warehouse Keeper Valkon: Now let's see... Think about it! Where would be the best place to find a mandragora in the whole continent? There is a place in Dion called the Mandragora Farm.
[30103-08.htm] Warehouse Keeper Valkon: How is your work proceeding, young fellow? How is the making of the 7 Journeyman Gem going? You should complete it soon so you can advance beyond an apprentice. Good luck!
[30103-09.htm] Warehouse Keeper Valkon: You have made all the rings. Thank you for your trouble. So, did you learn anything from the test? "I learned the mind attitude and virtues that one should possess as a faithful union member." "I learned how to fawn upon the authorities of the guild and ways to bribe them."
[30103-09a.htm] Warehouse Keeper Valkon: Yes, yes, yes! Superb! You will make an excellent addition to our guild, and I perceive a bright future in store for you. Congratulations! You have successfully passed the Trial of the Guildsman, and I now award you the Mark of Guildsman. It will aid you when transfering to a higher class. Good luck!
[30103-09b.htm] Warehouse Keeper Valkon: Hmmph. With talk like that, you won't last very long or rise very high here, my friend. My advice is to learn to fake sincerity, and everything else will be easy. Understood? In any case, congratulations are in order. You have successfully passed the Trial of the Guildsman, and I now award you the Mark of Guildsman. It will aid you when transfering to a higher class. Good luck!
[30210-01.htm] Warehouse Keeper Norman: I have no idea what Altran told you, but I am too busy these days to keep you company. "Please help me."
[30210-02.htm] Warehouse Keeper Norman: Ah, I am sorry... I told you, I am too busy! "Is there anything I can help you with?"
[30210-03.htm] Warehouse Keeper Norman: Hmm? So you are willing to assist with my work? I would really appreciate that... But it could be quite difficult... is that all right with you? "My pleasure."
[30210-04.htm] Warehouse Keeper Norman: Well, if you say so... At the moment I have something you can help me with. I am having many difficulties these days because of the gangs nearby town. Especially the Ol Mahum thieves, called Cat's Eye... I wonder why the guards won't protect us from them... Anyway, I am thinking of changing all the locks of the warehouse... The locks which I have ordered have already arrived, but the keys aren't here yet. I ordered them from Duning of Hunters Village. Will you go and fetch the keys for me? Here, this is the receipt.
[30210-05.htm] Warehouse Keeper Norman: Please visit Blacksmith Duning of Hunters Village and fetch the keys that I have ordered. Please hurry.
[30210-06.htm] Warehouse Keeper Norman: What? He lost the keys? How does that idiot expect me to use the locks without keys? I intend to report this to the Guild Association right away! Go back to Duning of Hunters Village and find out more about the lost keys. Let's see what his excuse is!
[30210-07.htm] Warehouse Keeper Norman: Thank you for your trouble. Now we will have to start changing the locks. I guess it will take quite a while to take care of 30 lockers each... Today will be another busy day. Now! Shall we get started! "Did you forget anything?"
[30210-08.htm] Warehouse Keeper Norman: Hmm? What, you haven't gone yet? Is there anything I can help you with...? "You promised that you would help me..."
[30210-09.htm] Warehouse Keeper Norman: Oh yes! That's right. You said that you were in the middle of taking a test to be a union member? A Journeyman Gem is not something you can get from somewhere, you have to make it yourself. But the skills of making it is not something that can be taught in a short time... I shall make one for you instead of teaching you the skills. First you must find me the materials needed to make the jewel. Any objection to going and finding the materials for yourself? You didn't expect such and old man like me to run around and collect the materials, did you? "I shall bring the materials."
[30210-10.htm] Warehouse Keeper Norman: Yes, that's a good boy. Now I shall give you the list of materials that you must find. First, we need some Gray Bone Powder to use as an abrasive. You can get it from undead monsters such as ghouls or strains. You will find plenty in the Execution Ground of Dion. I also need a Granite Whetstone, which is for polishing the surface of the jewel... You must find pieces of the granite golems that can be found in the Execution Ground or in the Wasteland! Other things that we need are the Red Pigment, which you can get from the dead seeker bat on the Execution Ground. Last, we need some Braided Yarn, which you can get by hunting the silenos in the Plains of Dion... Can you remember everything? I will need 70 each of all the above things. You need 7 Journeyman Gems, right? It will take 10 materials each per 1 jewel. Good luck then!
[30210-11.htm] Warehouse Keeper Norman: Hey, you! These are not enough materials! It can't be... You didn't forget what materials I requested, did you? Ask about the materials
[30210-11a.htm] Warehouse Keeper Norman: First, we need some Gray Bone Powder to use as an abrasive. You can get it from undead monsters such as ghouls or strains. You will find plenty in the Execution Ground of Dion. I also need a Granite Whetstone, which is for polishing the surface of the jewel... You must find pieces of the granite golems that can be found in the Execution Ground or in the Wasteland!! Other things that we need are the Red Pigment, which you can get from the dead seeker bat on the Execution Ground. Last, we need some Braided Yarn, which you can get by hunting the silenos in the Plains of Dion... Can you remember everything? I will need 70 each of all the above things. You need 7 Journeyman Gems, right? It will take 10 materials each per 1 jewel... Did you memorize everything? Don't forget it this time.
[30210-12.htm] Warehouse Keeper Norman: I don't know what that document refers to, but please remember that it has been kept safe by our Steel Gate Guild for over 200 years. To us, credibility is the greatest virtue!
[30283-01.htm] Blacksmith Altran: Oh my aching bones, the rains must be coming. It is so hard to work in such pain! Leave me alone now, punk! I wish Valkon would stop sending such worthless children to me! Get lost!
[30283-02.htm] Blacksmith Altran: Sniff, sniff...! Smells good?! Hey, aren't those mandragora berries! Thank you! Thank you very much!!!. I feel light just by smelling them! Ah, yes! Valkon sent you? You're taking the Trial of the Guildsman, right? "Teach me how to make a ring."
[30283-03.htm] Blacksmith Altran: Back in the old days I had to memorize hundreds of formulas. Now they all have recipes! What will they think of next? OK, here is the recipe for making a Journeyman Ring. Let me see... [Production of Journeyman Ring] [Materials] 1 Journeyman Gem, 1 Journeyman Deco Bead, 1 Steel, 10 Varnish, 10 Grade D Crystals [Result] 1 Journeyman Ring Steel and Varnish are commonly used and easily found. Journeyman Gems and Journeyman Deco Beads are harder to find, however. Ask about Journeyman Gem Ask about Journeyman Deco Beads
[30283-03a.htm] Blacksmith Altran: I don't have time to explain all of this to you. Go to Warehouse Keeper Norman of Gludin. He will explain it all. Return
[30283-03b.htm] Blacksmith Altran: Journeyman Deco Beads... Don't bother me with such trivial matters. It is better to ask Blacksmith Pinter of Gludio Castle Town. He will tell you more. Return
[30283-04.htm] Blacksmith Altran: What do you want now? Spit it out!! Ask about Journeyman Gem Ask about Journeyman Deco Beads
[30298-01.htm] Blacksmith Pinter: This isn't a place for children. Find me when you gain more experience. Then I will help you to pass the Trial of Guildsman.
[30298-02.htm] Blacksmith Pinter: Trial of the Guildsman? Deco beads? Hey, everyone has problems, I've got mine, too! I am swamped with too much work! 30 Mithril Breastplates and 30 Bastard Swords! The dogs of war are howling! How can I possibly finish all of this? Help him
[30298-03.htm] Blacksmith Pinter: Stop whining! You sound like a spoiled child! You say you need a Journeyman Deco Bead? To make that we need Amber Beads. I don't have any of these. I must cast a spell on Elmore's side... It will take a few weeks.. "I'll find it by myself."
[30298-04.htm] Blacksmith Pinter: You think you can get the Amber Beads by yourself...? Oho! Indeed you are a Scavenger! I can tell you where to look. There are giant ants living in the Wastelands, in the southern part of Gludio. They mine the Amber Beads, which are plentiful there. To get the beads you must kill the work ants not the ant soldiers, understand? You will be able to collect faster by casting Spoil. We will need about 20 beads to make Journeyman Deco Beads. However I can also use them in my work, I would be very grateful if you brought back 70. I will give your order top priority. Quite a deal, huh?
[30298-05.htm] Blacksmith Pinter: You think you can get the Amber Beads by yourself? Oho! You are not even a Scavenger! Oh, well, if you want to try I can tell you where to find them. There are giant ants living in the Wastelands, in the southern part of Gludio. They mine the Amber Beads which are plentiful in that place. To get the beads you must kill the work ants instead of ant soldiers, got it? We need about 20 beads to make Journeyman Decoration Beads. However, I also use them in my work, it would be nice if you brought back 70. I will give your order top priority. So how about it, a good deal, no? Oh yes! And take this recipe. It will help you. Ask about the recipe.
[30298-05a.htm] Blacksmith Pinter: You will find Amber Lump after killing the worker ants. If you grind the Amber Lump as in this recipe, you can make 5 Amber Beads. Good luck!
[30298-06.htm] Blacksmith Pinter: How many beads have you collected? That is not enough! Are you sure that you are looking in the Wastelands? Hurry and collect 70 Amber Beads. I will see to the preparations for making the decoration bead. Hurry back with the beads!
[30298-07.htm] Blacksmith Pinter: Good job! Aren't they beautiful! First separate 50 of them...! Now, shall I start? I will drill these and make splendid Journeyman Decoration Beads. OK, all done! Here are your beads. Good luck!
[30298-08.htm] Blacksmith Pinter: Good luck on the Trial of Guild, my friend! Could I bother you for a drink if you are passing by? I will pay if you can't, ha ha. I have much work to do, and little time to do it.
[30688-01.htm] Blacksmith Duning: Oh, yes, I made those keys. Would you like to know the secrets to making a key? Spirit, patience, nature, and passion. Harmony between the key and the lock is important, too. Inner and outer harmony are equally important. "Get to the point."
[30688-02.htm] Blacksmith Duning: We're both Dwarves, we should stick together, right? You mustn't repeat what I am about to tell you. I have lost all of my 30 keys to the Breka Orc beggars. If word got out about this my reputation with the guild would be destroyed! Please my young friend, could you help me this once? Please find the keys for me, it doesn't matter what condition they are in! Can I count on you? Breka Orcs can be found at Breka's Stronghold. You can, of course, find Breka orcs in Breka's Stronghold.
[30688-03.htm] Blacksmith Duning: Please get my 30 keys back from the Breka Orcs located in Breka's Stronghold. My reputation with the guild is at stake. I would really appreciate the help. You are currently undergoing the Trial of the Guildsman, right? Then I'm sure you understand my position.
[30688-04.htm] Blacksmith Duning: Oh thank you so much my young friend. My reputation with the guild is secured. I'm afraid they would have kicked me out for that blunder. I owe you one, friend. Please take these keys to Warehouse Keeper Norman.
[30688-05.htm] Blacksmith Duning: You are still here? Thank you again for finding my keys, you helped me more than you know. I will pay you back someday.
Исходник условий и наград (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.Q00216_TrialOfTheGuildsman;
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 Q00216_TrialOfTheGuildsman extends Quest
{
// NPCs
private static final int VALKON = 30103;
private static final int NORMAN = 30210;
private static final int ALTRAN = 30283;
private static final int PINTER = 30298;
private static final int DUNING = 30688;
// Monsters
private static final int ANT = 20079;
private static final int ANT_CAPTAIN = 20080;
private static final int GRANITE_GOLEM = 20083;
private static final int MANDRAGORA_SPROUT = 20154;
private static final int MANDRAGORA_SAPLING = 20155;
private static final int MANDRAGORA_BLOSSOM = 20156;
private static final int SILENOS = 20168;
private static final int STRAIN = 20200;
private static final int GHOUL = 20201;
private static final int DEAD_SEEKER = 20202;
private static final int BREKA_ORC = 20267;
private static final int BREKA_ORC_ARCHER = 20268;
private static final int BREKA_ORC_SHAMAN = 20269;
private static final int BREKA_ORC_OVERLORD = 20270;
private static final int BREKA_ORC_WARRIOR = 20271;
// Items
private static final int RECIPE_JOURNEYMAN_RING = 3024;
private static final int RECIPE_AMBER_BEAD = 3025;
private static final int VALKON_RECOMMENDATION = 3120;
private static final int MANDRAGORA_BERRY = 3121;
private static final int ALTRAN_INSTRUCTIONS = 3122;
private static final int ALTRAN_RECOMMENDATION_1 = 3123;
private static final int ALTRAN_RECOMMENDATION_2 = 3124;
private static final int NORMAN_INSTRUCTIONS = 3125;
private static final int NORMAN_RECEIPT = 3126;
private static final int DUNING_INSTRUCTIONS = 3127;
private static final int DUNING_KEY = 3128;
private static final int NORMAN_LIST = 3129;
private static final int GRAY_BONE_POWDER = 3130;
private static final int GRANITE_WHETSTONE = 3131;
private static final int RED_PIGMENT = 3132;
private static final int BRAIDED_YARN = 3133;
private static final int JOURNEYMAN_GEM = 3134;
private static final int PINTER_INSTRUCTIONS = 3135;
private static final int AMBER_BEAD = 3136;
private static final int AMBER_LUMP = 3137;
private static final int JOURNEYMAN_DECO_BEADS = 3138;
private static final int JOURNEYMAN_RING = 3139;
// Rewards
private static final int MARK_OF_GUILDSMAN = 3119;
private static final int DIMENSIONAL_DIAMOND = 7562;
public Q00216_TrialOfTheGuildsman()
{
super(216, "Trial of the Guildsman");
registerQuestItems(RECIPE_JOURNEYMAN_RING, RECIPE_AMBER_BEAD, VALKON_RECOMMENDATION, MANDRAGORA_BERRY, ALTRAN_INSTRUCTIONS, ALTRAN_RECOMMENDATION_1, ALTRAN_RECOMMENDATION_2, NORMAN_INSTRUCTIONS, NORMAN_RECEIPT, DUNING_INSTRUCTIONS, DUNING_KEY, NORMAN_LIST, GRAY_BONE_POWDER, GRANITE_WHETSTONE, RED_PIGMENT, BRAIDED_YARN, JOURNEYMAN_GEM, PINTER_INSTRUCTIONS, AMBER_BEAD, AMBER_LUMP, JOURNEYMAN_DECO_BEADS, JOURNEYMAN_RING);
addStartNpc(VALKON);
addTalkId(VALKON, NORMAN, ALTRAN, PINTER, DUNING);
addKillId(ANT, ANT_CAPTAIN, GRANITE_GOLEM, MANDRAGORA_SPROUT, MANDRAGORA_SAPLING, MANDRAGORA_BLOSSOM, SILENOS, STRAIN, GHOUL, DEAD_SEEKER, BREKA_ORC, BREKA_ORC_ARCHER, BREKA_ORC_SHAMAN, BREKA_ORC_OVERLORD, BREKA_ORC_WARRIOR);
}
@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 "30103-06.htm":
{
if (getQuestItemsCount(player, 57) >= 2000)
{
st.startQuest();
takeItems(player, 57, 2000);
giveItems(player, VALKON_RECOMMENDATION, 1);
if (!player.getVariables().getBoolean("secondClassChange35", false))
{
htmltext = "30103-06d.htm";
giveItems(player, DIMENSIONAL_DIAMOND, DF_REWARD_35.get(player.getPlayerClass().getId()));
player.getVariables().set("secondClassChange35", true);
}
}
else
{
htmltext = "30103-05a.htm";
}
break;
}
case "30103-06c.htm":
case "30103-07c.htm":
{
if (st.getCond() < 3)
{
st.setCond(3, true);
}
break;
}
case "30103-09a.htm":
case "30103-09b.htm":
{
takeItems(player, ALTRAN_INSTRUCTIONS, 1);
takeItems(player, JOURNEYMAN_RING, -1);
giveItems(player, MARK_OF_GUILDSMAN, 1);
addExpAndSp(player, 80993, 12250);
player.broadcastPacket(new SocialAction(player.getObjectId(), 3));
st.exitQuest(false, true);
break;
}
case "30210-04.htm":
{
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
takeItems(player, ALTRAN_RECOMMENDATION_1, 1);
giveItems(player, NORMAN_INSTRUCTIONS, 1);
giveItems(player, NORMAN_RECEIPT, 1);
break;
}
case "30210-10.htm":
{
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
giveItems(player, NORMAN_LIST, 1);
break;
}
case "30283-03.htm":
{
st.setCond(5, true);
takeItems(player, MANDRAGORA_BERRY, 1);
takeItems(player, VALKON_RECOMMENDATION, 1);
giveItems(player, ALTRAN_INSTRUCTIONS, 1);
giveItems(player, ALTRAN_RECOMMENDATION_1, 1);
giveItems(player, ALTRAN_RECOMMENDATION_2, 1);
giveItems(player, RECIPE_JOURNEYMAN_RING, 1);
break;
}
case "30298-04.htm":
{
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
takeItems(player, ALTRAN_RECOMMENDATION_2, 1);
giveItems(player, PINTER_INSTRUCTIONS, 1);
// Artisan receives a recipe to craft Amber Beads, while spoiler case is handled in onKill section.
if (player.getPlayerClass() == PlayerClass.ARTISAN)
{
htmltext = "30298-05.htm";
giveItems(player, RECIPE_AMBER_BEAD, 1);
}
break;
}
case "30688-02.htm":
{
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
takeItems(player, NORMAN_RECEIPT, 1);
giveItems(player, DUNING_INSTRUCTIONS, 1);
break;
}
}
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.SCAVENGER) && (player.getPlayerClass() != PlayerClass.ARTISAN))
{
htmltext = "30103-01.htm";
}
else if (player.getLevel() < 35)
{
htmltext = "30103-02.htm";
}
else
{
htmltext = "30103-03.htm";
}
break;
}
case State.STARTED:
{
final int cond = st.getCond();
switch (npc.getId())
{
case VALKON:
{
if (cond == 1)
{
htmltext = "30103-06c.htm";
}
else if (cond < 5)
{
htmltext = "30103-07.htm";
}
else if (cond == 5)
{
htmltext = "30103-08.htm";
}
else if (cond == 6)
{
htmltext = (getQuestItemsCount(player, JOURNEYMAN_RING) == 7) ? "30103-09.htm" : "30103-08.htm";
}
break;
}
case ALTRAN:
{
if (cond < 4)
{
htmltext = "30283-01.htm";
if (cond == 1)
{
st.setCond(2, true);
}
}
else if (cond == 4)
{
htmltext = "30283-02.htm";
}
else if (cond > 4)
{
htmltext = "30283-04.htm";
}
break;
}
case NORMAN:
{
if (cond == 5)
{
if (hasQuestItems(player, ALTRAN_RECOMMENDATION_1))
{
htmltext = "30210-01.htm";
}
else if (hasQuestItems(player, NORMAN_RECEIPT))
{
htmltext = "30210-05.htm";
}
else if (hasQuestItems(player, DUNING_INSTRUCTIONS))
{
htmltext = "30210-06.htm";
}
else if (getQuestItemsCount(player, DUNING_KEY) == 30)
{
htmltext = "30210-07.htm";
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
takeItems(player, DUNING_KEY, -1);
}
else if (hasQuestItems(player, NORMAN_LIST))
{
if ((getQuestItemsCount(player, GRAY_BONE_POWDER) == 70) && (getQuestItemsCount(player, GRANITE_WHETSTONE) == 70) && (getQuestItemsCount(player, RED_PIGMENT) == 70) && (getQuestItemsCount(player, BRAIDED_YARN) == 70))
{
htmltext = "30210-12.htm";
takeItems(player, NORMAN_INSTRUCTIONS, 1);
takeItems(player, NORMAN_LIST, 1);
takeItems(player, BRAIDED_YARN, -1);
takeItems(player, GRANITE_WHETSTONE, -1);
takeItems(player, GRAY_BONE_POWDER, -1);
takeItems(player, RED_PIGMENT, -1);
giveItems(player, JOURNEYMAN_GEM, 7);
if (getQuestItemsCount(player, JOURNEYMAN_DECO_BEADS) == 7)
{
st.setCond(6, true);
}
else
{
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
}
else
{
htmltext = "30210-11.htm";
}
}
}
break;
}
case DUNING:
{
if (cond == 5)
{
if (hasQuestItems(player, NORMAN_RECEIPT))
{
htmltext = "30688-01.htm";
}
else if (hasQuestItems(player, DUNING_INSTRUCTIONS))
{
if (getQuestItemsCount(player, DUNING_KEY) < 30)
{
htmltext = "30688-03.htm";
}
else
{
htmltext = "30688-04.htm";
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
takeItems(player, DUNING_INSTRUCTIONS, 1);
}
}
else
{
htmltext = "30688-05.htm";
}
}
break;
}
case PINTER:
{
if (cond == 5)
{
if (hasQuestItems(player, ALTRAN_RECOMMENDATION_2))
{
htmltext = (player.getLevel() < 36) ? "30298-01.htm" : "30298-02.htm";
}
else if (hasQuestItems(player, PINTER_INSTRUCTIONS))
{
if (getQuestItemsCount(player, AMBER_BEAD) < 70)
{
htmltext = "30298-06.htm";
}
else
{
htmltext = "30298-07.htm";
takeItems(player, AMBER_BEAD, -1);
takeItems(player, PINTER_INSTRUCTIONS, 1);
giveItems(player, JOURNEYMAN_DECO_BEADS, 7);
if (getQuestItemsCount(player, JOURNEYMAN_GEM) == 7)
{
st.setCond(6, true);
}
else
{
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
}
}
}
else if (hasQuestItems(player, JOURNEYMAN_DECO_BEADS))
{
htmltext = "30298-08.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;
}
switch (npc.getId())
{
case MANDRAGORA_SPROUT:
case MANDRAGORA_SAPLING:
case MANDRAGORA_BLOSSOM:
{
if (st.isCond(3))
{
giveItems(player, MANDRAGORA_BERRY, 1);
st.setCond(4, true);
}
break;
}
case BREKA_ORC:
case BREKA_ORC_ARCHER:
case BREKA_ORC_WARRIOR:
case BREKA_ORC_OVERLORD:
case BREKA_ORC_SHAMAN:
{
if (hasQuestItems(player, DUNING_INSTRUCTIONS) && (getQuestItemsCount(player, DUNING_KEY) < 30))
{
giveItems(player, DUNING_KEY, 1);
playSound(player, QuestSound.ITEMSOUND_QUEST_MIDDLE);
}
break;
}
case GHOUL:
case STRAIN:
{
if (hasQuestItems(player, NORMAN_LIST) && (getQuestItemsCount(player, GRAY_BONE_POWDER) < 70))
{
giveItems(player, GRAY_BONE_POWDER, 5);
playSound(player, QuestSound.ITEMSOUND_QUEST_MIDDLE);
}
break;
}
case GRANITE_GOLEM:
{
if (hasQuestItems(player, NORMAN_LIST) && (getQuestItemsCount(player, GRANITE_WHETSTONE) < 70))
{
giveItems(player, GRANITE_WHETSTONE, 7);
playSound(player, QuestSound.ITEMSOUND_QUEST_MIDDLE);
}
break;
}
case DEAD_SEEKER:
{
if (hasQuestItems(player, NORMAN_LIST) && (getQuestItemsCount(player, RED_PIGMENT) < 70))
{
giveItems(player, RED_PIGMENT, 7);
playSound(player, QuestSound.ITEMSOUND_QUEST_MIDDLE);
}
break;
}
case SILENOS:
{
if (hasQuestItems(player, NORMAN_LIST) && (getQuestItemsCount(player, BRAIDED_YARN) < 70))
{
giveItems(player, BRAIDED_YARN, 10);
playSound(player, QuestSound.ITEMSOUND_QUEST_MIDDLE);
}
break;
}
case ANT:
case ANT_CAPTAIN:
{
int count = 0;
if ((player.getPlayerClass() == PlayerClass.SCAVENGER) && npc.isSweepActive() && (npc.asAttackable().getSpoilerObjectId() == player.getObjectId()))
{
count += 5;
}
if (getRandomBoolean() && (player.getPlayerClass() == PlayerClass.ARTISAN))
{
giveItems(player, AMBER_LUMP, 1);
playSound(player, QuestSound.ITEMSOUND_QUEST_MIDDLE);
}
if ((getQuestItemsCount(player, AMBER_BEAD) + count) < 70)
{
count += 5;
}
if (count > 0)
{
giveItemRandomly(player, npc, AMBER_BEAD, count, 70, 1, true);
}
break;
}
}
}
}