Status of the Beacon Tower
- ID
- 113
- Название
- Status of the Beacon Tower
- start_npcs_json
- [31979]
- npc_ids_json
- [31979,32016]
- constants_json
- {"MOIRA":31979,"TORRANT":32016,"BOX":8086}
- Статус разбора
- metadata_only; dynamic Java conditions/rewards retained in source; unresolved starts: []
- Источник
- game/data/scripts/quests/Q00113_StatusOfTheBeaconTower/Q00113_StatusOfTheBeaconTower.java
NPC квеста
Условия уровней: выражения из Java
htmltext = (player.getLevel() < 40) ? "31979-00.htm" : "31979-01.htm";
Выдача предметов, адены и опыта: выражения из Java
giveItems(player, BOX, 1); giveAdena(player, 21578, true);
Квесты содержат динамические условия Java. Выражения выдачи включают промежуточные предметы, варианты и случайные награды; это не гарантированная награда. Константы приведены выше. Полные условия — в исходнике.
Тексты квеста
[31979-00.htm] Seer Moira: Oh, my poor adventurer! I don't feel the blessing of Pa'agrio's coming from you. Why don't you come back when you've had more experience? (This quest may only be undertaken by a character of level 40 and above.)
[31979-01.htm] Seer Moira: You are under the protection of Pa'agrio! I trust you. Please go to the Beacon Tower at the Den of Evil and take this box with you. "Why the Beacon Tower?"
[31979-02.htm] Seer Moira: I don't know why, but the power from the Beacon Tower is weakening. They must be unable to light it! Take this box containing the power of fire to Beacon Tower Manager Torrant.
[31979-03.htm] Seer Moira: Hurry up! Go see Beacon Tower Manager Torrant and give this to him.
[32016-01.htm] Beacon Tower Manager Torrant: So, Moira asked you to come? What is that you have there? A box containing the Fire of Holy Spirit? Great! The fire was weakening because of the weird energy in this area. Give me the box at once! "Here it is."
[32016-02.htm] Beacon Tower Manager Torrant: All right. I have the box. You've come a long way and I know it's not much, but please accept this reward.
Исходник условий и наград (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.Q00113_StatusOfTheBeaconTower;
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;
public class Q00113_StatusOfTheBeaconTower extends Quest
{
// NPCs
private static final int MOIRA = 31979;
private static final int TORRANT = 32016;
// Item
private static final int BOX = 8086;
public Q00113_StatusOfTheBeaconTower()
{
super(113, "Status of the Beacon Tower");
registerQuestItems(BOX);
addStartNpc(MOIRA);
addTalkId(MOIRA, TORRANT);
}
@Override
public String onEvent(String event, Npc npc, Player player)
{
final String htmltext = event;
final QuestState st = player.getQuestState(getName());
if (st == null)
{
return htmltext;
}
if (event.equals("31979-02.htm"))
{
st.startQuest();
giveItems(player, BOX, 1);
}
else if (event.equals("32016-02.htm"))
{
takeItems(player, BOX, 1);
giveAdena(player, 21578, true);
st.exitQuest(false, true);
}
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 = (player.getLevel() < 40) ? "31979-00.htm" : "31979-01.htm";
break;
}
case State.STARTED:
{
switch (npc.getId())
{
case MOIRA:
{
htmltext = "31979-03.htm";
break;
}
case TORRANT:
{
htmltext = "32016-01.htm";
break;
}
}
break;
}
case State.COMPLETED:
{
htmltext = getAlreadyCompletedMsg(player);
break;
}
}
return htmltext;
}
}