ZURSULUS L2

Trial of Duty

ID
212
Название
Trial of Duty
start_npcs_json
[30109]
npc_ids_json
[30109,30116,30311,30653,30654,30655,30656]
constants_json
{"HANNAVALT":30109,"DUSTIN":30116,"SIR_COLLIN":30311,"SIR_ARON":30653,"SIR_KIEL":30654,"SILVERSHADOW":30655,"SPIRIT_TALIANUS":30656,"LETTER_OF_DUSTIN":2634,"KNIGHTS_TEAR":2635,"MIRROR_OF_ORPIC":2636,"TEAR_OF_CONFESSION":2637,"REPORT_PIECE_1":2638,"REPORT_PIECE_2":2639,"TEAR_OF_LOYALTY":2640,"MILITAS_ARTICLE":2641,"SAINTS_ASHES_URN":2642,"ATHEBALDT_SKULL":2643,"ATHEBALDT_RIBS":2644,"ATHEBALDT_SHIN":2645,"LETTER_OF_WINDAWOOD":2646,"OLD_KNIGHT_SWORD":3027,"MARK_OF_DUTY":2633,"DIMENSIONAL_DIAMOND":7562}
Статус разбора
metadata_only; dynamic Java conditions/rewards retained in source; unresolved starts: []
Источник
game/data/scripts/quests/Q00212_TrialOfDuty/Q00212_TrialOfDuty.java

NPC квеста

IDНазваниеСтарт квестаУровень
30109HannavaltДа70
30116DustinНет70
30311Sir Collin WindawoodНет70
30653Sir Aron TanfordНет70
30654Sir Kiel NighthawkНет70
30655Isael SilvershadowНет70
30656Spirit Of Sir TalianusНет70

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

else if (player.getLevel() < 35)
if (player.getLevel() < 35)

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

giveItems(player, DIMENSIONAL_DIAMOND, DF_REWARD_35.get(player.getPlayerClass().getId()));
giveItems(player, MARK_OF_DUTY, 1);
addExpAndSp(player, 79832, 3750);
giveItems(player, OLD_KNIGHT_SWORD, 1);
giveItems(player, MIRROR_OF_ORPIC, 1);
giveItems(player, TEAR_OF_CONFESSION, 1);
giveItems(player, TEAR_OF_LOYALTY, 1);
giveItems(player, SAINTS_ASHES_URN, 1);
giveItems(player, LETTER_OF_DUSTIN, 1);
giveItems(player, LETTER_OF_WINDAWOOD, 1);
giveItems(player, KNIGHTS_TEAR, 1);
giveItems(player, REPORT_PIECE_1, 1);
giveItems(player, REPORT_PIECE_2, 1);
giveItems(player, MILITAS_ARTICLE, 1);
giveItems(player, ATHEBALDT_SKULL, 1);
giveItems(player, ATHEBALDT_RIBS, 1);
giveItems(player, ATHEBALDT_SHIN, 1);

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

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

[30109-01.htm] Grand Master Hannavalt: You fool! You are hardly worthy of the title you bear! Before you think of advancement, you must first improve your skills! (This quest may only be undertaken by a character of level 35 and above.) [30109-02.htm] Grand Master Hannavalt: The calling I refer to may only be answered by a Knight. You should seek another guide. (This quest may only be undertaken by Knights, Elven Knights, or Palus Knights.) [30109-03.htm] Grand Master Hannavalt: Do you hold higher ambitions than being a mere Knight? You must examine your motsivation for fighting. It may be to protect loved ones, for the glory of the kingdom, for power... But true knights fight for the 'calling' that is given them. The Trial of the Calling is the way for you to determine what your calling is. Say you will attempt the Trial of Duty [30109-04.htm] Grand Master Hannavalt: First you must find Sir Aron Tanford. He resides in the Southern Wastelands of Gludio. He shall give you your first test. [30109-04a.htm] Grand Master Hannavalt: First, meet with Sir Aron Tanford. You will find him south of the Wasteland. He will assign you your first task. Take this Dimension Diamond. You can trade it to the village gatekeeper for something special that may help you on your journey. [30109-05.htm] Grand Master Hannavalt: Be welcome. So, now you know your calling? No need to tell me. The actions you saw, heard and felt, those are the very call of the knight and the virtue of chivalry. Learn those lessons well; engrave them on your heart. Now I will give you the Mark of Duty. May Einhasad protect you! [30116-01.htm] Priest Dustin: Welcome, noble Knight. May the blessings of Einhasad be with you. I am troubled by recent violence of the foreign races. We have lost many of our young in fights with them... Just six months ago, a fine, strapping young lad named Leon Athebaldt was killed in battle with the Breka Orcs. Ask about Leon Athebaldt [30116-02.htm] Priest Dustin: He was a dashing young knight, sworn to serve Einhasad's holy will and protect the innocent. He took his vow in this very temple. He was an honorable and devout young man, nephew of the famous Sir Collin. He was even considered for canonization by the High Priest! We all had high hopes for him, for what he might acheive for the kingdom and for the Goddess of Light... ...but alas, he has been taken from us. Oh well, it was the will of Eisenhad. Ask about Athebaldt's death [30116-03.htm] Priest Dustin: Last winter a giant horde of blood-thirsty Breka Orcs swept in from the north and invaded Giran. Those violent thugs looted homes and businesses, and even threatened the castle. They gave the Royal Guards quite a challenge. Leon Athebaldt led his men in an attack on the Breka Orc encampment. With remarkable courage, they killed the Breka Orc Overlords one by one. Thanks to this effort the Breka Orcs were driven back into the north part of Giran. The final battle to drive them entirely out of Giran was the fiercest yet. The lone survivor of that battle was Leon's servant. He barely escaped with a shield and weapons inscribed with his master's crest. According to him, Athebaldt fought valiantly to the death, slaying Orcs to his left and right. Eventually he was no match for the hundreds of Orcs that continued to attack in waves against him. His remains have not been found. I'm sure the Breka Orcs have taken them for some nefarious purpose. It saddens me deeply that he cannot be given a proper burial. Ask about the remains [30116-04.htm] Priest Dustin: The Orcs have an appalling custom of carrying around the remains of their enemies as a sort of charm or amulet. They say that the more courageous the enemy, the greater the power... It is said that Athebaldt's remains were cut up into pieces and fashioned into amulets for the Breka Orc Overlords. These creatures are fierce and violent! But I must give Leon a proper burial. Can you retrieve his remains for me? "Please let me take that task." [30116-05.htm] Priest Dustin: Our religious traditions dictate that we can hold a funeral if we have the skull, ribs, and shinbone. Slay the Breka Orc Overlords and bring back Sir Athebaldt's Skull, ribs, and shinbone. [30116-06.htm] Priest Dustin: Please gather Sir Leon Athebaldt's remains. You must recover 3 portions: the skull, ribs, and shinbone. It sickens me to think of precious Leon's body decorating the necks of Orcs! This must not stand! [30116-07.htm] Priest Dustin: Thank you so very much. Now we may finally hold a proper funeral for Leon Athebaldt. I have cremated part of his remains and put them into this urn. Please deliver it to Leon's uncle, Sir Collin Windawood. He is the Governor of Talking Island. [30116-08.htm] Priest Dustin: Well done! I thank you in the name of the church of Einhasad. Sir Athebaldt will at last be at peace in the arms of Einhasad. The peace that we now enjoy would not have been possible without sacrifices such as this. Great things are achieved only at great cost... Sometimes a painful sacrifice must be made for the greater good. I have written a letter commending your efforts. Take this to Grand Master Hannavalt. [30116-09.htm] Priest Dustin: Have you delivered Sir Leon Athebaldt's remains to his family? Sir Collin Windawood of Talking Island is expecting you. [30116-10.htm] Priest Dustin: You have done all that I asked. Do you still have the letter of commendation I gave you? Deliver it to Grand Master Hannavalt in Giran. [30311-01.htm] Sir Collin Windawood: Could these actually be the bones of Leon? I heard of his glorious death during the battle against Orcs... What a loss... Never did I expect that I would see you like this, my beloved nephew! I regret I wasn't with you at the moment of your death! Young Warrior, My family is in your debt. I know it wasn't easy to recover his bones. Thank you so much. Take this letter to Priest Dustin. Now I shall prepare for my nephew's funeral... [30311-02.htm] Sir Collin Windawood: Young Warrior, thank you for recovering my nephew's remains and bringing them back to us. My family is in your debt. Now please take the letter that I gave you to Priest Dustin of the Town of Giran. Thank you. May the light of Einhasad guide your path. [30653-01.htm] Sir Aron Tanford: Dignity is one of the virtues that define a Knight's worth. Dignity takes various forms in different people... As we speak there are vicious gangs, who know nothing of dignity, prowling the Wastelands disturbing the residents. These gangs are led by Herod. He was once a prestigious Knight of Gludio. During the war against Gracia, Herod was tempted to treason by the enemy's leader. He became an agent of the invaders! Sir Klaus Vasper chased him doggedly and eventually put a spear through his heart. Karol said that 'A Knight who abandons his dignity is as good as dead.' Not wanting to give the traitor the dignity of a funeral, his corpse was left to rot in the Wastelands. This made his soul become a cursed devil, and the only way to get rid of him is to free him from the curse with this rusty sword. The skeleton raiders wandering around the Wastelands are his minions. As you destroy the filthy skeleton raiders one by one, you will confront the Spirit of Herod. Kill him with the rusty sword I gave you, and remind him of the noble dignity of a Gludio Knight. If possible, please bring proof of his end. [30653-02.htm] Sir Aron Tanford: I realize that it is not an easy task. But it is necessary for you to do it in order to acquire brilliance. You must kill the Spirit of Herod with the rusty sword I gave you, and free him from his disgraceful curse. While killing the skeleton raiders wandering around the Wastelands you will confront Herod. [30653-03.htm] Sir Aron Tanford: So the unfortunate knight was not able to recover his honor. Was this tear of return the only thing that remained? What a dreadful curse! So it is his fate to wander the Wastelands forever... He has no one to blame but himself. Well done! You have completed the task successfully. But the task does not end with this. Go to the Dark Elf Guild in the Town of Dion and meet Sir Kiel Nighthawk. He will be waiting for you with your second task. I pray to Einhasad that you finish all your tasks successfully and get your "wish". [30653-04.htm] Sir Aron Tanford: You will learn the second part of the trial when you visit Sir Kiel Nighthawk. He is in the Dark Elf Guild of the Town of Dion. I shall pray to Einhasad for the successful completion of your tasks. [30654-01.htm] Sir Kiel Nighthawk: Greetings, young Warrior. I am Kiel Nighthawk of the Griffon Knight union. Hannavalt sent word that you were coming. One of the virtues that define a Knight's character is a sense of justice. The history of this land of Dion is rife with gross injustice. One of the most heinous was the case of Sir Talianus. He was commissioned by the King to write a report about the causes and effects of the peasant's uprising. He was captured by rebels and accused of being a spy. He suffered days of unspeakable torture before death mercifully came. His report was torn up and scattered to the wind. His troops tried to collect the pieces of the report and they suffered the same fate as their leader. Until this day people claim that they hear the agonized wails of Sir Talianus and his troops, wafting across the execution grounds. I fear that their spirits are wandering the earth, unable to join with Shilen... Would you please seek justice for Sir Talianus? Kill the strains and the ghouls to collect the torn pieces of the report. When you gather all the pieces and complete Talianus' Report bring it back to me. [30654-02.htm] Sir Kiel Nighthawk: As I said, you must kill the strains and the ghouls to collect the torn pieces of the report. When you gather all the pieces of Sir Talianus' report, bring it back to me. Got it? [30654-03.htm] Sir Kiel Nighthawk: Ah, the report that was to be presented to the King... Perhaps now we can release the spirits of Sir Talianus and his comrades from their torment... Take this Mirror of Orpic with you and go to the Execution Grounds. There is power dwelling in this mirror which enables you to see the spirits of the dead. You must find and confront the doomed hangman tree. Free the spirits of Sir Talianus and his troops from their prison. Tell the spirit of Sir Talianus that the report for which he and his men gave their lives will be delivered to the King. This should give them peace at last. [30654-04.htm] Sir Kiel Nighthawk: You have not yet freed Spirit of Sir Talianus. The spirits of these brave soldiers must be put to rest. Go now to the Execution Grounds and destroy the hangman tree to free Sir Talianus from his torment. [30654-05.htm] Sir Kiel Nighthawk: Very interesting... It occurs to me that there must be some other reason why the spirits of Talianus and his men cannot rest in peace... I must do more research on this. You should now go and find Sir Isael Silvershadow in Hunter's Village to take the next part of the test. [30654-06.htm] Sir Kiel Nighthawk: You have given peace to the tortured souls of Sir Talianus and his men. You have passed this part of the trial admirably. For the next stage, you must seek out Sir Isael Silvershadow in the Hunter's Village. [30655-01.htm] Isael Silvershadow: Hello, young knight. May you be blessed by starlight. Welcome to the Hunters Village. True to Hannavalt's words, you have the talent to become a great Knight, but you are not quite ready this task. Please continue your training. [30655-02.htm] Isael Silvershadow: May the blessings of the starlight shine upon you. Hello, young warrior. Welcome to the Hunters Village. True to Hannavalt's words, you seem to have the potential to become a great Knight someday. Let's briefly discuss the last virtue of a Knight, loyalty. Loyalty may be towards a lord, towards the teachings of the divine powers, or to a town and its residents whom you've sworn to protect... A good example would be the guards that risked their lives to battle the Leto Lizardmen and protect this village. The loyalty they displayed in sacrificing their lives to protect their homes and loved ones is surely honorable indeed. My task for you is to recover the milita's article from the Leto Lizardmen. The families of the fallen guards wish to hold a memorial for them. Considering their sacrifice, should we not at least do this much for them? In order to hold the memorial, we need 20 pieces of the articles. Well then, good luck on your journey. Leto Lizardmen can be found on the Plains of the Lizardmen. [30655-03.htm] Isael Silvershadow: The hour of the memorial service draws near. We must have the personal articles of the guards from the Leto Lizardmen for the ceremony. We need about 20 pieces of the articles. Thank you for your assistance in this matter. Leto Lizardmen can be found on the Plains of the Lizardmen. [30655-04.htm] Isael Silvershadow: Well done! The guards' families will be eternally grateful for your services. The representative of the families has asked me to present you with this jewel. It is called the Tear of Loyalty. Grand Master Hannavalt has requested that you go to Father Dustin in the Town of Giran. He shall give you your final task. [30655-05.htm] Isael Silvershadow: You must proceed with haste to Father Dustin in the Town of Giran. He is preparing the last trial that you must face. With your admirable skills you should pass this test easily. I wish you luck. [30656-01.htm] Spirit of Sir Talianus: The report... Must get to the King! Please... please, could you deliver it to the King of Aden... Young Warrior... hear my confession... The depth of my sin is deeper than you can imagine... Until my wrongs are righted, and justice prevails in this land of Dion, I shall not rest in peace... I do not dare to...
Исходник условий и наград (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.Q00212_TrialOfDuty;

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.entity.itemcontainer.Inventory;
import org.l2jmobius.gameserver.mechanics.script.Quest;
import org.l2jmobius.gameserver.mechanics.script.QuestSound;
import org.l2jmobius.gameserver.mechanics.script.QuestState;
import org.l2jmobius.gameserver.mechanics.script.State;
import org.l2jmobius.gameserver.network.serverpackets.SocialAction;

public class Q00212_TrialOfDuty extends Quest
{
	// NPCs
	private static final int HANNAVALT = 30109;
	private static final int DUSTIN = 30116;
	private static final int SIR_COLLIN = 30311;
	private static final int SIR_ARON = 30653;
	private static final int SIR_KIEL = 30654;
	private static final int SILVERSHADOW = 30655;
	private static final int SPIRIT_TALIANUS = 30656;
	
	// Items
	private static final int LETTER_OF_DUSTIN = 2634;
	private static final int KNIGHTS_TEAR = 2635;
	private static final int MIRROR_OF_ORPIC = 2636;
	private static final int TEAR_OF_CONFESSION = 2637;
	private static final int REPORT_PIECE_1 = 2638;
	private static final int REPORT_PIECE_2 = 2639;
	private static final int TEAR_OF_LOYALTY = 2640;
	private static final int MILITAS_ARTICLE = 2641;
	private static final int SAINTS_ASHES_URN = 2642;
	private static final int ATHEBALDT_SKULL = 2643;
	private static final int ATHEBALDT_RIBS = 2644;
	private static final int ATHEBALDT_SHIN = 2645;
	private static final int LETTER_OF_WINDAWOOD = 2646;
	private static final int OLD_KNIGHT_SWORD = 3027;
	
	// Rewards
	private static final int MARK_OF_DUTY = 2633;
	private static final int DIMENSIONAL_DIAMOND = 7562;
	
	public Q00212_TrialOfDuty()
	{
		super(212, "Trial of Duty");
		registerQuestItems(LETTER_OF_DUSTIN, KNIGHTS_TEAR, MIRROR_OF_ORPIC, TEAR_OF_CONFESSION, REPORT_PIECE_1, REPORT_PIECE_2, TEAR_OF_LOYALTY, MILITAS_ARTICLE, SAINTS_ASHES_URN, ATHEBALDT_SKULL, ATHEBALDT_RIBS, ATHEBALDT_SHIN, LETTER_OF_WINDAWOOD, OLD_KNIGHT_SWORD);
		addStartNpc(HANNAVALT);
		addTalkId(HANNAVALT, DUSTIN, SIR_COLLIN, SIR_ARON, SIR_KIEL, SILVERSHADOW, SPIRIT_TALIANUS);
		addKillId(20144, 20190, 20191, 20200, 20201, 20270, 27119, 20577, 20578, 20579, 20580, 20581, 20582);
	}
	
	@Override
	public String onEvent(String event, Npc npc, Player player)
	{
		String htmltext = event;
		final QuestState st = getQuestState(player, false);
		if (st == null)
		{
			return htmltext;
		}
		
		if (event.equals("30109-04.htm"))
		{
			st.startQuest();
			if (!player.getVariables().getBoolean("secondClassChange35", false))
			{
				htmltext = "30109-04a.htm";
				giveItems(player, DIMENSIONAL_DIAMOND, DF_REWARD_35.get(player.getPlayerClass().getId()));
				player.getVariables().set("secondClassChange35", true);
			}
		}
		else if (event.equals("30116-05.htm"))
		{
			st.setCond(14, true);
			takeItems(player, TEAR_OF_LOYALTY, 1);
		}
		
		return htmltext;
	}
	
	@Override
	public String onTalk(Npc npc, Player player)
	{
		String htmltext = Quest.getNoQuestMsg(player);
		final QuestState st = getQuestState(player, true);
		
		switch (st.getState())
		{
			case State.CREATED:
			{
				if ((player.getPlayerClass() != PlayerClass.KNIGHT) && (player.getPlayerClass() != PlayerClass.ELVEN_KNIGHT) && (player.getPlayerClass() != PlayerClass.PALUS_KNIGHT))
				{
					htmltext = "30109-02.htm";
				}
				else if (player.getLevel() < 35)
				{
					htmltext = "30109-01.htm";
				}
				else
				{
					htmltext = "30109-03.htm";
				}
				break;
			}
			case State.STARTED:
			{
				final int cond = st.getCond();
				switch (npc.getId())
				{
					case HANNAVALT:
					{
						if (cond == 18)
						{
							htmltext = "30109-05.htm";
							takeItems(player, LETTER_OF_DUSTIN, 1);
							giveItems(player, MARK_OF_DUTY, 1);
							addExpAndSp(player, 79832, 3750);
							player.broadcastPacket(new SocialAction(player.getObjectId(), 3));
							st.exitQuest(false, true);
						}
						else
						{
							htmltext = "30109-04a.htm";
						}
						break;
					}
					case SIR_ARON:
					{
						if (cond == 1)
						{
							htmltext = "30653-01.htm";
							st.setCond(2, true);
							giveItems(player, OLD_KNIGHT_SWORD, 1);
						}
						else if (cond == 2)
						{
							htmltext = "30653-02.htm";
						}
						else if (cond == 3)
						{
							htmltext = "30653-03.htm";
							st.setCond(4, true);
							takeItems(player, KNIGHTS_TEAR, 1);
							takeItems(player, OLD_KNIGHT_SWORD, 1);
						}
						else if (cond > 3)
						{
							htmltext = "30653-04.htm";
						}
						break;
					}
					case SIR_KIEL:
					{
						if (cond == 4)
						{
							htmltext = "30654-01.htm";
							st.setCond(5, true);
						}
						else if (cond == 5)
						{
							htmltext = "30654-02.htm";
						}
						else if (cond == 6)
						{
							htmltext = "30654-03.htm";
							st.setCond(7, true);
							giveItems(player, MIRROR_OF_ORPIC, 1);
						}
						else if (cond == 7)
						{
							htmltext = "30654-04.htm";
						}
						else if (cond == 9)
						{
							htmltext = "30654-05.htm";
							st.setCond(10, true);
							takeItems(player, TEAR_OF_CONFESSION, 1);
						}
						else if (cond > 9)
						{
							htmltext = "30654-06.htm";
						}
						break;
					}
					case SPIRIT_TALIANUS:
					{
						if (cond == 8)
						{
							htmltext = "30656-01.htm";
							st.setCond(9, true);
							takeItems(player, MIRROR_OF_ORPIC, 1);
							takeItems(player, REPORT_PIECE_2, 1);
							giveItems(player, TEAR_OF_CONFESSION, 1);
							
							// Despawn the spirit.
							npc.deleteMe();
						}
						break;
					}
					case SILVERSHADOW:
					{
						if (cond == 10)
						{
							if (player.getLevel() < 35)
							{
								htmltext = "30655-01.htm";
							}
							else
							{
								htmltext = "30655-02.htm";
								st.setCond(11, true);
							}
						}
						else if (cond == 11)
						{
							htmltext = "30655-03.htm";
						}
						else if (cond == 12)
						{
							htmltext = "30655-04.htm";
							st.setCond(13, true);
							takeItems(player, MILITAS_ARTICLE, -1);
							giveItems(player, TEAR_OF_LOYALTY, 1);
						}
						else if (cond == 13)
						{
							htmltext = "30655-05.htm";
						}
						break;
					}
					case DUSTIN:
					{
						if (cond == 13)
						{
							htmltext = "30116-01.htm";
						}
						else if (cond == 14)
						{
							htmltext = "30116-06.htm";
						}
						else if (cond == 15)
						{
							htmltext = "30116-07.htm";
							st.setCond(16, true);
							takeItems(player, ATHEBALDT_SKULL, 1);
							takeItems(player, ATHEBALDT_RIBS, 1);
							takeItems(player, ATHEBALDT_SHIN, 1);
							giveItems(player, SAINTS_ASHES_URN, 1);
						}
						else if (cond == 16)
						{
							htmltext = "30116-09.htm";
						}
						else if (cond == 17)
						{
							htmltext = "30116-08.htm";
							st.setCond(18, true);
							takeItems(player, LETTER_OF_WINDAWOOD, 1);
							giveItems(player, LETTER_OF_DUSTIN, 1);
						}
						else if (cond == 18)
						{
							htmltext = "30116-10.htm";
						}
						break;
					}
					case SIR_COLLIN:
					{
						if (cond == 16)
						{
							htmltext = "30311-01.htm";
							st.setCond(17, true);
							takeItems(player, SAINTS_ASHES_URN, 1);
							giveItems(player, LETTER_OF_WINDAWOOD, 1);
						}
						else if (cond > 16)
						{
							htmltext = "30311-02.htm";
						}
						break;
					}
				}
				break;
			}
			case State.COMPLETED:
			{
				htmltext = getAlreadyCompletedMsg(player);
				break;
			}
		}
		
		return htmltext;
	}
	
	@Override
	public void onKill(Npc npc, Player player, boolean isPet)
	{
		final QuestState st = getQuestState(player, false);
		if ((st == null) || !st.isStarted())
		{
			return;
		}
		
		switch (npc.getId())
		{
			case 20190:
			case 20191:
			{
				if (st.isCond(2) && (getRandom(10) < 1))
				{
					playSound(player, QuestSound.ITEMSOUND_QUEST_BEFORE_BATTLE);
					addSpawn(27119, npc, false, 120000);
				}
				break;
			}
			case 27119:
			{
				if (st.isCond(2) && (player.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_RHAND) == OLD_KNIGHT_SWORD))
				{
					st.setCond(3, true);
					giveItems(player, KNIGHTS_TEAR, 1);
				}
				break;
			}
			case 20201:
			case 20200:
			{
				if (st.isCond(5))
				{
					giveItems(player, REPORT_PIECE_1, 1);
					if (getQuestItemsCount(player, REPORT_PIECE_1) >= 10)
					{
						st.setCond(6);
						takeItems(player, REPORT_PIECE_1, -1);
						giveItems(player, REPORT_PIECE_2, 1);
					}
					else
					{
						playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
					}
				}
				break;
			}
			case 20144:
			{
				if ((st.isCond(7) || st.isCond(8)) && (getRandom(100) < 33))
				{
					if (st.isCond(7))
					{
						st.setCond(8, true);
					}
					
					addSpawn(30656, npc, false, 300000);
				}
				break;
			}
			case 20577:
			case 20578:
			case 20579:
			case 20580:
			case 20581:
			case 20582:
			{
				if (st.isCond(11))
				{
					giveItems(player, MILITAS_ARTICLE, 1);
					if (getQuestItemsCount(player, MILITAS_ARTICLE) >= 20)
					{
						st.setCond(12, true);
					}
					else
					{
						playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
					}
				}
				break;
			}
			case 20270:
			{
				if (st.isCond(14) && getRandomBoolean())
				{
					if (!hasQuestItems(player, ATHEBALDT_SKULL))
					{
						playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
						giveItems(player, ATHEBALDT_SKULL, 1);
					}
					else if (!hasQuestItems(player, ATHEBALDT_RIBS))
					{
						playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
						giveItems(player, ATHEBALDT_RIBS, 1);
					}
					else if (!hasQuestItems(player, ATHEBALDT_SHIN))
					{
						st.setCond(15, true);
						giveItems(player, ATHEBALDT_SHIN, 1);
					}
				}
				break;
			}
		}
	}
}