ZURSULUS L2

Test of Magus

ID
228
Название
Test of Magus
start_npcs_json
[30629]
npc_ids_json
[20145,20157,20176,20230,20231,20232,20234,20553,20564,20565,20566,27095,27096,27097,27098,30391,30409,30411,30412,30413,30612,30629]
constants_json
{"PARINA":30391,"EARTH_SNAKE":30409,"FLAME_SALAMANDER":30411,"WIND_SYLPH":30412,"WATER_UNDINE":30413,"CASIAN":30612,"RUKAL":30629,"HARPY":20145,"MARSH_STAKATO":20157,"WYRM":20176,"MARSH_STAKATO_WORKER":20230,"TOAD_LORD":20231,"MARSH_STAKATO_SOLDIER":20232,"MARSH_STAKATO_DRONE":20234,"WINDSUS":20553,"ENCHANTED_MONSTEREYE":20564,"ENCHANTED_STONE_GOLEM":20565,"ENCHANTED_IRON_GOLEM":20566,"SINGING_FLOWER_PHANTASM":27095,"SINGING_FLOWER_NIGHTMARE":27096,"SINGING_FLOWER_DARKLING":27097,"GHOST_FIRE":27098,"RUKAL_LETTER":2841,"PARINA_LETTER":2842,"LILAC_CHARM":2843,"GOLDEN_SEED_1":2844,"GOLDEN_SEED_2":2845,"GOLDEN_SEED_3":2846,"SCORE_OF_ELEMENTS":2847,"DAZZLING_DROP":2848,"FLAME_CRYSTAL":2849,"HARPY_FEATHER":2850,"WYRM_WINGBONE":2851,"WINDSUS_MANE":2852,"EN_MONSTEREYE_SHELL":2853,"EN_STONEGOLEM_POWDER":2854,"EN_IRONGOLEM_SCRAP":2855,"TONE_OF_WATER":2856,"TONE_OF_FIRE":2857,"TONE_OF_WIND":2858,"TONE_OF_EARTH":2859,"SALAMANDER_CHARM":2860,"SYLPH_CHARM":2861,"UNDINE_CHARM":2862,"SERPENT_CHARM":2863,"MARK_OF_MAGUS":2840,"DIMENSIONAL_DIAMOND":7562}
Статус разбора
metadata_only; dynamic Java conditions/rewards retained in source; unresolved starts: []
Источник
game/data/scripts/quests/Q00228_TestOfMagus/Q00228_TestOfMagus.java

NPC квеста

IDНазваниеСтарт квестаУровень
20145HarpyНет32
20157Marsh StakatoНет29
20176WyrmНет35
20230Marsh Stakato WorkerНет31
20231Toad LordНет32
20232Marsh Stakato SoldierНет33
20234Marsh Stakato DroneНет35
20553WindsusНет39
20564Enchanted MonstereyeНет41
20565Enchanted Stone GolemНет42
20566Enchanted Iron GolemНет43
27095Singing Flower PhantasmНет44
27096Singing Flower NightmareНет44
27097Singing Flower DarklingНет44
27098Ghost FireНет42
30391ParinaНет70
30409Earth SnakeНет70
30411Flame SalamanderНет70
30412Wind SylphНет70
30413Water UndineНет70
30612CasianНет70
30629RukalДа70

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

else if (player.getLevel() < 39)

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

giveItems(player, RUKAL_LETTER, 1);
giveItems(player, DIMENSIONAL_DIAMOND, DF_REWARD_39.get(player.getPlayerClass().getId()));
giveItems(player, SCORE_OF_ELEMENTS, 1);
giveItems(player, PARINA_LETTER, 1);
giveItems(player, LILAC_CHARM, 1);
giveItems(player, SYLPH_CHARM, 1);
giveItems(player, SERPENT_CHARM, 1);
giveItems(player, MARK_OF_MAGUS, 1);
addExpAndSp(player, 139039, 40000);
giveItems(player, TONE_OF_WATER, 1);
giveItems(player, UNDINE_CHARM, 1);
giveItems(player, TONE_OF_FIRE, 1);
giveItems(player, SALAMANDER_CHARM, 1);
giveItems(player, TONE_OF_WIND, 1);
giveItems(player, TONE_OF_EARTH, 1);
giveItems(player, GOLDEN_SEED_1, 1);
giveItems(player, GOLDEN_SEED_2, 1);
giveItems(player, GOLDEN_SEED_3, 1);
giveItems(player, FLAME_CRYSTAL, 1);
giveItems(player, DAZZLING_DROP, 1);
giveItems(player, DAZZLING_DROP, 1);
giveItems(player, DAZZLING_DROP, 1);
giveItems(player, HARPY_FEATHER, 1);
giveItems(player, WYRM_WINGBONE, 1);
giveItems(player, WINDSUS_MANE, 1);
giveItems(player, EN_MONSTEREYE_SHELL, 1);
giveItems(player, EN_STONEGOLEM_POWDER, 1);
giveItems(player, EN_IRONGOLEM_SCRAP, 1);

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

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

[30391-01.htm] Parina: So you heard that song as well. Yes, I've been hearing that melody every night recently. I've heard many types of music, and am quite sure this is not a Human voice. It seemed to emanate from all directions. Near and far away at the same time... Perhaps it was the voice of the 'singing flower'... Ask about the singing flower [30391-02.htm] Parina: The singing flower is an infamous evil spirit which sings when in bloom. It looks like a beautiful woman but is actually quite a dreadful creature. They sprout from a pod called 'the Golden Seed'. The singing flower is said to seduce people with its beautiful voice, only to later feed on their blood... I have consulted Elder Casian about this matter, why don't you take this letter and go and meet him. He is in the Wastelands. [30391-03.htm] Parina: You are still here? You must go and meet Elder Casian immediately. He knows more than anyone else about the singing flower. [30391-04.htm] Parina: You must not be swayed by the voice of the singing flower. They are vile creatures that should be exterminated from the earth. Find them and kill them all. Then you must locate the Golden Seed which bears the blood of the innocent. When you find 3 of them take them to Bard Rukal. [30391-05.htm] Parina: So, I understand that you seek the notes of the 4 elements for Rukal? I wish you luck in gathering all the notes and completing the absolute tone. [30409-01.htm] Earth Snake: I am an element of this earth. The truths of the universe within the earth are within me. So, you seek the Note of the Earth? What do you expect to do with it...? Do you plan to create absolute music? Is that it...? And what then...? "I will use it to bring the thousand year flower into bloom." [30409-02.htm] Earth Snake: Ahhh, the thousand year flower! I see... So you seek the golden seed and the 4 elemental notes, then? Well, I guess it doesn't matter... Yes, I will give you the Note of the Earth. But you must find out something for me first. In that place that the Humans call Oren, near the Ivory Tower, I have seen monsters. They seem similar to those from the place called Gludio, but much stronger than any that I have ever seen... Why is this happening? I must know! "Which monsters must I investigate?" [30409-03.htm] Earth Snake: Enchanted Monster Eye, Enchanted Stone Golem, Enchanted Iron Golem... These are the monsters you must slay. You must kill them and bring me what they carry... and plenty of it! Ten! Yes! Ten from each will do! Take this totem with you as a reminder of your promise... [30409-04.htm] Earth Snake: There are not 10 items here...Did you think I would not notice? I will not give you the Note of the Earth until you bring me proof that you have slain 10 each of the Enchanted Monster Eye, Enchanted Stone Golem and Enchanted Iron Golem. [30409-05.htm] Earth Snake: 1, 2, 3... Yes... I think you have brought all that I asked for. I shall bestow upon you the Note of the Earth. May you create beautiful music with this and make the thousand year flower bloom... [30409-06.htm] Earth Snake: Have you acquired the notes of water, wind, and flame? The Note of the Earth is a deeper and more solemn tone than the other notes... Only when the 4 different notes combine together can the most beautiful music be played... The absolute music... [30411-01.htm] Flame Salamander: What is it, my child? Have you no fear of fire? ...Ah, you seek the Note of Fire... I see... Of course I have it, silly! Nothing comes for free, however... If you will journey north, near the Ivory Tower, and retrieve 5 Flame Crystals from the Ghost Fires, I shall take them in exchange for the Note of Fire! But not one less than 5! [30411-02.htm] Flame Salamander: Bring me 5 Flame Crystals from the Ghost Fires. They are in the north... Near the Ivory Tower... [30411-03.htm] Flame Salamander: Five Flame Crystals... Oh how lovely. Here is the Note of Fire. Take it! [30411-04.htm] Flame Salamander: I trust you are taking good care of the Note of Fire that I have given you... I hope you realize that that note is the strongest, and has the deepest tone of all 4 of the elemental notes... [30412-01.htm] Wind Sylph: Nice to meet you, Elder of the magical world, manager of the elements. I am the Wind Sylph, messenger of Zephyr, guide of the storms. Have you come to me seeking the Tone of Wind, by any chance? The wind is an elusive figure, hard to grasp... Do you believe that you can get a note consisting of this wind? Only I can give the Tone of Wind. You must make a deal with me. "I will make a deal with you." [30412-02.htm] Wind Sylph: Ah yes, a wise choice... Bring me 20 Harpy Feathers, 10 wyrm wingbones, and 10 Windsus Manes... You will find your prey in the Gorgon Flower Garden in Giran and Death Pass. Do you understand? The harpy flies by gliding on the wind, the wyrm's feathers blast the wind mightily and the mane of the windsus blows in the wind. As you see, these creatures all have the wind in common, which I must control... [30412-03.htm] Wind Sylph: Is the wind blowing in your mind as well? Are all your memories blown away? 20 Harpy Feathers, 10 Wyrm Wingbone, and 10 Windsus Manes... If you do not bring these 3 materials, I will not give you the Tone of Wind. [30412-04.htm] Wind Sylph: ...You have gathered all of them! You are faithful indeed... Even the wind keeps its promises. Take this Tone of Wind... Be careful, because it might blow away... [30412-05.htm] Wind Sylph: Are you taking good care of the Tone of Wind? That thing can be easily swept away, so hold on to it firmly. Once you lose it, you will never hear its beautiful melody again. [30413-01.htm] Water Undine: I am Undine, guardian of the deep lake, spirit of the precious water... Have you come for the Tone of Water? It is the rhythm which expresses the nature of water among the four basic elements which compose the earth... To create this, you need 20 Dazzling Drops from the monsters of the marshlands. Toad lords which live in the Cruma Marshlands... And the swamp stakatos have the Dazzling Drops. If you bring 20 of them, I shall make you the tone. This amulet is a symbol of my promise... [30413-02.htm] Water Undine: We need 20 Dazzling Drops to make the Tone of Water. Hunt toad lords and swamp stakatos in the Cruma Marshlands and take it from them. Now, hurry! You promised, didn't you? [30413-03.htm] Water Undine: ...18, 19, 20... Good... You have brought 20. I shall give you the Tone of Water. [30413-04.htm] Water Undine: I assume that you seek the Tones of Fire, Wind, Earth as well? They are all my brothers and sisters... Please give them my regards... [30612-01.htm] Elder Casian: I have heard of Parina's suffering because of that monstrous flower ... I have thought of nothing else for days... The only solution I can come up with is to hunt down the vicious flower and kill it. I have heard that there are actually 3 flowers: The nightmare singing flower, the phantom singing flower and the darkness singing flower. We must find all 3 of them. "Where are the singing flowers?" [30612-02.htm] Elder Casian: The singing flowers are said to bloom near waterfalls or lakes, and seduce passersby with their beautiful voice. Different kinds of singing flowers will never bloom close to each other. Parina, Rukal and I searched for them and managed to agree on a few places. We are sure the flowers may be found near the Fellmere Lake in Gludio, the waterfalls near the Ivory Tower of Oren, and somewhere in the southern part of the Town of Giran. Got that? The flowers bloom near water. You must look in the 3 places I mentioned, especially near water. You must be very careful because the singing flowers all possess small amounts of poison... Take this amulet with you, it will help. [30612-03.htm] Elder Casian: You still haven't found all the seeds... What are you doing? Hurry, go and find all 3! If this mission is too much for you, then give up! If you intend to complete the task, you must go to the Fellmere Lake in Gludio, the waterfalls near the Ivory Tower of Oren, and the southern part of the Town of Giran, kill the flowers and bring back the seeds! You got it? [30612-04.htm] Elder Casian: Ah, all the seeds! Good, good...! You may go now. Take this to Bard Rukal. [30612-05.htm] Elder Casian: The note of the element? Even I, an esteemed Sage, have never heard such a thing... Well, I must admit that I have heard of their stunning beauty... [30629-01.htm] Bard Rukal: To see a Mystic command the ultimate elemental magic is somewhat like hearing a song from heaven. Unlike other magic, Elemental Magic consists of combining the songs of the spirits. Your ears are not sophisticated enough to hear the elemental tones? I suppose a cacophony of swords and shields or a hymn of prayer and blessings would be easier for you to hear. (Quest for Wizards, Elven Wizards and Dark Wizards, level 39 or above.) [30629-02.htm] Bard Rukal: To see a Mystic combining the songs of the spirits while commanding elemental magic is like hearing a song straight from heaven. A Mystic must have a thorough understanding of the elements of tone. Come back when you have more experience. (Quest for Wizard, Elven Wizard, or Dark Wizard. Level 39 or above.) [30629-03.htm] Bard Rukal: Elemental magic is like a song from heaven. Combining the songs of the spirits is fundamental in the use of elemental magic. Mystics must have a complete understanding of the elements of tone. The Test of the Magus will assess your understanding of the tones of the 4 elements. Those who pass this test will have a chance to advance to the higher level of Elemental Magic.. Take the Test of the Magus [30629-04.htm] Bard Rukal: Good. First let me tell you something about myself. My nights are sleepless, haunted by the songs of the spirits. This is a condition common to the practitioners of Elemental Magic. This inhuman song is not of this earth, and can make the hair stand up on the back of your neck, and a cold shiver run down your spine. You must find the source of this music. I know someone who can help you. I will introduce you to Parina, who is in the temple of Gludin. She has a profound knowledge of Elemental Magic. She will help you find the source of this unworldly music if you show her this letter. [30629-04a.htm] Bard Rukal: Very well. Listen to my story, youngster. Blissful slumber escapes me night after night. In the quiet darkness, I am haunted by a strange melody that reaches my ears, a music that can only be heard by those who have mastered elemental magic. Low-pitched and subtle, it nevertheless grates upon my sensitive nerves. Humans cannot make this kind of otherworldy melody, I am convinced, and it is certainly not a magician's aria. Your task is to find the source of this ominous sound. To begin your investigation, visit Parina from the temple in Gludin Town. A master of elemental magic, perhaps he knows something about this eerie nighttime melody. I must be able to sleep! Show him this letter and I am sure that he will help you. Oh, and take this Dimension Diamond. You can trade it to the village gatekeeper for something special that may help you on your journey. [30629-05.htm] Bard Rukal: The strange songs of the spirits will still not let me sleep. Please go meet Parina and investigate the origin of this music. [30629-06.htm] Bard Rukal: This is very disturbing. That song was from the legendary evil spirit Singing Flower. As Parina advised you, you should go and meet Elder Casian. He will tell you more about Singing Flower. [30629-07.htm] Bard Rukal: The Singing Flowers must be stopped from ever singing that song again. You must find them all and destroy them. You can obtain golden seeds when you destroy them. You must get 3 types of seeds from 3 different types of Singing Flowers. [30629-08.htm] Bard Rukal: Excellent! The Golden Seeds of the Singing Flower! I have experience raising flowers from these seeds. One must be very careful in their cultivation, they can grow into brutal flowers if the seeds taste living human blood. Under normal circumstances they grow into a beautiful flower called 'Millennium Flower.' To grow these you must be able to produce the exquisite 'Absolute Tone'. The problem is that I cannot produce absolute tone with my skills... Would you be willing to help me once you start your job? Say you will help [30629-09.htm] Bard Rukal: To make an Absolute Tone we need 4 tones that correspond to 4 elements. As you know, our world is composed of these 4 elements and the 4 tones represent the essence of each element. That is, we can only make the Absolute Tone which controls all other tones by collecting 4 notes that correspond to the 4 elements. Remember, collecting these 4 tones is a difficult, time-consuming task.. Ask about 4 notes [30629-10.htm] Bard Rukal: You must collect the 4 tones that correspond to the 4 elements in order to create an Absolute Tone. To obtain the Note of Water you must visit the Water Undine, a water spirit who lives in Fellmere Lake... It is located northwest of Gludin, north of the Abandoned Camp. To obtain the Note of Fire you must seek the Flame Salamander. Lizard spirits such as this salamander are formed with the power of flame. They can be found in the Ruins of Despair, south of the Town of Gludio. To locate the Note of Wind you must meet the Wind Sylph. She is on the northwest side of the 3 entrances to the Wastelands of Gludio. Last, the Note of Earth can be obtained from the Earth Snake. He is in the Ruins of Agony, on the north side of the Town of Gludio. I will give you a musical book in which to put the 4 notes. When you have found them all return the book to me. [30629-11.htm] Bard Rukal: The Test of the Magus will not be complete until all 4 tones essential for Absolute Tone are collected. Please do your best to get these tones for me. [30629-12.htm] Bard Rukal: Congratulations! You have passed the Test of the Magus! Now I can start the time-consuming process of creating Absolute Tone. This would not have been possible without your efforts. I will let you know when the Millennium Flowers bloom. Come to see me then. Congratulations again on passing the test! I shall grant you the Mark of the Magus.
Исходник условий и наград (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.Q00228_TestOfMagus;

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 Q00228_TestOfMagus extends Quest
{
	// NPCs
	private static final int PARINA = 30391;
	private static final int EARTH_SNAKE = 30409;
	private static final int FLAME_SALAMANDER = 30411;
	private static final int WIND_SYLPH = 30412;
	private static final int WATER_UNDINE = 30413;
	private static final int CASIAN = 30612;
	private static final int RUKAL = 30629;
	
	// Monsters
	private static final int HARPY = 20145;
	private static final int MARSH_STAKATO = 20157;
	private static final int WYRM = 20176;
	private static final int MARSH_STAKATO_WORKER = 20230;
	private static final int TOAD_LORD = 20231;
	private static final int MARSH_STAKATO_SOLDIER = 20232;
	private static final int MARSH_STAKATO_DRONE = 20234;
	private static final int WINDSUS = 20553;
	private static final int ENCHANTED_MONSTEREYE = 20564;
	private static final int ENCHANTED_STONE_GOLEM = 20565;
	private static final int ENCHANTED_IRON_GOLEM = 20566;
	private static final int SINGING_FLOWER_PHANTASM = 27095;
	private static final int SINGING_FLOWER_NIGHTMARE = 27096;
	private static final int SINGING_FLOWER_DARKLING = 27097;
	private static final int GHOST_FIRE = 27098;
	
	// Items
	private static final int RUKAL_LETTER = 2841;
	private static final int PARINA_LETTER = 2842;
	private static final int LILAC_CHARM = 2843;
	private static final int GOLDEN_SEED_1 = 2844;
	private static final int GOLDEN_SEED_2 = 2845;
	private static final int GOLDEN_SEED_3 = 2846;
	private static final int SCORE_OF_ELEMENTS = 2847;
	private static final int DAZZLING_DROP = 2848;
	private static final int FLAME_CRYSTAL = 2849;
	private static final int HARPY_FEATHER = 2850;
	private static final int WYRM_WINGBONE = 2851;
	private static final int WINDSUS_MANE = 2852;
	private static final int EN_MONSTEREYE_SHELL = 2853;
	private static final int EN_STONEGOLEM_POWDER = 2854;
	private static final int EN_IRONGOLEM_SCRAP = 2855;
	private static final int TONE_OF_WATER = 2856;
	private static final int TONE_OF_FIRE = 2857;
	private static final int TONE_OF_WIND = 2858;
	private static final int TONE_OF_EARTH = 2859;
	private static final int SALAMANDER_CHARM = 2860;
	private static final int SYLPH_CHARM = 2861;
	private static final int UNDINE_CHARM = 2862;
	private static final int SERPENT_CHARM = 2863;
	
	// Rewards
	private static final int MARK_OF_MAGUS = 2840;
	private static final int DIMENSIONAL_DIAMOND = 7562;
	
	public Q00228_TestOfMagus()
	{
		super(228, "Test of Magus");
		registerQuestItems(RUKAL_LETTER, PARINA_LETTER, LILAC_CHARM, GOLDEN_SEED_1, GOLDEN_SEED_2, GOLDEN_SEED_3, SCORE_OF_ELEMENTS, DAZZLING_DROP, FLAME_CRYSTAL, HARPY_FEATHER, WYRM_WINGBONE, WINDSUS_MANE, EN_MONSTEREYE_SHELL, EN_STONEGOLEM_POWDER, EN_IRONGOLEM_SCRAP, TONE_OF_WATER, TONE_OF_FIRE, TONE_OF_WIND, TONE_OF_EARTH, SALAMANDER_CHARM, SYLPH_CHARM, UNDINE_CHARM, SERPENT_CHARM);
		addStartNpc(RUKAL);
		addTalkId(PARINA, EARTH_SNAKE, FLAME_SALAMANDER, WIND_SYLPH, WATER_UNDINE, CASIAN, RUKAL);
		addKillId(HARPY, MARSH_STAKATO, WYRM, MARSH_STAKATO_WORKER, TOAD_LORD, MARSH_STAKATO_SOLDIER, MARSH_STAKATO_DRONE, WINDSUS, ENCHANTED_MONSTEREYE, ENCHANTED_STONE_GOLEM, ENCHANTED_IRON_GOLEM, SINGING_FLOWER_PHANTASM, SINGING_FLOWER_NIGHTMARE, SINGING_FLOWER_DARKLING, GHOST_FIRE);
	}
	
	@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 "30629-04.htm":
			{
				st.startQuest();
				giveItems(player, RUKAL_LETTER, 1);
				if (!player.getVariables().getBoolean("secondClassChange39", false))
				{
					htmltext = "30629-04a.htm";
					giveItems(player, DIMENSIONAL_DIAMOND, DF_REWARD_39.get(player.getPlayerClass().getId()));
					player.getVariables().set("secondClassChange39", true);
				}
				break;
			}
			case "30629-10.htm":
			{
				st.setCond(5, true);
				takeItems(player, GOLDEN_SEED_1, 1);
				takeItems(player, GOLDEN_SEED_2, 1);
				takeItems(player, GOLDEN_SEED_3, 1);
				takeItems(player, LILAC_CHARM, 1);
				giveItems(player, SCORE_OF_ELEMENTS, 1);
				break;
			}
			case "30391-02.htm":
			{
				st.setCond(2, true);
				takeItems(player, RUKAL_LETTER, 1);
				giveItems(player, PARINA_LETTER, 1);
				break;
			}
			case "30612-02.htm":
			{
				st.setCond(3, true);
				takeItems(player, PARINA_LETTER, 1);
				giveItems(player, LILAC_CHARM, 1);
				break;
			}
			case "30412-02.htm":
			{
				playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
				giveItems(player, SYLPH_CHARM, 1);
				break;
			}
			case "30409-03.htm":
			{
				playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
				giveItems(player, SERPENT_CHARM, 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.getPlayerClass() != PlayerClass.WIZARD) && (player.getPlayerClass() != PlayerClass.ELVEN_WIZARD) && (player.getPlayerClass() != PlayerClass.DARK_WIZARD))
				{
					htmltext = "30629-01.htm";
				}
				else if (player.getLevel() < 39)
				{
					htmltext = "30629-02.htm";
				}
				else
				{
					htmltext = "30629-03.htm";
				}
				break;
			}
			case State.STARTED:
			{
				final int cond = st.getCond();
				switch (npc.getId())
				{
					case RUKAL:
					{
						if (cond == 1)
						{
							htmltext = "30629-05.htm";
						}
						else if (cond == 2)
						{
							htmltext = "30629-06.htm";
						}
						else if (cond == 3)
						{
							htmltext = "30629-07.htm";
						}
						else if (cond == 4)
						{
							htmltext = "30629-08.htm";
						}
						else if (cond == 5)
						{
							htmltext = "30629-11.htm";
						}
						else if (cond == 6)
						{
							htmltext = "30629-12.htm";
							takeItems(player, SCORE_OF_ELEMENTS, 1);
							takeItems(player, TONE_OF_EARTH, 1);
							takeItems(player, TONE_OF_FIRE, 1);
							takeItems(player, TONE_OF_WATER, 1);
							takeItems(player, TONE_OF_WIND, 1);
							giveItems(player, MARK_OF_MAGUS, 1);
							addExpAndSp(player, 139039, 40000);
							player.broadcastPacket(new SocialAction(player.getObjectId(), 3));
							st.exitQuest(false, true);
						}
						break;
					}
					case PARINA:
					{
						if (cond == 1)
						{
							htmltext = "30391-01.htm";
						}
						else if (cond == 2)
						{
							htmltext = "30391-03.htm";
						}
						else if ((cond == 3) || (cond == 4))
						{
							htmltext = "30391-04.htm";
						}
						else if (cond > 4)
						{
							htmltext = "30391-05.htm";
						}
						break;
					}
					case CASIAN:
					{
						if (cond == 2)
						{
							htmltext = "30612-01.htm";
						}
						else if (cond == 3)
						{
							htmltext = "30612-03.htm";
						}
						else if (cond == 4)
						{
							htmltext = "30612-04.htm";
						}
						else if (cond > 4)
						{
							htmltext = "30612-05.htm";
						}
						break;
					}
					case WATER_UNDINE:
					{
						if (cond == 5)
						{
							if (hasQuestItems(player, UNDINE_CHARM))
							{
								if (getQuestItemsCount(player, DAZZLING_DROP) < 20)
								{
									htmltext = "30413-02.htm";
								}
								else
								{
									htmltext = "30413-03.htm";
									takeItems(player, DAZZLING_DROP, 20);
									takeItems(player, UNDINE_CHARM, 1);
									giveItems(player, TONE_OF_WATER, 1);
									
									if (hasQuestItems(player, TONE_OF_FIRE, TONE_OF_WIND, TONE_OF_EARTH))
									{
										st.setCond(6, true);
									}
									else
									{
										playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
									}
								}
							}
							else if (!hasQuestItems(player, TONE_OF_WATER))
							{
								htmltext = "30413-01.htm";
								playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
								giveItems(player, UNDINE_CHARM, 1);
							}
							else
							{
								htmltext = "30413-04.htm";
							}
						}
						else if (cond == 6)
						{
							htmltext = "30413-04.htm";
						}
						break;
					}
					case FLAME_SALAMANDER:
					{
						if (cond == 5)
						{
							if (hasQuestItems(player, SALAMANDER_CHARM))
							{
								if (getQuestItemsCount(player, FLAME_CRYSTAL) < 5)
								{
									htmltext = "30411-02.htm";
								}
								else
								{
									htmltext = "30411-03.htm";
									takeItems(player, FLAME_CRYSTAL, 5);
									takeItems(player, SALAMANDER_CHARM, 1);
									giveItems(player, TONE_OF_FIRE, 1);
									
									if (hasQuestItems(player, TONE_OF_WATER, TONE_OF_WIND, TONE_OF_EARTH))
									{
										st.setCond(6, true);
									}
									else
									{
										playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
									}
								}
							}
							else if (!hasQuestItems(player, TONE_OF_FIRE))
							{
								htmltext = "30411-01.htm";
								giveItems(player, SALAMANDER_CHARM, 1);
							}
							else
							{
								htmltext = "30411-04.htm";
							}
						}
						else if (cond == 6)
						{
							htmltext = "30411-04.htm";
						}
						break;
					}
					case WIND_SYLPH:
					{
						if (cond == 5)
						{
							if (hasQuestItems(player, SYLPH_CHARM))
							{
								if ((getQuestItemsCount(player, HARPY_FEATHER) + getQuestItemsCount(player, WYRM_WINGBONE) + getQuestItemsCount(player, WINDSUS_MANE)) < 40)
								{
									htmltext = "30412-03.htm";
								}
								else
								{
									htmltext = "30412-04.htm";
									takeItems(player, HARPY_FEATHER, 20);
									takeItems(player, SYLPH_CHARM, 1);
									takeItems(player, WINDSUS_MANE, 10);
									takeItems(player, WYRM_WINGBONE, 10);
									giveItems(player, TONE_OF_WIND, 1);
									
									if (hasQuestItems(player, TONE_OF_WATER, TONE_OF_FIRE, TONE_OF_EARTH))
									{
										st.setCond(6, true);
									}
									else
									{
										playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
									}
								}
							}
							else if (!hasQuestItems(player, TONE_OF_WIND))
							{
								htmltext = "30412-01.htm";
							}
							else
							{
								htmltext = "30412-05.htm";
							}
						}
						else if (cond == 6)
						{
							htmltext = "30412-05.htm";
						}
						break;
					}
					case EARTH_SNAKE:
					{
						if (cond == 5)
						{
							if (hasQuestItems(player, SERPENT_CHARM))
							{
								if ((getQuestItemsCount(player, EN_MONSTEREYE_SHELL) + getQuestItemsCount(player, EN_STONEGOLEM_POWDER) + getQuestItemsCount(player, EN_IRONGOLEM_SCRAP)) < 30)
								{
									htmltext = "30409-04.htm";
								}
								else
								{
									htmltext = "30409-05.htm";
									takeItems(player, EN_IRONGOLEM_SCRAP, 10);
									takeItems(player, EN_MONSTEREYE_SHELL, 10);
									takeItems(player, EN_STONEGOLEM_POWDER, 10);
									takeItems(player, SERPENT_CHARM, 1);
									giveItems(player, TONE_OF_EARTH, 1);
									
									if (hasQuestItems(player, TONE_OF_WATER, TONE_OF_FIRE, TONE_OF_WIND))
									{
										st.setCond(6, true);
									}
									else
									{
										playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
									}
								}
							}
							else if (!hasQuestItems(player, TONE_OF_EARTH))
							{
								htmltext = "30409-01.htm";
							}
							else
							{
								htmltext = "30409-06.htm";
							}
						}
						else if (cond == 6)
						{
							htmltext = "30409-06.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;
		}
		
		final int cond = st.getCond();
		if (cond == 3)
		{
			switch (npc.getId())
			{
				case SINGING_FLOWER_PHANTASM:
				{
					if (!hasQuestItems(player, GOLDEN_SEED_1))
					{
						npc.broadcastSay(ChatType.GENERAL, "I am a tree of nothing... a tree... that knows where to return...");
						giveItems(player, GOLDEN_SEED_1, 1);
						if (hasQuestItems(player, GOLDEN_SEED_2, GOLDEN_SEED_3))
						{
							st.setCond(4, true);
						}
						else
						{
							playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
						}
					}
					break;
				}
				case SINGING_FLOWER_NIGHTMARE:
				{
					if (!hasQuestItems(player, GOLDEN_SEED_2))
					{
						npc.broadcastSay(ChatType.GENERAL, "I am a creature that shows the truth of the place deep in my heart...");
						giveItems(player, GOLDEN_SEED_2, 1);
						if (hasQuestItems(player, GOLDEN_SEED_1, GOLDEN_SEED_3))
						{
							st.setCond(4, true);
						}
						else
						{
							playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
						}
					}
					break;
				}
				case SINGING_FLOWER_DARKLING:
				{
					if (!hasQuestItems(player, GOLDEN_SEED_3))
					{
						npc.broadcastSay(ChatType.GENERAL, "I am a mirror of darkness... a virtual image of darkness...");
						giveItems(player, GOLDEN_SEED_3, 1);
						if (hasQuestItems(player, GOLDEN_SEED_1, GOLDEN_SEED_2))
						{
							st.setCond(4, true);
						}
						else
						{
							playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
						}
					}
					break;
				}
			}
		}
		else if (cond == 5)
		{
			switch (npc.getId())
			{
				case GHOST_FIRE:
				{
					if (hasQuestItems(player, SALAMANDER_CHARM) && (getRandom(10) < 5) && (getQuestItemsCount(player, FLAME_CRYSTAL) < 5))
					{
						giveItems(player, FLAME_CRYSTAL, 1);
						playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
					}
					break;
				}
				case TOAD_LORD:
				case MARSH_STAKATO:
				case MARSH_STAKATO_WORKER:
				{
					if (hasQuestItems(player, UNDINE_CHARM) && (getRandom(10) < 3) && (getQuestItemsCount(player, DAZZLING_DROP) < 20))
					{
						giveItems(player, DAZZLING_DROP, 1);
						playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
					}
					break;
				}
				case MARSH_STAKATO_SOLDIER:
				{
					if (hasQuestItems(player, UNDINE_CHARM) && (getRandom(10) < 4) && (getQuestItemsCount(player, DAZZLING_DROP) < 20))
					{
						giveItems(player, DAZZLING_DROP, 1);
						playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
					}
					break;
				}
				case MARSH_STAKATO_DRONE:
				{
					if (hasQuestItems(player, UNDINE_CHARM) && (getRandom(10) < 5) && (getQuestItemsCount(player, DAZZLING_DROP) < 20))
					{
						giveItems(player, DAZZLING_DROP, 1);
						playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
					}
					break;
				}
				case HARPY:
				{
					if (hasQuestItems(player, SYLPH_CHARM))
					{
						if (getQuestItemsCount(player, HARPY_FEATHER) < 20)
						{
							giveItems(player, HARPY_FEATHER, 1);
							playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
						}
					}
					break;
				}
				case WYRM:
				{
					if (hasQuestItems(player, SYLPH_CHARM) && (getRandom(10) < 5) && (getQuestItemsCount(player, WYRM_WINGBONE) < 10))
					{
						giveItems(player, WYRM_WINGBONE, 1);
						playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
					}
					break;
				}
				case WINDSUS:
				{
					if (hasQuestItems(player, SYLPH_CHARM) && (getRandom(10) < 5) && (getQuestItemsCount(player, WINDSUS_MANE) < 10))
					{
						giveItems(player, WINDSUS_MANE, 1);
						playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
					}
					break;
				}
				case ENCHANTED_MONSTEREYE:
				{
					if (hasQuestItems(player, SERPENT_CHARM) && (getQuestItemsCount(player, EN_MONSTEREYE_SHELL) < 10))
					{
						giveItems(player, EN_MONSTEREYE_SHELL, 1);
						playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
					}
					break;
				}
				case ENCHANTED_STONE_GOLEM:
				{
					if (hasQuestItems(player, SERPENT_CHARM) && (getQuestItemsCount(player, EN_STONEGOLEM_POWDER) < 10))
					{
						giveItems(player, EN_STONEGOLEM_POWDER, 1);
						playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
					}
					break;
				}
				case ENCHANTED_IRON_GOLEM:
				{
					if (hasQuestItems(player, SERPENT_CHARM) && (getQuestItemsCount(player, EN_IRONGOLEM_SCRAP) < 10))
					{
						giveItems(player, EN_IRONGOLEM_SCRAP, 1);
						playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
					}
					break;
				}
			}
		}
	}
}