Proof of Valor
- ID
- 271
- Название
- Proof of Valor
- start_npcs_json
- [30577]
- npc_ids_json
- []
- constants_json
- {"KASHA_WOLF_FANG":1473,"NECKLACE_OF_VALOR":1507,"NECKLACE_OF_COURAGE":1506}
- Статус разбора
- metadata_only; dynamic Java conditions/rewards retained in source; unresolved starts: []
- Источник
- game/data/scripts/quests/Q00271_ProofOfValor/Q00271_ProofOfValor.java
NPC квеста
Записей нет.
Условия уровней: выражения из Java
else if (player.getLevel() < 4)
Выдача предметов, адены и опыта: выражения из Java
giveItems(player, (getRandom(100) < 10) ? NECKLACE_OF_VALOR : NECKLACE_OF_COURAGE, 1); giveItems(player, KASHA_WOLF_FANG, getRandom(4) == 0 ? 2 : 1);
Квесты содержат динамические условия Java. Выражения выдачи включают промежуточные предметы, варианты и случайные награды; это не гарантированная награда. Константы приведены выше. Полные условия — в исходнике.
Тексты квеста
[30577-00.htm] Praetorian Rukain: Ha ha! What task would I, Rukain, have for a member of a weak race like yours? Just take care not be bitten on the behind by a ferocious kasha wolf! (This quest may only be undertaken by an Orcish character.)
[30577-01.htm] Praetorian Rukain: I can't stand newbies these days! They still smell like milk, but they think they're so great! If only I were not a praetorian, I would knock some of these saucy rascals down with one blow and perhaps get their wits going. Hey! Are you glaring at me, kid? You look upset because I disregard you! If you feel offended, why don't you train harder! (This quest may only be undertaken by a character of level 4 and above.)
[30577-02.htm] Praetorian Rukain: I truly cannot stand novices these days! They still smell like milk, but they go around like great lords ...! If I were not a praetorian, I would knock down all those saucy rascals with one swing of my fist. That might start their wits running. Hey! Are you glaring at me, youngster? You look offended because I disregard you. Hey, listen! If you don't want to be treated like a novice, you have no choice but to prove to me that you are an excellent fighter. Fine, I will prove my valor!
[30577-03.htm] Praetorian Rukain: Tejakar Pa'agrio! Good! You have quite a strong will! Run to the wilderness outside the village and hunt Kasha Wolves immediately! And bring fifty fangs that you pulled out of the wolves as proof. Then I, as a praetorian, will acknowledge you as a true Orc Fighter! You look frightened already! Ha ha! Hey, kid! You thought it'd be easy to show that you're brave! Anyway, I hope you come back alive!
[30577-04.htm] Praetorian Rukain: Hey, kid! Why are you back so early? Don't tell me you want to give up already? Don't be a wimp! Run out to the wilderness outside the village and hunt kasha wolves. Don't dream of coming back until you have fifty fangs!
[30577-05.htm] Praetorian Rukain: Tejakar Pa'agrio! My young brother, you came back alive! You have fulfilled your task well. It always makes me proud when I see a young friend returning with a fist tightly clasping fangs, with a battered body but a glowing eye! Wonderful! Take this! It is a necklace made of wolf fangs. This is a token that shows everyone that you have the combative spirit and courage of a true Orc. Wear it on your chest with pride!
[30577-06.htm] Praetorian Rukain: Haven't you already proven your valor and received the necklace? Do you want to try one more time? You overflow with vigor. If you want to go out and fight, I won't hold you back! I will try again!
[30577-07.htm] Praetorian Rukain: What are you waiting for! Leave now and run to the wilderness outside the village and hunt kasha wolves! And bring fifty fangs that you pulled out of the wolves as proof! Tejakar Pa'agrio!
Исходник условий и наград (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.Q00271_ProofOfValor;
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.QuestSound;
import org.l2jmobius.gameserver.mechanics.script.QuestState;
import org.l2jmobius.gameserver.mechanics.script.State;
public class Q00271_ProofOfValor extends Quest
{
// Item
private static final int KASHA_WOLF_FANG = 1473;
// Rewards
private static final int NECKLACE_OF_VALOR = 1507;
private static final int NECKLACE_OF_COURAGE = 1506;
public Q00271_ProofOfValor()
{
super(271, "Proof of Valor");
registerQuestItems(KASHA_WOLF_FANG);
addStartNpc(30577); // Rukain
addTalkId(30577);
addKillId(20475); // Kasha Wolf
}
@Override
public String onEvent(String event, Npc npc, Player player)
{
String htmltext = event;
final QuestState st = getQuestState(player, false);
if (st == null)
{
return htmltext;
}
if (event.equals("30577-03.htm"))
{
st.startQuest();
if (hasAtLeastOneQuestItem(player, NECKLACE_OF_COURAGE, NECKLACE_OF_VALOR))
{
htmltext = "30577-07.htm";
}
}
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.getRace() != Race.ORC)
{
htmltext = "30577-00.htm";
}
else if (player.getLevel() < 4)
{
htmltext = "30577-01.htm";
}
else
{
htmltext = (hasAtLeastOneQuestItem(player, NECKLACE_OF_COURAGE, NECKLACE_OF_VALOR)) ? "30577-06.htm" : "30577-02.htm";
}
break;
}
case State.STARTED:
{
if (st.isCond(1))
{
htmltext = (hasAtLeastOneQuestItem(player, NECKLACE_OF_COURAGE, NECKLACE_OF_VALOR)) ? "30577-07.htm" : "30577-04.htm";
}
else
{
htmltext = "30577-05.htm";
takeItems(player, KASHA_WOLF_FANG, -1);
giveItems(player, (getRandom(100) < 10) ? NECKLACE_OF_VALOR : NECKLACE_OF_COURAGE, 1);
st.exitQuest(true, true);
}
break;
}
}
return htmltext;
}
@Override
public void onKill(Npc npc, Player player, boolean isPet)
{
final QuestState st = getQuestState(player, false);
if ((st == null) || !st.isCond(1))
{
return;
}
giveItems(player, KASHA_WOLF_FANG, getRandom(4) == 0 ? 2 : 1);
if (getQuestItemsCount(player, KASHA_WOLF_FANG) < 50)
{
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
else
{
st.setCond(2, true);
}
}
}