ZURSULUS L2

Test of Witchcraft

ID
229
Название
Test of Witchcraft
start_npcs_json
[30630]
npc_ids_json
[20557,20565,20577,20578,20579,20580,20581,20582,20601,20602,27099,27100,27101,30063,30098,30110,30188,30314,30417,30435,30476,30630,30631,30632,30633]
constants_json
{"LARA":30063,"ALEXANDRIA":30098,"IKER":30110,"VADIN":30188,"NESTLE":30314,"SIR_KLAUS_VASPER":30417,"LEOPOLD":30435,"KAIRA":30476,"ORIM":30630,"RODERIK":30631,"ENDRIGO":30632,"EVERT":30633,"DIRE_WYRM":20557,"ENCHANTED_STONE_GOLEM":20565,"LETO_LIZARDMAN":20577,"LETO_LIZARDMAN_ARCHER":20578,"LETO_LIZARDMAN_SOLDIER":20579,"LETO_LIZARDMAN_WARRIOR":20580,"LETO_LIZARDMAN_SHAMAN":20581,"LETO_LIZARDMAN_OVERLORD":20582,"TAMLIN_ORC":20601,"TAMLIN_ORC_ARCHER":20602,"NAMELESS_REVENANT":27099,"SKELETAL_MERCENARY":27100,"DREVANUL_PRINCE_ZERUEL":27101,"ORIM_DIAGRAM":3308,"ALEXANDRIA_BOOK":3309,"IKER_LIST":3310,"DIRE_WYRM_FANG":3311,"LETO_LIZARDMAN_CHARM":3312,"EN_GOLEM_HEARTSTONE":3313,"LARA_MEMO":3314,"NESTLE_MEMO":3315,"LEOPOLD_JOURNAL":3316,"AKLANTOTH_GEM_1":3317,"AKLANTOTH_GEM_2":3318,"AKLANTOTH_GEM_3":3319,"AKLANTOTH_GEM_4":3320,"AKLANTOTH_GEM_5":3321,"AKLANTOTH_GEM_6":3322,"BRIMSTONE_1":3323,"ORIM_INSTRUCTIONS":3324,"ORIM_LETTER_1":3325,"ORIM_LETTER_2":3326,"SIR_VASPER_LETTER":3327,"VADIN_CRUCIFIX":3328,"TAMLIN_ORC_AMULET":3329,"VADIN_SANCTIONS":3330,"IKER_AMULET":3331,"SOULTRAP_CRYSTAL":3332,"PURGATORY_KEY":3333,"ZERUEL_BIND_CRYSTAL":3334,"BRIMSTONE_2":3335,"SWORD_OF_BINDING":3029,"MARK_OF_WITCHCRAFT":3307,"DIMENSIONAL_DIAMOND":7562}
Статус разбора
metadata_only; dynamic Java conditions/rewards retained in source; unresolved starts: []
Источник
game/data/scripts/quests/Q00229_TestOfWitchcraft/Q00229_TestOfWitchcraft.java

NPC квеста

IDНазваниеСтарт квестаУровень
20557Dire WyrmНет42
20565Enchanted Stone GolemНет42
20577Leto LizardmanНет35
20578Leto Lizardman ArcherНет36
20579Leto Lizardman SoldierНет37
20580Leto Lizardman WarriorНет38
20581Leto Lizardman ShamanНет39
20582Leto Lizardman OverlordНет40
20601Tamlin OrcНет41
20602Tamlin Orc ArcherНет42
27099Nameless RevenantНет38
27100Skeletal MercenaryНет39
27101Drevanul Prince ZeruelНет42
30063LaraНет70
30098AlexandriaНет70
30110IkerНет70
30188VadinНет70
30314NestleНет70
30417Sir Klaus VasperНет70
30435LeopoldНет70
30476KairaНет70
30630OrimДа70
30631RoderikНет70
30632EndrigoНет70
30633EvertНет70

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

else if (player.getLevel() < 39)

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

giveItems(player, ORIM_DIAGRAM, 1);
giveItems(player, DIMENSIONAL_DIAMOND, DF_REWARD_39.get(player.getPlayerClass().getId()));
giveItems(player, BRIMSTONE_1, 1);
giveItems(player, ORIM_INSTRUCTIONS, 1);
giveItems(player, ORIM_LETTER_1, 1);
giveItems(player, ORIM_LETTER_2, 1);
giveItems(player, MARK_OF_WITCHCRAFT, 1);
addExpAndSp(player, 139796, 40000);
giveItems(player, ALEXANDRIA_BOOK, 1);
giveItems(player, IKER_LIST, 1);
giveItems(player, IKER_AMULET, 1);
giveItems(player, SOULTRAP_CRYSTAL, 1);
giveItems(player, AKLANTOTH_GEM_2, 1);
giveItems(player, LARA_MEMO, 1);
giveItems(player, NESTLE_MEMO, 1);
giveItems(player, LEOPOLD_JOURNAL, 1);
giveItems(player, SIR_VASPER_LETTER, 1);
giveItems(player, BRIMSTONE_2, 1);
giveItems(player, AKLANTOTH_GEM_1, 1);
giveItems(player, SWORD_OF_BINDING, 1);
giveItems(player, VADIN_CRUCIFIX, 1);
giveItems(player, VADIN_SANCTIONS, 1);
giveItems(player, DIRE_WYRM_FANG, 1);
giveItems(player, EN_GOLEM_HEARTSTONE, 1);
giveItems(player, LETO_LIZARDMAN_CHARM, 1);
giveItems(player, LETO_LIZARDMAN_CHARM, 1);
giveItems(player, LETO_LIZARDMAN_CHARM, 1);
giveItems(player, AKLANTOTH_GEM_3, 1);
giveItems(player, AKLANTOTH_GEM_4, 1);
giveItems(player, AKLANTOTH_GEM_5, 1);
giveItems(player, AKLANTOTH_GEM_6, 1);
giveItems(player, TAMLIN_ORC_AMULET, 1);
giveItems(player, PURGATORY_KEY, 1);
giveItems(player, ZERUEL_BIND_CRYSTAL, 1);

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

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

[30063-01.htm] Trader Lara: Jewels? Ah! You mean the one that I bought in Giran's gallery recently. It was for one of my patrons who is really into collecting empire antiques. The jewels are already in his hands... Who is your patron? [30063-02.htm] Trader Lara: Let's see... The records say it was sold by the village leather craftsman Ismell. He has been behaving strangely since he bought jewelry from our shop. He has been seen wandering around the village in the middle of the night, murmuring to himself in a strange voice. Then suddenly he disappeared. Out of the blue! A few days ago he was spotted by execution Guard Roderick, running onto the Execution Grounds with a very pale face... [30063-03.htm] Trader Lara: I hope that Ismel is all right... [30063-04.htm] Trader Lara: Poor Ismel... He didn't even get a proper burial... Such an upstanding person... how could he have turned into an undead? So strange! Do you suppose that it has something to do with the jewelry? [30063-05.htm] Trader Lara: I am quite sure that the jewel you seek is an omen. If I were you, I would give it to the Highest Priest of Einhasad's shrine! [30098-01.htm] Trader Alexandria: What have you come here for? I wish to know about the jewels sold during auction. [30098-02.htm] Trader Alexandria: Ah! The jewels from last week's auction! They are truly exquisite, crafted with impeccable detail in the late empire fashion. They belonged to Trader Nestle of Gludin who requested that they be put in this auction as a relic from the ancient empire. They were all sold at the last auction. I must check the account book to see who bought them... Please check the account book. [30098-03.htm] Trader Alexandria: My records are very detailed. Three jewels were put up on auction. There were originally six pieces in the set, but the others were not in this set and were sold separately. The first jewel was sold to Magister Iker. He is one of the members of the Mystics Guild of this village. The second jewel was sold to Trader Lara in the Town of Dion. And the last jewel was sold to a Dark Elf named Kaira. She is one of the few Dark Elves who live in this village. I'm not sure, but you seem to be in something of a hurry. If need be, I will lend you my account book. You should meet the owners first, and ask Trader Nestle of Gludin about the origin of the jewels. [30098-04.htm] Trader Alexandria: Jewels received by Mr. Nestle... I didn't realize they were so valuable! As I told you, the 3 jewels that I put on the auction were sold to Magister Iker, Trader Lara and Dark Elven Magister Kaira... You should meet them first and then ask Trader Nestle in Gludin about the source of the jewels. [30098-05.htm] Trader Alexandria: Did you find the jewels? I have done some research and found that these jewels were used by the ancients to control evil. Had I known this earlier I could have sold them for a much higher price... Oh well, this has been very enlightening! [30110-01.htm] Magister Iker: The jewel bought at auction? Yes. So you noticed? That jewel is not an ordinary gem. I also felt a strong magical power emanating from the jewel, which is why I purchased it in the first place. But did you also perceive that the powers emitted from this jewel have a strong sense of... darkness. If you absolutely must have this jewel for your research, I'll trade it for something else. But you must first promise me that you will use the dark powers of this jewel responsibly. If you are like Hardin and his disciples, who were seduced by the powers of darkness and set their hands on forbidden dark magic, I shall never surrender this jewel. So promise me that you'll not use this jewel for evil purposes. I promise. [30110-02.htm] Magister Iker: All right. You can have the jewel. But I paid a hefty sum for it and require compensation. What about that? Bring me the materials I need for my research and I will give you the jewel in exchange. "I will gather your materials for you." [30110-03.htm] Magister Iker: All right, this is what I need. First, the teeth of the wyrm that lives in the Sea of Spores. 20 of them should be enough. You must also bring me the Leto Lizardman's amulet. You can find the Leto Lizardmen in the southern parts of Oren. You must bring me 20 of these.. And last, I need the stoneheart of the enchanted stone golems that may be found near the Ivory Tower. I will need 20 of these... These are quite a few items so I've written them down for you. Bring them to me and you shall have your jewel... [30110-04.htm] Magister Iker: Not yet? Bring the ingredients on this list and I will give you the jewel you seek. [30110-05.htm] Magister Iker: Ah, all the items that I asked for! Many thanks for your troubles... They will be of great help in my research. Here is the jewel. I must warn you that you must be careful of this jewel. In the few days that it was in my possession, I got the distinct impression that it was draining my life energy. In any case, it is a dangerous item. Beware. [30110-06.htm] Magister Iker: That jewel does not seem ordinary. I feel evil emanating from it. Be careful. [30110-07.htm] Magister Iker: You again? You have betrayed me! You gave that jewel to Orim of the Shadows after you promised that you wouldn't consort with Hardin and his minions! Leave now! You have sold your soul for dark power! I will not speak with you any longer. Explain the circumstances. [30110-08.htm] Magister Iker: Once again the short-sightedness of you dark sorcerers has brought disaster! Your careless use of dark magic has loosed a devil upon us! In any case, the monster Zeruel cannot be allowed to roam free. I shall lend you the Soul-trap Crystal. Seal the devil behind the doors of purgatory once again and return the crystal to me. This necklace has the power to deflect evil, it will also be of help to you. Now go! [30110-09.htm] Magister Iker: Due to your carelessness, a monster from the netherworld has been released from its bonds! You must bear responsibility for the beast that you have loosed upon us! You must destroy Zeruel's body and then use the Soul-trap Crystal to trap his soul. [30110-10.htm] Magister Iker: You have trapped the soul of the devil Zeruel within the Crystal of Binding... The malevolence of his soul makes me shudder! You must return and seal this devil within the original box! [30188-01.htm] Priest Vadin: Why do you seek to use the Sword of Binding? The Drevanul, Zeruel? I never heard of that monster. I see from your desperate look that you are not lying. I shall give you a test. If you complete this, I will approve that your resolve and faith are strong, and give you the sanction of the church. Listen carefully. The number of pilgrims to the great shrine of Aden is growing day by day. There are also wicked Orcs who are preying upon the pilgrims. The Tamlin Orcs of southern Aden are among them. Kill them and bring 20 Tamlin Orc Amulets as proof. This is the trial that the shrine asks of you. [30188-02.htm] Priest Vadin: Have you completed the trial that I gave you? Let me remind you, you must kill the Tamlin Orcs and bring 20 amulets as proof. If you complete the trial, I shall acknowledge that your resolve and faith are strong, and give you permission to use the Sword of Binding. [30188-03.htm] Priest Vadin: Good job! You have proven your faith and resolve. I hereby give you permission to use the Sword of Binding. Take this to Sir Klaus Vasper. [30188-04.htm] Priest Vadin: Haven't I already given you permission to use the Sword of Binding? Go and find Sir Klaus Vasper to receive the sword. Punish the creatures of hell in the name of the shrine. [30188-05.htm] Priest Vadin: Punish the children of darkness with the power of light! This is the will of the shrine, as well as a duty of the followers of Einhasad! [30314-01.htm] Trader Nestle: Ah, the Jewel of Aklantoth. I commissioned Trader Alexandria of Giran to sell it at auction. There were originally 6 jewels in the set, but unfortunately we have only acquired 3 of them so far. If I had the whole set I could get a much higher price... "Where were the jewels found?" [30314-02.htm] Trader Nestle: The soldiers brought them to me. They told me that they took the jewels during a fight with Turek Orcs. The northwest coast of Gludio is where the relics of the Elmoreden empire are often found... It is also written here in the account book! Three jewels of empirical style, sold by Leopold of the Black Lion Troop. You should ask him for the details. I think he lives near the rebuilding site of Gludin. [30314-03.htm] Trader Nestle: As I told you before, the jewels that you are looking for were brought by Leopold of the Black Lion Troop. Ask him for the details. I think he lives near the rebuilding site of Gludin. [30314-04.htm] Trader Nestle: Such a shame... To take a life for mere jewelry...! [30417-01.htm] Sir Klaus Vasper: Hello! I am Klaus Vasper, a member of the glorious continental Knight league, knighted by King Cadmus as the Guardian Knight of the west. Also known as 'guardian of the 3 swords'. Ask about the Sword of Binding [30417-02.htm] Sir Klaus Vasper: I am entrusted with 3 swords. The first is the 'Sword of Ritual' which is used in every knighting ceremony. The second is the 'Sword of Chastity' which our ancestors received from Ordana, the lady of the forest. The last is the Sword of Binding which Artreus, the hero of Elmoreden, used to seal the magical creatures of Shilen. May I please borrow the Sword of Binding? [30417-03.htm] Sir Klaus Vasper: No need to explain, I can see that you are in desperate need of the Sword of Binding. Unfortunately I cannot lend you the Sword of Binding without the permission of the Einhasad shrine. We must take every precaution to guarantee that the sword does not fall into the hands of the betrayers of Shilen. Legend says that this sword has the power to seal magical creatures, and also the power to free them. Go and find Priest Vadin in the town of Oren. If he gives his permission for you to use the Sword of Binding, I shall gladly lend it to you. [30417-04.htm] Sir Klaus Vasper: If you wish to use the Sword of Binding you must have the permission of the shrine. Go to Priest Vadin in Town of Oren and get his permission. [30417-05.htm] Sir Klaus Vasper: A sanction from the shrine! I shall lend you the Sword of Binding. I pray that you find and punish the creature that you seek. [30417-06.htm] Sir Klaus Vasper: I see that you are still hunting the creature. I pray for your success in the name of the Goddess of Light! [30435-01.htm] Leopold: Nice to meet you, traveler. I am Leopold, Commander of the third platoon of the Black Lion mercenaries. Our troops are as dignified and brave as any Knights on this continent. Last summer when the drakes swarmed out of Dragon Valley, we defended Castle Giran. A few months ago when the pirates of Avella attacked the floating city of Heine, it was the Black Lions who defeated them. These days we are battling the Turek orc people of the northwestern part of Gludio at the request of farmer Piotur. Ask about the jewel. [30435-02.htm] Leopold: They filled their pockets with the treasures of the ancient kingdom they found on the battlefield. They sold most of them at the shop, but there arose a dispute over a few very valuable jewels. I grew weary of their bickering and confiscated 3 out of 6 jewels and sent them to Trader Nestle for safekeeping. Meanwhile, tempers flared and three of them attacked and decapitated their colleagues in order to make their escape with 3 of the jewels! This senseless murder caused me such despair that I asked Nestle to dispose the rest of the jewels. I sent troops to punish the murderers, who witnessed the rogues kill each other over the jewels and then rise as undead! You will find them among the skull troops near the Wastelands. [30435-03.htm] Leopold: The murdering thieves killed each other over the jewels, and have now become undead. Search among the skull troops near the wastelands. [30435-04.htm] Leopold: Oh, why would they kill each other over mere jewels? Even mercenaries should have more dignity than that! Those jewels must be cursed! [30435-05.htm] Leopold: Have you disposed of the cursed jewels? Say the word and I will do it for you! [30476-01.htm] Magister Kaira: I heard that Orim of the Shadows is looking for this jewel.... Are you sent by him? No doubt, it is obvious. Do you know what kind of jewel this is? What did he tempt you with? Do you think that you can learn all the secrets of Black magic just from this jewel? If you are stupid enough to believe anything that Orim says, you can have the jewel. Just remember, all knowledge has its price. The first rule of Black magic is 'You lose as much as you get'. "Give me the jewel." [30476-02.htm] Magister Kaira: Good. You may have it. Money will not purchase this, however. Instead you'll have to pay for it in another way. [30476-03.htm] Magister Kaira: Do you have any idea what the jewel you have taken is capable of? A wise Wizard would never give or take such an object so carelessly. [30476-04.htm] Magister Kaira: Well, now you know of the evil that dwells in the jewel... You wouldn't have listened even if I had warned you. You people never trust Dark Elves! [30630-01.htm] Orim of the Shadow: The Wizards of the Ivory Tower and the Priests of Einhasad warn us against any use of Black Magic. They seem to think that it is filthy and immoral. Those like you who hate what you do not understand are ignorant bigots. You don't even try to understand! Now get out of here! (This quest may only be undertaken by Wizards, Knights and Palus Knights.) [30630-02.htm] Orim of the Shadow: The power of darkness is neither good nor bad. No one judges whether a sharp blade is good or bad... The magic depends entirely on the user. It can be used for justice as easily as it can be used for evil. There is no denying the fact that it is a very powerful tool. Learning Black Magic requires a certain degree of spiritual sophistication. I see in your eyes a lust for forbidden power... Just as no parent would give a sword to an untrained child, I will not give you the secrets of Black Magic. (This quest may only be undertaken by a character of level 39 and above.) [30630-03.htm] Orim of the Shadow: The power of darkness is neither good nor bad. No one judges whether a sharp blade is good or bad... The magic depends entirely on the user. It can be used for justice as easily as it can be used for evil. There is no denying on the fact that it is a powerful tool. Learning Black Magic requires a certain degree of spiritual sophistication. If you are ready to learn Black magic despite the bullying and scorn of people around you, I will gladly accept you as my pupil. "I am ready to face it." [30630-04.htm] Orim of the Shadow: It is very true that actions speak louder than words, and practice is more important than theory. I have no doubt that your resolutions are truthful but I can't totally believe you until you prove yourself. I will give you the opportunity to prove your faith and resolution. Will you help me with my research for a while? I will see during that period how serious you are, how intense your faith is, and above all, how passionate you are about the hidden truth. What do you say? Will you help me? Will you assist me in unveiling the secrets of black magic? I shall help. [30630-05.htm] Orim of the Shadow: From time to time people like you come to me wanting to learn black magic. They're usually people disillusioned such as Knights, who have trampled innocent serfs, or Priests, who burned innocent people at the stake... They all have their reasons, but they share one thing in common... Anger at the hypocrisy of practicing cruelty in the name of justice. These people share a common desire to show that justice can also be achieved through black magic. The power of darkness itself is neither good nor bad. Just as nobody judges a sharp blade as good or bad... It depends wholly on the user. It could be used for justice as easily as for slaughter and destruction. However, if you are to arrive at justice through darkness, and grasp hold of raw dark power, you must turn your back on the light and embrace darkness, enduring the contempt and bullying of people around you. You must firmly hold true to your will, and your faith... Dear Knight, is your will strong enough? Nothing can change my will and faith. [30630-06.htm] Orim of the Shadow: It is very true that actions speak louder than words, and practice is more important than theory. I have no doubt that your resolutions are truthful but I can't totally believe you until you prove yourself. I will give you the opportunity to prove your faith and resolution. Will you help me with my research for a while? I will see during that period how serious you are, how intense your faith is, and above all, how passionate you are about the hidden truth. What do you say? Will you help me? Will you assist me in unveiling the secrets of black magic? "I shall help." [30630-07.htm] Orim of the Shadow: Then take a look at this. It is something that I found in the Cruma Tower one day. A cube made out of a mysterious substance. They say that the Wizards of the ancient kingdom called it a 'spirit container' because it could hold a dead person's spirit in it. That is how they tried to keep all the great scholars and philosophers' knowledge and experience. This box right here contains the spirit of Magus Aklantoth in the days of Elmoreden. Recently, he woke up from his 1,000-year sleep. It is faint, but clear enough... I hear his voice, calling me... He has promised to teach me all he knows in magic if I free his spirit from the box. You can always rely on a Wizard's word... So, what we need to do is open this box, and we'll have access to the secrets of black magic from the age of the empire. So how do you open the box? [30630-08.htm] Orim of the Shadow: This box seems to be impregnable. On each side is a space where a jewel should be, and the spaces all seem to form a kind of lock. The box will open only when all 6 jewels are placed in their spaces, in the right order. Opening the box will be something of a challenge. This book has pictures of the 6 jewels. You must find them. In the meantime, I will try to find out which order they must be placed in. There is a jewelry auction at the Luxury Gallery of the Town of Giran. You should go and check there first. [30630-08a.htm] Orim of the Shadow: This box is sealed with magic power and can never be opened through physical power. See these 6 grooves, one on each side of the box? Each is a lock. To open the box, each must be unlocked by inserting the right jewelry in the right order. Even the process of opening the box itself is a riddle! Look here in this bookof pictures of the jewelry required. Your task is to find the 6 pieces of jewelry that act as keys.While you are gone, I will try to determine the order of insertion. I have heard a rumor that several pieces of jewelry cut in the imperial style were up for auction at the Giran Town Luxury Shop. Why not travel there first and have a look? Here, take this Dimension Diamond. You can trade it to the village gatekeeper for something special that may help you on your journey. [30630-09.htm] Orim of the Shadow: You must leave immediately for the jewelry auction at Giran's luxury gallery. [30630-10.htm] Orim of the Shadow: While you are searching for the 6 Gems of Aklantoth, I shall try to unravel the mystery of the order of the stones. We shall soon discover the secrets of the ancients contained in this box! [30630-11.htm] Orim of the Shadow: Ah, all 6 jewels! Excellent! While you were busy finding them I was researching the order of inserting the jewels. And just now I have solved the secret! Give me the jewels! We shall soon learn the secrets of the Cube of Aklantoth! Ask about the undead Give the Gems of Aklantoth to Orim. [30630-12.htm] Orim of the Shadow: All the previous owners of the jewels became undead? The Black magic dwelling in the jewels must drain the life energy of the owner... Normally, one would throw away or destroy such jewels, but these people held on to them too long... I suspect that the jewels held some other power over those who possessed them... This power must have something to do with the box. Well, we won't know until we open it. All that remains is to insert the jewels, each in its own space, in the correct order. Now, give me the jewels! Give the Gems of Aklantoth to Orim. [30630-13.htm] Orim of the Shadow: At last! Will the cube of Aklantoth be opened...? May the six bindings, tied by the almighty be undone, and let it see... daylight! Why should it be deprived of light...? Let those trapped in darkness, break free, and set their feet anew on the ground! Ah...! No!!! What have I done...? What's the matter? [30630-14.htm] Orim of the Shadow: How could I have been so stupid? I cannot believe a mere demon got the better of me! I, Orim of the Shadow, the best pupil of the great Wizard Hardin! He must be disposed of before he is complete! Hurry! He must not be allowed to reach his full strength! [30630-15.htm] Orim of the Shadow: I truly believed this to be the Cube of Aklantoth... the sacred container of the spirit of the ancient scholar... Actually a demon's prison! And not just any demon, but Zeruel, the Malrukian prince, Monarch of Drevanul, the bloody angel! It is all my fault! My pride has been my downfall! "We must get control of this situation!" [30630-16.htm] Orim of the Shadow: At the last moment I was able to weaken Zeruel. It is not permanent, however. If I were to lose my concentration for even one second, Zeruel and his minions will escape. Zeruel himself holds the key to seal the box permanently. We must take the key from him and then seal him in again. To do so, we need 2 things, the Sword of Binding and the Soul-trap Crystal... Once we get these things, we will be able to bring Zeruel down and seal his spirit permanently back in the box. You should be able to get the Sword of Binding from Sir Klaus Vasper in Gludin. I will write you a letter explaining the situation. He won't be inclined to lend his sword to a practitioner of Witchcraft... Do what you can to win his trust and borrow the sword from him. As for the Soul-trap Crystal, go and see Magister Iker of Giran. She is also hostile to Witchcraft, but if you explain the urgency of the situation she should let you borrow it. Meanwhile I will do my best to keep Zeruel under control. Please hurry! Although Zeruel is still weak, once he gets his strength back no one will be able to resist him! [30630-17.htm] Orim of the Shadow: We must have 2 things in order to lock the devil Zeruel back into the box: the Sword of Binding, and the Soul-trap Crystal. The Sword of Binding belongs to Sir Klaus Vasper, and the Soul-trap Crystal is owned by Magister Iker of Giran. Both of them are very prejudiced against Witchcraft and will need to be convinced to cooperate. [30630-18.htm] Orim of the Shadow: Ah, the Sword of Binding and the Soul-trap Crystal! You have acquired the 2 holy objects! Now, we must find Zeruel...! My searching spell wasn't a total success, but I have a clue of where he might be. I am fairly certain that he is in the northern part of the Town of Dion, somewhere near the Floran Village. He is probably dwelling inside a human body. When Zeruel reveals himself, you must use all your strength to kill him. Remember this, the last stroke must be taken with the Sword of Binding and then you must seal his spirit with the Soul-trap Crystal. I know you can do it. Please hurry. [30630-19.htm] Orim of the Shadow: Please hurry up and give me the crystal and the key! My concentration is slipping! We must not delay any longer! Give Orim the crystal in which Zeruel is sealed [30630-20.htm] Orim of the Shadow: I command thee, devil trapped in this prison of spirits! I invoke the name of Gran Kain, ruler of all darkness, get thee back from whence ye came! Oh chains of heaven which bind the evil creatures of shadow, I beseech thee in the name of Einhasad, may this sealed seraph imprison the demon forever! Now hurry! Give me the key! Give the Purgatory Key to Orim. [30630-21.htm] Orim of the Shadow: I, Orim of the Shadow, declare that this prison of spirits shall bear my seal forever! It is done. Zeruel and his minions are safeley locked inside the box and the box is sealed with the magic of light. I shall keep the 6 jewels that function as the lock for safekeeping. As for the sword and crystal, I shall return them to their owners. ...I don't know why but I still get the feeling that I am being watched... Have you received an unexpected gift recently? Give Iker's Necklace to Orim [30630-22.htm] Orim of the Shadow: The necklace of Magister Iker? Damn her eyes! I shall dispose of this right away. The Wizards of the Ivory Tower have been watching us all along with this necklace! Thank you very much, anyway. You saved us from certain disaster that was a direct result of my arrogance and greed. I am solely responsible for what happened. I was blind to the demon's tricks. Of course I can't blame the demon too much, that is just what demons do. After all, a Wizard who cannot control dark power is not much good to anyone... I wish I could take you to meet Hardin right away, but I am too ashamed to see him right now. I must meditate to recover my confidence. Take this Mark of Witchcraft. From here on, the road of the Magus will appear before thee. [30631-01.htm] Warden Roderik: Ismell? He passed here a few days ago. He seemed quite pale. He was determined to go to the execution place, even though I explained to him that the undead have been exceptionally active. He refused to listen to me, saying that he can't afford to lose such a precious thing. Afterwards a terrible shriek could be heard and he has not been seen since. I suppose he has become one of those nameless souls that wander around the Execution Grounds. [30632-01.htm] Warden Endrigo: Ismel? Ah, yes I remember him. He is in there. I suppose that he also turned into one of those 'nameless souls' by now. A few days ago, he ran in there as if he was being chased by someone... A terrible shriek was heard... And he never returned. [30633-01.htm] Fisher Evert: When I was young, I also dreamed of traveling the world and seeking adventure. But eventually I fell in love with a woman and became a fisherman. Now I am retired, with no care but to cast my line on a peaceful afternoon... This is not a bad life at all, is it? Please remove that sword. The reflecting sunlight is scaring the fish... Pull out the Sword of Binding [30633-02.htm] Fisher Evert: If you had only minded your own business and continued on your way you would have lived another day... Do you seriously intend to challenge the Prince of Darkness?! A foolhardy move indeed! [30633-03.htm] Fisher Evert: What...what is going on...? Oh that was horrible... What a terrible nightmare!
Исходник условий и наград (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.Q00229_TestOfWitchcraft;

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.enums.ChatType;
import org.l2jmobius.gameserver.network.serverpackets.SocialAction;

public class Q00229_TestOfWitchcraft extends Quest
{
	// NPCs
	private static final int LARA = 30063;
	private static final int ALEXANDRIA = 30098;
	private static final int IKER = 30110;
	private static final int VADIN = 30188;
	private static final int NESTLE = 30314;
	private static final int SIR_KLAUS_VASPER = 30417;
	private static final int LEOPOLD = 30435;
	private static final int KAIRA = 30476;
	private static final int ORIM = 30630;
	private static final int RODERIK = 30631;
	private static final int ENDRIGO = 30632;
	private static final int EVERT = 30633;
	
	// Monsters
	private static final int DIRE_WYRM = 20557;
	private static final int ENCHANTED_STONE_GOLEM = 20565;
	private static final int LETO_LIZARDMAN = 20577;
	private static final int LETO_LIZARDMAN_ARCHER = 20578;
	private static final int LETO_LIZARDMAN_SOLDIER = 20579;
	private static final int LETO_LIZARDMAN_WARRIOR = 20580;
	private static final int LETO_LIZARDMAN_SHAMAN = 20581;
	private static final int LETO_LIZARDMAN_OVERLORD = 20582;
	private static final int TAMLIN_ORC = 20601;
	private static final int TAMLIN_ORC_ARCHER = 20602;
	private static final int NAMELESS_REVENANT = 27099;
	private static final int SKELETAL_MERCENARY = 27100;
	private static final int DREVANUL_PRINCE_ZERUEL = 27101;
	
	// Items
	private static final int ORIM_DIAGRAM = 3308;
	private static final int ALEXANDRIA_BOOK = 3309;
	private static final int IKER_LIST = 3310;
	private static final int DIRE_WYRM_FANG = 3311;
	private static final int LETO_LIZARDMAN_CHARM = 3312;
	private static final int EN_GOLEM_HEARTSTONE = 3313;
	private static final int LARA_MEMO = 3314;
	private static final int NESTLE_MEMO = 3315;
	private static final int LEOPOLD_JOURNAL = 3316;
	private static final int AKLANTOTH_GEM_1 = 3317;
	private static final int AKLANTOTH_GEM_2 = 3318;
	private static final int AKLANTOTH_GEM_3 = 3319;
	private static final int AKLANTOTH_GEM_4 = 3320;
	private static final int AKLANTOTH_GEM_5 = 3321;
	private static final int AKLANTOTH_GEM_6 = 3322;
	private static final int BRIMSTONE_1 = 3323;
	private static final int ORIM_INSTRUCTIONS = 3324;
	private static final int ORIM_LETTER_1 = 3325;
	private static final int ORIM_LETTER_2 = 3326;
	private static final int SIR_VASPER_LETTER = 3327;
	private static final int VADIN_CRUCIFIX = 3328;
	private static final int TAMLIN_ORC_AMULET = 3329;
	private static final int VADIN_SANCTIONS = 3330;
	private static final int IKER_AMULET = 3331;
	private static final int SOULTRAP_CRYSTAL = 3332;
	private static final int PURGATORY_KEY = 3333;
	private static final int ZERUEL_BIND_CRYSTAL = 3334;
	private static final int BRIMSTONE_2 = 3335;
	private static final int SWORD_OF_BINDING = 3029;
	
	// Rewards
	private static final int MARK_OF_WITCHCRAFT = 3307;
	private static final int DIMENSIONAL_DIAMOND = 7562;
	
	// Misc
	private static boolean _drevanulPrinceZeruel = false;
	private static boolean _swordOfBinding = false;
	
	public Q00229_TestOfWitchcraft()
	{
		super(229, "Test of Witchcraft");
		registerQuestItems(ORIM_DIAGRAM, ALEXANDRIA_BOOK, IKER_LIST, DIRE_WYRM_FANG, LETO_LIZARDMAN_CHARM, EN_GOLEM_HEARTSTONE, LARA_MEMO, NESTLE_MEMO, LEOPOLD_JOURNAL, AKLANTOTH_GEM_1, AKLANTOTH_GEM_2, AKLANTOTH_GEM_3, AKLANTOTH_GEM_4, AKLANTOTH_GEM_5, AKLANTOTH_GEM_6, BRIMSTONE_1, ORIM_INSTRUCTIONS, ORIM_LETTER_1, ORIM_LETTER_2, SIR_VASPER_LETTER, VADIN_CRUCIFIX, TAMLIN_ORC_AMULET, VADIN_SANCTIONS, IKER_AMULET, SOULTRAP_CRYSTAL, PURGATORY_KEY, ZERUEL_BIND_CRYSTAL, BRIMSTONE_2, SWORD_OF_BINDING);
		addStartNpc(ORIM);
		addTalkId(LARA, ALEXANDRIA, IKER, VADIN, NESTLE, SIR_KLAUS_VASPER, LEOPOLD, KAIRA, ORIM, RODERIK, ENDRIGO, EVERT);
		addAttackId(NAMELESS_REVENANT, SKELETAL_MERCENARY, DREVANUL_PRINCE_ZERUEL);
		addKillId(DIRE_WYRM, ENCHANTED_STONE_GOLEM, LETO_LIZARDMAN, LETO_LIZARDMAN_ARCHER, LETO_LIZARDMAN_SOLDIER, LETO_LIZARDMAN_WARRIOR, LETO_LIZARDMAN_SHAMAN, LETO_LIZARDMAN_OVERLORD, TAMLIN_ORC, TAMLIN_ORC_ARCHER, NAMELESS_REVENANT, SKELETAL_MERCENARY, DREVANUL_PRINCE_ZERUEL);
	}
	
	@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 "30630-08.htm":
			{
				st.startQuest();
				giveItems(player, ORIM_DIAGRAM, 1);
				if (!player.getVariables().getBoolean("secondClassChange39", false))
				{
					htmltext = "30630-08a.htm";
					giveItems(player, DIMENSIONAL_DIAMOND, DF_REWARD_39.get(player.getPlayerClass().getId()));
					player.getVariables().set("secondClassChange39", true);
				}
				break;
			}
			case "30630-14.htm":
			{
				st.setCond(4, true);
				st.unset("gem456");
				takeItems(player, AKLANTOTH_GEM_1, 1);
				takeItems(player, AKLANTOTH_GEM_2, 1);
				takeItems(player, AKLANTOTH_GEM_3, 1);
				takeItems(player, AKLANTOTH_GEM_4, 1);
				takeItems(player, AKLANTOTH_GEM_5, 1);
				takeItems(player, AKLANTOTH_GEM_6, 1);
				takeItems(player, ALEXANDRIA_BOOK, 1);
				giveItems(player, BRIMSTONE_1, 1);
				addSpawn(DREVANUL_PRINCE_ZERUEL, 70381, 109638, -3726, 0, false, 120000);
				break;
			}
			case "30630-16.htm":
			{
				st.setCond(6, true);
				takeItems(player, BRIMSTONE_1, 1);
				giveItems(player, ORIM_INSTRUCTIONS, 1);
				giveItems(player, ORIM_LETTER_1, 1);
				giveItems(player, ORIM_LETTER_2, 1);
				break;
			}
			case "30630-22.htm":
			{
				takeItems(player, IKER_AMULET, 1);
				takeItems(player, ORIM_INSTRUCTIONS, 1);
				takeItems(player, PURGATORY_KEY, 1);
				takeItems(player, SWORD_OF_BINDING, 1);
				takeItems(player, ZERUEL_BIND_CRYSTAL, 1);
				giveItems(player, MARK_OF_WITCHCRAFT, 1);
				addExpAndSp(player, 139796, 40000);
				player.broadcastPacket(new SocialAction(player.getObjectId(), 3));
				st.exitQuest(false, true);
				break;
			}
			case "30098-03.htm":
			{
				st.setCond(2, true);
				st.set("gem456", "1");
				takeItems(player, ORIM_DIAGRAM, 1);
				giveItems(player, ALEXANDRIA_BOOK, 1);
				break;
			}
			case "30110-03.htm":
			{
				playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
				giveItems(player, IKER_LIST, 1);
				break;
			}
			case "30110-08.htm":
			{
				takeItems(player, ORIM_LETTER_2, 1);
				giveItems(player, IKER_AMULET, 1);
				giveItems(player, SOULTRAP_CRYSTAL, 1);
				if (hasQuestItems(player, SWORD_OF_BINDING))
				{
					st.setCond(7, true);
				}
				else
				{
					playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
				}
				break;
			}
			case "30476-02.htm":
			{
				giveItems(player, AKLANTOTH_GEM_2, 1);
				if (hasQuestItems(player, AKLANTOTH_GEM_1, AKLANTOTH_GEM_3) && (st.getInt("gem456") == 6))
				{
					st.setCond(3, true);
				}
				else
				{
					playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
				}
				break;
			}
			case "30063-02.htm":
			{
				playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
				giveItems(player, LARA_MEMO, 1);
				break;
			}
			case "30314-02.htm":
			{
				st.set("gem456", "2");
				playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
				giveItems(player, NESTLE_MEMO, 1);
				break;
			}
			case "30435-02.htm":
			{
				st.set("gem456", "3");
				playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
				takeItems(player, NESTLE_MEMO, 1);
				giveItems(player, LEOPOLD_JOURNAL, 1);
				break;
			}
			case "30417-03.htm":
			{
				playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
				takeItems(player, ORIM_LETTER_1, 1);
				giveItems(player, SIR_VASPER_LETTER, 1);
				break;
			}
			case "30633-02.htm":
			{
				st.setCond(9, true);
				giveItems(player, BRIMSTONE_2, 1);
				if (!_drevanulPrinceZeruel)
				{
					addSpawn(DREVANUL_PRINCE_ZERUEL, 13395, 169807, -3708, 0, false, 299000);
					_drevanulPrinceZeruel = true;
					
					// Resets Drevanul Prince Zeruel
					startQuestTimer("zeruel_cleanup", 300000, null, player, false);
				}
				break;
			}
			case "zeruel_despawn":
			{
				npc.abortAttack();
				npc.decayMe();
				return null;
			}
			case "zeruel_cleanup":
			{
				_drevanulPrinceZeruel = false;
				return null;
			}
		}
		
		return htmltext;
	}
	
	@Override
	public String onTalk(Npc npc, Player player)
	{
		String htmltext = getNoQuestMsg(player);
		final QuestState st = getQuestState(player, true);
		
		switch (st.getState())
		{
			case State.CREATED:
			{
				if ((player.getPlayerClass() != PlayerClass.KNIGHT) && (player.getPlayerClass() != PlayerClass.WIZARD) && (player.getPlayerClass() != PlayerClass.PALUS_KNIGHT))
				{
					htmltext = "30630-01.htm";
				}
				else if (player.getLevel() < 39)
				{
					htmltext = "30630-02.htm";
				}
				else
				{
					htmltext = (player.getPlayerClass() == PlayerClass.WIZARD) ? "30630-03.htm" : "30630-05.htm";
				}
				break;
			}
			case State.STARTED:
			{
				final int cond = st.getCond();
				final int gem456 = st.getInt("gem456");
				switch (npc.getId())
				{
					case ORIM:
					{
						if (cond == 1)
						{
							htmltext = "30630-09.htm";
						}
						else if (cond == 2)
						{
							htmltext = "30630-10.htm";
						}
						else if (cond == 3)
						{
							htmltext = "30630-11.htm";
						}
						else if (cond == 4)
						{
							htmltext = "30630-14.htm";
						}
						else if (cond == 5)
						{
							htmltext = "30630-15.htm";
						}
						else if (cond == 6)
						{
							htmltext = "30630-17.htm";
						}
						else if (cond == 7)
						{
							htmltext = "30630-18.htm";
							st.setCond(8, true);
						}
						else if ((cond == 8) || (cond == 9))
						{
							htmltext = "30630-18.htm";
						}
						else if (cond == 10)
						{
							htmltext = "30630-19.htm";
						}
						break;
					}
					case ALEXANDRIA:
					{
						if (cond == 1)
						{
							htmltext = "30098-01.htm";
						}
						else if (cond == 2)
						{
							htmltext = "30098-04.htm";
						}
						else
						{
							htmltext = "30098-05.htm";
						}
						break;
					}
					case KAIRA:
					{
						if (hasQuestItems(player, AKLANTOTH_GEM_2))
						{
							htmltext = "30476-03.htm";
						}
						else if (cond == 2)
						{
							htmltext = "30476-01.htm";
						}
						else if (cond > 3)
						{
							htmltext = "30476-04.htm";
						}
						break;
					}
					case IKER:
					{
						if (hasQuestItems(player, AKLANTOTH_GEM_1))
						{
							htmltext = "30110-06.htm";
						}
						else if (hasQuestItems(player, IKER_LIST))
						{
							if ((getQuestItemsCount(player, DIRE_WYRM_FANG) + getQuestItemsCount(player, LETO_LIZARDMAN_CHARM) + getQuestItemsCount(player, EN_GOLEM_HEARTSTONE)) < 60)
							{
								htmltext = "30110-04.htm";
							}
							else
							{
								htmltext = "30110-05.htm";
								takeItems(player, IKER_LIST, 1);
								takeItems(player, DIRE_WYRM_FANG, -1);
								takeItems(player, EN_GOLEM_HEARTSTONE, -1);
								takeItems(player, LETO_LIZARDMAN_CHARM, -1);
								giveItems(player, AKLANTOTH_GEM_1, 1);
								
								if (hasQuestItems(player, AKLANTOTH_GEM_2, AKLANTOTH_GEM_3) && (gem456 == 6))
								{
									st.setCond(3, true);
								}
								else
								{
									playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
								}
							}
						}
						else if (cond == 2)
						{
							htmltext = "30110-01.htm";
						}
						else if ((cond == 6) && !hasQuestItems(player, SOULTRAP_CRYSTAL))
						{
							htmltext = "30110-07.htm";
						}
						else if ((cond >= 6) && (cond < 10))
						{
							htmltext = "30110-09.htm";
						}
						else if (cond == 10)
						{
							htmltext = "30110-10.htm";
						}
						break;
					}
					case LARA:
					{
						if (hasQuestItems(player, AKLANTOTH_GEM_3))
						{
							htmltext = "30063-04.htm";
						}
						else if (hasQuestItems(player, LARA_MEMO))
						{
							htmltext = "30063-03.htm";
						}
						else if (cond == 2)
						{
							htmltext = "30063-01.htm";
						}
						else if (cond > 2)
						{
							htmltext = "30063-05.htm";
						}
						break;
					}
					case RODERIK:
					case ENDRIGO:
					{
						if (hasAtLeastOneQuestItem(player, LARA_MEMO, AKLANTOTH_GEM_3))
						{
							htmltext = npc.getId() + "-01.htm";
						}
						break;
					}
					case NESTLE:
					{
						if (gem456 == 1)
						{
							htmltext = "30314-01.htm";
						}
						else if (gem456 == 2)
						{
							htmltext = "30314-03.htm";
						}
						else if (gem456 > 2)
						{
							htmltext = "30314-04.htm";
						}
						break;
					}
					case LEOPOLD:
					{
						if (gem456 == 2)
						{
							htmltext = "30435-01.htm";
						}
						else if ((gem456 > 2) && (gem456 < 6))
						{
							htmltext = "30435-03.htm";
						}
						else if (gem456 == 6)
						{
							htmltext = "30435-04.htm";
						}
						else if (cond > 3)
						{
							htmltext = "30435-05.htm";
						}
						break;
					}
					case SIR_KLAUS_VASPER:
					{
						if (hasAtLeastOneQuestItem(player, SIR_VASPER_LETTER, VADIN_CRUCIFIX))
						{
							htmltext = "30417-04.htm";
						}
						else if (hasQuestItems(player, VADIN_SANCTIONS))
						{
							htmltext = "30417-05.htm";
							takeItems(player, VADIN_SANCTIONS, 1);
							giveItems(player, SWORD_OF_BINDING, 1);
							
							if (hasQuestItems(player, SOULTRAP_CRYSTAL))
							{
								st.setCond(7, true);
							}
							else
							{
								playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
							}
						}
						else if (cond == 6)
						{
							htmltext = "30417-01.htm";
						}
						else if (cond > 6)
						{
							htmltext = "30417-06.htm";
						}
						break;
					}
					case VADIN:
					{
						if (hasQuestItems(player, SIR_VASPER_LETTER))
						{
							htmltext = "30188-01.htm";
							playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
							takeItems(player, SIR_VASPER_LETTER, 1);
							giveItems(player, VADIN_CRUCIFIX, 1);
						}
						else if (hasQuestItems(player, VADIN_CRUCIFIX))
						{
							if (getQuestItemsCount(player, TAMLIN_ORC_AMULET) < 20)
							{
								htmltext = "30188-02.htm";
							}
							else
							{
								htmltext = "30188-03.htm";
								playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
								takeItems(player, TAMLIN_ORC_AMULET, -1);
								takeItems(player, VADIN_CRUCIFIX, -1);
								giveItems(player, VADIN_SANCTIONS, 1);
							}
						}
						else if (hasQuestItems(player, VADIN_SANCTIONS))
						{
							htmltext = "30188-04.htm";
						}
						else if (cond > 6)
						{
							htmltext = "30188-05.htm";
						}
						break;
					}
					case EVERT:
					{
						if ((cond == 7) || (cond == 8))
						{
							htmltext = "30633-01.htm";
						}
						else if (cond == 9)
						{
							htmltext = "30633-02.htm";
							
							if (!_drevanulPrinceZeruel)
							{
								addSpawn(DREVANUL_PRINCE_ZERUEL, 13395, 169807, -3708, 0, false, 299000);
								_drevanulPrinceZeruel = true;
								
								// Resets Drevanul Prince Zeruel
								startQuestTimer("zeruel_cleanup", 300000, null, player, false);
							}
						}
						else if (cond == 10)
						{
							htmltext = "30633-03.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) || !st.isStarted())
		{
			return;
		}
		
		switch (npc.getId())
		{
			case NAMELESS_REVENANT:
			{
				if (hasQuestItems(attacker, LARA_MEMO) && !npc.isScriptValue(1))
				{
					npc.setScriptValue(1);
					npc.broadcastSay(ChatType.GENERAL, "I absolutely cannot give it to you! It is my precious jewel!");
				}
				break;
			}
			case SKELETAL_MERCENARY:
			{
				if ((st.getInt("gem456") > 2) && (st.getInt("gem456") < 6) && !npc.isScriptValue(1))
				{
					npc.setScriptValue(1);
					npc.broadcastSay(ChatType.GENERAL, "I absolutely cannot give it to you! It is my precious jewel!");
				}
				break;
			}
			case DREVANUL_PRINCE_ZERUEL:
			{
				if (st.isCond(4) && !npc.isScriptValue(1))
				{
					st.setCond(5, true);
					
					npc.setScriptValue(1);
					npc.broadcastSay(ChatType.GENERAL, "I'll take your lives later!!");
					
					startQuestTimer("zeruel_despawn", 1000, npc, attacker, false);
				}
				else if (st.isCond(9) && _drevanulPrinceZeruel)
				{
					if (attacker.getInventory().getPaperdollItemId(7) == SWORD_OF_BINDING)
					{
						_swordOfBinding = true;
						
						if (!npc.isScriptValue(1))
						{
							npc.setScriptValue(1);
							npc.broadcastSay(ChatType.GENERAL, "That sword is really...!");
						}
					}
					else
					{
						_swordOfBinding = false;
					}
				}
				break;
			}
		}
	}
	
	@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 DIRE_WYRM:
			{
				if (hasQuestItems(player, IKER_LIST) && (getQuestItemsCount(player, DIRE_WYRM_FANG) < 20))
				{
					giveItems(player, DIRE_WYRM_FANG, 1);
					playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
				}
				break;
			}
			case ENCHANTED_STONE_GOLEM:
			{
				if (hasQuestItems(player, IKER_LIST) && (getQuestItemsCount(player, EN_GOLEM_HEARTSTONE) < 20))
				{
					giveItems(player, EN_GOLEM_HEARTSTONE, 1);
					playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
				}
				break;
			}
			case LETO_LIZARDMAN:
			case LETO_LIZARDMAN_ARCHER:
			{
				if (hasQuestItems(player, IKER_LIST) && (getRandom(10) < 5) && (getQuestItemsCount(player, LETO_LIZARDMAN_CHARM) < 20))
				{
					giveItems(player, LETO_LIZARDMAN_CHARM, 1);
					playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
				}
				break;
			}
			case LETO_LIZARDMAN_SOLDIER:
			case LETO_LIZARDMAN_WARRIOR:
			{
				if (hasQuestItems(player, IKER_LIST) && (getRandom(10) < 6) && (getQuestItemsCount(player, LETO_LIZARDMAN_CHARM) < 20))
				{
					giveItems(player, LETO_LIZARDMAN_CHARM, 1);
					playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
				}
				break;
			}
			case LETO_LIZARDMAN_SHAMAN:
			case LETO_LIZARDMAN_OVERLORD:
			{
				if (hasQuestItems(player, IKER_LIST) && (getRandom(10) < 7) && (getQuestItemsCount(player, LETO_LIZARDMAN_CHARM) < 20))
				{
					giveItems(player, LETO_LIZARDMAN_CHARM, 1);
					playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
				}
				break;
			}
			case NAMELESS_REVENANT:
			{
				if (hasQuestItems(player, LARA_MEMO))
				{
					takeItems(player, LARA_MEMO, 1);
					giveItems(player, AKLANTOTH_GEM_3, 1);
					
					if (hasQuestItems(player, AKLANTOTH_GEM_1, AKLANTOTH_GEM_2) && (st.getInt("gem456") == 6))
					{
						st.setCond(3, true);
					}
					else
					{
						playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
					}
				}
				break;
			}
			case SKELETAL_MERCENARY:
			{
				final int gem456 = st.getInt("gem456");
				if (gem456 == 3)
				{
					st.set("gem456", "4");
					playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
					giveItems(player, AKLANTOTH_GEM_4, 1);
				}
				else if (gem456 == 4)
				{
					st.set("gem456", "5");
					playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
					giveItems(player, AKLANTOTH_GEM_5, 1);
				}
				else if (gem456 == 5)
				{
					st.set("gem456", "6");
					takeItems(player, LEOPOLD_JOURNAL, 1);
					giveItems(player, AKLANTOTH_GEM_6, 1);
					
					if (hasQuestItems(player, AKLANTOTH_GEM_1, AKLANTOTH_GEM_2, AKLANTOTH_GEM_3))
					{
						st.setCond(3, true);
					}
					else
					{
						playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
					}
				}
				break;
			}
			case TAMLIN_ORC:
			case TAMLIN_ORC_ARCHER:
			{
				if (hasQuestItems(player, VADIN_CRUCIFIX) && (getRandom(10) < 5) && (getQuestItemsCount(player, TAMLIN_ORC_AMULET) < 20))
				{
					giveItems(player, TAMLIN_ORC_AMULET, 1);
					playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
				}
				break;
			}
			case DREVANUL_PRINCE_ZERUEL:
			{
				if (st.isCond(9) && _drevanulPrinceZeruel)
				{
					if (_swordOfBinding)
					{
						st.setCond(10);
						playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
						takeItems(player, BRIMSTONE_2, 1);
						takeItems(player, SOULTRAP_CRYSTAL, 1);
						giveItems(player, PURGATORY_KEY, 1);
						giveItems(player, ZERUEL_BIND_CRYSTAL, 1);
						npc.broadcastSay(ChatType.GENERAL, "No! I haven't completely finished the command for destruction and slaughter yet!!!");
					}
					
					cancelQuestTimer("zeruel_cleanup", null, player);
					_drevanulPrinceZeruel = false;
				}
				break;
			}
		}
	}
}