ZURSULUS L2

In Search of Fragments of Dimension

ID
634
Название
In Search of Fragments of Dimension
start_npcs_json
[]
npc_ids_json
[]
constants_json
{"DIMENSION_FRAGMENT":7079}
Статус разбора
metadata_only; dynamic Java conditions/rewards retained in source; unresolved starts: ["i"]
Источник
game/data/scripts/quests/Q00634_InSearchOfFragmentsOfDimension/Q00634_InSearchOfFragmentsOfDimension.java

NPC квеста

Записей нет.

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

htmltext = (player.getLevel() < 20) ? "01a.htm" : "01.htm";
giveItems(partyMember, DIMENSION_FRAGMENT, (int) ((npc.getLevel() * 0.15) + 2.6));

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

giveItems(partyMember, DIMENSION_FRAGMENT, (int) ((npc.getLevel() * 0.15) + 2.6));

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

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

[01.htm] Dimension Keeper: Surely you've heard all about the Dimensional Fragment. Let me ask you a simple question: Will you obtain the Dimensional Fragment and fight alongside us? "I'll do it!" [01a.htm] Dimension Keeper: Sorry, but you're not ready to fight alongside us yet. Your enthusiasm is great, but your skills are lacking. (This quest may only be undertaken by a character of level 20 and above.) [02.htm] Dimension Keeper: Your passion and conviction are apparent. The Contract between us is official! This Contract will help you to recognize the Dimensional Fragment. You're bound to experience numerous setbacks and obstacles in the future. I trust that your wisdom and courage will see you safely through your quest. You'll find the Dimensional Fragment very useful in the Dimensional Gap zone. [03.htm] Dimension Keeper: Have you found any dimension fragments? The more fragments you find, the longer you'll be allowed to stay in the dimension gap. Dimension fragments are watched over by the guardians of ancient magic. If you begin to feel overwhelmed by your mission and want to take a break, just let me know! You always have that option! "Who are the guardians of ancient magic?" "I want to continue." "I want to take a break." [04.htm] Dimension Keeper: It's very gratifying to see such burning ambition and passion! You're a natural! [05.htm] Dimension Keeper: Your burning passion has been a great help, and now others are starting to follow your excellent example! [06.htm] Dimension Keeper: The guardians of ancient magic are undead and demons summoned by ancient shamans. They worship the goddess of death to protect their sacred area from the crusaders of light. They're known as lookouts, watchers, guards, monks, prefects, seers, archons, inquisitors, guardians, sages, royal guards, and preachers.
Исходник условий и наград (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.Q00634_InSearchOfFragmentsOfDimension;

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 Q00634_InSearchOfFragmentsOfDimension extends Quest
{
	// Items
	private static final int DIMENSION_FRAGMENT = 7079;
	
	public Q00634_InSearchOfFragmentsOfDimension()
	{
		super(634, "In Search of Fragments of Dimension");
		
		// Dimensional Gate Keepers.
		for (int i = 31494; i < 31508; i++)
		{
			addStartNpc(i);
			addTalkId(i);
		}
		
		// All mobs.
		for (int i = 21208; i < 21256; i++)
		{
			addKillId(i);
		}
	}
	
	@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("02.htm"))
		{
			st.startQuest();
		}
		else if (event.equals("05.htm"))
		{
			st.exitQuest(true, 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:
			{
				htmltext = (player.getLevel() < 20) ? "01a.htm" : "01.htm";
				break;
			}
			case State.STARTED:
			{
				htmltext = "03.htm";
				break;
			}
		}
		
		return htmltext;
	}
	
	@Override
	public void onKill(Npc npc, Player player, boolean isPet)
	{
		final QuestState st = getRandomPartyMemberState(player, -1, 3, npc);
		if ((st == null) || !st.isStarted())
		{
			return;
		}
		
		if (getRandom(100) < 8)
		{
			final Player partyMember = st.getPlayer();
			giveItems(partyMember, DIMENSION_FRAGMENT, (int) ((npc.getLevel() * 0.15) + 2.6));
			playSound(partyMember, QuestSound.ITEMSOUND_QUEST_ITEMGET);
		}
	}
}