Prove your courage!
- ID
- 607
- Название
- Prove your courage!
- start_npcs_json
- [31370]
- npc_ids_json
- [25309,31370]
- constants_json
- {"KADUN":31370,"SHADITH":25309,"SHADITH_HEAD":7235,"VALOR_TOTEM":7219,"KETRA_ALLIANCE_THREE":7213,"MIN_LEVEL":75}
- Статус разбора
- metadata_only; dynamic Java conditions/rewards retained in source; unresolved starts: []
- Источник
- game/data/scripts/quests/Q00607_ProveYourCourageKetra/Q00607_ProveYourCourageKetra.java
NPC квеста
Условия уровней: выражения из Java
private static final int MIN_LEVEL = 75; htmltext = (player.getLevel() >= MIN_LEVEL) ? (hasQuestItems(player, KETRA_ALLIANCE_THREE)) ? "31370-01.htm" : "31370-02.htm" : "31370-03.htm";
Выдача предметов, адены и опыта: выражения из Java
giveItems(player, SHADITH_HEAD, 1); giveItems(player, VALOR_TOTEM, 1); addExpAndSp(player, 10000, 0);
Квесты содержат динамические условия Java. Выражения выдачи включают промежуточные предметы, варианты и случайные награды; это не гарантированная награда. Константы приведены выше. Полные условия — в исходнике.
Тексты квеста
[31370-01.htm] Kadun Zu Ketra: We've been at war with the murderous Varka Silenos for far too long! It's time that we put an end to this once and for all, and thrust our sword to the very core of the enemy forces! Comrade of Ketra! Will you join our struggle? "I'll do it!"
[31370-02.htm] Kadun Zu Ketra: I must find a worthy fighter to accomplish this mission. Unfortunately you don't seem up to the task. (Only a character who possesses Ketra's friend - 3rd level can undertake this quest.)
[31370-03.htm] Kadun Zu Ketra: You're not ready for this type of mission. Practice! (Only a character of level 75 or above can undertake this quest.)
[31370-04.htm] Kadun Zu Ketra: Among the Varka Silenos lurks an extremely skilled shaman known as Shadith. He leads their forces in battle far too successfully. He must be destroyed! But I must warn you, you can't take him down alone. Gather your trusted comrades, confront Shadith and take his head!
[31370-05.html] Kadun Zu Ketra: Have you brought me the Head of Shadith? "Here is Shadith's head."
[31370-06.html] Kadun Zu Ketra: Bring me the Head of Shadith!
[31370-07.html] Kadun Zu Ketra: Excellent! The head of Shadith!? Ugly bastard, wasn't he? You've proven your courage. Please accept this Totem of Valor in recognition of your outstanding military achievements! It's the custom of the Ketra to give this to the our most respected soldier who has proved the true valor like you! You're a true soldier!
Исходник условий и наград (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.Q00607_ProveYourCourageKetra;
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! (Ketra) (607)
* @author malyelfik
*/
public class Q00607_ProveYourCourageKetra extends Quest
{
// NPC
private static final int KADUN = 31370;
// Monster
private static final int SHADITH = 25309;
// Items
private static final int SHADITH_HEAD = 7235;
private static final int VALOR_TOTEM = 7219;
private static final int KETRA_ALLIANCE_THREE = 7213;
// Misc
private static final int MIN_LEVEL = 75;
public Q00607_ProveYourCourageKetra()
{
super(607, "Prove your courage!");
addStartNpc(KADUN);
addTalkId(KADUN);
addKillId(SHADITH);
registerQuestItems(SHADITH_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, SHADITH_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 "31370-04.htm":
{
qs.startQuest();
break;
}
case "31370-07.html":
{
if (hasQuestItems(player, SHADITH_HEAD) && qs.isCond(2))
{
giveItems(player, VALOR_TOTEM, 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, KETRA_ALLIANCE_THREE)) ? "31370-01.htm" : "31370-02.htm" : "31370-03.htm";
break;
}
case State.STARTED:
{
htmltext = (qs.isCond(2) && hasQuestItems(player, SHADITH_HEAD)) ? "31370-05.html" : "31370-06.html";
break;
}
}
return htmltext;
}
}