ZURSULUS L2

Illegitimate Child of A Goddess

ID
358
Название
Illegitimate Child of A Goddess
start_npcs_json
[30862]
npc_ids_json
[]
constants_json
{"SCALE":5868}
Статус разбора
metadata_only; dynamic Java conditions/rewards retained in source; unresolved starts: []
Источник
game/data/scripts/quests/Q00358_IllegitimateChildOfTheGoddess/Q00358_IllegitimateChildOfTheGoddess.java

NPC квеста

Записей нет.

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

htmltext = (player.getLevel() < 63) ? "30862-01.htm" : "30862-02.htm";

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

giveItems(player, getRandomEntry(REWARD), 1);
giveItems(player, SCALE, 1);

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

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

[30862-01.htm] Grand Master Oltlin: Have you seen the sights of the city? The wonderful castles built by humans, in spite of countless errors and obstacles. Do you have any idea what is beneath them? Often, long shadows are cast under the glow of glory. You always find the darkest shadows under strong light. Does this make sense to you? I thought not. It seems you will need more training. Why don't you explore the world some more and come back later. (This quest may only be undertaken by a character of level 63 and above.) [30862-02.htm] Grand Master Oltlin: Have you seen the sights of the city? The wonderful castles built by humans, in spite of countless errors and obstacles. Do you have any idea what is beneath them? Often, long shadows are cast under the glow of glory. You always find the darkest shadows under strong light. Those who pursue glory are wary of shadows. Where there is pure achievement, there is always absence. "Gee, I didn't expect to hear this sort of thing from someone like you!" [30862-03.htm] Grand Master Oltlin: Ah, yes, the bitter ramblings of an old man. As you approach true enlightenment, the shadows grow darker. Among those who pursue glory, some work diligently against the shadow at every opportunity. At the same time, they must know that their efforts are as futile as covering up the sky with your hand. Of course, I don't need to explain this to you. The gods created us in their own imperfect image. Perfect beings' only creations are contrivances. As the perfect circle has no edge... perfect hatred only produces monsters. "Is this a story about... Shilen?" [30862-04.htm] Grand Master Oltlin: Her anger towards Gran Kain and Einhasad for a time turned Shilen into a pure and perfect being. That is, she became the literal incarnation of destruction. As she achieved the purest form of fury, her benevolence and austerity left her completely. Her perfect wrath is the source of those evil creatures. They are sealed away now, and I don't know what their current condition is, but their very existence proves that she has become a goddess of destruction! We worshippers of Shilen teach our children that she is our mother, therefore we must calm her wrath. "Why can't we kill those creatures?" [30862-05.htm] Grand Master Oltlin: There are evil creatures close to her. These are the illegitimate children she bore while her fury was at its fiercest... Go slay Falibati and Trives who bear a striking resemblence to her. Bring back their Snake Scales. If you bring me 108 Snake Scales, I will teach you a secret, ancient method of creation. [30862-06.htm] Grand Master Oltlin: To restore the dignity and glory of the goddess you must kill Falibati and Trives, the illegitimate children born of her wrath, and bring back 108 Snake Scales. [30862-07.htm] Grand Master Oltlin: Thank you for your efforts. I know it was not easy... Needless to say, please don't tell other people that you have done this for me. Above all my children must never learn of it... In exchange for your efforts, I will give you this Secret Book in which ancient secret creation methods are recorded. I hope it will be helpful to you. Too many people think they can cover the sky with the palm of their hand. There is such a thing as too much truth... My work will likely never end... If you are ever interested in helping me again, come back to see me.
Исходник условий и наград (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.Q00358_IllegitimateChildOfTheGoddess;

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.QuestSound;
import org.l2jmobius.gameserver.mechanics.script.QuestState;
import org.l2jmobius.gameserver.mechanics.script.State;

public class Q00358_IllegitimateChildOfTheGoddess extends Quest
{
	// Item
	private static final int SCALE = 5868;
	
	// Reward
	private static final int[] REWARD =
	{
		6329,
		6331,
		6333,
		6335,
		6337,
		6339,
		5364,
		5366
	};
	
	public Q00358_IllegitimateChildOfTheGoddess()
	{
		super(358, "Illegitimate Child of A Goddess");
		registerQuestItems(SCALE);
		addStartNpc(30862); // Oltlin
		addTalkId(30862);
		addKillId(20672, 20673); // Trives, Falibati
	}
	
	@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("30862-05.htm"))
		{
			st.startQuest();
		}
		
		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() < 63) ? "30862-01.htm" : "30862-02.htm";
				break;
			}
			case State.STARTED:
			{
				if (st.isCond(1))
				{
					htmltext = "30862-06.htm";
				}
				else
				{
					htmltext = "30862-07.htm";
					takeItems(player, SCALE, -1);
					giveItems(player, getRandomEntry(REWARD), 1);
					st.exitQuest(true, true);
				}
				break;
			}
		}
		
		return htmltext;
	}
	
	@Override
	public void onKill(Npc npc, Player player, boolean isPet)
	{
		final QuestState st = getQuestState(player, false);
		if ((st == null) || !st.isCond(1))
		{
			return;
		}
		
		if (getRandom(100) < (npc.getId() == 20672 ? 68 : 66))
		{
			giveItems(player, SCALE, 1);
			if (getQuestItemsCount(player, SCALE) < 108)
			{
				playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
			}
			else
			{
				st.setCond(2, true);
			}
		}
	}
}