ZURSULUS L2

Truth Beyond the Gate

ID
636
Название
Truth Beyond the Gate
start_npcs_json
[31329]
npc_ids_json
[31329,32010]
constants_json
{"ELIYAH":31329,"FLAURON":32010,"VISITOR_MARK":8064,"FADED_VISITOR_MARK":8065}
Статус разбора
metadata_only; dynamic Java conditions/rewards retained in source; unresolved starts: []
Источник
game/data/scripts/quests/Q00636_TruthBeyondTheGate/Q00636_TruthBeyondTheGate.java

NPC квеста

IDНазваниеСтарт квестаУровень
31329EliyahДа70
32010FlauronНет70

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

if (player.getLevel() > 72)

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

giveItems(player, VISITOR_MARK, 1);
giveItems(player, FADED_VISITOR_MARK, 1);

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

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

[31329-01.htm] Priest Eliyah: Have you ever seen the Pagan Temple? You've heard the name, anyway, right? It's more like a Clan Hall for Pagans than any temple I've ever seen! Those Pagans, always lurking about like black curtains, secretly pulling the strings that control Rune Castle. No one's really sure what they do in there, since they never let the townspeople inside... I'm sure they're keeping some ghastly secret! Although their security is very tight, there just might be a way in... (Quest for characters level 73 and above) [31329-02.htm] Priest Eliyah: Have you ever seen the Pagan Temple? You've heard the name, anyway, right? It's more like a Clan Hall for Pagans than any temple I've ever seen! Those Pagans, always lurking about like black curtains, secretly pulling the strings that control Rune Castle. No one's really sure what they do in there, since they never let the townspeople inside... I'm sure they're keeping some ghastly secret! Although their security is very tight, there just might be a way in... "How can I get inside the Pagan Temple?" [31329-03.htm] Priest Eliyah: Those heathens occasionally even perform Human sacrifices in their so-called Temple! They seem to enjoy that part of their religion more than any other... And that, my child, is your way into the Temple! You'll be their human sacrifice! Of course, I realize that this is a very dangerous way to get in, but these are desperate times... And besides, they've been having a hard time finding Humans to sacrifice! Now, let's talk about how you're going to do this... Before I get started, are you sure you want to do this? "I really want to do this." [31329-04.htm] Priest Eliyah: Very well then! Well, I'll get started... Please pay attention! I don't want to have to repeat myself! Priest Flauron in Rune Township is in charge of finding Human sacrifices for them. Go speak with him and tell him that you're thinking about becoming a Pagan... He'll offer to let you visit the Temple, and will give you what he'll claim is an entrance pass. It's actually a Sacrifice Mark! It will get you inside the Temple easily enough, but once you're inside those lunatics will set upon you at once with spears and knives! There's no way that you could stand against this onslaught alone... Many people have been decieved by Flauron and ended up as live sacrifices. You should probably take some trusted comrades with you, but I heard that the Pagans have a strange technique for scattering the forces of outsiders. Be very careful! [31329-05.htm] Priest Eliyah: Dind't I say I don't want to repeat myself? Priest Flauron in Rune Township is in charge of finding Human sacrifices for them. Go speak with him and tell him that you're thinking about becoming a Pagan... He'll offer to let you visit the Temple, and will give you what he'll claim is an entrance pass. It's actually a Sacrifice Mark! It will get you inside the Temple easily enough, but once you're inside those lunatics will set upon you at once with spears and knives! There's no way that you could stand against this onslaught alone... Many people have been decieved by Flauron and ended up as live sacrifices. You should probably take some trusted comrades with you, but I heard that the Pagans have a strange technique for scattering the forces of outsiders. Be very careful! [32010-01.htm] Priest Flauron: Who comes calling? Oh, you can't want to go down this pathway. Yes, it leads to our temple, but it's awfully dangerous if you're not authorized. Unwelcome visitors often disappear down that path, never to been seen again. Unwise, tragically unwise! I see no authorization documents on you, so no, you cannot pass there safely. Although we sometimes receive visitors ... that would be authorized, I suppose, under certain circumstances. "Well, i'd like to visit too. May I?" [32010-02.htm] Priest Flauron: As it so happens, you are in luck! Today is Visitor's Day. Excuse me... (He mutters to the side) Yes, I have just received word from higher up that we need more, so I'm telling them that it's Visitor's Day. (He turns back to you) How fortunate you are! On Visitor's Day we lavish splendor on our lucky guests; generosity is our watchword. What? Oh, I was just talking to myself, hahaha! Now, here is the Visitor's Mark we give to visitors. [32010-03.htm] Priest Flauron: Oh dear, what are you still doing here? Remember you are in luck! Today is Visitor's Day and you don't want to miss a thing, do you? This way please.. join the rest of our.. visitors.
Исходник условий и наград (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.Q00636_TruthBeyondTheGate;

import org.l2jmobius.gameserver.entity.actor.Creature;
import org.l2jmobius.gameserver.entity.actor.Npc;
import org.l2jmobius.gameserver.entity.actor.Player;
import org.l2jmobius.gameserver.entity.item.enums.ItemProcessType;
import org.l2jmobius.gameserver.entity.zone.ZoneType;
import org.l2jmobius.gameserver.mechanics.script.Quest;
import org.l2jmobius.gameserver.mechanics.script.QuestState;
import org.l2jmobius.gameserver.mechanics.script.State;

/**
 * @author Mobius, Skache
 * @note Based on python script
 */
public class Q00636_TruthBeyondTheGate extends Quest
{
	// NPCs
	private static final int ELIYAH = 31329;
	private static final int FLAURON = 32010;
	
	// Item
	private static final int VISITOR_MARK = 8064;
	private static final int FADED_VISITOR_MARK = 8065;
	
	public Q00636_TruthBeyondTheGate()
	{
		super(636, "Truth Beyond the Gate");
		addStartNpc(ELIYAH);
		addTalkId(ELIYAH, FLAURON);
		addEnterZoneId(30100);
	}
	
	@Override
	public String onEvent(String event, Npc npc, Player player)
	{
		final String htmltext = event;
		final QuestState qs = player.getQuestState(getName());
		if (qs == null)
		{
			return htmltext;
		}
		
		if (event.equals("31329-04.htm"))
		{
			qs.startQuest();
		}
		else if (event.equals("32010-02.htm"))
		{
			giveItems(player, VISITOR_MARK, 1);
			qs.unset("cond");
			qs.exitQuest(true, true);
		}
		
		return htmltext;
	}
	
	@Override
	public String onTalk(Npc npc, Player player)
	{
		String htmltext = getNoQuestMsg(player);
		final QuestState qs = getQuestState(player, true);
		
		final int npcId = npc.getId();
		final int id = qs.getState();
		final int cond = qs.getCond();
		if ((cond == 0) && (id == State.CREATED))
		{
			if (npcId == ELIYAH)
			{
				if (player.getLevel() > 72)
				{
					htmltext = "31329-02.htm";
				}
				else
				{
					htmltext = "31329-01.htm";
					qs.exitQuest(true);
				}
			}
		}
		else if (id == State.STARTED)
		{
			if (npcId == ELIYAH)
			{
				htmltext = "31329-05.htm";
			}
			else if (npcId == FLAURON)
			{
				if (cond == 1)
				{
					htmltext = "32010-01.htm";
					qs.setCond(2);
				}
				else
				{
					htmltext = "32010-03.htm";
				}
			}
		}
		
		return htmltext;
	}
	
	@Override
	public void onEnterZone(Creature creature, ZoneType zone)
	{
		if (creature.isPlayer())
		{
			final Player player = creature.asPlayer();
			
			if (player.getInventory().getItemByItemId(VISITOR_MARK) != null)
			{
				if (player.destroyItemByItemId(ItemProcessType.QUEST, VISITOR_MARK, 1, player, false))
				{
					giveItems(player, FADED_VISITOR_MARK, 1);
				}
			}
		}
	}
}