Curse of the Underground Fortress
- ID
- 162
- Название
- Curse of the Underground Fortress
- start_npcs_json
- [30147]
- npc_ids_json
- []
- constants_json
- {"BONE_FRAGMENT":1158,"ELF_SKULL":1159,"BONE_SHIELD":625}
- Статус разбора
- metadata_only; dynamic Java conditions/rewards retained in source; unresolved starts: []
- Источник
- game/data/scripts/quests/Q00162_CurseOfTheUndergroundFortress/Q00162_CurseOfTheUndergroundFortress.java
NPC квеста
Записей нет.
Условия уровней: выражения из Java
else if (player.getLevel() < 12)
Выдача предметов, адены и опыта: выражения из Java
giveItems(player, BONE_SHIELD, 1); giveAdena(player, 24000, true); giveItems(killer, ELF_SKULL, 1); giveItems(killer, BONE_FRAGMENT, 1);
Квесты содержат динамические условия Java. Выражения выдачи включают промежуточные предметы, варианты и случайные награды; это не гарантированная награда. Константы приведены выше. Полные условия — в исходнике.
Тексты квеста
[30147-00.htm] Trader Unoren: You should be careful while walking the streets of this town, young Dark Elf. Though no harm will reach you thanks to the truce agreement, remember that my brothers will not look kindly upon you. We have not forgiven the race of dark for the cruel acts committed a thousand years ago to our race. (Not available for Dark Elven characters.)
[30147-01.htm] Trader Unoren: Did you know? The most intense battle against the evil Dark Elves took place in the Underground Fortress, which is now full of monsters. I was there when the last battle took place and still remember it vividly. I was so frightened that I thought only of my own safety, and left behind my screaming fellow soldiers as I ran away from the battle. The deep sorrow and tears of those who died then acted as a powerful curse, and the corpses resurrected as undead. I should have chosen death like my fellow soldiers ... I am so ashamed that I am still alive ... I am so ashamed that I cannot even look up at the heavens ... I wish to break the curse so that my friends may rest in peace in the afterlife. I will still not be forgiven for my sins against them, but I don't think I could ever live without doing something. Along with Sorcerer Esrandell, my long time friend, we are researching methods to counter the curse of the Underground Fortress, but we have yet to find an answer. When we find a method in the future, I would like to ask your help. (This quest may only be undertaken by any character, except Dark Elf, of level 12 and above.)
[30147-02.htm] Trader Unoren: Did you know? The most intense battle against the evil Dark Elves took place in the Underground Fortress, which is now full of monsters. I was there when the last battle took place and still remember it vividly. I was so frightened that I thought only of my own safety, and left behind my screaming fellow soldiers as I ran away from the battle. The deep sorrow and tears of those who died then acted as a powerful curse, and the corpses resurrected as undead. I should have chosen death like my fellow soldiers ... I am so ashamed that I am still alive ... I am so ashamed that I cannot even look up at the heavens ... I wished to break the curse so that my friends could peacefully rest in the afterlife, and I have spent a long time with my old friend Sorcerer Esrandell, researching ways to counter the curse of the Underground Fortress. We have only recently discovered a method. Ask about the studies
[30147-03.htm] Trader Unoren: According to my friend Magister Esrandell, the curse originated from the despair of the dead soldiers. But the curse continued because of the power of black magic that surrounds the Underground Fortress. They say that the residual black magic of those dirty Dark Elves, and the power of the dark spirits that they summoned, seeped into the foundations of the fortress. There are even preposterous rumors that our proud Elven Mystics of light also used forbidden black magic in order to achieve victory over the Dark Elves ... Anyhow, strong black magic powers still surround that place. After a long period of research, we have found an answer. If this force is neutralized, we should be able to counter the curse. First, my long time friend Magister Esrandell says that he needs a Complete Skeleton of an undead monster in order to identify the black energy that abounds in the fortress. I would like you to travel to the abandoned Underground Fortress and bring me Bone Fragments and skulls of the undead. If you would help me lessen my burden, I will reward you handsomely. Say you will do the favor
[30147-04.htm] Trader Unoren: I give you my deepest gratitude. Go immediately to the Underground Fortress and bring me ten undead Bone Fragments and three Elf Skulls. The skulls must be whole and intact, with no flaws. According to Magister Esrandell, flawless and unscarred Elf Skulls may only be obtained from the monsters called the dark terrors. Dark terror, mist terror and shade horror ... they are all related. I wish to present my fellow soldiers, who have suffered long enough, with eternal peace as soon as possible. Please. Hurry.
[30147-05.htm] Trader Unoren: I wish to present my fellow soldiers, who have suffered long enough, with eternal peace as soon as possible. Go to the Elven Underground Fortress to hunt the undead monsters, and bring me ten bone fragments and three Elf skulls. Please. Hurry.
[30147-06.htm] Trader Unoren: Thank you. Now all that is left is to figure out the origin of the black magic energy from the fortress. My old friend Magister Esrandell will also thank you, I'm sure. Please pray that we may send the souls of my fallen fellows into the arms of Eva. Please, take this. This is in gratitude for your work to bring eternal peace to our brothers who died for the future of our race. May honor and the spirits of the forest guide you on your path.
Исходник условий и наград (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.Q00162_CurseOfTheUndergroundFortress;
import java.util.HashMap;
import java.util.Map;
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 Q00162_CurseOfTheUndergroundFortress extends Quest
{
// Items
private static final int BONE_FRAGMENT = 1158;
private static final int ELF_SKULL = 1159;
// Rewards
private static final int BONE_SHIELD = 625;
// Drop chances
private static final Map<Integer, Integer> MONSTERS_SKULLS = new HashMap<>();
private static final Map<Integer, Integer> MONSTERS_BONES = new HashMap<>();
static
{
MONSTERS_SKULLS.put(20033, 25); // Shade Horror
MONSTERS_SKULLS.put(20345, 26); // Dark Terror
MONSTERS_SKULLS.put(20371, 23); // Mist Terror
MONSTERS_BONES.put(20463, 25); // Dungeon Skeleton Archer
MONSTERS_BONES.put(20464, 23); // Dungeon Skeleton
MONSTERS_BONES.put(20504, 26); // Dread Soldier
}
public Q00162_CurseOfTheUndergroundFortress()
{
super(162, "Curse of the Underground Fortress");
registerQuestItems(BONE_FRAGMENT, ELF_SKULL);
addStartNpc(30147); // Unoren
addTalkId(30147);
addKillId(MONSTERS_SKULLS.keySet());
addKillId(MONSTERS_BONES.keySet());
}
@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("30147-04.htm"))
{
st.startQuest();
}
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.DARK_ELF)
{
htmltext = "30147-00.htm";
}
else if (player.getLevel() < 12)
{
htmltext = "30147-01.htm";
}
else
{
htmltext = "30147-02.htm";
}
break;
}
case State.STARTED:
{
final int cond = st.getCond();
if (cond == 1)
{
htmltext = "30147-05.htm";
}
else if (cond == 2)
{
htmltext = "30147-06.htm";
takeItems(player, ELF_SKULL, -1);
takeItems(player, BONE_FRAGMENT, -1);
giveItems(player, BONE_SHIELD, 1);
giveAdena(player, 24000, true);
st.exitQuest(false, true);
}
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 (MONSTERS_SKULLS.containsKey(npc.getId()))
{
if (getRandom(100) < MONSTERS_SKULLS.get(npc.getId()))
{
long skulls = getQuestItemsCount(killer, ELF_SKULL);
if (skulls < 3)
{
giveItems(killer, ELF_SKULL, 1);
if (((++skulls) >= 3) && (getQuestItemsCount(killer, BONE_FRAGMENT) >= 10))
{
qs.setCond(2, true);
}
else
{
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
}
}
}
else if (MONSTERS_BONES.containsKey(npc.getId()) && (getRandom(100) < MONSTERS_BONES.get(npc.getId())))
{
long bones = getQuestItemsCount(killer, BONE_FRAGMENT);
if (bones < 10)
{
giveItems(killer, BONE_FRAGMENT, 1);
if (((++bones) >= 10) && (getQuestItemsCount(killer, ELF_SKULL) >= 3))
{
qs.setCond(2, true);
}
else
{
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
}
}
}
}
}