ZURSULUS L2

Will the Seal be Broken?

ID
3
Название
Will the Seal be Broken?
start_npcs_json
[30141]
npc_ids_json
[20031,20041,20046,20048,20052,20057,30141]
constants_json
{"TALLOTH":30141,"OMEN_BEAST":20031,"TAINTED_ZOMBIE":20041,"STINK_ZOMBIE":20046,"LESSER_SUCCUBUS":20048,"LESSER_SUCCUBUS_TUREN":20052,"LESSER_SUCCUBUS_TILFO":20057,"OMEN_BEAST_EYE":1081,"TAINT_STONE":1082,"SUCCUBUS_BLOOD":1083,"ENCHANT":956,"MIN_LEVEL":16}
Статус разбора
metadata_only; dynamic Java conditions/rewards retained in source; unresolved starts: []
Источник
game/data/scripts/quests/Q00003_WillTheSealBeBroken/Q00003_WillTheSealBeBroken.java

NPC квеста

IDНазваниеСтарт квестаУровень
20031Omen BeastНет17
20041Tainted ZombieНет18
20046Stink ZombieНет19
20048Lesser SuccubusНет20
20052Lesser Succubus TurenНет21
20057Lesser Succubus TilfoНет22
30141TallothДа70

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

private static final int MIN_LEVEL = 16;
htmltext = (player.getRace() != Race.DARK_ELF) ? "30141-00.htm" : (player.getLevel() >= MIN_LEVEL) ? "30141-02.htm" : "30141-01.html";

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

giveItems(player, ENCHANT, 1);
giveItems(player, item, 1);

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

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

[30141-00.htm] Tetrarch Talloth: I have no task reserved for those of foreign races. Begone. [30141-01.html] Tetrarch Talloth: For hundreds of years, I have devoted my life to researching a method to break the seal that was placed on our Hierarch. I've received news that ancient magic scrolls have been discovered in the northern lands of Pabel, and they say that the scrolls contain secrets of dark arts that we have not yet learned. If the scrolls were to be brought here, we would be able to discover a method for breaking the seal placed on our Hierarch. I may need your help then, to gather materials needed for performing this magic when the time comes. (Quest for Dark Elven characters level 16 or above.) [30141-02.htm] Tetrarch Talloth: For hundreds of years I have devoted myself to researching magic that could break the seal placed on our Hierarch, Mitraell. But we are still uncertain of the exact magic that created the seal -- all we are certain of is that the magic used for the seal is entirely different from Human or Elven magic today, and that all our efforts towards breaking the seal have so far been futile. But recently, ancient magic scrolls containing secrets of the Dark Arts have been discovered in the northern lands of Pabel. Our Dark Elven brothers who have been sent there have succeeded in recovering those scrolls. After three days and nights of pouring over the scrolls, I have discovered a lead for the magic needed to break the seal. As you know, the seal is composed of three levels -- the physical seal, that restrains the body, the mental seal that restrains his mind, and the spiritual seal that restrains his soul. This time, I am attempting to break that first seal, the physical seal. But to perform the magic, I need many rare materials. I'd like to ask you to go and gather them. I'm sure you won't refuse? Say you will gather the materials [30141-03.htm] Tetrarch Talloth: The materials that I require for my magic are the omen beast's eye, Taint Stone and succubus' blood. You can find all three materials at the abandoned School of Dark Arts. If you do not know the way, ask Sentry Kayleen. You can obtain the first component by killing the omen beast and taking the jewel that is embedded in its eye. The second material can be gathered by hunting stink zombies or tainted zombies, the undead that wander the School of Dark Arts. The final material can be obtained only by killing the succubus, who resides in the deepest lairs of the School of Dark Arts. It may be safer for you to train a bit more before you leave, because zombies and the succubus may be difficult for you to hunt. There is no need to hurry. Gather the materials diligently, and bring them to me when you have gathered all three. May the protection of Shilen be with you. [30141-04.html] Tetrarch Talloth: You haven't been able to gather all three materials yet? Don't tell me that you've forgotten what materials you need to gather? Ask about the materials [30141-05.html] Tetrarch Talloth: Tsk tsk. I will tell you one more time. I need the omen beast's eye, Taint Stone and succubus' blood. You can obtain the first component by killing the omen beast and taking the jewel that is embedded in its eye. The second material can be gathered by hunting stink zombies or tainted zombies, the undead that wander the School of Dark Arts. The final material can be obtained only by killing the succubus, who resides in the deepest lairs of the School of Dark Arts. When you have gathered all three materials, bring them to me. [30141-06.html] Tetrarch Talloth: You've found all three materials. Well done! Now I can start my research to undo the 'spiritual chains.' We need further observation to see if the research will yield any results, but I believe that the seals placed on our Hierarch will one day be broken. I will give you this as a token of my appreciation. Think of it as a just payment for working for our race. I am not alone in the research to break the seal. Magister Kayla is continuing her research in the region known as Giran, to free the mental chains that bind the mind of our Hierarch If you ever pass through that region, I suggest that you go and seek her. She may also need your help someday. May the shelter of the abyss be with you, 'til the day our Dark Elf race rules the destiny of the land.
Исходник условий и наград (Java)
/*
 * This file is part of the L2J Mobius project.
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 */
package quests.Q00003_WillTheSealBeBroken;

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;

/**
 * Will the Seal be Broken? (3)
 * @author malyelfik
 */
public class Q00003_WillTheSealBeBroken extends Quest
{
	// NPC
	private static final int TALLOTH = 30141;
	
	// Monsters
	private static final int OMEN_BEAST = 20031;
	private static final int TAINTED_ZOMBIE = 20041;
	private static final int STINK_ZOMBIE = 20046;
	private static final int LESSER_SUCCUBUS = 20048;
	private static final int LESSER_SUCCUBUS_TUREN = 20052;
	private static final int LESSER_SUCCUBUS_TILFO = 20057;
	
	// Items
	private static final int OMEN_BEAST_EYE = 1081;
	private static final int TAINT_STONE = 1082;
	private static final int SUCCUBUS_BLOOD = 1083;
	private static final int ENCHANT = 956;
	
	// Misc
	private static final int MIN_LEVEL = 16;
	
	public Q00003_WillTheSealBeBroken()
	{
		super(3, "Will the Seal be Broken?");
		addStartNpc(TALLOTH);
		addTalkId(TALLOTH);
		addKillId(OMEN_BEAST, TAINTED_ZOMBIE, STINK_ZOMBIE, LESSER_SUCCUBUS, LESSER_SUCCUBUS_TILFO, LESSER_SUCCUBUS_TUREN);
		registerQuestItems(OMEN_BEAST_EYE, TAINT_STONE, SUCCUBUS_BLOOD);
	}
	
	@Override
	public String onEvent(String event, Npc npc, Player player)
	{
		final QuestState qs = getQuestState(player, false);
		if (qs == null)
		{
			return null;
		}
		
		String htmltext = event;
		switch (event)
		{
			case "30141-03.htm":
			{
				qs.startQuest();
				break;
			}
			case "30141-05.html":
			{
				break;
			}
			default:
			{
				htmltext = null;
				break;
			}
		}
		
		return htmltext;
	}
	
	@Override
	public String onTalk(Npc npc, Player player)
	{
		final QuestState qs = getQuestState(player, true);
		String htmltext = getNoQuestMsg(player);
		switch (qs.getState())
		{
			case State.CREATED:
			{
				htmltext = (player.getRace() != Race.DARK_ELF) ? "30141-00.htm" : (player.getLevel() >= MIN_LEVEL) ? "30141-02.htm" : "30141-01.html";
				break;
			}
			case State.STARTED:
			{
				if (qs.isCond(1))
				{
					htmltext = "30141-04.html";
				}
				else
				{
					giveItems(player, ENCHANT, 1);
					qs.exitQuest(false, true);
					htmltext = "30141-06.html";
				}
				break;
			}
			case State.COMPLETED:
			{
				htmltext = getAlreadyCompletedMsg(player);
				break;
			}
		}
		
		return htmltext;
	}
	
	@Override
	public void onKill(Npc npc, Player player, boolean isSummon)
	{
		final Player member = getRandomPartyMember(player, 1);
		if (member == null)
		{
			return;
		}
		
		final QuestState qs = getQuestState(member, false);
		switch (npc.getId())
		{
			case OMEN_BEAST:
			{
				giveItem(member, qs, OMEN_BEAST_EYE, getRegisteredItemIds());
				break;
			}
			case STINK_ZOMBIE:
			case TAINTED_ZOMBIE:
			{
				giveItem(member, qs, TAINT_STONE, getRegisteredItemIds());
				break;
			}
			case LESSER_SUCCUBUS:
			case LESSER_SUCCUBUS_TILFO:
			case LESSER_SUCCUBUS_TUREN:
			{
				giveItem(member, qs, SUCCUBUS_BLOOD, getRegisteredItemIds());
				break;
			}
		}
	}
	
	private void giveItem(Player player, QuestState qs, int item, int... items)
	{
		if (!hasQuestItems(player, item))
		{
			giveItems(player, item, 1);
			playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
			if (hasQuestItems(player, items))
			{
				qs.setCond(2, true);
			}
		}
	}
}