Walk of Fate
- ID
- 112
- Название
- Walk of Fate
- start_npcs_json
- [30572]
- npc_ids_json
- [30572,32017]
- constants_json
- {"LIVINA":30572,"KARUDA":32017,"ENCHANT_D":956}
- Статус разбора
- metadata_only; dynamic Java conditions/rewards retained in source; unresolved starts: []
- Источник
- game/data/scripts/quests/Q00112_WalkOfFate/Q00112_WalkOfFate.java
NPC квеста
Условия уровней: выражения из Java
htmltext = (player.getLevel() < 20) ? "30572-00.htm" : "30572-01.htm";
Выдача предметов, адены и опыта: выражения из Java
giveItems(player, ENCHANT_D, 1); giveAdena(player, 4665, true);
Квесты содержат динамические условия Java. Выражения выдачи включают промежуточные предметы, варианты и случайные награды; это не гарантированная награда. Константы приведены выше. Полные условия — в исходнике.
Тексты квеста
[30572-00.htm] Seer Livina: What's your business here? (This quest may only be undertaken by a character of level 20 and above.)
[30572-01.htm] Seer Livina: Come in! I've been waiting for you. I knew you were coming! It's the will of Pa'agrio. You won't feel it, but I can feel a very positive energy from far beyond the eastern horizon! Could you check out what's going on over there? I know I'm being vague like most psychics are, but please trust me. "I'll do it."
[30572-02.htm] Seer Livina: Alas, fate isn't to be trifled with! To the east of here, there's a passage from the Cave of Trials to the Valley of the Lords. Take that passage towards the Crypts of Disgrace where the Orcs are buried. You'll meet someone named Karuda. Tell him to come to me and give me a status report!
[30572-03.htm] Seer Livina: You haven't left yet? You will soon go there as dictated by your fate. Go to the Crypts of Disgrace and meet Karuda.
[32017-01.htm] Karuda: You came to inquire after Livina? She is mostly all right, there is a small problem, but it's nothing serious. I was asked to find out how she is.
[32017-02.htm] Karuda: Well, I'll tell you what: why don't you go ask Moira? He can tell you what's happening. I do thank you for your trouble in coming all this way, though. Here, take this - it isn't much, but it will buy you a drink to wash away the dust of the road. If you are not engaged in some other task, please return later. I may have a job for you.
Исходник условий и наград (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.Q00112_WalkOfFate;
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 Q00112_WalkOfFate extends Quest
{
// NPCs
private static final int LIVINA = 30572;
private static final int KARUDA = 32017;
// Rewards
private static final int ENCHANT_D = 956;
public Q00112_WalkOfFate()
{
super(112, "Walk of Fate");
addStartNpc(LIVINA);
addTalkId(LIVINA, KARUDA);
}
@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("30572-02.htm"))
{
st.startQuest();
}
else if (event.equals("32017-02.htm"))
{
giveItems(player, ENCHANT_D, 1);
giveAdena(player, 4665, 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() < 20) ? "30572-00.htm" : "30572-01.htm";
break;
}
case State.STARTED:
{
switch (npc.getId())
{
case LIVINA:
{
htmltext = "30572-03.htm";
break;
}
case KARUDA:
{
htmltext = "32017-01.htm";
break;
}
}
break;
}
case State.COMPLETED:
{
htmltext = getAlreadyCompletedMsg(player);
break;
}
}
return htmltext;
}
}