Prove your courage!
- ID
- 613
- Название
- Prove your courage!
- start_npcs_json
- [31377]
- npc_ids_json
- [25299,31377]
- constants_json
- {"ASHAS":31377,"HEKATON":25299,"HEKATON_HEAD":7240,"VALOR_FEATHER":7229,"VARKA_ALLIANCE_THREE":7223,"MIN_LEVEL":75}
- Статус разбора
- metadata_only; dynamic Java conditions/rewards retained in source; unresolved starts: []
- Источник
- game/data/scripts/quests/Q00613_ProveYourCourageVarka/Q00613_ProveYourCourageVarka.java
NPC квеста
Условия уровней: выражения из Java
private static final int MIN_LEVEL = 75; htmltext = (player.getLevel() >= MIN_LEVEL) ? (hasQuestItems(player, VARKA_ALLIANCE_THREE)) ? "31377-01.htm" : "31377-02.htm" : "31377-03.htm";
Выдача предметов, адены и опыта: выражения из Java
giveItems(player, HEKATON_HEAD, 1); giveItems(player, VALOR_FEATHER, 1); addExpAndSp(player, 10000, 0);
Квесты содержат динамические условия Java. Выражения выдачи включают промежуточные предметы, варианты и случайные награды; это не гарантированная награда. Константы приведены выше. Полные условия — в исходнике.
Тексты квеста
[31377-01.htm] Chief Ashas Varka Durai: Have you heard of Hekaton, the hero of those despicable Ketra Orcs? Countless brave Varka soldiers have fallen before his axe, and I can still hear his howls of victory! We Varka can no longer ignore his atrocities! I seek a brave warrior to execute this scurvy dog! Will you prove your valor to all Varkas by cutting down Hekaton, the sworn enemy of the Varka? "I'll kill Hekaton."
[31377-02.htm] Chief Ashas Varka Durai: I must find a worthy fighter who can defeat Hekaton of the Ketra Orcs! Sadly, I don't think you're up to the task! Sigh... It seems like they're all too young or too old... (Only a character who possesses the mark of Varka's friend - 3rd level can undertake this quest.)
[31377-03.htm] Chief Ashas Varka Durai: You're not ready yet, my child! (Only a character of level 75 or above may undertake this quest.)
[31377-04.htm] Chief Ashas Varka Durai: Do you truly believe you can kill Hekaton? This will be the ultimate test of your courage! Kill that filthy hero of the Ketra Orcs and cut off his head! But you mustn't forget, he's a formidable enemy! Even the best warrior is made more formidable with trusted friends fighting by his side! Gather your strongest allies and conquer the cruel Hekaton!
[31377-05.html] Chief Ashas Varka Durai: Have you brought the head of the hero of the Ketra Orcs? "Here is Hekaton's head."
[31377-06.html] Chief Ashas Varka Durai: Prove yourself! Kill Hekaton and cut off his head!
[31377-07.html] Chief Ashas Varka Durai: Is this the head of the beast who spilt gallons of our tribe's blood? Excellent! You're a true soldier! You've proven your valor! Dear friend of Varka, please accept this Feather of Valor.
Исходник условий и наград (Java)
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package quests.Q00613_ProveYourCourageVarka;
import org.l2jmobius.gameserver.config.PlayerConfig;
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;
import org.l2jmobius.gameserver.util.LocationUtil;
/**
* Prove Your Courage! (Varka) (613)
* @author malyelfik
*/
public class Q00613_ProveYourCourageVarka extends Quest
{
// NPC
private static final int ASHAS = 31377;
// Monster
private static final int HEKATON = 25299;
// Items
private static final int HEKATON_HEAD = 7240;
private static final int VALOR_FEATHER = 7229;
private static final int VARKA_ALLIANCE_THREE = 7223;
// Misc
private static final int MIN_LEVEL = 75;
public Q00613_ProveYourCourageVarka()
{
super(613, "Prove your courage!");
addStartNpc(ASHAS);
addTalkId(ASHAS);
addKillId(HEKATON);
registerQuestItems(HEKATON_HEAD);
}
@Override
public void actionForEachPlayer(Player player, Npc npc, boolean isSummon)
{
final QuestState qs = getQuestState(player, false);
if ((qs != null) && qs.isCond(1) && LocationUtil.checkIfInRange(PlayerConfig.ALT_PARTY_RANGE, npc, player, false))
{
giveItems(player, HEKATON_HEAD, 1);
qs.setCond(2, true);
}
}
@Override
public String onEvent(String event, Npc npc, Player player)
{
final QuestState qs = getQuestState(player, false);
if (qs == null)
{
return null;
}
String htmltext = event;
switch (event)
{
case "31377-04.htm":
{
qs.startQuest();
break;
}
case "31377-07.html":
{
if (hasQuestItems(player, HEKATON_HEAD) && qs.isCond(2))
{
giveItems(player, VALOR_FEATHER, 1);
addExpAndSp(player, 10000, 0);
qs.exitQuest(true, true);
}
else
{
htmltext = getNoQuestMsg(player);
}
break;
}
default:
{
htmltext = null;
break;
}
}
return htmltext;
}
@Override
public void onKill(Npc npc, Player killer, boolean isSummon)
{
executeForEachPlayer(killer, npc, isSummon, true, false);
}
@Override
public String onTalk(Npc npc, Player player)
{
final QuestState qs = getQuestState(player, true);
String htmltext = getNoQuestMsg(player);
switch (qs.getState())
{
case State.CREATED:
{
htmltext = (player.getLevel() >= MIN_LEVEL) ? (hasQuestItems(player, VARKA_ALLIANCE_THREE)) ? "31377-01.htm" : "31377-02.htm" : "31377-03.htm";
break;
}
case State.STARTED:
{
htmltext = (qs.isCond(2) && hasQuestItems(player, HEKATON_HEAD)) ? "31377-05.html" : "31377-06.html";
break;
}
}
return htmltext;
}
}