ZURSULUS L2

Meeting the Elroki

ID
124
Название
Meeting the Elroki
start_npcs_json
[32113]
npc_ids_json
[32113,32114,32115,32117,32118]
constants_json
{"MARQUEZ":32113,"MUSHIKA":32114,"ASAMAH":32115,"KARAKAWEI":32117,"MANTARASA":32118}
Статус разбора
metadata_only; dynamic Java conditions/rewards retained in source; unresolved starts: []
Источник
game/data/scripts/quests/Q00124_MeetingTheElroki/Q00124_MeetingTheElroki.java

NPC квеста

IDНазваниеСтарт квестаУровень
32113MarquezДа70
32114MushikaНет70
32115AsamahНет70
32117KarakaweiНет70
32118Mantarasa EggНет70

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

htmltext = (player.getLevel() < 75) ? "32113-01a.htm" : "32113-01.htm";

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

giveItems(player, 8778, 1); // Egg
giveAdena(player, 71318, true);

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

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

[32113-01.htm] Marquez: Have you heard of the natives of this island, the Elroki tribe? Perhaps you've heard the common drivel about an uncivilized race abandoned by the gods, beset by primitive and ferocious creatures. Hogwash! Those rumors are spread by people ignorant of the truth. The Elrokians I know are different than us, but no less intelligent. Their culture is steeped in tradition, in fact. And I will never forget the aid they gave me and my expedition. Ask when the conflict between humans and Elrokians began. [32113-01a.htm] Marquez: I don't think you're ready. (This quest may only be undertaken by a character of level 75 and above.) [32113-02.htm] Marquez: The conflict between Humans and Elrokians began when the explorers built this wharf and maintained a presence here. Our two races are divided by differences in culture and language; what seems normal to one is often strange, even offensive, to the other. Despite my efforts to teach both sides to live together in harmony, misunderstandings are common. Blood has been spilled on more than one occasion, and the peace that now exists here is fragile at best. The Humans see the Elroki tribe as nothing more than violent savages, while the Elrokians see Humans as invaders. How can either side learn to respect the other? I tell you this because you seem to have no prejudice against the Elroki tribe -- will you help me help them? Tell him that you will help. [32113-03.htm] Marquez: Thank you! Then listen carefully. I have received news of the Elrokian chief, Mushika, the leader of his tribe. In his youth, he ventured into the Lost Nest in search of relics that could shed light on his people's history. During that time, I led an expedition to the Lost Nest which nearly met with disaster. Only Mushika's intervention saved us, and he and I became good friends. But I recently received a letter from him in which he tells me that he is dying from some disease. The pain must be unbearable, since it seems that his son Asamah had to finish the letter for him. "What kind of disease?" [32113-04.htm] Marquez: I don't know... His son Asamah wrote that he thinks he has found a cure, but needs a strong young adventurer to obtain it. Were I younger, I would go myself...but I know in my heart that this is a task for another. If I cannot go, though, I will at least send someone worthy of this trust, one who can help me repay the life-debt I owe Mushika. Will you go and help? You will find Mushika and his son Asamah in the Elrokian tribal chief barracks located southeast of the Primeval Plains. To get there, though, you will need help of a native warrior named Orahochin who lives near the foot of the mountain that lies between the southern shore of the Primeval Plains and the Lost Nest. When you get to the Elroki camp, visit Mushika first if possible, but do not forget to speak with Asamah as well. [32113-04a.htm] Marquez: Will you go and help? You will find Mushika and his son Asamah in the Elrokian tribal chief barracks located southeast of the Primeval Plains. To get there, though, you will need help of a native warrior named Orahochin who lives near the foot of the mountain that lies between the southern shore of the Primeval Plains and the Lost Nest. When you get to the Elroki camp, visit Mushika first if possible, but do not forget to speak with Asamah as well. [32114-01.htm] Mushika: Uh... Shilen, our mother... Do not abandon your chosen people, the Elroki tribe... Elroki! Bestow on us your mighty power... He seems to be delirious because of fever. Tell him that you are here at Marquez' request. [32114-02.htm] Mushika: Ma...Marquez! My friend...(coughing)...I'm sorry. Before... your book...is...finished...I, Mushika...must...go to...Shilen's side. Please, call my...son...Asamah...(coughing)... [32114-03.htm] Mushika: Uh... Shilen, our mother... Do not abandon your chosen people, the Elroki tribe... Elroki! Bestow on us your mighty power... [32115-01.htm] Asamah: Perhaps you should listen to this story to better understand the situation. You have already heard the tale of how my father and Marquez met, haven't you? The Lost Nest where they met is a very important place for the Elroki tribe. According to legend, it is the place where the goddess of water, Shilen, the mother and founder of this primitive island, blessed the Elrokians, transforming them into the bravest warriors the world has ever known. "Tell me more about the Elroki tribe." [32115-02.htm] Asamah: If we had more time, I could tell you fantastic tales about the ancient Elrokian warriors, whose courage and skill awed even the mighty-limbed dinosaurus. But now, we have fallen so far from those heights that the world refuses to believe we are even descended from that heroic race. My father always said that the first and most important duty of the Elrokian chief is to bring forth to our people the lost truth of our heritage, that we are the descendants of the Elrokians and chosen by the goddess herself. He believed we would find that proof in the Lost Nest, deep in the island's wild interior. Ask if his father's illness has anything to do with the Lost Nest. [32115-03.htm] Asamah: Yes, or so the shaman Karakawei and I believe. My father is the only Elrokian to have explored the Lost Nest, bringing back the ancient relic. He has truly devoted his entire life to restoring the lost stature of the Elroki tribe. Despite his efforts, some malcontents accused him of dwelling on the past while neglecting the present. Now their influence has spread like a grass fire in summer. Amidst all this chaos, my father fell ill, and I have searched everywhere for a cure. Eventually, I found references in the ancient tomes about a mysterious medicine capable of healing any illness. It was know to the ancient Elrokians back when they inhabited the Lost Nest. Ask about the mysterious medicine in detail. [32115-04.htm] Asamah: Unfortunately, all I could discover was when the medicine existed. So I asked the shaman Karakawei to summon the spirits of the Elrokians of that time and ask them where the medicine is. Karakawei knew the risk, but for my sake he attempted to summon our ancestors' spirit. For many days, his efforts were in vain, but finally he was able to contact a spirit who possessed knowledge of the medicine's whereabouts. Since then we've been anxiously waiting for an adventurer with the courage and skill to recover it for us. There is not a moment to spare! Please go straight to Karakawei -- you'll probably find him praying around the barracks. After you've obtained the medicine, please return to me at once. In the meantime, I will attempt to discover the cause of this illness while protecting my father from the riots. [32115-05.htm] Asamah: Is this the mysterious medicine? Blessed are you, Shilen! Thank you, my friend. Now we must wait to see if it is Shilen's will whether my father recovers or perishes. Whatever the result, you will be a friend of the Elroki forever, always present in our hearts and welcome at our hearts. If my father's health does improve, as I believe it will, I know he will wish to speak with you again. [32115-06.htm] Asamah: Thank you, my friend. Now we must wait to see if it is Shilen's will whether my father recovers or perishes. Whatever the result, you will be a friend of the Elroki forever, always present in our hearts and welcome at our hearths. If my father's health does improve, as I believe it will, I know he will wish to speak with you again. [32117-01.htm] Karakawei: Friend of the Elroki, be welcome here. You need not tell me who you are or why you are -- the ancestors surrounding me have already told me that you are the outsider destined by fate to save the Elroki tribe from the evil facing it. Outsider, my ancestors wish to convey a message to you through me. Are you ready to hear it? Say that you are ready. [32117-02.htm] Karakawei: Alas, our chief, Mushika, should have never begun the exploration. His arrogance aroused the wrath of our ancestors and brought on his illnes. But Shilen has promised that Mushika would not perish, and will soon recover to help save the Elroki tribe. The key to his recovery lies in your willingness, fated outsider, to help our people. Wait! One of my departed ancestors wishes to speak with you through me. Talk to Karakawei while he is chanting a spell of invocation. Talk to Karakawei after the spirit of his Elrokian ancestor enters him. [32117-03.htm] Karakawei: Lost to my people's memory, unremembered and unknown, I, Elrokian of old, speak with you! The wisdom of the ancestors is this: find the egg laid by the Mantarasa dinosaur. The gods have bestowed upon it the gift of healing. To find it, make your mind light as light as an eagle's feather and as clean as the morning dew and travel north. You will find the Mantarasa Egg on the border between the Primeval Plains and the Lost Nest. Only the Mantarasa Egg can save these poor children of the Elroki. May their former glory be restored to them! [32117-03a.htm] Karakawei: Such disrespect! Do you not know that I am readying myself to enter the sacred space where life and death coexist? Though you are the outsider of fate, you must not trifle with these matters. They are beyond your comprehension. Be still and watch! Return. [32117-04.htm] Karakawei: You will find the Mantarasa Egg on the border between the Primeval Plains and the Lost Nest. Only the Mantarasa Egg can save these poor children of the Elroki. May their former glory be restored to them! [32118-01.htm] Mantarasa Egg: It may be the Mantarasa Egg. Its shell resembles that of a giant tortoise. When you touch it, it feels surprisingly warm. Take the egg. [32118-02.htm] Mantarasa Egg: You carefully pick up the egg and place it in your bag. [32118-03.htm] Mantarasa Egg: It may be the Mantarasa Egg. Its shell resembles that of a giant tortoise. When you touch it, it feels surprisingly warm.
Исходник условий и наград (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.Q00124_MeetingTheElroki;

import org.l2jmobius.gameserver.entity.actor.Npc;
import org.l2jmobius.gameserver.entity.actor.Player;
import org.l2jmobius.gameserver.mechanics.script.Quest;
import org.l2jmobius.gameserver.mechanics.script.QuestState;
import org.l2jmobius.gameserver.mechanics.script.State;

public class Q00124_MeetingTheElroki extends Quest
{
	// NPCs
	private static final int MARQUEZ = 32113;
	private static final int MUSHIKA = 32114;
	private static final int ASAMAH = 32115;
	private static final int KARAKAWEI = 32117;
	private static final int MANTARASA = 32118;
	
	public Q00124_MeetingTheElroki()
	{
		super(124, "Meeting the Elroki");
		addStartNpc(MARQUEZ);
		addTalkId(MARQUEZ, MUSHIKA, ASAMAH, KARAKAWEI, MANTARASA);
	}
	
	@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 "32113-03.htm":
			{
				st.startQuest();
				break;
			}
			case "32113-04.htm":
			{
				st.setCond(2, true);
				break;
			}
			case "32114-02.htm":
			{
				st.setCond(3, true);
				break;
			}
			case "32115-04.htm":
			{
				st.setCond(4, true);
				break;
			}
			case "32117-02.htm":
			{
				if (st.isCond(4))
				{
					st.set("progress", "1");
				}
				break;
			}
			case "32117-03.htm":
			{
				st.setCond(5, true);
				break;
			}
			case "32118-02.htm":
			{
				st.setCond(6, true);
				giveItems(player, 8778, 1); // Egg
				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:
			{
				htmltext = (player.getLevel() < 75) ? "32113-01a.htm" : "32113-01.htm";
				break;
			}
			case State.STARTED:
			{
				final int cond = st.getCond();
				switch (npc.getId())
				{
					case MARQUEZ:
					{
						if (cond == 1)
						{
							htmltext = "32113-03.htm";
						}
						else if (cond > 1)
						{
							htmltext = "32113-04a.htm";
						}
						break;
					}
					case MUSHIKA:
					{
						if (cond == 2)
						{
							htmltext = "32114-01.htm";
						}
						else if (cond > 2)
						{
							htmltext = "32114-03.htm";
						}
						break;
					}
					case ASAMAH:
					{
						if (cond == 3)
						{
							htmltext = "32115-01.htm";
						}
						else if (cond == 6)
						{
							htmltext = "32115-05.htm";
							takeItems(player, 8778, -1);
							giveAdena(player, 71318, true);
							st.exitQuest(false, true);
						}
						break;
					}
					case KARAKAWEI:
					{
						if (cond == 4)
						{
							htmltext = "32117-01.htm";
							if (st.getInt("progress") == 1)
							{
								htmltext = "32117-02.htm";
							}
						}
						else if (cond > 4)
						{
							htmltext = "32117-04.htm";
						}
						break;
					}
					case MANTARASA:
					{
						if (cond == 5)
						{
							htmltext = "32118-01.htm";
						}
						else if (cond > 5)
						{
							htmltext = "32118-03.htm";
						}
						break;
					}
				}
				break;
			}
			case State.COMPLETED:
			{
				if (npc.getId() == ASAMAH)
				{
					htmltext = "32115-06.htm";
				}
				else
				{
					htmltext = getAlreadyCompletedMsg(player);
				}
				break;
			}
		}
		
		return htmltext;
	}
}