ZURSULUS L2

Secret Meeting With Varka Silenos

ID
12
Название
Secret Meeting With Varka Silenos
start_npcs_json
[31296]
npc_ids_json
[31258,31296,31378]
constants_json
{"CADMON":31296,"HELMUT":31258,"NARAN_ASHANUK":31378,"MUNITIONS_BOX":7232}
Статус разбора
metadata_only; dynamic Java conditions/rewards retained in source; unresolved starts: []
Источник
game/data/scripts/quests/Q00012_SecretMeetingWithVarkaSilenos/Q00012_SecretMeetingWithVarkaSilenos.java

NPC квеста

IDНазваниеСтарт квестаУровень
31258HelmutНет70
31296CadmonДа80
31378Naran AshanukНет70

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

htmltext = (player.getLevel() < 74) ? "31296-02.htm" : "31296-01.htm";

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

giveItems(player, MUNITIONS_BOX, 1);
addExpAndSp(player, 79761, 0);

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

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

[31258-01.htm] Trader Helmut: Did Guard Cadmon send you? All right. I guess you are good enough. Bear in mind that the Varka Silenos are different from other Silenos. They may look alike, but the Varka Silenos have traditionally been fearless soldiers. They are completely different from other Silenos who are engaged in stock farming. They are very particular about manners. You should try not to offend them. Okay, here's the task. You need to take this box of supplies to the Varka Silenos base. Sounds simple, right? Even a three year old can do this. "All right. Entrust me with the task." [31258-02.htm] Trader Helmut: Good, good. I like your straight-forward personality. Now take this box of supplies to Naran Ashanuk Herald of Varka at the Varka Silenos base. [31258-03.htm] Trader Helmut: What are you still doing here? Take the box of supplies to Naran Ashanuk Herald of Varka! [31296-01.htm] Guard Cadmon: Are you interested in the Varka Silenos, stranger? Well, if you are, I know an interesting story. They've been hiring mercenaries lately! It's a great opportunity to gain access to their barracks on the pretext of smuggling weapons in! "I'll do it." [31296-02.htm] Guard Cadmon: I appreciate your interest, but the Varkas aren't your average Silenos! They're some very rough characters! You wouldn't stand a chance! (This quest may only be undertaken by a character of level 74 and above.) [31296-03.htm] Guard Cadmon: Good! Find Trader Helmut at the weapons and armor shop. He'll give you the details. Basically, you're delivering goods to them. It won't be very difficult. After the delivery, the next step is up to you. It depends entirely on how you act as to whether you gain their trust or become their enemy. Good luck! [31296-04.htm] Guard Cadmon: Go to the weapons and armor shop, and tell Trader Helmut. Hurry up. [31378-01.htm] Varka's Messenger Naran Ashanuk: What brings you to this land of the Varka, traveler of Zephyr Winds? "Hand over Helmut's chest of military supplies." [31378-02.htm] Varka's Messenger Naran Ashanuk: Were these supplies sent by Helmut of Goddard? Thank you for bringing them so far! We Varkas never forget our debts! You look like a very strong person! We Varka have been at war with the Ketra Orcs for a very long time. Will you help us? We never forget our friends!
Исходник условий и наград (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.Q00012_SecretMeetingWithVarkaSilenos;

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 Q00012_SecretMeetingWithVarkaSilenos extends Quest
{
	// NPCs
	private static final int CADMON = 31296;
	private static final int HELMUT = 31258;
	private static final int NARAN_ASHANUK = 31378;
	
	// Items
	private static final int MUNITIONS_BOX = 7232;
	
	public Q00012_SecretMeetingWithVarkaSilenos()
	{
		super(12, "Secret Meeting With Varka Silenos");
		registerQuestItems(MUNITIONS_BOX);
		addStartNpc(CADMON);
		addTalkId(CADMON, HELMUT, NARAN_ASHANUK);
	}
	
	@Override
	public String onEvent(String event, Npc npc, Player player)
	{
		String htmltext = event;
		final QuestState st = getQuestState(player, false);
		if (st == null)
		{
			return htmltext;
		}
		
		switch (event)
		{
			case "31296-03.htm":
			{
				st.startQuest();
				break;
			}
			case "31258-02.htm":
			{
				giveItems(player, MUNITIONS_BOX, 1);
				st.setCond(2, true);
				break;
			}
			case "31378-02.htm":
			{
				takeItems(player, MUNITIONS_BOX, 1);
				addExpAndSp(player, 79761, 0);
				st.exitQuest(false, true);
				break;
			}
		}
		
		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() < 74) ? "31296-02.htm" : "31296-01.htm";
				break;
			}
			case State.STARTED:
			{
				final int cond = st.getCond();
				switch (npc.getId())
				{
					case CADMON:
					{
						if (cond == 1)
						{
							htmltext = "31296-04.htm";
						}
						break;
					}
					case HELMUT:
					{
						if (cond == 1)
						{
							htmltext = "31258-01.htm";
						}
						else if (cond == 2)
						{
							htmltext = "31258-03.htm";
						}
						break;
					}
					case NARAN_ASHANUK:
					{
						if (cond == 2)
						{
							htmltext = "31378-01.htm";
						}
						break;
					}
				}
				break;
			}
			case State.COMPLETED:
			{
				htmltext = getAlreadyCompletedMsg(player);
				break;
			}
		}
		
		return htmltext;
	}
}