Sweet Whispers
- ID
- 15
- Название
- Sweet Whispers
- start_npcs_json
- [31302]
- npc_ids_json
- [31302,31517,31518]
- constants_json
- {"VLADIMIR":31302,"HIERARCH":31517,"MYSTERIOUS_NECRO":31518}
- Статус разбора
- metadata_only; dynamic Java conditions/rewards retained in source; unresolved starts: []
- Источник
- game/data/scripts/quests/Q00015_SweetWhispers/Q00015_SweetWhispers.java
NPC квеста
Условия уровней: выражения из Java
htmltext = (player.getLevel() < 60) ? "31302-00a.htm" : "31302-00.htm";
Выдача предметов, адены и опыта: выражения из Java
addExpAndSp(player, 60217, 0);
Квесты содержат динамические условия Java. Выражения выдачи включают промежуточные предметы, варианты и случайные награды; это не гарантированная награда. Константы приведены выше. Полные условия — в исходнике.
Тексты квеста
[31302-00.htm] Trader Vladimir: The world is very unsettled these days. Would you be interested in a unique kind of power? Quest
[31302-00a.htm] Trader Vladimir: I think it is too early for you to help me. Come back after you have gained some more experience. (This quest may only be undertaken by a character of level 60 and above.)
[31302-01.htm] Trader Vladimir: Excellent, I'll tell you what to do. Find the mysterious Necromancer at the entrance to the Valley of Saints. He'll help you test your fate. Look for someone from my guild if you should need help.
[31302-01a.htm] Trader Vladimir: Find the mysterious Necromancer at the entrance to the Valley of Saints. He'll help you test your fate.
[31517-00.htm] Hierarch: What are you doing here? We don't let just anybody in here! "Vladimir sent me."
[31517-01.htm] Hierarch: Oh, he sent you! Fine! We'll be working together then! Your first task will only be a test. After I assess your ability, I'll assign you a mission that's more appropriate for you. Come back later.
[31518-00.htm] Mysterious Necromancer: What business do you have here? What do you want from me? "I want to change my ways."
[31518-01.htm] Mysterious Necromancer: Ah! You're looking for the elder too, aren't you? Lots of folks looking for him these days... This is getting old! Do I look like a street sign to you? Anyway, past the Entrance of the Saints, you'll see the valley. Go to the deepest part of the valley and enter the cave. You'll find the elder there.
[31518-01a.htm] Mysterious Necromancer: Hmmph! I've already told you where to look for him! Past the Entrance of the Saints you'll see the valley. Go to the deepest part of the valley and enter the cave there. You'll find the elder that you seek.
Исходник условий и наград (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.Q00015_SweetWhispers;
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 Q00015_SweetWhispers extends Quest
{
// NPCs
private static final int VLADIMIR = 31302;
private static final int HIERARCH = 31517;
private static final int MYSTERIOUS_NECRO = 31518;
public Q00015_SweetWhispers()
{
super(15, "Sweet Whispers");
addStartNpc(VLADIMIR);
addTalkId(VLADIMIR, HIERARCH, MYSTERIOUS_NECRO);
}
@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 "31302-01.htm":
{
st.startQuest();
break;
}
case "31518-01.htm":
{
st.setCond(2, true);
break;
}
case "31517-01.htm":
{
addExpAndSp(player, 60217, 0);
st.exitQuest(false, true);
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 = (player.getLevel() < 60) ? "31302-00a.htm" : "31302-00.htm";
break;
}
case State.STARTED:
{
final int cond = st.getCond();
switch (npc.getId())
{
case VLADIMIR:
{
htmltext = "31302-01a.htm";
break;
}
case MYSTERIOUS_NECRO:
{
if (cond == 1)
{
htmltext = "31518-00.htm";
}
else if (cond == 2)
{
htmltext = "31518-01a.htm";
}
break;
}
case HIERARCH:
{
if (cond == 2)
{
htmltext = "31517-00.htm";
}
break;
}
}
break;
}
case State.COMPLETED:
{
htmltext = getAlreadyCompletedMsg(player);
break;
}
}
return htmltext;
}
}