ZURSULUS L2

Repent Your Sins

ID
422
Название
Repent Your Sins
start_npcs_json
[30981]
npc_ids_json
[30300,30597,30612,30668,30718,30981]
constants_json
{"BLACK_JUDGE":30981,"KATARI":30668,"PIOTUR":30597,"CASIAN":30612,"JOAN":30718,"PUSHKIN":30300,"RATMAN_SCAVENGER_SKULL":4326,"TUREK_WAR_HOUND_TAIL":4327,"TYRANT_KINGPIN_HEART":4328,"TRISALIM_TARANTULA_VENOM_SAC":4329,"QITEM_PENITENT_MANACLES":4330,"MANUAL_OF_MANACLES":4331,"PENITENT_MANACLES":4425,"LEFT_PENITENT_MANACLES":4426,"SILVER_NUGGET":1873,"ADAMANTINE_NUGGET":1877,"BLACKSMITH_FRAME":1892,"COKES":1879,"STEEL":1880}
Статус разбора
metadata_only; dynamic Java conditions/rewards retained in source; unresolved starts: []
Источник
game/data/scripts/quests/Q00422_RepentYourSins/Q00422_RepentYourSins.java

NPC квеста

IDНазваниеСтарт квестаУровень
30300PushkinНет70
30597PioturНет70
30612CasianНет70
30668KatariНет70
30718JoanНет70
30981Black JudgeДа70

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

if (player.getLevel() <= 20)
else if ((player.getLevel() >= 20) && (player.getLevel() <= 30))
else if ((player.getLevel() >= 30) && (player.getLevel() <= 40))
st.set("level", String.valueOf(player.getLevel()));
st.set("level", String.valueOf(player.getLevel()));
st.set("level", String.valueOf(player.getLevel()));

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

giveItems(player, PENITENT_MANACLES, 1);
giveItems(player, PENITENT_MANACLES, 1);
giveItems(player, LEFT_PENITENT_MANACLES, 1);
giveItems(player, MANUAL_OF_MANACLES, 1);
giveItems(player, QITEM_PENITENT_MANACLES, 1);
giveItems(player, RATMAN_SCAVENGER_SKULL, 1);
giveItems(player, TUREK_WAR_HOUND_TAIL, 1);
giveItems(player, TYRANT_KINGPIN_HEART, 1);
giveItems(player, TRISALIM_TARANTULA_VENOM_SAC, 1);

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

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

[30300-01.htm] Blacksmith Pushkin: Manacles of a Penitent...? Ah yes. A strange item, but I can make them. Funny thing, too... I've been getting a lot of orders for these lately. They must be getting popular... I've memorized the ingredients: I'll need some Steel, an Adamantite Nugget... some silver... Here, take this list. Verify that this is what you want to order. These are serious manacles and cannot be handled carelessly! [30300-02.htm] Blacksmith Pushkin: Manacles of a Penitent...? Ah yes. A strange item, but I can make them. Funny thing, too... I've been getting a lot of orders for these lately. They must be getting popular... In fact, so popular that I've run out of the ingredients I need to make them! Would you mind going and getting the ingredients listed on this recipe? I will make the manacles for you if you do this. [30300-03.htm] Blacksmith Pushkin: If you don't mind my asking, what do intend to do with these manacles? I mean, nothing kinky I hope?!? [30597-01.htm] Piotur: Are you here to hunt the Turek war hounds? A while back a black-clad sage appeared and told me that someone like you was coming and I should ask for help with my needs. When the war was over I returned to find my farm devastated by the filthy orcs! I hired mercenaries and managed to drive them off my land, but their cursed stray war hounds remain and are rampaging and killing my cattle. Recently they have even been threatening the farmers. If you are here to help, please kill the Turek war hounds. Please kill at least 10 of them! Of course they can be found near the Orc Barracks! [30597-02.htm] Piotur: I'm beginning to think that those damned Turek war hounds are worse that the Turek orcs themselves. Not long ago I was attacked by one and nearly lost my leg! Please go and hunt 10 of them down at the Orc Barracks. You don't need to bring those filthy animals' corpses back here, just cut off their tails to prove how many you've killed. [30597-03.htm] Piotur: That was quick! Well done! Most mercenaries demand payment in advance... Is it possible you were sent by the gods? Well, you are an angel to me, anyway... I truly have never met anyone as kind and virtuous as you! [30597-04.htm] Piotur: Oh, it's you! Thanks to you, my farm is peaceful again. Come back after the fruit ripens and we'll have a drink together! [30612-01.htm] Sage Casian: Why would you want to help me? Someone up there must like me. Things keep happening that give me the impression that my penance is being watched over. So, will you do me a favor? I am researching different ways that this polluted Wasteland can be restored to its previous, verdant state. The most promising method is a potion I've been working on. To make this potion I must secure the heart of a tyrant kingpin. This could very well be above your abilities, but if you bring me the heart of a tyrant kingpin my research can continue. You will find the beasts in the western part of the Wasteland. [30612-02.htm] Sage Casian: Why haven't you brought me the heart of a tyrant kingpin yet? I realize that this is not an easy task. My work shall continue for several years, so there is no hurry. Take your time... Oh, did I happen to mention that you can find quite a few tyrant kingpins in the western section of the Wasteland? [30612-03.htm] Sage Casian: Ah, the heart of a tyrant kingpin! Thank you! This will advance my research greatly. Now I must confess... In the past I was a terrible criminal. I undertook this project seeking redemption, but now I find that I am required to commit crimes to further my research! The importance of what I am doing, the big picture, is all that keeps me going... [30612-04.htm] Sage Casian: Thanks to you my research can continue... By the way, what inspired you to help a wretch such as I? I suppose we all have our own reasons... [30668-01.htm] Katari: At last! You have come for me! Oh, pardon me... I had a very vivid dream last night, and I've been waiting for someone like you to come for me. Just in case you were the one in my dreams, I wanted you to know. Well... then, I may as well ask you. I and some religious ol mahums are being threatened by scavenger wererats. They seem to be unaware of the teachings of the god of light. Everyone knows, even after a conversion, ol mahums are not to be trifled with. The same can be said of the Dark Elves. Our god of light is no coward, and I'm ready to teach them a thing or two. Please, would you go kill these creatures? Bring back 10 skulls of scavenger wererats. They can be found in the Neutral Zone. Put a good scare into them, something to let them know they shouldn't pick on missionaries. [30668-02.htm] Katari: If I had my way, I would kill every last one of them. But even the most wicked have the chance of redemption. Perhaps one day they will come to the god of light... Anyway, now we must spill some blood. Go to the Neutral Zone and hunt scavenger wererats. Bring back 10 of their skulls. [30668-03.htm] Katari: That should teach them a lesson. I was dreading having to send the ol mahums to do the killing, I hate to get them started. And then, from the mist, you appeared. My savior! And you gave them what for, didn't you! Einhasad is truly watching over me. Thank you, my friend... I wish you all the best. [30668-04.htm] Katari: Why are you still here? Would you like to become a missionary? You taught those filthy scavenger wererats some respect for the blade, didn't you? We don't need your help right now, but I do hope you will drop in from time to time. I would like for you to meet some of our ol mahum believers. [30718-01.htm] Magister Joan: Greetings! I look forward to working with you. I am Magister Joan. I am researching the neutralization of the toxic element found in the Sea of Spores. I am sure you are familiar with that poisonous pond... Your task will be to collect three Trisalim's Venom Sacs. You will find them in the Sea of Spores. Please bring them to me as soon as possible. [30718-02.htm] Magister Joan: Have you found three Trisalim Venom Sacs yet? You have gone to the Sea of Spores, haven't you? This research may seem unimportant to you, but it is of utmost importance to me and the entire Elven race! Although I am the only one who seems to care about it... [30718-03.htm] Magister Joan: You brought all three of them! Wonderful! As agreed, your compensation will be paid at the Ivory Tower... Huh? Wait, what is this... What are trying to pull?! According to my records, an adventurer in service to the Ivory Tower has already left for Innadril...! Who are you? [30718-04.htm] Magister Joan: Ah, it's you again! I'm so dreadfully sorry about the confusion last time. Yes, about your pay... I apologize, I'm waiting for approval and a check from the home office... ... err, ummm... To tell you the truth, I hired you without the approval of the Grand Magisters of the Ivory Tower! You may be waiting a very, very, very long time for your compensation. Please forgive me! I am so ashamed of myself... I'm always getting into trouble. I'm also stubborn! And obsessive-compulsive! Is that a bad thing? ... By the way, who in the world are you? [30981-01.htm] Black Judge: Throughout their lives people commit varying degrees of sins. You, however, have never committed a sin so grievious that you required our assistance... You are on the right path! Your integrity is impressive! (This quest may only be undertaken by a character who has committed PK.) [30981-02.htm] Black Judge: Sinning is easy. Atoning for those sins, however, is much more difficult. Are you really prepared for this? We will test your resolve to its utmost on your journey of penitence... Are you ready to follow the path away from riches and fame? "I seek redemption." [30981-03.htm] Black Judge: Very well, the test can begin. You must go and see Katari, a Dark Elf. She teaches the word of Einhasad to godless heathens, such as the ol mahums... She needs your help. Meet her at the edge of the Dark Elven Forest north of the Marshland and offer her your help. Come back to see us after you complete this task. [30981-04.htm] Black Judge: Very well, the test can begin. You will go help a farmer who lost all his possessions during the war between Gracia and Aden. He was left with less than a handful of seed! But this tenacious farmer is bravely trying to cultivate his crops. His name is Piotur. You will find him near the Orc Barracks in the western part of Gludio. Go there and help him. Come back and see us after you complete the task. [30981-05.htm] Black Judge: This is the first time that Wiseman Casian has ever met with a black judge. He has volunteered to walk the path of endless hardship. Right now he is working on a task in the southern Wasteland in Gludio. He is in trouble and needs some help... Go there and find him. Come back and see us when you have completed the task. (This quest is automatically stopped if any sub-class is added or changed while it is performed.) [30981-06.htm] Black Judge: Magister Joan of the Ivory Tower, the daughter of a forest fairy, does not realize the importance of the work she is doing. You must go and help her. You must not ask or answer any questions while dealing with her. Come back and see us after completing the task. (This quest is automatically stopped if any sub-class is added or changed while it is performed.) [30981-07.htm] Black Judge: You have not even taken one step forward on the path of penance. As I said before, this is not the way to fame or fortune. Nobody, including us black judges, can force you to follow this path. If you are having doubts, leave now and never come back. [30981-08.htm] Black Judge: Don't say a word. I can tell that you have completed your task. Take this to Blacksmith Pushkin in Giran Castle Town. He will make an item for you. When he finishes it, bring it back to us. [30981-09.htm] Black Judge: There is no hurry. The path of penance will endlessly unfold in front of you. Go to Blacksmith Pushkin of Giran Castle Town. He will make an item for you. Bring this item to us. [30981-10.htm] Black Judge: Have you brought back the manacles of penitence? You must bring them to me. You shall wear them until you have finished your penitence. Give him the manacles. [30981-11.htm] Black Judge: At the other end of this chain is the Sin Eater. He is your brother, and will come if you call his name. Now you must leave. When you have completed your penance once, come back and see us. That will be the time when you two will part your ways. At that time, you will be released from the manacles. (When the Sin Eater advances one level you will have completed this quest.) All of the Exp that the character who summoned the Sin Eater has acquired will be transferred to the Sin Eater. When the Sin Eater becomes hungry, you can feed him with "Food For Wolves." [30981-12.htm] Black Judge: Your brother's hunger for your sins is not yet sated. Your penance must continue... All the terrible feelings that you are experiencing... the feelings of embarrassment, confusion, loneliness, and boredom etc... they are the manifestation of your sins that are now getting dissolved and exposed... (When the Sin Eater advances one level you will have completed this quest.) All of the Exp that the character who summoned the Sin Eater has acquired will be transferred to the Sin Eater. When the Sin Eater becomes hungry, you can feed him with "Food For Wolves." [30981-13.htm] Black Judge: Ha! Yes, your brother has grown fat on your sins, hasn't he? Let me see your hands. (Note: If you click the link below, the manacle of penitent disappears. At this time, all the items contained in the inventory of the Sin Eater disappears as well, so please check if you put any items in the inventory.) Extend your manacled hands. [30981-14.htm] Black Judge: Your sins have been absolved and you are free to go your separate ways. The Sin Eater will return from whence he came. There, his sin is changed to virtue, and virtue to nothing. "What about my remaining sins?" [30981-15.htm] Black Judge: Your sins have been washed away. At least the ones we know about... The Sin Eater can help you no further. You must make your own choices from now on, and become your own Sin Eater. [30981-16.htm] Black Judge: These chains cannot be broken as long as your brother remains in this world. You must now release him to return from whence he came. Release the sin eater! (Note: If you click the link below, the manacle of penitent disappears. At this time, all the items contained in the inventory of the Sin Eater disappears as well, so please check if you put any items in the inventory.) Continue [30981-17.htm] Black Judge: Ah, yes, there are more sins, aren't there... Are you willing to continue to carry out your task to atone for your sins? "I wish to atone for my remaining sins." Quit [30981-18.htm] Black Judge: All of your transgressions have not yet been redeemed. You must begin your penitence once again. Would you be in need of a sin eater? "I wish to atone for my sins." Quit [30981-19.htm] Black Judge: Very well. Give me your hands. Extend your wrists. [30981-20.htm] Black Judge: Have you grown weary of the path of penance? Do as you will. No one is forcing you to do this. You are the one who made all the wrong choices... If you have decided to live with them, we respect that. Walk your own path.
Исходник условий и наград (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.Q00422_RepentYourSins;

import org.l2jmobius.gameserver.entity.actor.Npc;
import org.l2jmobius.gameserver.entity.actor.Player;
import org.l2jmobius.gameserver.entity.actor.Summon;
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;

public class Q00422_RepentYourSins extends Quest
{
	// NPCs
	private static final int BLACK_JUDGE = 30981;
	private static final int KATARI = 30668;
	private static final int PIOTUR = 30597;
	private static final int CASIAN = 30612;
	private static final int JOAN = 30718;
	private static final int PUSHKIN = 30300;
	
	// Items
	private static final int RATMAN_SCAVENGER_SKULL = 4326;
	private static final int TUREK_WAR_HOUND_TAIL = 4327;
	private static final int TYRANT_KINGPIN_HEART = 4328;
	private static final int TRISALIM_TARANTULA_VENOM_SAC = 4329;
	private static final int QITEM_PENITENT_MANACLES = 4330;
	private static final int MANUAL_OF_MANACLES = 4331;
	private static final int PENITENT_MANACLES = 4425;
	private static final int LEFT_PENITENT_MANACLES = 4426;
	private static final int SILVER_NUGGET = 1873;
	private static final int ADAMANTINE_NUGGET = 1877;
	private static final int BLACKSMITH_FRAME = 1892;
	private static final int COKES = 1879;
	private static final int STEEL = 1880;
	
	public Q00422_RepentYourSins()
	{
		super(422, "Repent Your Sins");
		registerQuestItems(RATMAN_SCAVENGER_SKULL, TUREK_WAR_HOUND_TAIL, TYRANT_KINGPIN_HEART, TRISALIM_TARANTULA_VENOM_SAC, MANUAL_OF_MANACLES, PENITENT_MANACLES, QITEM_PENITENT_MANACLES);
		addStartNpc(BLACK_JUDGE);
		addTalkId(BLACK_JUDGE, KATARI, PIOTUR, CASIAN, JOAN, PUSHKIN);
		addKillId(20039, 20494, 20193, 20561);
	}
	
	@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 "Start":
			{
				st.startQuest();
				if (player.getLevel() <= 20)
				{
					htmltext = "30981-03.htm";
					st.setCond(2);
				}
				else if ((player.getLevel() >= 20) && (player.getLevel() <= 30))
				{
					htmltext = "30981-04.htm";
					st.setCond(3);
				}
				else if ((player.getLevel() >= 30) && (player.getLevel() <= 40))
				{
					htmltext = "30981-05.htm";
					st.setCond(4);
				}
				else
				{
					htmltext = "30981-06.htm";
					st.setCond(5);
				}
				break;
			}
			case "30981-11.htm":
			{
				if (!hasQuestItems(player, PENITENT_MANACLES))
				{
					final int cond = st.getCond();
					
					// Case you return back the qitem to Black Judge. She rewards you with the pet item.
					if (cond == 15)
					{
						st.setCond(16);
						st.set("level", String.valueOf(player.getLevel()));
						playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
						takeItems(player, QITEM_PENITENT_MANACLES, -1);
						giveItems(player, PENITENT_MANACLES, 1);
					}
					// Case you return back to Black Judge with leftover of previous quest.
					else if (cond == 16)
					{
						st.set("level", String.valueOf(player.getLevel()));
						playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
						takeItems(player, LEFT_PENITENT_MANACLES, -1);
						giveItems(player, PENITENT_MANACLES, 1);
					}
				}
				break;
			}
			case "30981-19.htm":
			{
				if (hasQuestItems(player, LEFT_PENITENT_MANACLES))
				{
					st.setState(State.STARTED);
					st.setCond(16, true);
				}
				break;
			}
			case "Pk":
			{
				final Summon pet = player.getSummon();
				
				// If Sin Eater is currently summoned, show a warning.
				if ((pet != null) && (pet.getId() == 12564))
				{
					htmltext = "30981-16.htm";
				}
				else if (findSinEaterLvl(player) > st.getInt("level"))
				{
					takeItems(player, PENITENT_MANACLES, 1);
					giveItems(player, LEFT_PENITENT_MANACLES, 1);
					
					final int removePkAmount = getRandom(10) + 1;
					
					// Player's PKs are lower than random amount ; finish the quest.
					if (player.getPkKills() <= removePkAmount)
					{
						htmltext = "30981-15.htm";
						st.exitQuest(true, true);
						
						player.setPkKills(0);
						player.updateUserInfo();
					}
					// Player's PK are bigger than random amount ; continue the quest.
					else
					{
						htmltext = "30981-14.htm";
						st.set("level", String.valueOf(player.getLevel()));
						playSound(player, QuestSound.ITEMSOUND_QUEST_MIDDLE);
						
						player.setPkKills(player.getPkKills() - removePkAmount);
						player.updateUserInfo();
					}
				}
				break;
			}
			case "Quit":
			{
				htmltext = "30981-20.htm";
				takeItems(player, RATMAN_SCAVENGER_SKULL, -1);
				takeItems(player, TUREK_WAR_HOUND_TAIL, -1);
				takeItems(player, TYRANT_KINGPIN_HEART, -1);
				takeItems(player, TRISALIM_TARANTULA_VENOM_SAC, -1);
				takeItems(player, MANUAL_OF_MANACLES, -1);
				takeItems(player, PENITENT_MANACLES, -1);
				takeItems(player, QITEM_PENITENT_MANACLES, -1);
				st.exitQuest(true, true);
				break;
			}
		}
		
		return htmltext;
	}
	
	@Override
	public String onTalk(Npc npc, Player player)
	{
		String htmltext = getAlreadyCompletedMsg(player);
		final QuestState st = player.getQuestState(getName());
		if (st == null)
		{
			return htmltext;
		}
		
		switch (st.getState())
		{
			case State.CREATED:
			{
				if (player.getPkKills() >= 1)
				{
					htmltext = (hasQuestItems(player, LEFT_PENITENT_MANACLES)) ? "30981-18.htm" : "30981-02.htm";
				}
				else
				{
					htmltext = "30981-01.htm";
				}
				break;
			}
			case State.STARTED:
			{
				final int cond = st.getCond();
				switch (npc.getId())
				{
					case BLACK_JUDGE:
					{
						if (cond <= 9)
						{
							htmltext = "30981-07.htm";
						}
						else if ((cond > 9) && (cond < 14))
						{
							htmltext = "30981-08.htm";
							st.setCond(14, true);
							giveItems(player, MANUAL_OF_MANACLES, 1);
						}
						else if (cond == 14)
						{
							htmltext = "30981-09.htm";
						}
						else if (cond == 15)
						{
							htmltext = "30981-10.htm";
						}
						else if (cond == 16)
						{
							if (hasQuestItems(player, PENITENT_MANACLES))
							{
								htmltext = (findSinEaterLvl(player) > st.getInt("level")) ? "30981-13.htm" : "30981-12.htm";
							}
							else
							{
								htmltext = "30981-18.htm";
							}
						}
						break;
					}
					case KATARI:
					{
						if (cond == 2)
						{
							htmltext = "30668-01.htm";
							st.setCond(6, true);
						}
						else if (cond == 6)
						{
							if (getQuestItemsCount(player, RATMAN_SCAVENGER_SKULL) < 10)
							{
								htmltext = "30668-02.htm";
							}
							else
							{
								htmltext = "30668-03.htm";
								st.setCond(10, true);
								takeItems(player, RATMAN_SCAVENGER_SKULL, -1);
							}
						}
						else if (cond == 10)
						{
							htmltext = "30668-04.htm";
						}
						break;
					}
					case PIOTUR:
					{
						if (cond == 3)
						{
							htmltext = "30597-01.htm";
							st.setCond(7, true);
						}
						else if (cond == 7)
						{
							if (getQuestItemsCount(player, TUREK_WAR_HOUND_TAIL) < 10)
							{
								htmltext = "30597-02.htm";
							}
							else
							{
								htmltext = "30597-03.htm";
								st.setCond(11, true);
								takeItems(player, TUREK_WAR_HOUND_TAIL, -1);
							}
						}
						else if (cond == 11)
						{
							htmltext = "30597-04.htm";
						}
						break;
					}
					case CASIAN:
					{
						if (cond == 4)
						{
							htmltext = "30612-01.htm";
							st.setCond(8, true);
						}
						else if (cond == 8)
						{
							if (!hasQuestItems(player, TYRANT_KINGPIN_HEART))
							{
								htmltext = "30612-02.htm";
							}
							else
							{
								htmltext = "30612-03.htm";
								st.setCond(12, true);
								takeItems(player, TYRANT_KINGPIN_HEART, -1);
							}
						}
						else if (cond == 12)
						{
							htmltext = "30612-04.htm";
						}
						break;
					}
					case JOAN:
					{
						if (cond == 5)
						{
							htmltext = "30718-01.htm";
							st.setCond(9, true);
						}
						else if (cond == 9)
						{
							if (getQuestItemsCount(player, TRISALIM_TARANTULA_VENOM_SAC) < 3)
							{
								htmltext = "30718-02.htm";
							}
							else
							{
								htmltext = "30718-03.htm";
								st.setCond(13, true);
								takeItems(player, TRISALIM_TARANTULA_VENOM_SAC, -1);
							}
						}
						else if (cond == 13)
						{
							htmltext = "30718-04.htm";
						}
						break;
					}
					case PUSHKIN:
					{
						if ((cond == 14) && (getQuestItemsCount(player, MANUAL_OF_MANACLES) == 1))
						{
							if ((getQuestItemsCount(player, SILVER_NUGGET) < 10) || (getQuestItemsCount(player, STEEL) < 5) || (getQuestItemsCount(player, ADAMANTINE_NUGGET) < 2) || (getQuestItemsCount(player, COKES) < 10) || (getQuestItemsCount(player, BLACKSMITH_FRAME) < 1))
							{
								htmltext = "30300-02.htm";
							}
							else
							{
								htmltext = "30300-01.htm";
								st.setCond(15, true);
								
								takeItems(player, MANUAL_OF_MANACLES, 1);
								takeItems(player, SILVER_NUGGET, 10);
								takeItems(player, ADAMANTINE_NUGGET, 2);
								takeItems(player, COKES, 10);
								takeItems(player, STEEL, 5);
								takeItems(player, BLACKSMITH_FRAME, 1);
								
								giveItems(player, QITEM_PENITENT_MANACLES, 1);
							}
						}
						else if (hasAtLeastOneQuestItem(player, QITEM_PENITENT_MANACLES, PENITENT_MANACLES, LEFT_PENITENT_MANACLES))
						{
							htmltext = "30300-03.htm";
						}
						break;
					}
				}
				break;
			}
		}
		
		return htmltext;
	}
	
	@Override
	public void onKill(Npc npc, Player player, boolean isPet)
	{
		final QuestState st = getQuestState(player, false);
		if ((st == null) || !st.isStarted())
		{
			return;
		}
		
		switch (npc.getId())
		{
			case 20039:
			{
				if (st.isCond(6) && (getQuestItemsCount(player, RATMAN_SCAVENGER_SKULL) < 10))
				{
					giveItems(player, RATMAN_SCAVENGER_SKULL, 1);
					if (getQuestItemsCount(player, RATMAN_SCAVENGER_SKULL) < 10)
					{
						playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
					}
					else
					{
						playSound(player, QuestSound.ITEMSOUND_QUEST_MIDDLE);
					}
				}
				break;
			}
			case 20494:
			{
				if (st.isCond(7) && (getQuestItemsCount(player, TUREK_WAR_HOUND_TAIL) < 10))
				{
					giveItems(player, TUREK_WAR_HOUND_TAIL, 1);
					if (getQuestItemsCount(player, TUREK_WAR_HOUND_TAIL) < 10)
					{
						playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
					}
					else
					{
						playSound(player, QuestSound.ITEMSOUND_QUEST_MIDDLE);
					}
				}
				break;
			}
			case 20193:
			{
				if (st.isCond(8) && !hasQuestItems(player, TYRANT_KINGPIN_HEART))
				{
					giveItems(player, TYRANT_KINGPIN_HEART, 1);
					playSound(player, QuestSound.ITEMSOUND_QUEST_MIDDLE);
				}
				break;
			}
			case 20561:
			{
				if (st.isCond(9) && (getQuestItemsCount(player, TRISALIM_TARANTULA_VENOM_SAC) < 3))
				{
					giveItems(player, TRISALIM_TARANTULA_VENOM_SAC, 1);
					if (getQuestItemsCount(player, TRISALIM_TARANTULA_VENOM_SAC) < 3)
					{
						playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
					}
					else
					{
						playSound(player, QuestSound.ITEMSOUND_QUEST_MIDDLE);
					}
				}
				break;
			}
		}
	}
	
	private static int findSinEaterLvl(Player player)
	{
		return player.getInventory().getItemByItemId(PENITENT_MANACLES).getEnchantLevel();
	}
}