ZURSULUS L2

Path to an Orc Raider

ID
414
Название
Path to an Orc Raider
start_npcs_json
[30570]
npc_ids_json
[20320,27045,27054,27320,30501,30570,31978]
constants_json
{"KARUKIA":30570,"KASMAN":30501,"TAZEER":31978,"GOBLIN_TOMB_RAIDER_LEADER":20320,"KURUKA_RATMAN_LEADER":27045,"UMBAR_ORC":27054,"TIMORA_ORC":27320,"GREEN_BLOOD":1578,"GOBLIN_DWELLING_MAP":1579,"KURUKA_RATMAN_TOOTH":1580,"BETRAYER_REPORT_1":1589,"BETRAYER_REPORT_2":1590,"HEAD_OF_BETRAYER":1591,"MARK_OF_RAIDER":1592,"TIMORA_ORC_HEAD":8544}
Статус разбора
metadata_only; dynamic Java conditions/rewards retained in source; unresolved starts: []
Источник
game/data/scripts/quests/Q00414_PathOfTheOrcRaider/Q00414_PathOfTheOrcRaider.java

NPC квеста

IDНазваниеСтарт квестаУровень
20320Goblin Tomb Raider LeaderНет12
27045Kuruka Ratman LeaderНет18
27054Umbar OrcНет20
27320Timora OrcНет20
30501KasmanНет70
30570KarukiaДа70
31978TazeerНет70

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

else if (player.getLevel() < 19)

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

giveItems(player, GOBLIN_DWELLING_MAP, 1);
giveItems(player, BETRAYER_REPORT_1, 1);
giveItems(player, BETRAYER_REPORT_2, 1);
giveItems(player, MARK_OF_RAIDER, 1);
addExpAndSp(player, 3200, 2360);
giveItems(player, MARK_OF_RAIDER, 1);
addExpAndSp(player, 3200, 2360);
giveItems(player, GREEN_BLOOD, 1);
giveItems(player, KURUKA_RATMAN_TOOTH, 1);
giveItems(player, HEAD_OF_BETRAYER, 1);
giveItems(player, TIMORA_ORC_HEAD, 1);

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

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

[30501-01.htm] Prefect Kasman: I have received notice from Karukia. You were given the task to destroy the betrayers, right? They are sly scoundrels, so you must be careful in dealing with them. After you finish your task, bring me back their heads! [30501-02.htm] Prefect Kasman: Now you have one left. Go and kill the scoundrel! [30501-03.htm] Prefect Kasman: Foul betrayers, the Umbar tribe, to think that they abandoned the courage and loyalty of high-level orcs, they have become low Orcs depraved in body as well as in soul. How truly wicked they look. I am moved to think that we have shown mercy by killing them! Anyway, you have done well. You have truly demonstrated both courage and loyalty. Congratulations! I bestow this token on you. Take it and go to High Prefect Osborn right here! He will change your profession to Orc Raider. [30570-01.htm] Prefect Karukia: Orc Raiders are of the most elite rank among fighters of our race! Their mere appearance on the battlefield makes the enemy troops shiver in fear! To earn the qualifications to become an Orc Raider, you must prove that you have courage that has no regard for death, and absolute loyalty to the Orcs. There have been many young ones that lost their lives trying to prove their courage and loyalty! It is not something to challenge with a light heart! Say you want to be an Orc Raider [30570-02.htm] Prefect Karukia: Of course, I know your goal is to be a dignified and noble member of our race. But courage unsupported by ability is foolishness! That is a path that leads only to a meaningless death. Train patiently, youngster, and your chance will come. See me again when you reach level 19! [30570-02a.htm] Prefect Karukia: You fool! You have already been selected as a courageous Orc Raider! Don't waste my time with useless questions. Go out to the battlefield and strike down the enemy! [30570-03.htm] Prefect Karukia: Only the most courageous Orc Fighters are chosen to be Orc Raiders. You don't have the qualifications to become a Marauder! [30570-04.htm] Prefect Karukia: Oh! The Mark of the Raider! Another strong Warrior is born to fight for the Kingdom! Ha! You must go at once to the Kingdom of Humans and show this mark to the High Prefect there! He'll transfer you to the Raider class. You should visit either High Prefect Osborn in Gludin Village or High Prefect Pinker in the Town of Schuttgart. [30570-05.htm] Prefect Karukia: Then, I will give you a test! Orc Raiders are completed when they show courage that is unafraid of death and loyalty that is absolute. First, you must prove your loyalty. Destroy the goblins that spoil the earth and the Kuruka Ratman Leaders that control that filthy race! Take this Map. It is marked with the places where there are goblin tribes. If you obliterate the goblin tomb raider leader there, a Kuruka Ratman Leader will appear, so make sure not to let him get away! We do not need captives. Remember, you must kill at least ten Kuruka Ratman Leaders. Plant the power and fear of the Orcs into the enemy's heart! [30570-06.htm] Prefect Karukia: Why have you come back already? Didn't I tell you to bring back ten kuruka ratman teeth? Is this all the courage you can muster? [30570-07.htm] Prefect Karukia: You accomplished the mission well, but don't get too sure of yourself! As an Orc Raider, that should've been nothing to you! Now you must prove your loyalty. Two Judges await you. Which do you want to go to? "I want to go to Gludin Village." "I want to go to the Town of Schuttgart." [30570-07a.htm] Prefect Karukia: We of the Orc Kingdom have long cherished our tradition of obedience to our elders. Having said that, there are always certain individuals who'd like to change the way we do things... Some such criminal dogs are said to be hiding in Gludin Village! Speak with Prefect Kasman of Gludin Village... He'll tell you what you need to do! [30570-07b.htm] Prefect Karukia: We of the Orc Kingdom have long cherished our tradition of obedience to our elders. Having said that, there are always certain individuals who'd like to change the way we do things... Some such criminal dogs are said to be hiding in the Town of Schuttgart! Speak with Tazeer, the Lord of Schuttgart... He'll tell you what you need to do! [30570-08.htm] Prefect Karukia: You have not yet proven your loyalty! There are many traitors hiding far away in Gludin to avoid our eyes! They think they are safe, but we have not forgotten them. Go on now and put an end to the betrayers and prove your loyalty! When you complete this task, take the heads of the two traitors to Prefect Kasman in the village of Gludin. If you have truly earned the qualifications to become an Orc Raider, you will receive a token to change profession from him. [31978-01.htm] Prefect Tazeer: All glory flows from the great fire! Are you a young soldier of the Orc Kingdom? Surely you realize that you must prove your loyalty in order to be an Orc Raider. The test is very simple. Unlike in your land, there are many lower Orcs here, who hold much power... Any move against them would take a special kind of courage... Do you have it? "I do." [31978-02.htm] Prefect Tazeer: Very well! Then pay close attention! The Timora Orcs betrayed us by joining the dreaded Ragna Orcs, who have long been the scourge of this area. They can usually be found near the lake between the Crypts of Disgrace and the Den of Evil. They hide in the Den of Evil whenever they hear that we're sending a powerful Orc after them. Letting their betrayal go unchallenged would harm the reputation of the entire Orc Kingdom! If we secretly send an unknown Orc like you after them, they might be taken off-guard... Please, destroy the Timora Orcs! "I'll do it." [31978-03.htm] Prefect Tazeer: Excellent! I won't tell you that you won't be in serious danger, but I believe that you're skilled enough to defeat the Timora Orcs. Bring me one of their heads and I'll reward you with the Mark of the Raider! Go now! [31978-04.htm] Prefect Tazeer: The traitorous Timora Orcs can be found near the lake between the Crypts of Disgrace and the Den of Evil! Now go and bring me back one of their heads! [31978-05.htm] Prefect Tazeer: Tejakar Oroca! Tejakar Renegade Raider! You've brought me the head of a traitor! Please accept this Mark of the Raider! Take it to the High Prefect and he will qualify you as an Orc Raider if your skills are good enough! Glory be with you, young Orc!
Исходник условий и наград (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.Q00414_PathOfTheOrcRaider;

import org.l2jmobius.gameserver.entity.actor.Npc;
import org.l2jmobius.gameserver.entity.actor.Player;
import org.l2jmobius.gameserver.entity.actor.enums.player.PlayerClass;
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;
import org.l2jmobius.gameserver.network.serverpackets.SocialAction;

public class Q00414_PathOfTheOrcRaider extends Quest
{
	// NPCs
	private static final int KARUKIA = 30570;
	private static final int KASMAN = 30501;
	private static final int TAZEER = 31978;
	
	// Monsters
	private static final int GOBLIN_TOMB_RAIDER_LEADER = 20320;
	private static final int KURUKA_RATMAN_LEADER = 27045;
	private static final int UMBAR_ORC = 27054;
	private static final int TIMORA_ORC = 27320;
	
	// Items
	private static final int GREEN_BLOOD = 1578;
	private static final int GOBLIN_DWELLING_MAP = 1579;
	private static final int KURUKA_RATMAN_TOOTH = 1580;
	private static final int BETRAYER_REPORT_1 = 1589;
	private static final int BETRAYER_REPORT_2 = 1590;
	private static final int HEAD_OF_BETRAYER = 1591;
	private static final int MARK_OF_RAIDER = 1592;
	private static final int TIMORA_ORC_HEAD = 8544;
	
	public Q00414_PathOfTheOrcRaider()
	{
		super(414, "Path to an Orc Raider");
		registerQuestItems(GREEN_BLOOD, GOBLIN_DWELLING_MAP, KURUKA_RATMAN_TOOTH, BETRAYER_REPORT_1, BETRAYER_REPORT_2, HEAD_OF_BETRAYER, TIMORA_ORC_HEAD);
		addStartNpc(KARUKIA);
		addTalkId(KARUKIA, KASMAN, TAZEER);
		addKillId(GOBLIN_TOMB_RAIDER_LEADER, KURUKA_RATMAN_LEADER, UMBAR_ORC, TIMORA_ORC);
	}
	
	@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 "30570-05.htm":
			{
				if (player.getPlayerClass() != PlayerClass.ORC_FIGHTER)
				{
					htmltext = (player.getPlayerClass() == PlayerClass.ORC_RAIDER) ? "30570-02a.htm" : "30570-03.htm";
				}
				else if (player.getLevel() < 19)
				{
					htmltext = "30570-02.htm";
				}
				else if (hasQuestItems(player, MARK_OF_RAIDER))
				{
					htmltext = "30570-04.htm";
				}
				else
				{
					st.startQuest();
					giveItems(player, GOBLIN_DWELLING_MAP, 1);
				}
				break;
			}
			case "30570-07a.htm":
			{
				st.setCond(3, true);
				takeItems(player, GOBLIN_DWELLING_MAP, 1);
				takeItems(player, KURUKA_RATMAN_TOOTH, -1);
				giveItems(player, BETRAYER_REPORT_1, 1);
				giveItems(player, BETRAYER_REPORT_2, 1);
				break;
			}
			case "30570-07b.htm":
			{
				st.setCond(5, true);
				takeItems(player, GOBLIN_DWELLING_MAP, 1);
				takeItems(player, KURUKA_RATMAN_TOOTH, -1);
				break;
			}
			case "31978-03.htm":
			{
				st.setCond(6, 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 = "30570-01.htm";
				break;
			}
			case State.STARTED:
			{
				final int cond = st.getCond();
				switch (npc.getId())
				{
					case KARUKIA:
					{
						if (cond == 1)
						{
							htmltext = "30570-06.htm";
						}
						else if (cond == 2)
						{
							htmltext = "30570-07.htm";
						}
						else if ((cond == 3) || (cond == 4))
						{
							htmltext = "30570-08.htm";
						}
						else if (cond == 5)
						{
							htmltext = "30570-07b.htm";
						}
						break;
					}
					case KASMAN:
					{
						if (cond == 3)
						{
							htmltext = hasQuestItems(player, HEAD_OF_BETRAYER) ? "30501-02.htm" : "30501-01.htm";
						}
						else if (cond == 4)
						{
							htmltext = "30501-03.htm";
							takeItems(player, BETRAYER_REPORT_1, 1);
							takeItems(player, BETRAYER_REPORT_2, 1);
							takeItems(player, HEAD_OF_BETRAYER, -1);
							giveItems(player, MARK_OF_RAIDER, 1);
							addExpAndSp(player, 3200, 2360);
							player.broadcastPacket(new SocialAction(player.getObjectId(), 3));
							st.exitQuest(true, true);
						}
						break;
					}
					case TAZEER:
					{
						if (cond == 5)
						{
							htmltext = "31978-01.htm";
						}
						else if (cond == 6)
						{
							htmltext = "31978-04.htm";
						}
						else if (cond == 7)
						{
							htmltext = "31978-05.htm";
							takeItems(player, TIMORA_ORC_HEAD, 1);
							giveItems(player, MARK_OF_RAIDER, 1);
							addExpAndSp(player, 3200, 2360);
							player.broadcastPacket(new SocialAction(player.getObjectId(), 3));
							st.exitQuest(true, true);
						}
						break;
					}
				}
				break;
			}
		}
		
		return htmltext;
	}
	
	@Override
	public void onKill(Npc npc, Player player, boolean isPet)
	{
		final QuestState st = getQuestState(player, false);
		if ((st == null) || !st.isStarted())
		{
			return;
		}
		
		switch (npc.getId())
		{
			case GOBLIN_TOMB_RAIDER_LEADER:
			{
				if (st.isCond(1))
				{
					if (getQuestItemsCount(player, GREEN_BLOOD) <= getRandom(20))
					{
						playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
						giveItems(player, GREEN_BLOOD, 1);
					}
					else
					{
						takeItems(player, GREEN_BLOOD, -1);
						addSpawn(KURUKA_RATMAN_LEADER, npc, false, 300000);
					}
				}
				break;
			}
			case KURUKA_RATMAN_LEADER:
			{
				if (st.isCond(1))
				{
					if (getQuestItemsCount(player, KURUKA_RATMAN_TOOTH) < 10)
					{
						giveItems(player, KURUKA_RATMAN_TOOTH, 1);
						
						if (getQuestItemsCount(player, KURUKA_RATMAN_TOOTH) >= 10)
						{
							st.setCond(2, true);
						}
						else
						{
							playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
						}
					}
				}
				break;
			}
			case UMBAR_ORC:
			{
				if (st.isCond(3) && (getQuestItemsCount(player, HEAD_OF_BETRAYER) < 2) && (getRandom(10) < 2))
				{
					giveItems(player, HEAD_OF_BETRAYER, 1);
					
					if (getQuestItemsCount(player, HEAD_OF_BETRAYER) >= 2)
					{
						st.setCond(4, true);
					}
					else
					{
						playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
					}
				}
				break;
			}
			case TIMORA_ORC:
			{
				if (st.isCond(6) && (getRandom(10) < 6))
				{
					giveItems(player, TIMORA_ORC_HEAD, 1);
					st.setCond(7, true);
				}
				break;
			}
		}
	}
}