Path to an Elven Knight
- ID
- 406
- Название
- Path to an Elven Knight
- start_npcs_json
- [30327]
- npc_ids_json
- [30317,30327]
- constants_json
- {"SORIUS":30327,"KLUTO":30317,"SORIUS_LETTER":1202,"KLUTO_BOX":1203,"ELVEN_KNIGHT_BROOCH":1204,"TOPAZ_PIECE":1205,"EMERALD_PIECE":1206,"KLUTO_MEMO":1276}
- Статус разбора
- metadata_only; dynamic Java conditions/rewards retained in source; unresolved starts: []
- Источник
- game/data/scripts/quests/Q00406_PathOfTheElvenKnight/Q00406_PathOfTheElvenKnight.java
NPC квеста
Условия уровней: выражения из Java
else if (player.getLevel() < 19)
Выдача предметов, адены и опыта: выражения из Java
giveItems(player, KLUTO_MEMO, 1); giveItems(player, SORIUS_LETTER, 1); giveItems(player, ELVEN_KNIGHT_BROOCH, 1); addExpAndSp(player, 3200, 2280); giveItems(player, KLUTO_BOX, 1); giveItems(player, TOPAZ_PIECE, 1); giveItems(player, EMERALD_PIECE, 1);
Квесты содержат динамические условия Java. Выражения выдачи включают промежуточные предметы, варианты и случайные награды; это не гарантированная награда. Константы приведены выше. Полные условия — в исходнике.
Тексты квеста
[30317-01.htm] Blacksmith Kluto: Oh ho, so you want to be an Elven Knight? Of course, I know how to make the brooch. However, nothing in this world is free ... If you want the Elven Knight Brooch, you must first do me a service. Ask about the favor
[30317-02.htm] Blacksmith Kluto: East of here, there is a camp of the Ol Mahums. They are indeed ferocious scoundrels. Their trainees come out to the southeast of the Abandoned Camp, and I want you to get rid of them. You need not know the reason. There will be about twenty of them. Hmm ... I would have to know whether or not you really killed all twenty. If you bring me twenty of the jewels that the Ol mahums carry with them, I will accommodate you. I'll give you this so you do not forget. Now, off you go!
[30317-03.htm] Blacksmith Kluto: Why have you returned so early? Were you afraid? They are only Ol Mahum Novices... You are quite timid. If I may give you a piece of advice, don't go deep into the camp. If the Ol Mahum come upon you in a group, with your skills you'd never be able to deal with them. Do you understand what I'm saying? Well, be off now!
[30317-04.htm] Blacksmith Kluto: Did I not tell you to bring twenty jewels? I cannot accommodate you even if you are only one short.
[30317-05.htm] Blacksmith Kluto: Amazing! To be frank, I wasn't expecting much out of you. Indeed, Master Sorius knows a good candidate. To tell the truth, bringing back the Emeralds was also part of the test. Since Sorius saved my life long ago, I have been assisting him in testing young Elven Fighters. When we have some time, I will tell you how Sorius saved me from the Orcs. Give me the Topaz Pieces and Emerald Pieces. These jewels will be used as materials to make the brooches for the next youngsters who qualify to become Elven Knights. Your brooch has already been made from the jewels collected by those that took the test before you. Now take this box. In it is the completed Elven Knight Brooch. Take this to Master Sorius and he will conduct the official presentation. You have rightfully earned it.
[30317-06.htm] Blacksmith Kluto: Have you not gone yet? Aren't you eager to begin your career as an Elven Knight. Get along now to Master Sorius!
[30327-01.htm] Master Sorius: Greetings, child in search of the training of the sword. When I look at the new candidates like yourself that seek me, I am sure that the long tradition of our Elven race is being continued. Say you want to be an Elven Knight
[30327-02.htm] Master Sorius: Haven't you already chosen the path that you must take? Train yourself more before aspiring to a higher level.
[30327-02a.htm] Master Sorius: You are already walking the path of an Elven Knight. Train yourself more before proceeding to a higher level. May the starlight guide you.
[30327-03.htm] Master Sorius: However, you do not have enough experience. I feel that your movements and steps are not enough to study the skills of a higher level. Be patient and train yourself. Your eyes are filled with passion and faith. I will wait for that time.
[30327-04.htm] Master Sorius: I see you have the Elven Knight Brooch. Take the brooch and go to Grand Master Ramos. Then he will change your profession to Elven Knight.
[30327-05.htm] Master Sorius: Elven Knights choose the path of the sword over archery, both of which were developed by our race for thousands of years. These days, many Elven Knights enter the Human world to practice the will of Einhasad and Eva, even though they were originally created to protect the Mother Trees from invaders. We must test your skills to see if you have what it takes to become an Elven Knight. This is a test to judge your skills, but I am sure one of your level will pass with no particular difficulties. What do you say? Will you assume the challenge of the test? Challenge the test
[30327-06.htm] Master Sorius: There is a place called the Ruins of Agony in the war-devastated area at the northern part of Gludio. Cruel and violent undead skeletons and the spartoi are disturbing and harming innocent people who travel near there. Elven Knights follow the teachings of Einhasad and Eva. There is no better place than the Ruins of Agony where an Elven Knight can perform his or her duty. If you don't know how to go to the Ruins of Agony, ask Guard Babenco. Please go to the Ruins of Agony and hunt skeletons and spartoi. If you defeat the undead, you will be able to get some Topaz Pieces. You must bring back twenty of these jewels. Also, you must be extra careful because those undead can help each other. This is your first test. Now, it's time to test your talent. I will pray for you to distinguish yourself in war.
[30327-07.htm] Master Sorius: You haven't left yet? Can it be it that you are unsure of the test? Someone like you will be able to perform it well. Hurry on to the Ruins of Agony and test your skills on the skeletons and spartoi. If you don't know how to go to the Ruins of Agony, ask Guard Babenco.
[30327-08.htm] Master Sorius: It is still not enough. You must have 20 Topaz Pieces. May the divine blessing of Einhasad and Eva be with you.
[30327-09.htm] Master Sorius: Congratulations. You have safely completed the test. The topaz that you brought will be used to make the Elven Knight Brooch, symbol of the Elven Knights. With this, you can prove your skills openly to the grand master. However, the Topaz Piece is not enough to complete the Elven Knight Brooch. Take this letter and go to Blacksmith Kluto of the village of Gludin. He will tell you how to make these jewels into an Elven Knight Brooch. If you don't know how to go to Gludin, ask Guard Praga.
[30327-10.htm] Master Sorius: I see you have safely passed Kluto's test. Congratulations! You have proven that you have the courage to become an Elven Knight. This brooch is made of materials collected by other Elves who have gone through this same test. Another brilliant tradition of the Elven race is passed on to future generations! If you wish to change your profession to Elven Knight, give this brooch to Grand Master Rains. Until we meet again, may the protection of Eva be with you!
[30327-11.htm] Master Sorius: You haven't found Kluto yet? You can meet Kluto at the blacksmith's shop in Gludin. If you don't know how to get to Gludin, ask Guard Praga.
Исходник условий и наград (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.Q00406_PathOfTheElvenKnight;
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 Q00406_PathOfTheElvenKnight extends Quest
{
// NPCs
private static final int SORIUS = 30327;
private static final int KLUTO = 30317;
// Items
private static final int SORIUS_LETTER = 1202;
private static final int KLUTO_BOX = 1203;
private static final int ELVEN_KNIGHT_BROOCH = 1204;
private static final int TOPAZ_PIECE = 1205;
private static final int EMERALD_PIECE = 1206;
private static final int KLUTO_MEMO = 1276;
public Q00406_PathOfTheElvenKnight()
{
super(406, "Path to an Elven Knight");
registerQuestItems(SORIUS_LETTER, KLUTO_BOX, TOPAZ_PIECE, EMERALD_PIECE, KLUTO_MEMO);
addStartNpc(SORIUS);
addTalkId(SORIUS, KLUTO);
addKillId(20035, 20042, 20045, 20051, 20054, 20060, 20782);
}
@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 "30327-05.htm":
{
if (player.getPlayerClass() != PlayerClass.ELVEN_FIGHTER)
{
htmltext = (player.getPlayerClass() == PlayerClass.ELVEN_KNIGHT) ? "30327-02a.htm" : "30327-02.htm";
}
else if (player.getLevel() < 19)
{
htmltext = "30327-03.htm";
}
else if (hasQuestItems(player, ELVEN_KNIGHT_BROOCH))
{
htmltext = "30327-04.htm";
}
break;
}
case "30327-06.htm":
{
st.startQuest();
break;
}
case "30317-02.htm":
{
st.setCond(4, true);
takeItems(player, SORIUS_LETTER, 1);
giveItems(player, KLUTO_MEMO, 1);
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 = "30327-01.htm";
break;
}
case State.STARTED:
{
final int cond = st.getCond();
switch (npc.getId())
{
case SORIUS:
{
if (cond == 1)
{
htmltext = (!hasQuestItems(player, TOPAZ_PIECE)) ? "30327-07.htm" : "30327-08.htm";
}
else if (cond == 2)
{
htmltext = "30327-09.htm";
st.setCond(3, true);
giveItems(player, SORIUS_LETTER, 1);
}
else if ((cond > 2) && (cond < 6))
{
htmltext = "30327-11.htm";
}
else if (cond == 6)
{
htmltext = "30327-10.htm";
takeItems(player, KLUTO_BOX, 1);
takeItems(player, KLUTO_MEMO, 1);
giveItems(player, ELVEN_KNIGHT_BROOCH, 1);
addExpAndSp(player, 3200, 2280);
player.broadcastPacket(new SocialAction(player.getObjectId(), 3));
st.exitQuest(true, true);
}
break;
}
case KLUTO:
{
if (cond == 3)
{
htmltext = "30317-01.htm";
}
else if (cond == 4)
{
htmltext = (!hasQuestItems(player, EMERALD_PIECE)) ? "30317-03.htm" : "30317-04.htm";
}
else if (cond == 5)
{
htmltext = "30317-05.htm";
st.setCond(6, true);
takeItems(player, EMERALD_PIECE, -1);
takeItems(player, TOPAZ_PIECE, -1);
giveItems(player, KLUTO_BOX, 1);
}
else if (cond == 6)
{
htmltext = "30317-06.htm";
}
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 20035:
case 20042:
case 20045:
case 20051:
case 20054:
case 20060:
{
if (st.isCond(1) && (getRandom(10) < 7))
{
if (getQuestItemsCount(player, TOPAZ_PIECE) < 20)
{
giveItems(player, TOPAZ_PIECE, 1);
if (getQuestItemsCount(player, TOPAZ_PIECE) >= 20)
{
st.setCond(2, true);
}
else
{
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
}
}
break;
}
case 20782:
{
if (st.isCond(4) && (getRandom(10) < 5))
{
if (getQuestItemsCount(player, EMERALD_PIECE) < 20)
{
giveItems(player, EMERALD_PIECE, 1);
if (getQuestItemsCount(player, EMERALD_PIECE) >= 20)
{
st.setCond(5, true);
}
else
{
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
}
}
break;
}
}
}
}