Legacy of the Poet
- ID
- 163
- Название
- Legacy of the Poet
- start_npcs_json
- [30220]
- npc_ids_json
- [30220]
- constants_json
- {"STARDEN":30220,"RUMIELS_1ST_POEM":1038,"RUMIELS_2ND_POEM":1039,"RUMIELS_3RD_POEM":1040,"RUMIELS_4TH_POEM":1041,"MIN_LEVEL":11}
- Статус разбора
- metadata_only; dynamic Java conditions/rewards retained in source; unresolved starts: []
- Источник
- game/data/scripts/quests/Q00163_LegacyOfThePoet/Q00163_LegacyOfThePoet.java
NPC квеста
| ID | Название | Старт квеста | Уровень |
|---|---|---|---|
| 30220 | Starden | Да | 80 |
Условия уровней: выражения из Java
private static final int MIN_LEVEL = 11; htmltext = (player.getRace() != Race.DARK_ELF) ? (player.getLevel() >= MIN_LEVEL) ? "30220-02.htm" : "30220-01.htm" : "30220-00.htm";
Выдача предметов, адены и опыта: выражения из Java
giveAdena(player, 13890, true); giveItems(killer, RUMIELS_1ST_POEM, 1); giveItems(killer, RUMIELS_2ND_POEM, 1); giveItems(killer, RUMIELS_3RD_POEM, 1); giveItems(killer, RUMIELS_4TH_POEM, 1);
Квесты содержат динамические условия Java. Выражения выдачи включают промежуточные предметы, варианты и случайные награды; это не гарантированная награда. Константы приведены выше. Полные условия — в исходнике.
Тексты квеста
[30220-00.htm] Sentinel Starden: If not for the peace talks, I would slay Dark Elves like yourself with a single blow! Child of darkness, beware! We Sentinels will be watching your every move! (Not available for Dark Elven characters.)
[30220-01.htm] Sentinel Starden: I am one of the warriors who fought in the underground dungeon battle during the war with the Dark Elves. My long time friend and companion, Rumiel, was killed in that battle. Not only was he an excellent warrior, but he was also a marvelous poet. Sadly, the beautiful poetry he wrote on the battlefield was lost during the last battle in the underground dungeons. One day I plan to go to the abandoned dungeon and recover my friend's legacy. It would be nice if you could help. (This quest may be undertaken by any character (other than Dark Elf characters) of level 11 or higher.)
[30220-02.htm] Sentinel Starden: According to legend, the Eldarin of the beginning of the world -- or the 'Gods,' as the Humans call them, created various races and gave each race different knowledge. The Orcs received the art of war from Pa'agrio, the Dwarves trade and craftsmanship from Maphr, and we received poetry and songs from Eva. The other races hold our Elven magic and archery in high regard, but I think that the greatest achievement of the brothers of the forest is the culture and music that we have developed over thousands of years. I have been trained as a Sentinel, protector of the forest, but I spend my spare time composing and writing poetry. Though my poems are not good enough to recite to others. But it was a different case for my old time friend and colleague, Rumiel Moonshine. He was a warrior with the heart of a poet. The short poems that he recorded in the life and death situations of the battlefield were a great comfort to our sentinel brothers who were weary of fighting. His voice, which sang of the beauty of the forest, the wind and the springs, made us remember what we were fighting for. Ask about Rumiel
[30220-03.html] Sentinel Starden: During the fiercest battle with the Dark Elves, Rumiel and I, along with a few dozen sentinel brothers, faced the Dark Elves that had surrounded our fortress. The Dark Elves did not engage in direct battle but used hit and run tactics, slowly tiring us out. Rumiel was in the most pain during that time. The battle had deeply scarred his sensitive soul. During the siege in the Underground Fortress, Rumiel composed five poems. It was the most beautiful poetry I had ever heard -- poems that turned the fear and despair of that time into verses. Ask about the five poems
[30220-04.html] Sentinel Starden: Unfortunately all of those five poems were lost. We were defeated in the siege of the Underground Fortress, and three Sentinels, including myself, barely managed to escape with our lives. But Rumiel was killed in that battle. The sheepskin scrolls where his poems were written were lost, along with him. Some time ago I went to the abandoned dungeons to recover my friend's work. But I only managed to find one of Rumiel's five scrolls. I want to go to the dungeons again to look for the rest of the scrolls, but I cannot leave my post due to the recent battles with the Orcs of the Misty Mountains. I desperately want to recover my friend's legacy, and am frustrated because I cannot. Do you think you could go to the Underground Fortress and find the scrolls where Rumiel wrote his poems? Say you will do the favor
[30220-05.htm] Sentinel Starden: Thank you. Go to the Elven Underground Fortress and find the remaining four scrolls. I have discovered his second poem already. What you must find are the scrolls containing his first, third, fourth and fifth poems. I think that the foolish baraq orcs that live in the ruins may have mistaken Rumiel's scrolls for magic scrolls and hidden them. I implore you! I am certain that the cultural wealth of our race will become richer with the recovery of Rumiel's poems.
[30220-06.html] Sentinel Starden: I see, so you haven't recovered all of Rumiel's poems yet. Travel along the southwestern path of the village and you will reach the Underground Fortress. Please recover Rumiel's four scrolls from the lowly race that lives there. I implore you!
[30220-07.html] Sentinel Starden: So you have recovered all of Rumiel's poems. Now I can read my friend's poetry once again. I plan to put these together with the other poems that Rumiel wrote and publish a Poetry Book. Now my Elven brothers may also enjoy Rumiel's fine poetry. This is the only thing I can do for Rumiel, whom I could not save in battle. Please accept this. This is for your work in recovering the scrolls. May the blessings of the starlight fall upon you.
Исходник условий и наград (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.Q00163_LegacyOfThePoet;
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;
/**
* Legacy of the Poet (163)
* @author xban1x
*/
public class Q00163_LegacyOfThePoet extends Quest
{
// NPC
private static final int STARDEN = 30220;
// Monsters
private static final int[] MONSTERS =
{
20372, // Baraq Orc Fighter
20373, // Baraq Orc Warrior Leader
};
// Items
private static final int RUMIELS_1ST_POEM = 1038;
private static final int RUMIELS_2ND_POEM = 1039;
private static final int RUMIELS_3RD_POEM = 1040;
private static final int RUMIELS_4TH_POEM = 1041;
// Misc
private static final int MIN_LEVEL = 11;
public Q00163_LegacyOfThePoet()
{
super(163, "Legacy of the Poet");
addStartNpc(STARDEN);
addTalkId(STARDEN);
addKillId(MONSTERS);
registerQuestItems(RUMIELS_1ST_POEM, RUMIELS_2ND_POEM, RUMIELS_3RD_POEM, RUMIELS_4TH_POEM);
}
@Override
public String onEvent(String event, Npc npc, Player player)
{
final QuestState qs = getQuestState(player, false);
String htmltext = null;
if (qs != null)
{
switch (event)
{
case "30220-03.html":
case "30220-04.html":
{
htmltext = event;
break;
}
case "30220-05.htm":
{
qs.startQuest();
htmltext = event;
break;
}
}
}
return htmltext;
}
@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.getRace() != Race.DARK_ELF) ? (player.getLevel() >= MIN_LEVEL) ? "30220-02.htm" : "30220-01.htm" : "30220-00.htm";
break;
}
case State.STARTED:
{
if (hasQuestItems(player, RUMIELS_1ST_POEM, RUMIELS_2ND_POEM, RUMIELS_3RD_POEM, RUMIELS_4TH_POEM))
{
giveAdena(player, 13890, true);
qs.exitQuest(false, true);
htmltext = "30220-07.html";
}
else
{
htmltext = "30220-06.html";
}
break;
}
case State.COMPLETED:
{
htmltext = getAlreadyCompletedMsg(player);
break;
}
}
return htmltext;
}
@Override
public void onKill(Npc npc, Player killer, boolean isSummon)
{
final QuestState qs = getQuestState(killer, false);
if ((qs != null) && qs.isCond(1))
{
if ((getRandom(10) == 0) && !hasQuestItems(killer, RUMIELS_1ST_POEM))
{
giveItems(killer, RUMIELS_1ST_POEM, 1);
if (hasQuestItems(killer, RUMIELS_2ND_POEM, RUMIELS_3RD_POEM, RUMIELS_4TH_POEM))
{
qs.setCond(2, true);
}
else
{
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
}
if ((getRandom(10) > 7) && !hasQuestItems(killer, RUMIELS_2ND_POEM))
{
giveItems(killer, RUMIELS_2ND_POEM, 1);
if (hasQuestItems(killer, RUMIELS_1ST_POEM, RUMIELS_3RD_POEM, RUMIELS_4TH_POEM))
{
qs.setCond(2, true);
}
else
{
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
}
if ((getRandom(10) > 7) && !hasQuestItems(killer, RUMIELS_3RD_POEM))
{
giveItems(killer, RUMIELS_3RD_POEM, 1);
if (hasQuestItems(killer, RUMIELS_1ST_POEM, RUMIELS_2ND_POEM, RUMIELS_4TH_POEM))
{
qs.setCond(2, true);
}
else
{
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
}
if ((getRandom(10) > 5) && !hasQuestItems(killer, RUMIELS_4TH_POEM))
{
giveItems(killer, RUMIELS_4TH_POEM, 1);
if (hasQuestItems(killer, RUMIELS_1ST_POEM, RUMIELS_2ND_POEM, RUMIELS_3RD_POEM))
{
qs.setCond(2, true);
}
else
{
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
}
}
}
}