ZURSULUS L2

Pursuit of Clan Ambition!

ID
503
Название
Pursuit of Clan Ambition!
start_npcs_json
[30760]
npc_ids_json
[20137,20243,20282,20285,20654,20656,20668,27178,27179,27180,27181,30512,30645,30758,30759,30760,30761,30762,30763,30764,30765,30766,30868]
constants_json
{"MARTIEN":30645,"ATHREA":30758,"KALIS":30759,"SIR_GUSTAV_ATHEBALDT":30760,"CORPSE_OF_FRITZ":30761,"CORPSE_OF_LUTZ":30762,"CORPSE_OF_KURTZ":30763,"KUSTO":30512,"BALTHAZAR":30764,"SIR_ERIC_RODEMAI":30868,"IMPERIAL_COFFER":30765,"CLEO":30766,"THUNDER_WYRM":20243,"THUNDER_WYRM_HOLD":20282,"DRAKE":20137,"DRAKE_HOLD":20285,"BLITZ_WYRM":27178,"LESSER_GIANT_SOLDIER":20654,"LESSER_GIANT_SCOUT":20656,"GRAVE_GUARD":20668,"GRAVE_KEYMASTER":27179,"IMPERIAL_SLAVE":27180,"IMPERIAL_GRAVEKEEPER":27181,"TELEPORT_1_X":179520,"TELEPORT_1_Y":6464,"TELEPORT_2_X":171104,"TELEPORT_2_Y":6496,"DARK_HEAL_SKILL":4080,"GUSTAVS_1ST_LETTER":3866,"MIST_DRAKE_EGG":3839,"BLITZ_WYRM_EGG":3840,"DRAKE_EGG":3841,"THUNDER_WYRM_EGG":3842,"BROOCH_OF_THE_MAGPIE":3843,"BLACK_ANVIL_COIN":3871,"GUSTAVS_2ND_LETTER":3867,"RECIPE_TITANS_POWERSTONE":3838,"NEBULITE_CRYSTALS":3844,"BROKEN_TITANS_POWERSTONE":3845,"TITANS_POWERSTONE":3846,"GUSTAVS_3RD_LETTER":3868,"SCEPTER_OF_JUDGMENT":3869,"IMPERIAL_KEY":3847,"SEAL_OF_ASPIRATION":3870}
Статус разбора
metadata_only; dynamic Java conditions/rewards retained in source; unresolved starts: []
Источник
game/data/scripts/quests/Q00503_PursuitOfClanAmbition/Q00503_PursuitOfClanAmbition.java

NPC квеста

IDНазваниеСтарт квестаУровень
20137DrakeНет57
20243Thunder WyrmНет54
20282Thunder WyrmНет54
20285DrakeНет57
20654Lesser Giant SoldierНет62
20656Lesser Giant ScoutНет63
20668Grave GuardНет54
27178Blitz WyrmНет60
27179Grave KeymasterНет65
27180Imperial SlaveНет56
27181Imperial GravekeeperНет60
30512KustoНет70
30645MartienНет70
30758AthreaНет70
30759KalisНет70
30760Sir Gustav AthebaldtДа70
30761Corpse Of FritzНет70
30762Corpse Of LutzНет70
30763Corpse Of KurtzНет70
30764BalthazarНет70
30765Imperial CofferНет70
30766CleoНет70
30868Sir Eric RodemaiНет70

Условия уровней: выражения из Java

else if (player.getClan().getLevel() != 4)

Выдача предметов, адены и опыта: выражения из Java

giveItems(player, GUSTAVS_1ST_LETTER, 1);
giveItems(player, GUSTAVS_2ND_LETTER, 1);
giveItems(player, GUSTAVS_3RD_LETTER, 1);
giveItems(player, SEAL_OF_ASPIRATION, 1);
addExpAndSp(player, 0, 250000);
giveItems(player, SEAL_OF_ASPIRATION, 1);
addExpAndSp(player, 0, 250000);
giveItems(player, MIST_DRAKE_EGG, 6);
giveItems(player, BROOCH_OF_THE_MAGPIE, 1);
giveItems(player, MIST_DRAKE_EGG, 4);
giveItems(player, BLITZ_WYRM_EGG, 3);
giveItems(player, BLITZ_WYRM_EGG, 3);
giveItems(player, BLACK_ANVIL_COIN, 1);
giveItems(player, RECIPE_TITANS_POWERSTONE, 1);
giveItems(player, SCEPTER_OF_JUDGMENT, 1);
giveItems(clanLeader, IMPERIAL_KEY, 1);
giveItems(clanLeader, TITANS_POWERSTONE, 1);
giveItems(clanLeader, NEBULITE_CRYSTALS, 1);
giveItems(clanLeader, BROKEN_TITANS_POWERSTONE, 1);

Квесты содержат динамические условия Java. Выражения выдачи включают промежуточные предметы, варианты и случайные награды; это не гарантированная награда. Константы приведены выше. Полные условия — в исходнике.

Тексты квеста

[30512-01.htm] Head Blacksmith Kusto: Greetings! Your reputation precedes you. Your clan is quite powerful, eh? And you are headed to Dragon Valley...? I've got a favor to ask you. Could you possibly try to find my younger brother? He is a bounty hunter who has fallen in with a bad crowd known as the Magpie Brothers. It is said that they are searching for something in Dragon Valley at the behest of some Human royalty... Something is not right about this... [30512-01a.htm] Head Blacksmith Kusto: I have heard many impressive tales of your clan... I would be greatly honored to meet the lord of your clan. [30512-02.htm] Head Blacksmith Kusto: A magpie brooch...? Does this mean...?! How could he...! Sob! It's from the Magpie Brothers! He fell in with those ruffians and see where it got him... He sullied the reputations of honorable Bounty Hunters everywhere... How dreadful! Even though he has disgraced himself, I cannot deny our blood connection. Thank you for discovering the fate of my brother. As a token of appreciation from myself and the Black Anvil Guild, please take these coins. "Tell me more about the Magpie Brothers." [30512-03.htm] Head Blacksmith Kusto: They are apostates and don't hesitate to dishonor our ancestors. These Bounty Hunters dig up graves and rob them of whatever items they find of value. They are especially fond of shiny objects, and thus earned their moniker "the Magpie Brothers". They robbed the graves of ancient Dwarven kings in the labyrinth of Schuttgart and then shamelessly sold them to the highest bidder. The most holy relics of our race! They were banished from the kingdom for that. They came to the kingdom of Aden and stole the relics of the Elmoreden Empire from the National Cemetery... It is said that they have been searching for eggs in Dragon Valley at the behest of some Human royals... [30512-04.htm] Head Blacksmith Kusto: I will never forget your kindness in bringing me the news of my poor brother. I hope that the guild can help you someday. "Tell me about the Magpie Brothers." [30645-01.htm] Martian: Sir Gustaf professed much faith in your clan. I must speak to your leader! [30645-02.htm] Martian: I'm sure you have heard from Athebaldt of the awakening of the Land Dragon Antharas. Most people still have not accepted the horror of this reality. It is only a matter of time until the Land Dragon wakes up completely. When this happens, the wyrms and drakes of Dragon Valley will join their leader and assist Antharas in the utter destruction of this whole area. We must devise a plan to save Giran. A direct attack on the dragon would be fruitless. Indeed, the very idea of opposing Antharas with any conventional means is absurd. We must find a unique way to destroy the evil creatures of Antharas. Up to now our only response has been to shore up our defenses. Fortunately, Athebaldt has heard of our plight and offered his assistance. "Tell me more about the situation." [30645-03.htm] Martian: I collect the eggs of wyrms and drakes to study them. I have spoken with experts in this field and feel qualified to do this study. Earlier I sent several Dwarven Bounty Hunters to Dragon Valley to collect eggs. It's been a week and still there is no word from them. I am afraid that this was too challenging a job for them. Please go to the valley and collect eggs for me. Please bring 10 each of Thunder Wyrm Eggs, Drake Eggs, Blitz Wyrm Eggs and Mist Drake Eggs. Blitz Wyrms and mist drakes are extremely rare and it will probably be quite difficult to find them. If you should happen to meet the Dwarves that I sent earlier, they may give you some hints. Good luck! [30645-04.htm] Martien: Soon the Land Dragon will awake from his slumber. Giran, no, the entire kingdom is in mortal danger! You must hurry to Dragon Valley. Bring me Thunder Wyrm Eggs, Drake Eggs, Blitz Wyrm Eggs and Mist Drake Eggs there. And just one or two is not enough. I'll need 10 of each. You must do whatever it takes to accomplish this task. And one more thing... Blitz Wyrms and mist drakes are extremely rare and will be very difficult to find. If you see the Dwarves that I sent earlier, they may be able to help you. Good luck. [30645-05.htm] Martian: All dead?...Oh, my! How dreadful! Oh, well, what can be done? I mean, frankly, they were grave robbers and made their living smuggling stolen relics... It is a dangerous life which always seems to end prematurely. Anyway, good job! I'll take all the eggs that you've brought. Now you should report back to Athebaldt. "What about the dead Dwarves' belongings?" [30645-06.htm] Martian: Hmm, I wouldn't know. They had rather unsavory reputations, even for Dwarves... Just put them out of your mind. [30645-07.htm] Martian: Thank you again for all of your help. I have reported to Athebaldt what a big help you've been. Go and see him. He is expecting you. [30645-08.htm] Martian: Athebaldt has a very high opinion of your clan. His influence will be a big factor in your success. [30758-01.htm] Witch Athrea: Take heed, my ambitious friend! The path of a king is often ravaged by war and death! [30759-01.htm] Witch Kalis: You who will walk the path of a king, listen carefully! Ambition and power will guide your fate! [30760-01.htm] Sir Gustaf Athebaldt: The power of the royals has been slowly eroding for years. The bloody peasants' uprising of a few years ago in Dion is the proof. From this chaos several small cells within the country are gaining strength in preparation for grasping a large share of the kingdom for themselves. Our kingdom needs young, energetic lords like you to lead it into the future. Once your clan distinguishes itself further, I will join forces with you and lend you my support. (Only a level 4 clan leader can undertake this quest.) [30760-02.htm] Sir Gustaf Athebaldt: The power of the royals has been slowly eroding for years. The bloody peasants' uprising of a few years ago in Dion is the proof. From this chaos several small cells within the country are gaining strength in preparation for grasping a large share of the kingdom for themselves. Our kingdom needs young, energetic lords like you to lead it into the future. Once your clan distinguishes itself further, I will join forces with you and lend you my support, although you are already so well-trusted by many people that I expect my backing won't be decisive... (This quest may be undertaken only by a level 4 clan.) [30760-03.htm] Sir Gustaf Athebaldt: Finally, the Proof of Aspiration! Good work! Now you must take it to one of the grand masters. Show it to him and he will instruct you on how to strengthen your clan. [30760-04.htm] Sir Gustaf Athebaldt: The power of the royals has been slowly eroding for years. The bloody peasants' uprising of a few years ago in Dion is proof of this. From this chaos several small cells within the country are gaining strength in preparation for grasping a large share of the kingdom for themselves. Our kingdom needs young, energetic lords like you to lead it into the future. Will you join forces with me? "I will join forces with you." [30760-04t.htm] Sir Gustaf Athebaldt: The power of the royals has been slowly eroding for years. The bloody peasants' uprising of a few years ago in Dion is the proof. From this chaos several small cells within the country are gaining strength in preparation for grasping a large share of the kingdom for themselves. Our kingdom needs young, energetic lords like you to lead it into the future. (Only a level 4 clan leader can undertake this quest.) [30760-05.htm] Sir Gustaf Athebaldt: Yes, I agree. But first I must ask you a question. Why do you wish to strengthen your clan? As clan leader, what do you truly desire? Be honest. "I would like us to become stronger so that we can establish a better world." "I wish to strengthen my clan in order to fulfill my ambitions." [30760-06.htm] Sir Gustaf Athebaldt: Yes! You remind me of myself when I was young. But this world is not so easily conquered... You will learn to overcome obstacles as they appear. I believe that you have what it takes to be a capable leader. I'm sure things will work out for the best. Now please, you must help me prepare for my mission. "You can trust me with this task, sir." [30760-07.htm] Sir Gustaf Athebaldt: You must not always show your true feelings. A leader with many followers must keep his private opinions to himself. You have shown much potential, now I will tell you how you can help me. "Thank you for your trust." [30760-08.htm] Sir Gustaf Athebaldt: The people of Giran are now being threatened by the Land Dragon Antharas. Word has quickly spread of the beast's awakening. The powers that be have deluded themselves with the idea that the dragon can be subdued by hired mercenaries. I expect to see drakes and wyrms pouring out of Dragon Valley at any moment. We cannot trust these incompetents to solve this crisis. I have begun an operation in Giran to deal with the dragon. It could be in vain, but it could also be the first step toward the solution of the problem. First, you must go to Giran Castle Town and find a man named Martien who is seeing to my business affairs. I trust him completely and so should you. He will tell you more details when you see him. I will pray for the gods' divine protection over you and your clan. [30760-09.htm] Sir Gustaf Athebaldt: You must hurry to Giran Castle Town and meet with Martien. Do whatever he says. You and your clan must be able to perform to your full ability. [30760-10.htm] Sir Gustaf Athebaldt: How are things going with Martien? I have his report. You and your clan still have my trust. You must never forget that the future of the kingdom rests on the shoulders of you and your clan. [30760-11.htm] Sir Gustaf Athebaldt: I have received Martien's report. I have given compensation to the families of the dead Dwarves. It hurts my heart that they died on my watch, even if they were just hired Dwarves. Truly a sad day... Well, at least the first part of my plan has been completed... Now we must move on to the next. "What's next?" [30760-11t.htm] Sir Gustaf Athebaldt: Martien tells me that you have completed the first stage of the plan. Now you and your clan are needed elsewhere... Please have your clan lord come to see me in the next few days. [30760-12.htm] Sir Gustaf Athebaldt: History tells us again and again that ultimate power comes from superior technology. Therefore I have long supported the Black Anvil guild. Their mission is to research the ancient technology of the giants. They have not yet developed any practical applications of this technology, but it has amazing potential! There is a Dwarf in the guild named Balthazar in whom I have invested much time and resources. Although he is not well-known in Dwarven society, he is an amazing Artisan. I believe that his efforts will soon bear fruit. However, he has reached an impasse in his work and has requested my help. It has something to do with a new type of golem he is developing... He will tell you more when you see him. Take this letter amd find him in Hunters Village. [30760-13.htm] Sir Gustaf Athebaldt: You must hurry to Balthazar with the letter I gave you. He can be found in Hunters Village. [30760-14.htm] Sir Gustaf Athebaldt: Although Balthazar is not well-known in Dwarven society, he is an amazing Artisan. It seems that his efforts will soon bear fruit. Your clan will be a great help to him, and I expect that the results of his research will be of great use to you as well... [30760-15.htm] Sir Gustaf Athebaldt: I have heard that your clan has been a great help to Balthazar... Thank you. I hate to bring this up so soon after your return, but the next part of your mission awaits. Are you ready? "What is the next part of the mission?" [30760-15t.htm] Sir Gustaf Athebaldt: I have heard of the great help that you and your clan have given to Balthazar... Thank you. By the way, why didn't you bring your clan leader with you? I must meet with him to ask for his help with something. [30760-16.htm] Sir Gustaf Athebaldt: Much has transpired since then. Dire warnings of global destruction and chaos are rife throughout the land. A force has been dispatched to deal with Antharas, and evil spirits are wreaking havoc in several parts of the kingdom. Warlords are battling against each other for the privilege of ruling the territories. We haven't much time. We must quickly conclude our preparations. Have you heard of the Scepter of Judgment? It is said that he who holds it is invincible in battle. Of course this is nonsense, but the problem is that everyone believes it to be true, from commoner to soldier... Take this letter to Sir Eric Rodemai in Aden Castle Town. He and his family are all my faithful servants. You should trust him and offer him your services willingly. He will tell you more when you see him. Now, I pray for the gods' divine protection over you and your clan. [30760-17.htm] Sir Gustaf Athebaldt: You must find the highly-prized Scepter of Judgment. We must secure it before it falls into someone else's hands. Go and see Sir Eric Rodemai in Aden Castle Town. Give him the letter I gave you, he will tell you what to do. [30760-18.htm] Sir Gustaf Athebaldt: I see that you have met with Sir Rodemai. As you know, you must find the Scepter of Judgment. If it falls into the hands of our rivals, it will bring chaos and destruction. [30760-19.htm] Sir Gustaf Athebaldt: Good job! You have obtained the Scepter of Judgment! Now give it to me! "Here, take it." "What do you intend to do with it?" [30760-19t.htm] Sir Gustaf Athebaldt: Good job! You have secured the scepter of judgement! Where is your clan leader, by the way? I hope he wasn't hurt! [30760-20.htm] Sir Gustaf Athebaldt: Well, our time together has come to an end... I pray that one day your clan will become strong enough to establish peace on this continent. I look forward to that day. Now I bestow upon your clan the Proof of Aspiration. Since the days of King Rauhel this honor has been given to promising young lords who dare to dream great dreams. Present this to High Priests and Grand Masters to receive help in strengthening your clan. [30760-21.htm] Sir Gustaf Athebaldt: I see from your face that Sir Rodemai has been talking about me... Please don't misunderstand my intentions. When King Rauhel was alive, I served him faithfully. I have been as truthful with you up to now as I thought I could be... I believe my country needs a strong ruler such as myself. Ah yes, the mighty Scepter of Judgment! Ha! That broken-down old relic is no real use to me, but the stupid commoners and soldiers believe in its power. With the scepter I can rally my troops and make our enemies tremble! Thereby, I will be invincible. And you? I must admit, I took advantage of your clan for this reason. But isn't it true that you also used me for your own purposes? You will certainly need my help in the future. There may come a day when we will face each other as enemies. But for now, what is it that you need the most? Look! I have it in my hand. The Proof of Aspiration! We can each help ourselves by helping each other! A fair trade, no? "I refuse your offer." "I agree to trade with you." [30760-22.htm] Sir Gustaf Athebaldt: You are an idiot! How can you be so short-sighted! What a hypocrite! I certainly judged you wrong! Even now the Black Legion is coming for this object. You will be helpless against them. You and your entire clan will surely be killed! [30760-23.htm] Sir Gustaf Athebaldt: I suppose I misjudged you. We all seek what we think is most important. Here you go. Take this Proof of Aspiration. This brings you one step closer to your dream. [30760-24.htm] Sir Gustaf Athebaldt: A wise man knows when to change his mind. What were you thinking by refusing me the scepter? You must have known that you couldn't keep it from me. I am destined to possess it. "I refuse to give it to you." "I agree to give it to you." [30760-24t.htm] Sir Gustaf Athebaldt: Go and tell your clan leader that he must relinquish the scepter immediately. It is of no use to your clan. If he values his own life and that of his clan he will comply. [30761-01.htm] Corpse of Fritz: A dead Dwarf with a large bag. Open the bag [30761-02.htm] Corpse of Fritz: There are three Blitz Wyrm Eggs inside. [30761-03.htm] Corpse of Fritz: There is nothing there. [30762-01.htm] Corpse of Lutz: The corpse of a Dwarf with a large bag. Open the bag [30762-02.htm] Corpse of Lutz: There are three Blitz Wyrm Eggs and four Mist Drake Eggs inside. [30762-03.htm] Corpse of Lutz: It is empty. [30763-01.htm] Corpse of Kurtz: A seriously injured Dwarf, gasping for his last breath. "Hey! Are you OK?" [30763-02.htm] Corpse of Kurtz: Uhhhh... Luh, luh, look here... I was wrong... Woe is me!... What an awful way to die... Eggs of drake... Tuh, tuh, take them to Martien... And, this brooch... Puh, puh, please... take it to muh, my brother Kusto...! Maphr... welcomes... my... soul... Arghhhh... [30763-03.htm] Corpse of Kurtz: The still-warm corpse of a Dwarf. [30764-01.htm] Balthazar: Sir Athebaldt has told me that your clan would be helpful in my research. I don't have the time to repeat myself, where is the leader of your fine clan? [30764-02.htm] Balthazar: Sir Athebaldt has said that your clan would be helpful to me in my research. Would you like to know more about my research? Very well, I'll tell you! Recently, I and my old friend Tajif Goldgedder have been working on the development of a new type of golem! If things go according to plan, I shall soon create an awesome monster that can break through any castle wall with one blow! Let's see if it works! "Can I help?" [30764-03.htm] Balthazar: You must bring me Titan's Powerstones. You will find them in the Titan Cave, south of Aden. The degenerate Titans that live there are curious creatures, ancestors of the glorious civilization of ancient Titans. They have grafted a mechanical device to their bodies. Don't be deceived by their odd appearance, they are still incredible beings with unparalleled strength. They can, however, be outwitted by a resourceful person such as yourself. After you kill the titan soldiers or border guards you can get the powerstone from the mechanical device that is fitted on their bodies. You must handle them carefully, as a broken one is of no use at all... Please bring a powerstone in good condition. We shall also need Nebulite Crystals, used as fuel for the powerstones. They resemble gems but are recognizable by the special luster they emit. We must have ten each of the powerstones and Nebulite Crystals. Please do your best. [30764-04.htm] Balthazar: Sir Athebaldt has informed me that your clan would be helpful in my research. Would you like to know what I'm researching? All right, I'll tell you! Recently an old friend, Tajif Goldgedder, brought me some curious materials from Cruma Tower. I'll skip the details, but we are currently researching siege golems strong enough to break through any castle wall with one blow. If this works, the face of war will change dramatically! "How can I help?" [30764-05.htm] Balthazar: You must bring me Titan's Powerstones. You will find them in the Titan Cave, south of Aden. The degenerate Titans that live there are curious creatures, ancestors of the glorious civilization of ancient Titans. They have grafted a mechanical device to their bodies. Don't be deceived by their odd appearance, they are still incredible beings with unparalleled strength. They can, however, be outwitted by a resourceful person such as yourself. After you kill the titan soldiers or border guards you can get the powerstone from the mechanical device that is fitted on their bodies. You must handle them carefully, as a broken one is of no use at all... Please bring a powerstone in good condition. We shall also need Nebulite Crystals, used as fuel for the powerstones. They resemble gems but are recognizable by the special luster they emit. We must have ten each of the powerstones and Nebulite Crystals. Please do your best. Oh wait... the coins...? Let me see them! Show coins. [30764-06.htm] Balthazar: Hmm... These coins aren't from our guild! It appears that you've helped someone from the Black Anvil Guild! Well, we Dwarves never forget a favor. I shall give you something that will be helpful to you. It's a recipe for fixing a broken and otherwise useless titan powerstone. You will find it quite useful if you have a Dwarf in your group. Good luck! [30764-07.htm] Balthazar: As I said, I must have 10 titan powerstones and 10 Nebulite Crystals. The powerstones can be taken from the mechanical devices attached to the bodies of titan soldiers and border guards that you kill. You must handle them carefully and bring back undamaged ones! The Nebulite Crystals can also be obtained from the Titans. They resemble brightly Shining Gemstones that shine brightly but with their own special luster. [30764-08.htm] Balthazar: Good job! You have obtained all the powerstones and Nebulite Crystals that I requested. Let's see... Behold the splendid artistry of the Titans! Aren't they exquisite? These make our devices look like children's toys! This is wonderful! Thanks to you, our research on the siege golem is back on track! We shall all see the results soon! Ha, ha, ha... You will surely be impressed! The new golem will be awesome! [30764-09.htm] Balthazar: Thanks to you my research is proceeding as scheduled. Soon we shall all see the amazing results! The prototype is almost finished! [30765-01.htm] Imperial Coffer: The box is secured with six locks. Open coffer [30765-02.htm] Imperial Coffer: This box may only be opened by a clan leader. [30765-03.htm] Imperial Coffer: You have discovered the Scepter of Judgment. [30765-03a.htm] Imperial Coffer: It will not open. [30766-01.htm] Witch Cleo: I must find the leader of the brothers of blood. They are warriors united by their firm resolve and ambition. I must guide him to a priceless royal symbol of no monetary value... [30766-02.htm] Witch Cleo: Welcome leader of the resolute and anmitious brothers of blood. I have been expecting you... "Tell me about the Scepter of Judgment." [30766-03.htm] Witch Cleo: Listen carefully. There is one whose path freely traverses time and space. The holder of 6 keys, the great king of grave lookouts... If he is pierced with a two-pronged spear, he will be brought down, and then his effects shall become yours... Or if you wish, I could tell you another story. "Tell me another story." [30766-04.htm] Witch Cleo: The path of a king is rife with blood and honor, war and death, ambition and power. Soon you will know all of them well. Such has it always been and such shall it always be. Soon you will be forced to choose whether to stand against the waves of fate or to ride over them... [30766-05.htm] Witch Cleo: I never repeat myself. If you don't understand what I have already explained to you, go and see Sir Eric Rodemai. His family often visits me to listen to the ramblings of a crazy old woman. [30766-06.htm] Witch Cleo: Did you hear what I said? Riding the waves of fate or standing against them. Although fate may be cruel regardless of which you choose, you still must make a choice. [30766-07.htm] Witch Cleo: The Scepter of Judgment is desperately sought after by many of the military elite... You can trade it for something you would find much more useful. Why have you brought it to me? Can I touch it? Show her the Scepter of Judgment [30766-08.htm] Witch Cleo: Ah, the scepter of shunaiman! It's been many years since I laid eyes on it. Its color has completely faded! Although it is quite ancient it is very fragile. For instance, if I were to drop it while standing on a stone floor... Clang!! It would break just like that! Ha! Destruction and chaos! It's what I live for! Stop frowning, it was of no use to you anyway. Why else would you have handed it over so willingly... Instead, why don't you take this? It was given to me by a young king who had gotten it from the lady of the lake. Take it with you. When next we meet you shall be drenched in blood, and I will be waiting... [30868-01.htm] Sir Eric Rodemai: Gustaf Athebaldt told me about you. It's an honor to finally get to work with you. Actually my father Sir Kristof Rodemai often speaks of you. He says that you and your race have embarked on a great mission, and I should watch you carefully and learn. I wish to meet the lord of your clan as soon as possible. [30868-02.htm] Sir Eric Rodemai: Gustaf Athebaldt told me about you. It's an honor to finally get to work with you. Actually my father Sir Kristof Rodemai often speaks of you. He says that you and your race have embarked on a great mission, and I should watch you carefully and learn. I wish to meet the lord of your clan as soon as possible. Generations ago my family agreed to work for the Athebaldt family. Now they have ordered us to recover the Scepter of Judgment, a relic of the ancient kingdom. It may actually be just a legend, we have been searching everywhere without success. "Tell me more about the scepter of judgement." [30868-03.htm] Sir Eric Rodemai: As you may know, it is said that the scepter makes its possessor invincible in battle. Although this is probably just a legend, having it will greatly boost our soldiers' morale. However, we are losing hope of finding it. We hired Dwarven Bounty Hunters to find it and they have had no success either. My father has recommended that I ask the witches' advice regarding this matter... "Tell me more about the witches." [30868-04.htm] Sir Eric Rodemai: It is impossible to guess how old these three women are. They typically show up, mumble some incomprehensible incantations and vanish. My father has become obsessed by their remarks. I'm not sure if these witches have been of any help to my family in the past. If it was up to me I wouldn't have anything to do with those blasphemous old women. Would you be willing to visit them on my behalf? It is said that the youngest of the three sisters, Cleo, can be found east of the village. Cross the bridge and you will find her. [30868-05.htm] Sir Eric Rodemai: Please find Cleo and ask her advice on the Scepter of Judgment. East of the village you will find a bridge. Cross it and you will find her. [30868-06.htm] Sir Eric Rodemai: An Imperial grave? A grave keeper? Guardian of a key? Traveling freely through time and space? Must be pierced with two-pronged lance? I've got a pretty good idea what they mean... "What do these words mean?" [30868-06a.htm] Sir Eric Rodemai: Let me see if I can put them together... It is at the National Cemetery... Once you defeat the grave keeper a key master will show up and give you a key... When you collect all six keys, you must overpower the imperial grave keeper and find the scepter... You must take care, as the Imperial grave keeper can move through time and space... This will appear as instantaneous attacks... You must divide your team into two parts to defeat him. [30868-07.htm] Sir Eric Rodemai: You have obtained an important clue from the witch regarding the Scepter of Judgment? Now you must go and find it! I must speak with your clan lord regarding this matter. Please bring him to me at once! [30868-08.htm] Sir Eric Rodemai: Will it be possible to find the Scepter of Judgment by following the obscure clues of the witches? "What do the clues mean?" [30868-09.htm] Sir Eric Rodemai: Ah, at last, the Scepter of Judgment! It truly does exist! This is a great accomplishment... Sir Gustaf Athebaldt sends word that he would like for all of you to bring the scepter to him. However, I must ask you something... Why are you allowing yourselves to be taken advantage of by someone like Sir Gustaf Athebaldt? My father has told me a lot about you and that's why I ask. With your skills you can follow your own path. "What do you mean by this?" [30868-10.htm] Sir Eric Rodemai: Sir Gustaf Athebaldt is an uncle of King Amadeo Cadmus. He is next in succession to the royal throne. He feigns a disinterest in politics to dispel people's suspicions, while in reality he controls many cliques which are undermining the power of the king. He ulimately plans to seize the throne! The dragon eggs you have collected will be used to create his own private army of striders. Even now Dwarven Artisans are completing the gigantic siege weapons he will use in the coup. This is all I will say on the subject. Please go to Sir Gustaf Athebaldt. [30868-11.htm] Sir Eric Rodemai: Despite his outward appearance Sir Athebaldt is a very crafty man. You must take care that he doesn't take advantage of you.
Исходник условий и наград (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.Q00503_PursuitOfClanAmbition;

import org.l2jmobius.gameserver.data.xml.SkillData;
import org.l2jmobius.gameserver.entity.actor.Npc;
import org.l2jmobius.gameserver.entity.actor.Player;
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.mechanics.skill.Skill;
import org.l2jmobius.gameserver.network.enums.ChatType;
import org.l2jmobius.gameserver.network.serverpackets.NpcSay;
import org.l2jmobius.gameserver.network.serverpackets.TeleportToLocation;

/**
 * @author Jackass, Skache
 */
public class Q00503_PursuitOfClanAmbition extends Quest
{
	// NPCs
	private static final int MARTIEN = 30645;
	private static final int ATHREA = 30758;
	private static final int KALIS = 30759;
	private static final int SIR_GUSTAV_ATHEBALDT = 30760;
	private static final int CORPSE_OF_FRITZ = 30761;
	private static final int CORPSE_OF_LUTZ = 30762;
	private static final int CORPSE_OF_KURTZ = 30763;
	private static final int KUSTO = 30512;
	private static final int BALTHAZAR = 30764;
	private static final int SIR_ERIC_RODEMAI = 30868;
	private static final int IMPERIAL_COFFER = 30765;
	private static final int CLEO = 30766;
	
	// Monsters
	private static final int THUNDER_WYRM = 20243;
	private static final int THUNDER_WYRM_HOLD = 20282;
	private static final int DRAKE = 20137;
	private static final int DRAKE_HOLD = 20285;
	private static final int BLITZ_WYRM = 27178;
	private static final int LESSER_GIANT_SOLDIER = 20654;
	private static final int LESSER_GIANT_SCOUT = 20656;
	private static final int GRAVE_GUARD = 20668;
	private static final int GRAVE_KEYMASTER = 27179;
	private static final int IMPERIAL_SLAVE = 27180;
	private static final int IMPERIAL_GRAVEKEEPER = 27181;
	
	// Imperial Gravekeeper teleports
	private static final int TELEPORT_1_X = 179520;
	private static final int TELEPORT_1_Y = 6464;
	private static final int TELEPORT_1_Z = -2706;
	private static final int TELEPORT_2_X = 171104;
	private static final int TELEPORT_2_Y = 6496;
	private static final int TELEPORT_2_Z = -2706;
	
	// Skill
	private static final int DARK_HEAL_SKILL = 4080;
	
	// First part items
	private static final int GUSTAVS_1ST_LETTER = 3866;
	private static final int MIST_DRAKE_EGG = 3839;
	private static final int BLITZ_WYRM_EGG = 3840;
	private static final int DRAKE_EGG = 3841;
	private static final int THUNDER_WYRM_EGG = 3842;
	private static final int BROOCH_OF_THE_MAGPIE = 3843;
	private static final int BLACK_ANVIL_COIN = 3871;
	
	// Second part items
	private static final int GUSTAVS_2ND_LETTER = 3867;
	private static final int RECIPE_TITANS_POWERSTONE = 3838;
	private static final int NEBULITE_CRYSTALS = 3844;
	private static final int BROKEN_TITANS_POWERSTONE = 3845;
	private static final int TITANS_POWERSTONE = 3846;
	
	// Third part items
	private static final int GUSTAVS_3RD_LETTER = 3868;
	private static final int SCEPTER_OF_JUDGMENT = 3869;
	private static final int IMPERIAL_KEY = 3847;
	
	// Final item
	private static final int SEAL_OF_ASPIRATION = 3870;
	
	// Droplist
	private static final int[][] DROPLIST =
	{
		// npcId, cond, MaxCount, chance, item1
		// @formatter:off
		{THUNDER_WYRM, 2, 10, 500000, THUNDER_WYRM_EGG},
		{THUNDER_WYRM_HOLD, 2, 10, 500000, THUNDER_WYRM_EGG},
		{DRAKE, 2, 10, 500000, DRAKE_EGG},
		{DRAKE_HOLD, 2, 10, 500000, DRAKE_EGG},
		{BLITZ_WYRM, 2, 10, 1000000, BLITZ_WYRM_EGG},
		// @formatter:on
	};
	
	public Q00503_PursuitOfClanAmbition()
	{
		super(503, "Pursuit of Clan Ambition!");
		registerQuestItems(MIST_DRAKE_EGG, BLITZ_WYRM_EGG, DRAKE_EGG, THUNDER_WYRM_EGG, BROOCH_OF_THE_MAGPIE, NEBULITE_CRYSTALS, BROKEN_TITANS_POWERSTONE, TITANS_POWERSTONE, IMPERIAL_KEY, GUSTAVS_1ST_LETTER, GUSTAVS_2ND_LETTER, GUSTAVS_3RD_LETTER, SCEPTER_OF_JUDGMENT);
		addStartNpc(SIR_GUSTAV_ATHEBALDT);
		addTalkId(MARTIEN, ATHREA, KALIS, SIR_GUSTAV_ATHEBALDT, CORPSE_OF_FRITZ, CORPSE_OF_LUTZ, CORPSE_OF_KURTZ, KUSTO, BALTHAZAR, SIR_ERIC_RODEMAI, IMPERIAL_COFFER, CLEO);
		addKillId(THUNDER_WYRM_HOLD, THUNDER_WYRM, DRAKE, DRAKE_HOLD, BLITZ_WYRM, LESSER_GIANT_SOLDIER, LESSER_GIANT_SCOUT, GRAVE_GUARD, GRAVE_KEYMASTER, IMPERIAL_GRAVEKEEPER);
		addAttackId(IMPERIAL_GRAVEKEEPER);
	}
	
	@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 "30760-08.htm":
			{
				st.startQuest();
				giveItems(player, GUSTAVS_1ST_LETTER, 1);
				break;
			}
			case "30760-12.htm":
			{
				giveItems(player, GUSTAVS_2ND_LETTER, 1);
				st.setCond(4);
				break;
			}
			case "30760-16.htm":
			{
				giveItems(player, GUSTAVS_3RD_LETTER, 1);
				st.setCond(7);
				break;
			}
			case "30760-20.htm":
			{
				takeItems(player, SCEPTER_OF_JUDGMENT, -1);
				giveItems(player, SEAL_OF_ASPIRATION, 1);
				addExpAndSp(player, 0, 250000);
				st.exitQuest(false, true);
				finishQuestToClan(player);
				break;
			}
			case "30760-22.htm":
			{
				if ((st.getCond() == 11) || hasQuestItems(player, SCEPTER_OF_JUDGMENT))
				{
					st.setCond(13);
				}
				break;
			}
			case "30760-23.htm":
			{
				takeItems(player, SCEPTER_OF_JUDGMENT, -1);
				giveItems(player, SEAL_OF_ASPIRATION, 1);
				addExpAndSp(player, 0, 250000);
				st.exitQuest(false, true);
				finishQuestToClan(player);
				break;
			}
			case "30645-03.htm":
			{
				setQuestToClanMembers(player);
				takeItems(player, GUSTAVS_1ST_LETTER, -1);
				st.setCond(2);
				st.set("kurt", "0");
				break;
			}
			case "30763-02.htm":
			{
				giveItems(player, MIST_DRAKE_EGG, 6);
				giveItems(player, BROOCH_OF_THE_MAGPIE, 1);
				st.set("kurt", "1");
				break;
			}
			case "30762-02.htm":
			{
				giveItems(player, MIST_DRAKE_EGG, 4);
				giveItems(player, BLITZ_WYRM_EGG, 3);
				addSpawn(BLITZ_WYRM, npc.getX(), npc.getY(), npc.getZ(), npc.getHeading(), true, 0);
				addSpawn(BLITZ_WYRM, npc.getX(), npc.getY(), npc.getZ(), npc.getHeading(), true, 0);
				st.set("lutz", "1");
				break;
			}
			case "30761-02.htm":
			{
				giveItems(player, BLITZ_WYRM_EGG, 3);
				addSpawn(BLITZ_WYRM, npc.getX(), npc.getY(), npc.getZ(), npc.getHeading(), true, 0);
				addSpawn(BLITZ_WYRM, npc.getX(), npc.getY(), npc.getZ(), npc.getHeading(), true, 0);
				st.set("fritz", "1");
				break;
			}
			case "30512-03.htm":
			{
				takeItems(player, BROOCH_OF_THE_MAGPIE, 1);
				giveItems(player, BLACK_ANVIL_COIN, 1);
				st.set("kurt", "2");
				break;
			}
			case "30764-03.htm":
			{
				takeItems(player, GUSTAVS_2ND_LETTER, -1);
				st.setCond(5);
				break;
			}
			case "30764-05.htm":
			{
				takeItems(player, GUSTAVS_2ND_LETTER, -1);
				st.setCond(5);
				break;
			}
			case "30764-06.htm":
			{
				takeItems(player, BLACK_ANVIL_COIN, -1);
				giveItems(player, RECIPE_TITANS_POWERSTONE, 1);
				break;
			}
			case "30868-04.htm":
			{
				takeItems(player, GUSTAVS_3RD_LETTER, -1);
				st.setCond(8);
				break;
			}
			case "30868-06a.htm":
			{
				st.setCond(10);
				break;
			}
			case "30868-10.htm":
			{
				st.setCond(11);
				break;
			}
			case "30766-04.htm":
			{
				st.setCond(9);
				npc.broadcastPacket(new NpcSay(npc, ChatType.NPC_GENERAL, "Blood and honor!"));
				final Npc sister1 = addSpawn(KALIS, 160665, 21209, -3710, npc.getHeading(), false, 180000);
				sister1.broadcastPacket(new NpcSay(sister1, ChatType.NPC_GENERAL, "Ambition and power!"));
				final Npc sister2 = addSpawn(ATHREA, 160665, 21291, -3710, npc.getHeading(), false, 180000);
				sister2.broadcastPacket(new NpcSay(sister2, ChatType.NPC_GENERAL, "War and death!"));
				break;
			}
			case "OPEN":
			{
				if (!player.isClanLeader() || !st.isStarted() || (st.getCond() != 10) || hasQuestItems(player, SCEPTER_OF_JUDGMENT))
				{
					htmltext = "30765-02.htm";
				}
				else if (getQuestItemsCount(player, IMPERIAL_KEY) < 6)
				{
					htmltext = "30765-03a.htm";
				}
				else
				{
					htmltext = "30765-03.htm";
					st.setCond(11);
					takeItems(player, IMPERIAL_KEY, 6);
					giveItems(player, SCEPTER_OF_JUDGMENT, 1);
				}
				break;
			}
		}
		
		return htmltext;
	}
	
	@Override
	public String onTalk(Npc npc, Player player)
	{
		final QuestState leaderSt = getClanLeaderQuestState(player, npc);
		if ((npc.getId() == IMPERIAL_COFFER) && !player.isClanLeader() && (leaderSt != null) && leaderSt.isStarted() && (leaderSt.getCond() == 10))
		{
			return "30765-02.htm";
		}
		
		String htmltext = getNoQuestMsg(player);
		final QuestState st = getQuestState(player, true);
		int state = st.getState();
		if (!player.isClanLeader() && (state == State.CREATED) && (leaderSt != null) && leaderSt.isStarted())
		{
			state = State.STARTED;
		}
		
		switch (state)
		{
			case State.CREATED:
			{
				if (npc.getId() != SIR_GUSTAV_ATHEBALDT)
				{
					break;
				}
				if (player.getClan() == null)
				{
					htmltext = "30760-01.htm";
					st.exitQuest(true);
				}
				else if (player.isClanLeader())
				{
					if (hasQuestItems(player, SEAL_OF_ASPIRATION))
					{
						htmltext = "30760-03.htm";
						st.exitQuest(true);
					}
					else if (player.getClan().getLevel() != 4)
					{
						htmltext = "30760-02.htm";
						st.exitQuest(true);
					}
					else
					{
						htmltext = "30760-04.htm";
					}
				}
				else
				{
					htmltext = "30760-04t.htm";
					st.exitQuest(true);
				}
				break;
			}
			case State.STARTED:
			{
				final int cond = st.getCond();
				int memberCond = 0;
				if (leaderSt != null)
				{
					memberCond = leaderSt.getCond();
				}
				
				switch (npc.getId())
				{
					case SIR_GUSTAV_ATHEBALDT:
					{
						if (player.isClanLeader())
						{
							if (cond == 1)
							{
								htmltext = "30760-09.htm";
							}
							else if (cond == 2)
							{
								htmltext = "30760-10.htm";
							}
							else if (cond == 3)
							{
								htmltext = "30760-11.htm";
							}
							else if (cond == 4)
							{
								htmltext = "30760-13.htm";
							}
							else if (cond == 5)
							{
								htmltext = "30760-14.htm";
							}
							else if (cond == 6)
							{
								htmltext = "30760-15.htm";
							}
							else if (cond == 7)
							{
								htmltext = "30760-17.htm";
							}
							else if (cond == 11)
							{
								htmltext = "30760-19.htm";
							}
							else if (cond == 13)
							{
								htmltext = "30760-24.htm";
							}
							else if (hasQuestItems(player, SCEPTER_OF_JUDGMENT))
							{
								htmltext = "30760-19.htm";
							}
							else
							{
								htmltext = "30760-18.htm";
							}
						}
						else
						{
							if (memberCond == 3)
							{
								htmltext = "30760-11t.htm";
							}
							else if (memberCond == 4)
							{
								htmltext = "30760-15t.htm";
							}
							else if (memberCond == 11)
							{
								htmltext = "30760-19t.htm";
							}
							else if (memberCond == 13)
							{
								htmltext = "30760-24t.htm";
							}
						}
						break;
					}
					case MARTIEN:
					{
						if (player.isClanLeader())
						{
							if (cond == 1)
							{
								htmltext = "30645-02.htm";
							}
							else if (cond == 2)
							{
								if ((getQuestItemsCount(player, MIST_DRAKE_EGG) > 9) && (getQuestItemsCount(player, BLITZ_WYRM_EGG) > 9) && (getQuestItemsCount(player, DRAKE_EGG) > 9) && (getQuestItemsCount(player, THUNDER_WYRM_EGG) > 9))
								{
									htmltext = "30645-05.htm";
									st.setCond(3);
									takeItems(player, MIST_DRAKE_EGG, -1);
									takeItems(player, BLITZ_WYRM_EGG, -1);
									takeItems(player, DRAKE_EGG, -1);
									takeItems(player, THUNDER_WYRM_EGG, -1);
								}
								else
								{
									htmltext = "30645-04.htm";
								}
							}
							else if (cond == 3)
							{
								htmltext = "30645-07.htm";
							}
							else
							{
								htmltext = "30645-08.htm";
							}
						}
						else
						{
							if ((memberCond == 1) || (memberCond == 2) || (memberCond == 3))
							{
								htmltext = "30645-01.htm";
							}
						}
						break;
					}
					case CORPSE_OF_LUTZ:
					{
						if (player.isClanLeader() && (cond == 2))
						{
							if (st.getInt("lutz") == 1)
							{
								htmltext = "30762-03.htm";
							}
							else
							{
								htmltext = "30762-01.htm";
							}
						}
						break;
					}
					case CORPSE_OF_KURTZ:
					{
						if (player.isClanLeader() && (cond == 2))
						{
							if (st.getInt("kurt") == 1)
							{
								htmltext = "30763-03.htm";
							}
							else
							{
								htmltext = "30763-01.htm";
							}
						}
						break;
					}
					case CORPSE_OF_FRITZ:
					{
						if (player.isClanLeader() && (cond == 2))
						{
							if (st.getInt("fritz") == 1)
							{
								htmltext = "30761-03.htm";
							}
							else
							{
								htmltext = "30761-01.htm";
							}
						}
						break;
					}
					case KUSTO:
					{
						if (player.isClanLeader())
						{
							if (getQuestItemsCount(player, BROOCH_OF_THE_MAGPIE) == 1)
							{
								if (st.getInt("kurt") == 0)
								{
									htmltext = "30512-01.htm";
								}
								else if (st.getInt("kurt") == 1)
								{
									htmltext = "30512-02.htm";
								}
								else
								{
									htmltext = "30512-04.htm";
								}
							}
						}
						else
						{
							if ((memberCond > 2) && (memberCond < 6))
							{
								htmltext = "30512-01a.htm";
							}
						}
						break;
					}
					case BALTHAZAR:
					{
						if (player.isClanLeader())
						{
							if (cond == 4)
							{
								if (st.getInt("kurt") == 2)
								{
									htmltext = "30764-04.htm";
								}
								else
								{
									htmltext = "30764-02.htm";
								}
							}
							else if (cond == 5)
							{
								if ((getQuestItemsCount(player, TITANS_POWERSTONE) > 9) && (getQuestItemsCount(player, NEBULITE_CRYSTALS) > 9))
								{
									htmltext = "30764-08.htm";
									takeItems(player, TITANS_POWERSTONE, -1);
									takeItems(player, NEBULITE_CRYSTALS, -1);
									takeItems(player, BROOCH_OF_THE_MAGPIE, -1);
									st.setCond(6);
								}
								else
								{
									htmltext = "30764-07.htm";
								}
							}
							else if (cond == 6)
							{
								htmltext = "30764-09.htm";
							}
						}
						else
						{
							if (memberCond == 4)
							{
								htmltext = "30764-01.htm";
							}
						}
						break;
					}
					case SIR_ERIC_RODEMAI:
					{
						if (player.isClanLeader())
						{
							if (cond == 7)
							{
								htmltext = "30868-02.htm";
							}
							else if (cond == 8)
							{
								htmltext = "30868-05.htm";
							}
							else if (cond == 9)
							{
								htmltext = "30868-06.htm";
							}
							else if (cond == 10)
							{
								htmltext = "30868-08.htm";
							}
							else if (cond == 11)
							{
								htmltext = "30868-09.htm";
							}
							else if (cond == 12)
							{
								htmltext = "30868-11.htm";
							}
						}
						else
						{
							if (memberCond == 7)
							{
								htmltext = "30868-01.htm";
							}
							else if ((memberCond == 9) || (memberCond == 10))
							{
								htmltext = "30868-07.htm";
							}
						}
						break;
					}
					case CLEO:
					{
						if (player.isClanLeader())
						{
							if (cond == 8)
							{
								htmltext = "30766-02.htm";
							}
							else if (cond == 9)
							{
								htmltext = "30766-05.htm";
							}
							else if (cond == 10)
							{
								htmltext = "30766-06.htm";
							}
							else if ((cond == 11) || (cond == 12) || (cond == 13))
							{
								htmltext = "30766-07.htm";
							}
						}
						else
						{
							if (memberCond == 8)
							{
								htmltext = "30766-01.htm";
							}
						}
						break;
					}
					case IMPERIAL_COFFER:
					{
						if (player.isClanLeader())
						{
							if ((cond == 10) && !hasQuestItems(player, SCEPTER_OF_JUDGMENT))
							{
								htmltext = getQuestItemsCount(player, IMPERIAL_KEY) >= 6 ? "30765-01.htm" : "30765-03a.htm";
							}
						}
						else
						{
							if (memberCond == 10)
							{
								htmltext = "30765-02.htm";
							}
						}
						break;
					}
					case KALIS:
					{
						if (player.isClanLeader())
						{
							htmltext = "30759-01.htm";
						}
						break;
					}
					case ATHREA:
					{
						if (player.isClanLeader())
						{
							htmltext = "30758-01.htm";
						}
						break;
					}
				}
				break;
			}
		}
		
		return htmltext;
	}
	
	@Override
	public void onAttack(Npc npc, Player attacker, int damage, boolean isSummon, Skill skill)
	{
		if (npc.isDead() || (npc.getId() != IMPERIAL_GRAVEKEEPER))
		{
			return;
		}
		
		final Player realAttacker = isSummon && (attacker.asPlayer() != null) ? attacker.asPlayer() : attacker;
		if ((realAttacker == null) || !realAttacker.isOnline())
		{
			return;
		}
		
		final QuestState qs = getClanLeaderQuestState(realAttacker, npc);
		if ((qs == null) || !qs.isStarted() || (qs.getCond() != 10))
		{
			return;
		}
		
		final double hpPercent = (npc.getCurrentHp() / npc.getMaxHp()) * 100.0;
		
		final int lastSpawnTrigger = npc.getVariables().getInt("lastSpawnTrigger", 100);
		if ((lastSpawnTrigger > 80) && (hpPercent <= 80))
		{
			spawnImperialSlaves(npc);
			npc.getVariables().set("lastSpawnTrigger", 80);
		}
		else if ((lastSpawnTrigger > 40) && (hpPercent <= 40))
		{
			spawnImperialSlaves(npc);
			npc.getVariables().set("lastSpawnTrigger", 40);
		}
		else if ((lastSpawnTrigger > 20) && (hpPercent <= 20))
		{
			spawnImperialSlaves(npc);
			npc.getVariables().set("lastSpawnTrigger", 20);
		}
		
		final int lastTeleport = npc.getVariables().getInt("lastTeleport", 100);
		if ((lastTeleport > 50) && (hpPercent <= 50))
		{
			npc.asAttackable().setCanReturnToSpawnPoint(false);
			teleportImperialGravekeeper(npc, TELEPORT_1_X, TELEPORT_1_Y, TELEPORT_1_Z);
			npc.getVariables().set("lastTeleport", 50);
		}
		else if ((lastTeleport > 30) && (hpPercent <= 30))
		{
			npc.asAttackable().setCanReturnToSpawnPoint(false);
			teleportImperialGravekeeper(npc, TELEPORT_2_X, TELEPORT_2_Y, TELEPORT_2_Z);
			npc.getVariables().set("lastTeleport", 30);
		}
		
		final Skill selfHealSkill = SkillData.getInstance().getSkill(DARK_HEAL_SKILL, 1);
		if (selfHealSkill != null)
		{
			final long now = System.currentTimeMillis();
			final long lastCast = npc.getVariables().getLong("lastDarkHealCast", 0);
			final long reuseDelay = 60000;
			
			if (((now - lastCast) >= reuseDelay) && !npc.isCastingNow() && !npc.isSkillDisabled(selfHealSkill) && (npc.getCurrentMp() >= selfHealSkill.getMpConsume()) && (npc.getCurrentHp() > selfHealSkill.getHpConsume()))
			{
				npc.setTarget(npc);
				npc.getAI().setIntentionCast(selfHealSkill, npc);
				npc.getVariables().set("lastDarkHealCast", now);
			}
		}
	}
	
	@Override
	public void onKill(Npc npc, Player player, boolean isPet)
	{
		QuestState st = null;
		st = getClanLeaderQuestState(player, npc);
		if ((st == null) || !st.isStarted())
		{
			return;
		}
		
		int npcId = npc.getId();
		int cond = st.getCond();
		
		if (npcId == IMPERIAL_GRAVEKEEPER)
		{
			final Player clanLeader = st.getPlayer();
			if ((clanLeader != null) && clanLeader.isOnline() && (cond == 10) && !hasQuestItems(clanLeader, SCEPTER_OF_JUDGMENT) && (clanLeader.calculateDistance3D(npc) <= 1500))
			{
				final Npc coffer = addSpawn(IMPERIAL_COFFER, npc.getX(), npc.getY(), npc.getZ(), npc.getHeading(), true, 180000);
				coffer.broadcastPacket(new NpcSay(coffer, ChatType.NPC_GENERAL, "Curse of the gods on the one that defiles the property of the empire!"));
			}
			return;
		}
		
		if (npcId == GRAVE_GUARD)
		{
			final Player clanLeader = st.getPlayer();
			if ((clanLeader != null) && clanLeader.isOnline() && (cond == 10) && !hasQuestItems(clanLeader, SCEPTER_OF_JUDGMENT) && (clanLeader.calculateDistance3D(npc) <= 1500))
			{
				int graveGuardKills = st.getInt("grave_guard_kills") + 1;
				st.set("grave_guard_kills", graveGuardKills);
				if (((graveGuardKills >= 5) && (getRandom(100) < 50)) || (graveGuardKills >= 10))
				{
					st.set("grave_guard_kills", 0);
					addSpawn(GRAVE_KEYMASTER, npc.getX(), npc.getY(), npc.getZ(), npc.getHeading(), true, 0);
				}
			}
			return;
		}
		
		if (npcId == GRAVE_KEYMASTER)
		{
			final Player clanLeader = st.getPlayer();
			if ((clanLeader != null) && clanLeader.isOnline() && (cond == 10) && !hasQuestItems(clanLeader, SCEPTER_OF_JUDGMENT) && (getQuestItemsCount(clanLeader, IMPERIAL_KEY) < 6) && (clanLeader.calculateDistance3D(npc) <= 1500))
			{
				giveItems(clanLeader, IMPERIAL_KEY, 1);
				if (getQuestItemsCount(clanLeader, IMPERIAL_KEY) >= 6)
				{
					playSound(clanLeader, QuestSound.ITEMSOUND_QUEST_MIDDLE);
				}
				else
				{
					playSound(clanLeader, QuestSound.ITEMSOUND_QUEST_ITEMGET);
				}
			}
			return;
		}
		
		if (((npcId == DRAKE) || (npcId == DRAKE_HOLD)) && (cond == 2))
		{
			final Player clanLeader = st.getPlayer();
			giveItemRandomly(clanLeader, npc, MIST_DRAKE_EGG, 1, 10, 0.10, true);
			giveItemRandomly(clanLeader, npc, DRAKE_EGG, 1, 10, 0.50, true);
			return;
		}
		
		// Handling for LESSER_GIANT_SOLDIER and LESSER_GIANT_SCOUT for retail chances
		if (((npcId == LESSER_GIANT_SOLDIER) || (npcId == LESSER_GIANT_SCOUT)) && (cond == 5))
		{
			final Player clanLeader = st.getPlayer();
			final int roll = getRandom(100);
			
			if ((roll < 10) && (getQuestItemsCount(clanLeader, TITANS_POWERSTONE) < 10))
			{
				giveItems(clanLeader, TITANS_POWERSTONE, 1);
			}
			else if ((roll < 30) && (getQuestItemsCount(clanLeader, NEBULITE_CRYSTALS) < 10))
			{
				giveItems(clanLeader, NEBULITE_CRYSTALS, 1);
			}
			else if (roll < 80)
			{
				giveItems(clanLeader, BROKEN_TITANS_POWERSTONE, 1);
			}
			
			return; // Skip rest of the drop logic for these NPCs
		}
		
		for (int[] element : DROPLIST)
		{
			if (element[0] == npcId)
			{
				if (cond == element[1])
				{
					final int maxCount = element[2];
					final int chance = element[3];
					final int item1 = element[4];
					
					if (item1 != 0)
					{
						giveItemRandomly(st.getPlayer(), item1, 1, maxCount, chance / 1000000d, true);
					}
					else if ((element[0] == GRAVE_GUARD) && (getQuestItemsCount(st.getPlayer(), IMPERIAL_KEY) < 6) && (getRandom(1000000) < chance))
					{
						addSpawn(GRAVE_KEYMASTER, player.getX(), player.getY(), player.getZ(), player.getHeading(), true, 0);
					}
				}
			}
		}
	}
	
	private void spawnImperialSlaves(Npc npc)
	{
		for (int i = 0; i < 4; i++)
		{
			addSpawn(IMPERIAL_SLAVE, npc.getX(), npc.getY(), npc.getZ(), npc.getHeading(), true, 0);
		}
	}
	
	private void teleportImperialGravekeeper(Npc npc, int x, int y, int z)
	{
		npc.broadcastPacket(new TeleportToLocation(npc, x, y, z, npc.getHeading()));
		npc.setXYZ(x, y, z);
		npc.revalidateZone(true);
	}
}