ZURSULUS L2

Path to a Human Wizard

ID
404
Название
Path to a Human Wizard
start_npcs_json
[30391]
npc_ids_json
[30391,30409,30410,30411,30412,30413]
constants_json
{"PARINA":30391,"EARTH_SNAKE":30409,"WASTELAND_LIZARDMAN":30410,"FLAME_SALAMANDER":30411,"WIND_SYLPH":30412,"WATER_UNDINE":30413,"MAP_OF_LUSTER":1280,"KEY_OF_FLAME":1281,"FLAME_EARING":1282,"BROKEN_BRONZE_MIRROR":1283,"WIND_FEATHER":1284,"WIND_BANGEL":1285,"RAMA_DIARY":1286,"SPARKLE_PEBBLE":1287,"WATER_NECKLACE":1288,"RUST_GOLD_COIN":1289,"RED_SOIL":1290,"EARTH_RING":1291,"BEAD_OF_SEASON":1292}
Статус разбора
metadata_only; dynamic Java conditions/rewards retained in source; unresolved starts: []
Источник
game/data/scripts/quests/Q00404_PathOfTheHumanWizard/Q00404_PathOfTheHumanWizard.java

NPC квеста

IDНазваниеСтарт квестаУровень
30391ParinaДа70
30409Earth SnakeНет70
30410Wasteland LizardmanНет70
30411Flame SalamanderНет70
30412Wind SylphНет70
30413Water UndineНет70

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

else if (player.getLevel() < 19)

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

giveItems(player, WIND_FEATHER, 1);
giveItems(player, BEAD_OF_SEASON, 1);
addExpAndSp(player, 3200, 2020);
giveItems(player, MAP_OF_LUSTER, 1);
giveItems(player, FLAME_EARING, 1);
giveItems(player, BROKEN_BRONZE_MIRROR, 1);
giveItems(player, WIND_BANGEL, 1);
giveItems(player, RAMA_DIARY, 1);
giveItems(player, WATER_NECKLACE, 1);
giveItems(player, RUST_GOLD_COIN, 1);
giveItems(player, EARTH_RING, 1);
giveItems(player, KEY_OF_FLAME, 1);
giveItems(player, SPARKLE_PEBBLE, 1);
giveItems(player, RED_SOIL, 1);

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

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

[30391-01.htm] Parina: Looking closely, I see you are not the one I have been waiting for. I'm sorry, but I do not have anything to tell you. I am tired, so please go back to where you came from. However ... please be happy. [30391-02.htm] Parina: Amazing powers such as water, fire, wind and earth are hidden within nature. When more time passes, you will come to understand. Until then, be patient and wait. [30391-02a.htm] Parina: You are a Human Wizard that has already perceived the secrets of water, fire, wind, and earth. There is no need for you to re-embark upon the journey of becoming a Wizard. [30391-03.htm] Parina: Is there something you have not found yet? Don't you already have the four tokens of water, fire, wind and earth? Take the bead of four seasons and go to the high priest. He will be able to open your new future for you. I feel the power of a new beginning. He will not like me that much, but ... I respect him. Go before it is too late. [30391-04.htm] Parina: To become a Human Wizard, you must have the four tokens of water, fire, wind and earth. If you are not acknowledged by nature, which controls these four elements, you do not have the right to be called a Wizard. Go out into the world and collect the four tokens. The collection of the tokens can only be accomplished by your own power. This is all I can do for you. Perform quest of changing profession to a Human Wizard [30391-05.htm] Parina: How goes your journey of searching for the tokens? Please find and bring the tokens of water, fire, wind and earth. [30391-06.htm] Parina: I see you have collected all four tokens of water, fire, wind and earth. Through the journey to collect tokens, you have proven your passion for learning, curiosity about the world, powers of deep investigation and contemplation, and strong will. You have created your future with your own hands. I give you the bead of four seasons. Take this bead to the high priest. I'm sure he can guide you to the path of the Wizard. May your future days always be filled with light. [30391-08.htm] Parina: The journey of becoming a Wizard begins with the will of a magician to learn new things. Strong will to obtain knowledge is often compared to a flame. You must first find the token of flame. In order to do that, you must meet the Flame Spirit. It is in the form of a lizard wrapped up in flames and is near a village damaged during the war, now called the Ruins of Despair. Look for it to the south of the village of Castle Gludio. [30409-01.htm] Earth Snake: Wait! Do not deceive yourself into thinking I am a mere lizard just because I look like a basilisk. Although my appearance is unremarkable, I am a spirit of earth, which studies the principles of the world embodied within the soil and rock. Right now I am looking for a way to purify the negative forces that have seeped into the earth in these ruins. You say you are looking for the token of earth? Then I must test you to see if you are qualified to earn it. Just because the spirits of water, fire and wind have acknowledged you doesn't mean that I will do so as easily. It is your task to find Red Soil that contains the strong life of the earth. You can obtain it by hunting a bear called the red bear that lives in this vicinity. The red bear can be found in the Fellmere Harvest Grounds between the Ruins of Agony and the Orc Barracks. [30409-02.htm] Earth Snake: If you want to receive the token of earth from me, bring me back Red Soil. The Red Soil contains the strong vitality of the earth and can be obtained by hunting the red bears that are frequently seen in the Fellmere Harvest Grounds between the Ruins of Agony and the Orc Barracks. [30409-03.htm] Earth Snake: You've brought the Red Soil! So fast for a Human! I thought you would have more trouble than that. As promised, I'll exchange the Ring of Earth for a Token of Earth. Don't lose the faith, pilgrim. Once you've collected the tokens of fire, water, wind and earth, speak with Parina in Gludin. She has a special affinity for the spirits of the four elements, for they are constantly whispering into her ear. She will raise your understanding of magic to new heights. [30409-04.htm] Earth Snake: Once you have collected all four tokens - fire, water, air and earth - that represent the four elements of nature, go find Parina in Gludin Village. Her deep understanding of the elements and spirits can lead you towards enlightenment. [30410-01.htm] Lizardman of the Wastelands: Nice to meet you, Human. I am a minstrel who savors the music in nature and loves to sing loudly. I regret that I cannot chat with you long. I am in the middle of listening to the song brought to me by the winds of the Wastelands. You've come because you have some business with me? What business are you talking about? Talk about the wind sylph [30410-02.htm] Lizardman of the Wastelands: Ah ...! The spirit of wind up in the north? I've seen it a few times ... I hate that race, so I don't even associate with it at all. I just saw it from afar and it didn't even say hello, so I passed by. But why did you bring up the sylph? Talk about the noise [30410-03.htm] Lizardman of the Wastelands: I'm very sorry about that ... I didn't know I was making that much noise. Actually, I've been digging in the ground to bury my eggs here. I finished digging yesterday, and I've buried the eggs, so I won't be noisy any more. Won't you tell her that I'm really sorry? I also found this feather while I was digging. It may belong to the sylph. Please show it to her. [30410-04.htm] Lizardman of the Wastelands: Take the feather I gave you to the wind sylph. Don't forget to say that I said I am sorry about the noise ... [30411-01.htm] Flame Salamander: What is it, child of Humans? Aren't you frightened by the fumes of fire that I breathe? It has been a long time since I've seen a Human as fearless as you. So you've come to find the token of flame? Now I see that you are a Mystic who controls the powers of elements! Good ... If you grant me a favor, I will give you the token of flame. The Key of Flame that I had in my charge was stolen not long ago. The rascal that took the key was a ratman fighter. He is in fact an evil spirit in disguise, that covets the power of fire. How else could he have tricked me and stolen the key? Please find the scoundrel and recover the key. There are many ratman fighters at the northwestern corner of the Ruins of Despair. [30411-02.htm] Flame Salamander: Child of Humans, have you come back already? Didn't I tell you to kill the ratman fighter and bring back the Key of Flame? Only then can I give you the token of flame. There are many ratman fighters at the northwestern corner of the Ruins of Despair. [30411-03.htm] Flame Salamander: Ah ... I see you have found the key. I give you the Flame Earring as a token of fire. I name you predecessor of the flame ... Pray, do not neglect the desire for learning now rising within you. Your desires for knowledge lead to curiosity about the world. Thought caught up in that curiosity cannot stay in one place for very long, and will wander continuously in search of new knowledge. This is why the strong curiosity that stirs the scholar to travel is often compared to the wind. The next thing you must find is the token of wind. In order to find it, you must first speak to the Wind Sylph. She is staying at the entrance of the Wastelands beyond the southwestern mountains. As you already know, there are three entrances to the Wastelands. The sylph will be at the northwest entrance. I wish you luck! [30411-04.htm] Flame Salamander: Child of Humans ... Haven't you already received the token of flame from me? You have already been recognized as the predecessor of flame, now go find the token of wind. In order to find the token, you must meet the Wind Sylph. You can meet her at the entrance to the Wastelands that is southwest of here. [30412-01.htm] Wind Sylph: I see you have come to find the token of wind. The winds blowing here told me of your story. If you grant me one favor, I will happily give you the token of wind. Not long ago, the wastelands Lizardman appeared in the southern Wastelands, and it has been so noisy ever since that I haven't been able to savor the wind comfortably. Please make the wastelands Lizardman quiet so my meditations are not disrupted. Then I will give you the token of wind. Since scary monsters are prowling around on the southern hills, it would be safer for you to follow the western path of the valley and then head south. [30412-02.htm] Wind Sylph: Is it that you do not wish to grant my request? All the noise gives me a headache ... Please, I beg you. Go quiet the Lizardman. He is in the southern Wastelands. The safest route for you will be to follow the road west of the valley and then head south. [30412-03.htm] Wind Sylph: Thank you very much. Now I can meditate in peace. I was thinking of going to some other land because it was so noisy. As a token of my appreciation, I give you the token of wind. Searcher of the wind, please do not forget your naive curiosity about materials. Curiosity always leads to investigation. The deep contemplation and research of a magician is very often compared to the deep waters of a lake. Now you must find the token of water. In order to find it, you must meet the undine of the water. She is near Fellmere Lake. The lake can be found if you pass the abandoned camp of the Ol Mahums in the north and continue a little farther north. Well then, may the divine protection of wind be with you. [30412-04.htm] Wind Sylph: I see you have already earned the token of wind from me. What you must find now is the token of water. To find it, you must meet the undine of the water. The undine of the water is at Fellmere Lake. To find the lake, you must go north of here. Go pass the abandoned camp where the Ol Mahums are and go a little more north to reach Fellmere Lake. [30413-01.htm] Water Undine: Don't be a nuisance and disappear. I am busy purifying the force of water in the surrounding land! You want to earn the token of water? Well then, do me one favor. Do you see that lake? On the other side of the lake is a monster shaped like a strange eye called the Water Seer. It disturbs the force of water in this area and really gives me a headache. Would you be willing to go kill the Water Seer and bring back two sparkling pebbles as proof? Then I will give you the token of water. [30413-02.htm] Water Undine: You don't have the sparkling pebbles yet? You can obtain the pebbles by killing the Water Seer. Bring back two of them. Please hurry! If I change my mind, I may just give away the token of water to someone else. [30413-03.htm] Water Undine: Oh! Surprisingly, you have some skill! Now it will be a little easier for me to purify the water. As I promised, I will give you the token of water. Studier of the water, do not be lazy in your quest for truth. When a magician's knowledge reaches a certain level, his understanding of the world turns to steadfast faith. The strong will of a magician who tries to change the world with his beliefs is very often compared to the earth. The next thing you must find is the token of earth. You can only obtain that by meeting the Earth Snake. If you want to meet the snake, you must go to the Ruins of Agony. Just north of here, you will easily find the ruins. The Earth Snake may look crude, but it is a very wise spirit, so it is better not to be arrogant in front of it. [30413-04.htm] Water Undine: Have you forgotten what I've said already? I told you to go find the earth snake! Go to the Ruins of Agony north of here to meet it. You haven't given up on the token of earth, have you?
Исходник условий и наград (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.Q00404_PathOfTheHumanWizard;

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.serverpackets.SocialAction;

public class Q00404_PathOfTheHumanWizard extends Quest
{
	// NPCs
	private static final int PARINA = 30391;
	private static final int EARTH_SNAKE = 30409;
	private static final int WASTELAND_LIZARDMAN = 30410;
	private static final int FLAME_SALAMANDER = 30411;
	private static final int WIND_SYLPH = 30412;
	private static final int WATER_UNDINE = 30413;
	
	// Items
	private static final int MAP_OF_LUSTER = 1280;
	private static final int KEY_OF_FLAME = 1281;
	private static final int FLAME_EARING = 1282;
	private static final int BROKEN_BRONZE_MIRROR = 1283;
	private static final int WIND_FEATHER = 1284;
	private static final int WIND_BANGEL = 1285;
	private static final int RAMA_DIARY = 1286;
	private static final int SPARKLE_PEBBLE = 1287;
	private static final int WATER_NECKLACE = 1288;
	private static final int RUST_GOLD_COIN = 1289;
	private static final int RED_SOIL = 1290;
	private static final int EARTH_RING = 1291;
	private static final int BEAD_OF_SEASON = 1292;
	
	public Q00404_PathOfTheHumanWizard()
	{
		super(404, "Path to a Human Wizard");
		registerQuestItems(MAP_OF_LUSTER, KEY_OF_FLAME, FLAME_EARING, BROKEN_BRONZE_MIRROR, WIND_FEATHER, WIND_BANGEL, RAMA_DIARY, SPARKLE_PEBBLE, WATER_NECKLACE, RUST_GOLD_COIN, RED_SOIL, EARTH_RING);
		addStartNpc(PARINA);
		addTalkId(PARINA, EARTH_SNAKE, WASTELAND_LIZARDMAN, FLAME_SALAMANDER, WIND_SYLPH, WATER_UNDINE);
		addKillId(20021, 20359, 27030);
	}
	
	@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("30391-08.htm"))
		{
			st.startQuest();
		}
		else if (event.equals("30410-03.htm"))
		{
			st.setCond(6, true);
			takeItems(player, BROKEN_BRONZE_MIRROR, 1);
			giveItems(player, WIND_FEATHER, 1);
		}
		
		return htmltext;
	}
	
	@Override
	public String onTalk(Npc npc, Player player)
	{
		String htmltext = getNoQuestMsg(player);
		final QuestState st = getQuestState(player, true);
		
		final int cond = st.getCond();
		switch (st.getState())
		{
			case State.CREATED:
			{
				if (player.getPlayerClass() != PlayerClass.MAGE)
				{
					htmltext = (player.getPlayerClass() == PlayerClass.WIZARD) ? "30391-02a.htm" : "30391-01.htm";
				}
				else if (player.getLevel() < 19)
				{
					htmltext = "30391-02.htm";
				}
				else if (hasQuestItems(player, BEAD_OF_SEASON))
				{
					htmltext = "30391-03.htm";
				}
				else
				{
					htmltext = "30391-04.htm";
				}
				break;
			}
			case State.STARTED:
			{
				switch (npc.getId())
				{
					case PARINA:
					{
						if (cond < 13)
						{
							htmltext = "30391-05.htm";
						}
						else if (cond == 13)
						{
							htmltext = "30391-06.htm";
							takeItems(player, EARTH_RING, 1);
							takeItems(player, FLAME_EARING, 1);
							takeItems(player, WATER_NECKLACE, 1);
							takeItems(player, WIND_BANGEL, 1);
							giveItems(player, BEAD_OF_SEASON, 1);
							addExpAndSp(player, 3200, 2020);
							player.broadcastPacket(new SocialAction(player.getObjectId(), 3));
							st.exitQuest(true, true);
						}
						break;
					}
					case FLAME_SALAMANDER:
					{
						if (cond == 1)
						{
							htmltext = "30411-01.htm";
							st.setCond(2, true);
							giveItems(player, MAP_OF_LUSTER, 1);
						}
						else if (cond == 2)
						{
							htmltext = "30411-02.htm";
						}
						else if (cond == 3)
						{
							htmltext = "30411-03.htm";
							st.setCond(4, true);
							takeItems(player, KEY_OF_FLAME, 1);
							takeItems(player, MAP_OF_LUSTER, 1);
							giveItems(player, FLAME_EARING, 1);
						}
						else if (cond > 3)
						{
							htmltext = "30411-04.htm";
						}
						break;
					}
					case WIND_SYLPH:
					{
						if (cond == 4)
						{
							htmltext = "30412-01.htm";
							st.setCond(5, true);
							giveItems(player, BROKEN_BRONZE_MIRROR, 1);
						}
						else if (cond == 5)
						{
							htmltext = "30412-02.htm";
						}
						else if (cond == 6)
						{
							htmltext = "30412-03.htm";
							st.setCond(7, true);
							takeItems(player, WIND_FEATHER, 1);
							giveItems(player, WIND_BANGEL, 1);
						}
						else if (cond > 6)
						{
							htmltext = "30412-04.htm";
						}
						break;
					}
					case WASTELAND_LIZARDMAN:
					{
						if (cond == 5)
						{
							htmltext = "30410-01.htm";
						}
						else if (cond > 5)
						{
							htmltext = "30410-04.htm";
						}
						break;
					}
					case WATER_UNDINE:
					{
						if (cond == 7)
						{
							htmltext = "30413-01.htm";
							st.setCond(8, true);
							giveItems(player, RAMA_DIARY, 1);
						}
						else if (cond == 8)
						{
							htmltext = "30413-02.htm";
						}
						else if (cond == 9)
						{
							htmltext = "30413-03.htm";
							st.setCond(10, true);
							takeItems(player, RAMA_DIARY, 1);
							takeItems(player, SPARKLE_PEBBLE, -1);
							giveItems(player, WATER_NECKLACE, 1);
						}
						else if (cond > 9)
						{
							htmltext = "30413-04.htm";
						}
						break;
					}
					case EARTH_SNAKE:
					{
						if (cond == 10)
						{
							htmltext = "30409-01.htm";
							st.setCond(11, true);
							giveItems(player, RUST_GOLD_COIN, 1);
						}
						else if (cond == 11)
						{
							htmltext = "30409-02.htm";
						}
						else if (cond == 12)
						{
							htmltext = "30409-03.htm";
							st.setCond(13, true);
							takeItems(player, RED_SOIL, 1);
							takeItems(player, RUST_GOLD_COIN, 1);
							giveItems(player, EARTH_RING, 1);
						}
						else if (cond > 12)
						{
							htmltext = "30409-04.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 20359: // Ratman Warrior
			{
				if (st.isCond(2) && (getRandom(10) < 8))
				{
					giveItems(player, KEY_OF_FLAME, 1);
					st.setCond(3, true);
				}
				break;
			}
			case 27030: // Water Seer
			{
				if (st.isCond(8) && (getRandom(10) < 8))
				{
					if (getQuestItemsCount(player, SPARKLE_PEBBLE) < 2)
					{
						giveItems(player, SPARKLE_PEBBLE, 1);
						
						if (getQuestItemsCount(player, SPARKLE_PEBBLE) >= 2)
						{
							st.setCond(9, true);
						}
						else
						{
							playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
						}
					}
				}
				break;
			}
			case 20021: // Red Bear
			{
				if (st.isCond(11) && (getRandom(10) < 2))
				{
					giveItems(player, RED_SOIL, 1);
					st.setCond(12, true);
				}
				break;
			}
		}
	}
}