ZURSULUS L2

Wrath of Ancestors

ID
272
Название
Wrath of Ancestors
start_npcs_json
[30572]
npc_ids_json
[]
constants_json
{"GRAVE_ROBBERS_HEAD":1474}
Статус разбора
metadata_only; dynamic Java conditions/rewards retained in source; unresolved starts: []
Источник
game/data/scripts/quests/Q00272_WrathOfAncestors/Q00272_WrathOfAncestors.java

NPC квеста

Записей нет.

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

else if (player.getLevel() < 5)

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

giveAdena(player, 1500, true);
giveItems(player, GRAVE_ROBBERS_HEAD, 1);

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

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

[30572-00.htm] Seer Livina: Tejakar Oroka! Now that the goblins have moved here to the Immortal Plateau, that dirty race has damaged the legacy of our ancestors and stained our holy ground for hundreds of years. However, now we Orcs will commence an unmerciful punishment on the goblins! It is not something for one of a different race, like yourself, to meddle in, so be careful not to become involved in the fight for no purpose! (This quest may only be undertaken by an Orcish character.) [30572-01.htm] Seer Livina: Tejakar Oroka! Since the goblins moved here while we were at war against the Elves, they have been damaging the legacy of our ancestors and have been staining our sacred grounds for hundreds of years. Just a few days ago, reckless Goblin grave robbers dug up our great Urutu graves and dishonored us! Because of this incident, the spirits of our ancestors were furious and appear in our dreams every night, shouting for revenge in blood. When the next full moon rises, we plan to cut the head of those unholy grave robbers and calm the fury of the ancestral spirits by performing a sacrificial rite. When the time comes, I will order many young brothers to punish those goblins, so be prepared! (This quest may only be undertaken by a character of level 5 and above.) [30572-02.htm] Seer Livina: Tejakar Oroka! Young Orc, you have been guided to me by the spirits of our ancestors. As you already know, since they have moved in here while we were at war against the Elves, the goblins have been damaging the legacy of our ancestors and have been staining our sacred grounds for hundreds of years. Just few days ago, reckless goblin grave robbers dug up the great Urutu graves and committed sacrilege! Because of this incident, the spirits of our ancestors were furious and appear in our dreams every night, shouting for revenge in blood. The only way to ease their anger is to behead those disrespectful grave robbers and offer them to the ancestors. I order you as a seer. Go, young orc! Go punish the goblins and burn their village! Show no mercy to those who dug up our ancestors' graves! Say you will take revenge [30572-03.htm] Seer Livina: Tejakar Oroka! Young orc who fights for the dignity of your race, you must pacify the fury of the ancestors and renew the honor of the Orcs by killing each and every goblin that lives in this land. But first, we must make a sacrifice for our ancestors to soothe their spirits! To do that, we need to behead those who dug up the graves. To satisfy our ancestors, we should behead at least fifty grave robbers. So go to the wilderness and kill all the goblin grave robbers you see! [30572-04.htm] Seer Livina: That is not enough to soothe our ancestors' anger! Only when the blood of fifty goblin grave robbers wets the ground and their heads are offered on the altar, will the angry spirits of our ancestors go back to sleep in peace. Young Orc, who fights for our pride, teach them the consequences of upsetting us! [30572-05.htm] Seer Livina: Tejakar Oroka! May glory be upon the Orcs! With this, the blood of fifty goblin grave diggers has wet the ground and their heads have been sacrificed to our ancestors to pacify their wrath. Young Orc, you have done very well! You fought for our pride and you deserve a reward! Take this money and enjoy it as much as you want! Having fun and resting are also ways to prepare for the next battle! Now, I must prepare the sacrificial ceremony for the spirits of our ancestors. After you've rested enough, come visit me. This battle shall continue until we clear those dirty goblins out of our land!
Исходник условий и наград (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.Q00272_WrathOfAncestors;

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;

public class Q00272_WrathOfAncestors extends Quest
{
	// Item
	private static final int GRAVE_ROBBERS_HEAD = 1474;
	
	public Q00272_WrathOfAncestors()
	{
		super(272, "Wrath of Ancestors");
		registerQuestItems(GRAVE_ROBBERS_HEAD);
		addStartNpc(30572); // Livina
		addTalkId(30572);
		addKillId(20319, 20320); // Goblin Grave Robber, Goblin Tomb Raider Leader
	}
	
	@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("30572-03.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:
			{
				if (player.getRace() != Race.ORC)
				{
					htmltext = "30572-00.htm";
				}
				else if (player.getLevel() < 5)
				{
					htmltext = "30572-01.htm";
				}
				else
				{
					htmltext = "30572-02.htm";
				}
				break;
			}
			case State.STARTED:
			{
				if (st.isCond(1))
				{
					htmltext = "30572-04.htm";
				}
				else
				{
					htmltext = "30572-05.htm";
					takeItems(player, GRAVE_ROBBERS_HEAD, -1);
					giveAdena(player, 1500, true);
					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;
		}
		
		giveItems(player, GRAVE_ROBBERS_HEAD, 1);
		if (getQuestItemsCount(player, GRAVE_ROBBERS_HEAD) < 50)
		{
			playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
		}
		else
		{
			st.setCond(2, true);
		}
	}
}