ZURSULUS L2

Into the City of Humans

ID
9
Название
Into the City of Humans
start_npcs_json
[30583]
npc_ids_json
[30571,30576,30583]
constants_json
{"PETUKAI":30583,"TANAPI":30571,"TAMIL":30576,"MARK_OF_TRAVELER":7570,"SOE_GIRAN":7126}
Статус разбора
metadata_only; dynamic Java conditions/rewards retained in source; unresolved starts: []
Источник
game/data/scripts/quests/Q00009_IntoTheCityOfHumans/Q00009_IntoTheCityOfHumans.java

NPC квеста

IDНазваниеСтарт квестаУровень
30571TanapiНет70
30576TamilНет70
30583PetukaiДа80

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

if ((player.getLevel() >= 3) && (player.getRace() == Race.ORC))

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

giveItems(player, MARK_OF_TRAVELER, 1);
rewardItems(player, SOE_GIRAN, 1);

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

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

[30571-00.htm] Seer Tanapi: Did Centurion Petukai send you? Our ancestors were driven to the Immortal Plateau after their defeat by the Humans. Are we not stronger than they are? You must prove yourself! "What should I do?" [30571-01.htm] Seer Tanapi: You must find your own way. We seek a different power than the Humans. Giran is very different from our Immortal Plateau, yet you must start there. Tell Gatekeeper Tamil I sent you, she'll help you from there. May the Glory of Pa'agrio be with you! [30571-01a.htm] Seer Tanapi: Find Gatekeeper Tamil, she'll give you the directions. [30576-00.htm] Gatekeeper Tamil: You're the one going to the city of Humans to find the magic we Orcs never possessed? The gate of time and space is used for long distance travel. This is powerful Human magic! Do you have permission from Seer Tanapi? "Yes I do." [30576-01.htm] Gatekeeper Tamil: Giran is very far from here. Here's a magic scroll that allows you to use the gate of time and space. It's a scroll called the Scroll of Escape to Giran Castle Town. This is valuable, you can use it only once! Use it wisely. I will put it in your quest item window. I'll give you a Mark of Traveler as well. When you wish to return to Immortal Plateau, hometown of the Orcs, take this mark and go visit Trader Galladucci at his boutique shop. He'll help you. May the glory of Pa'agrio be with you! [30583-00.htm] Centurion Petukai: I am devoted to the subject of power! Specifically, what is the most powerful thing in the world? Of course, dragons are quite formidable! But there is a beast who can subjugate even the mightiest of dragons! They are called Humans. We creatures of Pa'agrio are fammiliar with this scourage... It was they who defeated us in battle and exiled us to this Immortal Plateau! But what is the source of their victory? Are they really more powerful than the mighty Orc? But, I, Centaurion Petukaj, guard the great Flame Lord Kakai! I can't investigate this myself... Young Orc! Find the answer for me! "I'll do it!" [30583-00a.htm] Centurion Petukai: I am devoted to the subject of power! What is the most powerful thing in the world? (This quest may only be undertaken by an Orcish character of level 3 and above.) [30583-01.htm] Centurion Petukai: Good job! No Orc has sought to answer this question until now! Now, go to Seer Tanapi at the Temple of Flames. He's the wisest of all Orcs and is sure to know the answer. Go now! Go to Seer Tenapi! [30583-01a.htm] Centurion Petukai: Arise, Orc Warrior! Visit Seer Tanapi at the Temple of Flames! He is very wise! He will know the answer to my question!
Исходник условий и наград (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.Q00009_IntoTheCityOfHumans;

import org.l2jmobius.gameserver.entity.actor.Npc;
import org.l2jmobius.gameserver.entity.actor.Player;
import org.l2jmobius.gameserver.entity.actor.enums.creature.Race;
import org.l2jmobius.gameserver.mechanics.script.Quest;
import org.l2jmobius.gameserver.mechanics.script.QuestState;
import org.l2jmobius.gameserver.mechanics.script.State;

public class Q00009_IntoTheCityOfHumans extends Quest
{
	// NPCs
	private static final int PETUKAI = 30583;
	private static final int TANAPI = 30571;
	private static final int TAMIL = 30576;
	
	// Rewards
	private static final int MARK_OF_TRAVELER = 7570;
	private static final int SOE_GIRAN = 7126;
	
	public Q00009_IntoTheCityOfHumans()
	{
		super(9, "Into the City of Humans");
		addStartNpc(PETUKAI);
		addTalkId(PETUKAI, TANAPI, TAMIL);
	}
	
	@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 "30583-01.htm":
			{
				st.startQuest();
				break;
			}
			case "30571-01.htm":
			{
				st.setCond(2, true);
				break;
			}
			case "30576-01.htm":
			{
				giveItems(player, MARK_OF_TRAVELER, 1);
				rewardItems(player, SOE_GIRAN, 1);
				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:
			{
				if ((player.getLevel() >= 3) && (player.getRace() == Race.ORC))
				{
					htmltext = "30583-00.htm";
				}
				else
				{
					htmltext = "30583-00a.htm";
				}
				break;
			}
			case State.STARTED:
			{
				final int cond = st.getCond();
				switch (npc.getId())
				{
					case PETUKAI:
					{
						if (cond == 1)
						{
							htmltext = "30583-01a.htm";
						}
						break;
					}
					case TANAPI:
					{
						if (cond == 1)
						{
							htmltext = "30571-00.htm";
						}
						else if (cond == 2)
						{
							htmltext = "30571-01a.htm";
						}
						break;
					}
					case TAMIL:
					{
						if (cond == 2)
						{
							htmltext = "30576-00.htm";
						}
						break;
					}
				}
				break;
			}
			case State.COMPLETED:
			{
				htmltext = getAlreadyCompletedMsg(player);
				break;
			}
		}
		
		return htmltext;
	}
}