ZURSULUS L2

Through the Gate Once More

ID
637
Название
Through the Gate Once More
start_npcs_json
[32010]
npc_ids_json
[32010]
constants_json
{"FLAURON":32010,"FADED_VISITOR_MARK":8065,"NECROMANCER_HEART":8066,"PAGAN_MARK":8067}
Статус разбора
metadata_only; dynamic Java conditions/rewards retained in source; unresolved starts: []
Источник
game/data/scripts/quests/Q00637_ThroughOnceMore/Q00637_ThroughOnceMore.java

NPC квеста

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

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

if ((player.getLevel() < 73) || !hasQuestItems(player, FADED_VISITOR_MARK))

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

giveItems(player, PAGAN_MARK, 1);
giveItems(player, 8273, 10);
giveItems(partyMember, NECROMANCER_HEART, 1);

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

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

[32010-00.htm] Priest Flauron: You already have the Mark of the Pagan, so you don't need to hear this story again. Oh, by the way, a little remind for you: Although you realized your own frailty and brought your combined might can do anything to stop us. Lord Triol was quite aware of the danger a party of adventurers might present, so he cast a spell that will scatter an invading party to the winds. So don't waste your time fighting us - you'll never prevail. (If a party of six or more fight inside the Pagan Temple, there is a chance that some of the party members will be teleported elsewhere.) [32010-01.htm] Priest Flauron: Eh? Oh, my, it's you! I, uh, I didn't expect to see you again. Not alive, at any rate. Well, er, let us rejoice in your good fortune! Surely your relief at your survival will allow you to laugh at any harmless incidents in the past! Eheheh. Grab him by the collar. Listen to his story. [32010-01a.htm] Priest Flauron: I'm too busy to help you. Sorry! (This quest may only be undertaken by a character of level 73 and above who possesses a Faded Visitor's Mark.) [32010-02.htm] Priest Flauron: Hey, hey! Settle down! We can discuss this, can't we? It was merely a harmless prank, and I'm sure you appreciate the humor - hey, that hurts! The truth? Very well. I can see I have no choice; your grim faces suggest no love of my jest. Visitor's Day is a lie. We use that as a ruse to attract live sacrifices. A little embarrassing to be found out like this, really. But what's important is that you made it out. To be honest, it's been a long time since I've seen anyone escape the temple. You must be very powerful adventurers. I could use a favor... "Why would I do you a favor when you lied to me?" [32010-02a.htm] Priest Flauron: Ha, you emerged alive! My felicitations. And even better, you came back to speak with me! So, all water under the bridge, then, eh? Yes, Visitor's Day is a lie. We use it to attract live sacrifices, frankly. Anyway, it's been a long time since I've seen anyone return from there alive. I'm interested in you; I think you're capable of doing me a particular favor. "Why would I do you a favor after you lied to me?" [32010-03.htm] Priest Flauron: Oh, that. Disregard that; it was a minor matter. You have survived and gained by your experiences, surely. How can that be bad? Keep your thoughts on the future, that is my motto! Look, let's deal. I'm not going to try any more tricks. I know better now. If I'd known you for what you were, I'd never have tried it in the first place. But I have a job that needs doing, and I can offer you a real benefit in exchange: the mark that lets you go all the way into the chapel of the temple. I think that's where you want to go, am I right? "I want to go into the chapel, but why would you want to help me?" "I am not interested in the chapel of the temple." [32010-03a.htm] Priest Flauron: Why betray my order? Well, for one thing, I don't think you'll pose any real threat to the order, even if you do get into the temple. We aren't weaklings, you know. In any case, our order teaches self-interest, and this deal serves my interest. You get into the chapel, I get what I want. What do you say? "Okay, it's a deal." [32010-04.htm] Priest Flauron: A wise decision! Now, here's what I want: go to the Forest of the Dead and defeat the Bone Animator, the Bone Slayer and the Skull Animator. Bring me 10 Necromancer Hearts. Do that, and I'll give you the real sign - the occult sign that will allow you to enter the chapel of the Temple. [32010-05.htm] Priest Flauron: We have a deal, then. Now go to the Forest of the Dead and defeat the Bone Animator, the Bone Slayer, and the Skull Animator. Bring me ten Necromancer Hearts, and I will give you the Pagan's Mark that will allow you to enter the chapel of the Temple. [32010-06.htm] Priest Flauron: Ha! Excellent! Quickly, give it to me, before someone sees us! What am I going to use it for, you ask? Heh. Ask me no questions, and I'll tell you no lies! Well, you've done your part, and I'll do mine. Here, let me give you the Pagan's Mark. There! You will no longer need the Visitor's Mark; This one will work better, and will admit you to the chapel - that, and the key to the Anteroom, which I now give you. What's inside the chapel? Now, that would be telling. What are we doing there? Ha ha! Don't bother asking me such questions. Go find out for yourself! Stop us if you can! Your numbers won't help you as much as you think. It is good that you recognize your weakness and that you bring your comrades with you, but it won't help you. Lord Triol long ago realized the danger of attack by a well-coordinated band of adventurers, and cast a spell that will scatter groups of outsiders to the four winds! Be sensible, then. Surely you realize the futility of fighting us. The fact that I just gave you a free pass into the chapel should tell you something: We are not afraid of you. Think about that. (If a party of six or more fight inside The Pagan Temple, there is a chance that one or more party members will be teleported to another place.) [32010-10.htm] Priest Flauron: Oh, really? What a pity. Please feel free to return any time!
Исходник условий и наград (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.Q00637_ThroughOnceMore;

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 Q00637_ThroughOnceMore extends Quest
{
	// NPC
	private static final int FLAURON = 32010;
	
	// Items
	private static final int FADED_VISITOR_MARK = 8065;
	private static final int NECROMANCER_HEART = 8066;
	
	// Reward
	private static final int PAGAN_MARK = 8067;
	
	public Q00637_ThroughOnceMore()
	{
		super(637, "Through the Gate Once More");
		registerQuestItems(NECROMANCER_HEART);
		addStartNpc(FLAURON);
		addTalkId(FLAURON);
		addKillId(21565, 21566, 21567);
	}
	
	@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("32010-04.htm"))
		{
			st.startQuest();
		}
		else if (event.equals("32010-10.htm"))
		{
			st.exitQuest(true);
		}
		
		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.getLevel() < 73) || !hasQuestItems(player, FADED_VISITOR_MARK))
				{
					htmltext = "32010-01a.htm";
				}
				else if (hasQuestItems(player, PAGAN_MARK))
				{
					htmltext = "32010-00.htm";
				}
				else
				{
					htmltext = "32010-01.htm";
				}
				break;
			}
			case State.STARTED:
			{
				if (st.isCond(2))
				{
					if (getQuestItemsCount(player, NECROMANCER_HEART) == 10)
					{
						htmltext = "32010-06.htm";
						takeItems(player, FADED_VISITOR_MARK, 1);
						takeItems(player, NECROMANCER_HEART, -1);
						giveItems(player, PAGAN_MARK, 1);
						giveItems(player, 8273, 10);
						st.exitQuest(true, true);
					}
					else
					{
						st.setCond(1);
					}
				}
				else
				{
					htmltext = "32010-05.htm";
				}
				break;
			}
		}
		
		return htmltext;
	}
	
	@Override
	public void onKill(Npc npc, Player player, boolean isPet)
	{
		final QuestState qs = getRandomPartyMemberState(player, 1, 3, npc);
		if (qs == null)
		{
			return;
		}
		
		final Player partyMember = qs.getPlayer();
		final QuestState st = getQuestState(partyMember, false);
		if (st == null)
		{
			return;
		}
		
		if (getRandom(10) < 4)
		{
			giveItems(partyMember, NECROMANCER_HEART, 1);
			if (getQuestItemsCount(partyMember, NECROMANCER_HEART) < 10)
			{
				playSound(partyMember, QuestSound.ITEMSOUND_QUEST_ITEMGET);
			}
			else
			{
				st.setCond(2, true);
			}
		}
	}
}