ZURSULUS L2

Jumble, Tumble, Diamond Fuss

ID
108
Название
Jumble, Tumble, Diamond Fuss
start_npcs_json
[30523]
npc_ids_json
[20323,20324,20480,30516,30521,30522,30523,30526,30529,30555]
constants_json
{"GOUPH":30523,"REEP":30516,"MURDOC":30521,"AIRY":30522,"BRUNON":30526,"MARON":30529,"TOROCCO":30555,"GOBLIN_BRIGAND_LEADER":20323,"GOBLIN_BRIGAND_LIEUTENANT":20324,"BLADE_BAT":20480,"GOUPH_CONTRACT":1559,"REEP_CONTRACT":1560,"ELVEN_WINE":1561,"BRUNON_DICE":1562,"BRUNON_CONTRACT":1563,"AQUAMARINE":1564,"CHRYSOBERYL":1565,"GEM_BOX":1566,"COAL_PIECE":1567,"BRUNON_LETTER":1568,"BERRY_TART":1569,"BAT_DIAGRAM":1570,"STAR_DIAMOND":1571,"SILVERSMITH_HAMMER":1511,"SPIRITSHOT_FOR_BEGINNERS":5790,"SOULSHOT_FOR_BEGINNERS":5789,"ECHO_BATTLE":4412,"ECHO_LOVE":4413,"ECHO_SOLITUDE":4414,"ECHO_FEAST":4415,"ECHO_CELEBRATION":4416,"LESSER_HEALING_POTION":1060,"MAX_GEM_COUNT":10}
Статус разбора
metadata_only; dynamic Java conditions/rewards retained in source; unresolved starts: []
Источник
game/data/scripts/quests/Q00108_JumbleTumbleDiamondFuss/Q00108_JumbleTumbleDiamondFuss.java

NPC квеста

IDНазваниеСтарт квестаУровень
20323Goblin Brigand LeaderНет14
20324Goblin Brigand LieutenantНет10
20480Blade BatНет10
30516ReepНет70
30521MurdocНет70
30522AiryНет70
30523GouphДа70
30526BrunonНет70
30529MaronНет70
30555ToroccoНет70

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

else if (player.getLevel() < 10)

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

giveItems(player, GOUPH_CONTRACT, 1);
giveItems(player, ELVEN_WINE, 1);
giveItems(player, BRUNON_CONTRACT, 1);
giveItems(player, COAL_PIECE, 1);
giveItems(player, SILVERSMITH_HAMMER, 1);
giveItems(player, LESSER_HEALING_POTION, 100);
giveItems(player, SPIRITSHOT_FOR_BEGINNERS, 3000);
giveItems(player, SOULSHOT_FOR_BEGINNERS, 7000);
giveItems(player, ECHO_BATTLE, 10);
giveItems(player, ECHO_LOVE, 10);
giveItems(player, ECHO_SOLITUDE, 10);
giveItems(player, ECHO_FEAST, 10);
giveItems(player, ECHO_CELEBRATION, 10);
giveItems(player, REEP_CONTRACT, 1);
giveItems(player, BRUNON_DICE, 1);
giveItems(player, GEM_BOX, 1);
giveItems(player, BRUNON_LETTER, 1);
giveItems(player, BERRY_TART, 1);
giveItems(player, BAT_DIAGRAM, 1);

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

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

[30516-01.htm] Trader Reep: Star Diamond? I went on a business trip to Giran expressly for Gouph, and acquired the Star Diamond, that is a fact. I was going to bring it here myself... But Gouph insisted that one of his guild members, Carrier Torocco, be in charge of delivery... So, I gave the jewel to Torocco as he asked. I don't know what happened afterwards. As our Contract states, I acquired the Star Diamond for him. It was Gouph who insisted that someone else should deliver it. This Contract was drawn up when requesting the delivery. It may be of aid, so take it. I have nothing to do with this anymore. Ah! And when you see Gouph again, tell him that Trader Reep wants the rest of the payment for the jewel. And!!! If he's trying to cheat me, tell him I won't let him get away with it!!! [30516-02.htm] Trader Reep: Why have you come back? Didn't I tell you? I don't have the Star Diamond!!! The last person who had the jewel was Carrier Torocco. If you find him, show him the Contract I gave you and ask him why the delivery is taking so long. I have nothing to do with this anymore, so don't come back to me again. [30521-01.htm] Warehouse Keeper Murdoc: Has Brunon sent you? Ah ha! You came to the right place! I was going to visit him regarding the same matter! I opened the treasure chest I got from Brunon, and was very surprised to find a jewel in it! I then realized that the treasure chests must have been switched. But then, something happened! My friend Warehouse Keeper Airy's pet bat all of a sudden swooped in and swallowed the jewel. I was trying to catch the bat and make it spit the jewel out, but it flew out the window ... Airy is very upset that I made her lovely Kurupuru fly away, and she won't talk to me! This Berry Tart is Airy's favorite dessert. Please give this to her. Her anger will be alleviated somewhat. I need to find that stupid bat as soon as possible ... [30521-02.htm] Warehouse Keeper Murdoc: Hey, you! Don't be shy, and give those pastries to Warehouse Keeper Airy! Also, tell her that I'm very sorry ... [30521-03.htm] Warehouse Keeper Murdoc: ... My colleague Airy is very upset ... Whew ... Well, it's all my fault ... What should I do ... [30522-01.htm] Warehouse Keeper Airy: Berry Tart ...? Wow ... My favorite ... Is that for me? Wow! Thank you very much! It's from Murphy? Humph! I hate Murphy! He harassed my lovely Kurupuru ... It was just a stupid jewel ... He didn't have to run after Kurupuru with a knife ... Kurupuru got scared and flew away!!! Find my Kurupuru! I've had that lovely blade bat for one year! Look at this drawing! Kurupuru looks like this! What do you think? You can find him, right? You can find the jewel if you bring Kurupuru, right ...? Right? Right? So please find him ...! [30522-02.htm] Warehouse Keeper Airy: You haven't found Kurupuru yet? I even gave you a drawing!!! He's a very cute blade bat! Kurupuru swallowed that Star Diamond or whatever it is you are looking for, and flew away ... He must be somewhere outside the village, all cold and dark ... trembling ... My poor Kurupuru ... You must find him! [30522-03.htm] Warehouse Keeper Airy: That diamond is ...? It's the jewel Kurupuru swallowed, right ...? Right? Then, have you found Kurupuru? What? What? Wait ...! What is this blood on the jewel ... It can't be ... Kurupuru? Kurupuru!!! [30522-04.htm] Warehouse Keeper Airy: Ugh ... Poor Kurupuru ... He must be cold and hungry ... trembling in some cave ... Ughh ... Please come back ... [30523-00.htm] Collector Gouph: I can't ask an honored guest of another race who has visited our Dwarven town to run an errand for me! Take your time looking around, and enjoy! (This quest may only be undertaken by a Dwarven character.) [30523-01.htm] Collector Gouph: Hey, young friend! Have you ever heard of the jewel called the Star Diamond? It's a very rare gem of which only twelve exist on the entire continent. Due to a recent stroke of luck, I've managed to obtain one of those Star Diamonds ... It will be delivered here in few days ... I am so excited ...! Hoo Hoo Hoo ... (This quest may only be undertaken by a character of level 10 and above.) [30523-02.htm] Collector Gouph: Hey, young friend. Have you ever heard of a jewel called the Star Diamond? It's a very rare gem of which only twelve exist on the entire continent. Due to a recent stroke of luck, I've managed to obtain one of those Star Diamonds ... But, it's been more than three days since it was supposed to be delivered ... Hmmph ... What's going on? Hey! Are you interested in some work? Go and find out why the delivery is taking so long. Don't worry about the reward, I'll pay you more than enough! Those who work for me are all satisfied with their pay. You won't regret it! Say you will take the task [30523-03.htm] Collector Gouph: Good! Do you know Trader Reep of the weapons shop? He got the Star Diamond for me as my agent in Giran. That fellow is a master of bargaining, and so he got me a really nice price for the jewel. Go see him and ask him what's going on. If you show him this Contract, that scoundrel can't play innocent! And tell him this ... if that no-good crook is planning to cheat me, I will not let him get away with it! [30523-04.htm] Collector Gouph: Have you met Reep? Not yet? What in the world are you doing? If you've made up your mind to do this job, you'd better be responsible and get to it! Go and meet Trader Reep at the weapon shop and ask him where my diamond is, right now. If you show him this Contract, he can't pretend that he doesn't know anything! [30523-05.htm] Collector Gouph: What did Reep say? Where is my jewel? Hey, youngster, hurry up and find my jewel! You should be more responsible when you're hired to do a job! [30523-06.htm] Collector Gouph: Oooh! You've finally brought me my jewel. My precious Star Diamond ... Heh, heh, heh ... Let me see ... my baby ... What in the world is this? A lump of Coal? Look, young friend, what is the meaning of this? Can't you do a simple job right? Why have you brought me the wrong box? Take this dirty Coal Piece back immediately! [30523-07.htm] Collector Gouph: Are you still running around with that lump of Coal? When are you going to bring me my jewel? Can't you do this job right! Look, youngster, don't disappoint me! [30523-08.htm] Collector Gouph: Oooh! You've finally found it! My Star Diamond ...! Heh, heh, heh ... Give it to me now! Thank you! Thank you! Thank you! You've done well, young friend. As promised, I will give you a reward. Here, take this weapon. This hammer was used by silversmiths from the Elmoreden period. I got it from Gracia a few days ago, and what do you know, they say that someone stole it from the personal vaults of Count Boldstone and smuggled it here ... As I hold a public position as one of the leaders of the guild, it is not good for me to have smuggled goods in my possession ... So feel free to take it! You can use it or sell it. It's up to you! [30526-01.htm] Blacksmith Brunon: ... This dice ...? Where did you get this? Thanks anyway. Is there anything else you want to tell me about? Star Diamond? Oh, you mean the fool's jewel that I won from gambling yesterday! I don't care about you people, but I won that jewel through a fair dice game. The jewel is mine now! No matter what you say, I will not give it back to him! You shouldn't ignore the sacred rules of gambling! But, it seems like you are in some kind of trouble ... Then, how about this? If you do me a favor ... I will give you the jewel. Say you will take the task [30526-02.htm] Blacksmith Brunon: All right. I will explain this quest to you, so listen carefully. This happened few weeks ago ... ... When I was delivering jewels that I got at the Mithril Mines, I was attacked by goblin brigands ... I barely got out alive, but they took all the jewels I was delivering ... I fired those guards, but ... Anyway, I didn't get the jewels back yet ... I think the Goblin Brigand Lieutenant split the jewels ... Please go to the west of the Spine Mines, defeat them, and bring the jewels back. They are ten Aquamarines and ten Chrysoberyls. Should you return all of them, I shall give you the jewel your friend had lost from me. You have my word. I consider our agreement to be a binding Contract and I hope it will satisfy you. Please concentrate on finding my precious jewels. [30526-03.htm] Blacksmith Brunon: Have you recovered all my jewels? Not yet? Have you forgotten about our contract? I promised that if you restore all my jewels that the Goblin Brigand Lieutenant took from me, I would give you the diamond back that I won from your friend, Torocco. You have to find my ten Aquamarines and ten Chrysoberyls. [30526-04.htm] Blacksmith Brunon: Good job! You found all my jewels! Thank you! Now, as we agreed, I will give your friend's diamond back. Take this Gem Box! You don't need to worry about anything. I've never opened it ever since I got it from your friend. [30526-05.htm] Blacksmith Brunon: Why have you come back? You got the Gem Box. What else do you need from me? Hurry up and give the diamond back to the owner. [30526-06.htm] Blacksmith Brunon: What? Isn't that Murdoc's lucky Coal Piece? Why do you have it? Oh my! I gave you the wrong Gem Box! How on earth...? Look, I didn't mean to deceive you. This sounds terrible, but I thought the Gem Box that Warehouse Keeper Murdoc entrusted to me was the Gem Box with the diamond in it. Ha ha ha... I didn't mean this to happen, so please forgive me. I'm very sorry. I will write a letter explaining this situation, so take this to Warehouse Keeper Murdoc. Then you will be able to get your Gem Box back. [30526-07.htm] Blacksmith Brunon: Look! I didn't mean it! I was not trying to deceive you! Take the letter I wrote to Warehouse Keeper Murphy. Then, you will be able to get your Gem Box back. [30526-08.htm] Blacksmith Brunon: ... Look. I am very busy now ... I don't know what you are up to, but can we talk about this later? [30529-01.htm] Miner Maron: Elven Wine ...? A gift from Torocco? Oh my ... This gift is great, but ... he's going to have to fix that bad drinking habit of his ... I'm always worried that Torocco might start trouble while drinking ... Whew ... I am worried about him ... My friend, Torocco, is a fine, steady lad, but ... He has two bad habits ... One is drinking ... . And the other is gambling ... ... We were drinking together last night ... Then, Blacksmith Brunon suggested we gamble with dice ... I told him not to ... but Torocco just couldn't resist the temptation, and started to roll the dice ... These exact dice here ... He was very drunk and lost everything he had ... Whew ... He may be my friend, but I'm very ashamed of him ... [30529-02.htm] Miner Maron: Ah! You again ... Are you an investigator of the Bronze Key Guild? I told you everything I know ... I don't know about the Star Diamond ... But what I know for sure is that my friend lost everything he had while gambling ... to Blacksmith Brunon. [30529-03.htm] Miner Maron: Whew ... I am very worried about my friend, Torocco ... He is a nice fellow ... Except for his terrible drinking and gambling habits ... I don't know when he will cause another problem, so I can't let down my guard ... Whew ... [30555-01.htm] Carrier Torocco: Blast... What should I do? What should I do? How can I ever get that diamond back? I am in so much trouble... Gouph will kill me... What should I do? ...What the?! Who are you? How long have you been there? Did Gouph sent you?? Agghh... I'm sorry! Please forgive me....!!! I don't know what to do!!! I lost the legendary Star Diamond, that was my responsibility!!! I dishonored the Carriers, who are famous for their competence... My guild will excommunicate me... I won't be able to pay off the expensive fines even if I worked for the rest of my life? My colleagues and my family will laugh at me... Aghh... This is the end of my life! Ask what happened. [30555-02.htm] Carrier Torocco: I received the Star Diamond at Giran ... .and drew a Contract with Reep ... I told him that I would be responsible for delivery ... Everything was great when I was traveling ... And I got here, Kingdom of the Dwarves, last night ... I drank with my old friend, Miner Maron ... We have been friends ever since we were very young ... When we meet once in awhile, we have the bad habit of drinking until we pass out ... ... and we had quite a bit to drink last night ... But when I woke up in the morning, I found that my weapons, equipment, travel money, and the box where I put the Star Diamond were missing ...! I don't know what could have happened ... Agghhhhh ...! However ... Perhaps my friend Maron remembers something about last night ... But he paid for the drinks last night, as well as for the tables and chairs I broke ... I'm too ashamed to meet him ... Why don't you go to the strip mine and ask him? Give this wine to Maron for me ... This is a rare wine I brought for him from Giran as a present ... [30555-03.htm] Carrier Torocco: Have you found the Star Diamond ...? Not yet ... Oh no, oh no ... What should I do ... But you ... Didn't you say that you would meet my friend, Miner Maron, and ask him about the jewel? Hurry up and go to the strip mine and meet Maron! [30555-04.htm] Carrier Torocco: This is ...? Oh wow! The Treasure Chest I was delivering ...! You've found the Star Diamond!!! Thank you. Thank you. How can I ever repay you ... But first, please take this Treasure Chest to Collector Gouph ... He must be waiting ... [30555-05.htm] Carrier Torocco: ... What should I do ... What should I do ... How can I ever get the diamond back ... I am in so much trouble ... Gouph will kill me ... What should I do ... What should I do ... Disqualification and excommunication from the guild ... ... Expensive fines that I can never pay back in this lifetime ... The mocking laughter of my colleagues and my family ... Aghh ... This is the end of my life ...
Исходник условий и наград (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.Q00108_JumbleTumbleDiamondFuss;

import java.util.HashMap;
import java.util.Map;

import org.l2jmobius.gameserver.config.PlayerConfig;
import org.l2jmobius.gameserver.entity.actor.Npc;
import org.l2jmobius.gameserver.entity.actor.Player;
import org.l2jmobius.gameserver.entity.actor.enums.creature.Race;
import org.l2jmobius.gameserver.mechanics.script.Quest;
import org.l2jmobius.gameserver.mechanics.script.QuestSound;
import org.l2jmobius.gameserver.mechanics.script.QuestState;
import org.l2jmobius.gameserver.mechanics.script.State;
import org.l2jmobius.gameserver.mechanics.variables.PlayerVariables;
import org.l2jmobius.gameserver.network.serverpackets.SocialAction;
import org.l2jmobius.gameserver.util.LocationUtil;

public class Q00108_JumbleTumbleDiamondFuss extends Quest
{
	// NPCs
	private static final int GOUPH = 30523;
	private static final int REEP = 30516;
	private static final int MURDOC = 30521;
	private static final int AIRY = 30522;
	private static final int BRUNON = 30526;
	private static final int MARON = 30529;
	private static final int TOROCCO = 30555;
	
	// Monsters
	private static final int GOBLIN_BRIGAND_LEADER = 20323;
	private static final int GOBLIN_BRIGAND_LIEUTENANT = 20324;
	private static final int BLADE_BAT = 20480;
	
	// Items
	private static final int GOUPH_CONTRACT = 1559;
	private static final int REEP_CONTRACT = 1560;
	private static final int ELVEN_WINE = 1561;
	private static final int BRUNON_DICE = 1562;
	private static final int BRUNON_CONTRACT = 1563;
	private static final int AQUAMARINE = 1564;
	private static final int CHRYSOBERYL = 1565;
	private static final int GEM_BOX = 1566;
	private static final int COAL_PIECE = 1567;
	private static final int BRUNON_LETTER = 1568;
	private static final int BERRY_TART = 1569;
	private static final int BAT_DIAGRAM = 1570;
	private static final int STAR_DIAMOND = 1571;
	
	// Rewards
	private static final int SILVERSMITH_HAMMER = 1511;
	private static final int SPIRITSHOT_FOR_BEGINNERS = 5790;
	private static final int SOULSHOT_FOR_BEGINNERS = 5789;
	private static final int ECHO_BATTLE = 4412;
	private static final int ECHO_LOVE = 4413;
	private static final int ECHO_SOLITUDE = 4414;
	private static final int ECHO_FEAST = 4415;
	private static final int ECHO_CELEBRATION = 4416;
	private static final int LESSER_HEALING_POTION = 1060;
	
	// Misc
	private static final int MAX_GEM_COUNT = 10;
	private static final Map<Integer, Double> GOBLIN_DROP_CHANCES = new HashMap<>();
	static
	{
		GOBLIN_DROP_CHANCES.put(GOBLIN_BRIGAND_LEADER, 0.8);
		GOBLIN_DROP_CHANCES.put(GOBLIN_BRIGAND_LIEUTENANT, 0.6);
	}
	
	public Q00108_JumbleTumbleDiamondFuss()
	{
		super(108, "Jumble, Tumble, Diamond Fuss");
		registerQuestItems(GOUPH_CONTRACT, REEP_CONTRACT, ELVEN_WINE, BRUNON_DICE, BRUNON_CONTRACT, AQUAMARINE, CHRYSOBERYL, GEM_BOX, COAL_PIECE, BRUNON_LETTER, BERRY_TART, BAT_DIAGRAM, STAR_DIAMOND);
		addStartNpc(GOUPH);
		addTalkId(GOUPH, REEP, MURDOC, AIRY, BRUNON, MARON, TOROCCO);
		addKillId(GOBLIN_BRIGAND_LEADER, GOBLIN_BRIGAND_LIEUTENANT, BLADE_BAT);
	}
	
	@Override
	public String onEvent(String event, Npc npc, Player player)
	{
		final QuestState st = player.getQuestState(getName());
		final String htmltext = event;
		if (st == null)
		{
			return htmltext;
		}
		
		switch (event)
		{
			case "30523-03.htm":
			{
				st.startQuest();
				giveItems(player, GOUPH_CONTRACT, 1);
				break;
			}
			case "30555-02.htm":
			{
				st.setCond(3, true);
				takeItems(player, REEP_CONTRACT, 1);
				giveItems(player, ELVEN_WINE, 1);
				break;
			}
			case "30526-02.htm":
			{
				st.setCond(5, true);
				takeItems(player, BRUNON_DICE, 1);
				giveItems(player, BRUNON_CONTRACT, 1);
				break;
			}
		}
		
		return htmltext;
	}
	
	@Override
	public String onTalk(Npc npc, Player player)
	{
		String htmltext = getNoQuestMsg(player);
		final QuestState st = getQuestState(player, true);
		
		switch (st.getState())
		{
			case State.CREATED:
			{
				if (player.getRace() != Race.DWARF)
				{
					htmltext = "30523-00.htm";
				}
				else if (player.getLevel() < 10)
				{
					htmltext = "30523-01.htm";
				}
				else
				{
					htmltext = "30523-02.htm";
				}
				break;
			}
			case State.STARTED:
			{
				final int cond = st.getCond();
				switch (npc.getId())
				{
					case GOUPH:
					{
						if (cond == 1)
						{
							htmltext = "30523-04.htm";
						}
						else if ((cond > 1) && (cond < 7))
						{
							htmltext = "30523-05.htm";
						}
						else if (cond == 7)
						{
							htmltext = "30523-06.htm";
							st.setCond(8, true);
							takeItems(player, GEM_BOX, 1);
							giveItems(player, COAL_PIECE, 1);
						}
						else if ((cond > 7) && (cond < 12))
						{
							htmltext = "30523-07.htm";
						}
						else if (cond == 12)
						{
							htmltext = "30523-08.htm";
							takeItems(player, STAR_DIAMOND, -1);
							giveItems(player, SILVERSMITH_HAMMER, 1);
							giveItems(player, LESSER_HEALING_POTION, 100);
							
							// Give newbie reward if player is eligible
							if (player.isNewbie())
							{
								int newPlayerRewardsReceived = player.getVariables().getInt(PlayerVariables.NEWBIE_SHOTS_RECEIVED, 0);
								if (newPlayerRewardsReceived < 2)
								{
									st.showQuestionMark(26);
									if (player.isMageClass())
									{
										st.playTutorialVoice("tutorial_voice_027");
										giveItems(player, SPIRITSHOT_FOR_BEGINNERS, 3000);
										player.getVariables().set(PlayerVariables.NEWBIE_SHOTS_RECEIVED, ++newPlayerRewardsReceived);
									}
									else
									{
										st.playTutorialVoice("tutorial_voice_026");
										giveItems(player, SOULSHOT_FOR_BEGINNERS, 7000);
										player.getVariables().set(PlayerVariables.NEWBIE_SHOTS_RECEIVED, ++newPlayerRewardsReceived);
									}
								}
							}
							
							giveItems(player, ECHO_BATTLE, 10);
							giveItems(player, ECHO_LOVE, 10);
							giveItems(player, ECHO_SOLITUDE, 10);
							giveItems(player, ECHO_FEAST, 10);
							giveItems(player, ECHO_CELEBRATION, 10);
							player.broadcastPacket(new SocialAction(player.getObjectId(), 3));
							st.exitQuest(false, true);
						}
						break;
					}
					case REEP:
					{
						if (cond == 1)
						{
							htmltext = "30516-01.htm";
							st.setCond(2, true);
							takeItems(player, GOUPH_CONTRACT, 1);
							giveItems(player, REEP_CONTRACT, 1);
						}
						else if (cond > 1)
						{
							htmltext = "30516-02.htm";
						}
						break;
					}
					case TOROCCO:
					{
						if (cond == 2)
						{
							htmltext = "30555-01.htm";
						}
						else if (cond == 3)
						{
							htmltext = "30555-03.htm";
						}
						else if (cond == 7)
						{
							htmltext = "30555-04.htm";
						}
						else if (cond > 7)
						{
							htmltext = "30555-05.htm";
						}
						break;
					}
					case MARON:
					{
						if (cond == 3)
						{
							htmltext = "30529-01.htm";
							st.setCond(4, true);
							takeItems(player, ELVEN_WINE, 1);
							giveItems(player, BRUNON_DICE, 1);
						}
						else if (cond == 4)
						{
							htmltext = "30529-02.htm";
						}
						else if (cond > 4)
						{
							htmltext = "30529-03.htm";
						}
						break;
					}
					case BRUNON:
					{
						if (cond == 4)
						{
							htmltext = "30526-01.htm";
						}
						else if (cond == 5)
						{
							htmltext = "30526-03.htm";
						}
						else if (cond == 6)
						{
							htmltext = "30526-04.htm";
							st.setCond(7, true);
							takeItems(player, BRUNON_CONTRACT, 1);
							takeItems(player, AQUAMARINE, -1);
							takeItems(player, CHRYSOBERYL, -1);
							giveItems(player, GEM_BOX, 1);
						}
						else if (cond == 7)
						{
							htmltext = "30526-05.htm";
						}
						else if (cond == 8)
						{
							htmltext = "30526-06.htm";
							st.setCond(9, true);
							takeItems(player, COAL_PIECE, 1);
							giveItems(player, BRUNON_LETTER, 1);
						}
						else if (cond == 9)
						{
							htmltext = "30526-07.htm";
						}
						else if (cond > 9)
						{
							htmltext = "30526-08.htm";
						}
						break;
					}
					case MURDOC:
					{
						if (cond == 9)
						{
							htmltext = "30521-01.htm";
							st.setCond(10, true);
							takeItems(player, BRUNON_LETTER, 1);
							giveItems(player, BERRY_TART, 1);
						}
						else if (cond == 10)
						{
							htmltext = "30521-02.htm";
						}
						else if (cond > 10)
						{
							htmltext = "30521-03.htm";
						}
						break;
					}
					case AIRY:
					{
						if (cond == 10)
						{
							htmltext = "30522-01.htm";
							st.setCond(11, true);
							takeItems(player, BERRY_TART, 1);
							giveItems(player, BAT_DIAGRAM, 1);
						}
						else if (cond == 11)
						{
							htmltext = getRandomBoolean() ? "30522-02.htm" : "30522-04.htm";
						}
						else if (cond == 12)
						{
							htmltext = "30522-03.htm";
						}
						break;
					}
				}
				break;
			}
			case State.COMPLETED:
			{
				htmltext = getAlreadyCompletedMsg(player);
				break;
			}
		}
		
		return htmltext;
	}
	
	@Override
	public void onKill(Npc npc, Player killer, boolean isSummon)
	{
		final QuestState qs = getQuestState(killer, false);
		if ((qs != null) && LocationUtil.checkIfInRange(PlayerConfig.ALT_PARTY_RANGE, npc, killer, true))
		{
			switch (npc.getId())
			{
				case GOBLIN_BRIGAND_LEADER:
				case GOBLIN_BRIGAND_LIEUTENANT:
				{
					if (qs.isCond(5) && hasQuestItems(killer, BRUNON_CONTRACT))
					{
						final double dropChance = GOBLIN_DROP_CHANCES.get(npc.getId());
						boolean playSound = false;
						if (giveItemRandomly(killer, npc, AQUAMARINE, 1, MAX_GEM_COUNT, dropChance, false))
						{
							if (getQuestItemsCount(killer, CHRYSOBERYL) >= MAX_GEM_COUNT)
							{
								qs.setCond(6, true);
								break;
							}
							
							playSound = true;
						}
						
						if (giveItemRandomly(killer, npc, CHRYSOBERYL, 1, MAX_GEM_COUNT, dropChance, false))
						{
							if (getQuestItemsCount(killer, AQUAMARINE) >= MAX_GEM_COUNT)
							{
								qs.setCond(6, true);
								break;
							}
							
							playSound = true;
						}
						
						if (playSound)
						{
							playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
						}
					}
					break;
				}
				case BLADE_BAT:
				{
					if (qs.isCond(11) && hasQuestItems(killer, BAT_DIAGRAM) && giveItemRandomly(killer, npc, STAR_DIAMOND, 1, 1, 0.2, true))
					{
						takeItems(killer, BAT_DIAGRAM, -1);
						qs.setCond(12);
					}
					break;
				}
			}
		}
	}
}