ZURSULUS L2

Pavel the Giant

ID
121
Название
Pavel the Giant
start_npcs_json
[31961]
npc_ids_json
[31961,32041]
constants_json
{"NEWYEAR":31961,"YUMI":32041}
Статус разбора
metadata_only; dynamic Java conditions/rewards retained in source; unresolved starts: []
Источник
game/data/scripts/quests/Q00121_PavelTheGiant/Q00121_PavelTheGiant.java

NPC квеста

IDНазваниеСтарт квестаУровень
31961NewyearДа70
32041YumiНет70

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

htmltext = (player.getLevel() < 46) ? "31961-1a.htm" : "31961-1.htm";

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

addExpAndSp(player, 10000, 0);

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

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

[31961-1.htm] Head Blacksmith Newyear: Have you ever thought about working for us dwarves? Near this area lies the Pavel Ruins. I sent an investigator there a while ago, but got nowhere with their reportings. If you are experienced enough, I'd like to send you there. Say you're experienced enough [31961-1a.htm] Head Blacksmith Newyear: You're full of confidence, aren't you? Then why don't you show me how you use that weapon? I've been using this hammer for about a hundred years,and I can rate a man's swing as well as anyone. Hm. In my opinion, I don't think you're experienced enough. Why don't you come back when you've developed your skills a bit? This is a really difficult task. (This quest may only be undertaken by a character of level 46 and above.) [31961-2.htm] Head Blacksmith Newyear: You're full of confidence, I see. Well, that's right and proper; you have the skill to back it up. Just the sort of adventurer I need! In the heart of the Ruins of Pavel there is a Dwarven barracks. There you will find my asociate, Collector Yumi. She will give you a job if you tell her I sent you. She's, um, a little eccentric. I'm not sure what she'll make of you, but I think you'll pass muster with her. So, get going! Quests don't keep forever, you know! [31961-2a.htm] Head Blacksmith Newyear: Can't you remember what i said? In the heart of the Ruins of Pavel there is a Dwarven barrack. There you will find my associate, Collector Yumi. She'll give you a job if you tell her I sent you. [32041-1.htm] Collector Yumi: Ah, Newyear sent you, did he? I'm glad you came. I've been waiting for you. How is the old boy? Surely he could have sent some food with you. Would that have been too much to expect of him? Honestly. Well, no matter. Let's discuss business. "Ask what needs to be done." [32041-2.htm] Collector Yumi: We have two problems. The first and most urgent is that we are beset by a mad scientist whose work is causing us great harm. I am not sure if you can prevail against him, and in good conscience I cannot send you against him until I am sure. Please go see Collector Gutenhagen. He has been in need of assistance, and he can evaluate your fitness for this task. If he passes you, come see me, and I will tell you a tale of the old manager of the Pavel Ruins.
Исходник условий и наград (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.Q00121_PavelTheGiant;

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.QuestState;
import org.l2jmobius.gameserver.mechanics.script.State;

public class Q00121_PavelTheGiant extends Quest
{
	// NPCs
	private static final int NEWYEAR = 31961;
	private static final int YUMI = 32041;
	
	public Q00121_PavelTheGiant()
	{
		super(121, "Pavel the Giant");
		addStartNpc(NEWYEAR);
		addTalkId(NEWYEAR, YUMI);
	}
	
	@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("31961-2.htm"))
		{
			st.startQuest();
		}
		else if (event.equals("32041-2.htm"))
		{
			addExpAndSp(player, 10000, 0);
			st.exitQuest(false, 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() < 46) ? "31961-1a.htm" : "31961-1.htm";
				break;
			}
			case State.STARTED:
			{
				switch (npc.getId())
				{
					case NEWYEAR:
					{
						htmltext = "31961-2a.htm";
						break;
					}
					case YUMI:
					{
						htmltext = "32041-1.htm";
						break;
					}
				}
				break;
			}
			case State.COMPLETED:
			{
				htmltext = getAlreadyCompletedMsg(player);
				break;
			}
		}
		
		return htmltext;
	}
}