Last Imperial Prince
- ID
- 119
- Название
- Last Imperial Prince
- start_npcs_json
- [31453]
- npc_ids_json
- [31453,32009]
- constants_json
- {"NAMELESS_SPIRIT":31453,"DEVORIN":32009,"ANTIQUE_BROOCH":7262}
- Статус разбора
- metadata_only; dynamic Java conditions/rewards retained in source; unresolved starts: []
- Источник
- game/data/scripts/quests/Q00119_LastImperialPrince/Q00119_LastImperialPrince.java
NPC квеста
Условия уровней: выражения из Java
htmltext = (!hasQuestItems(player, ANTIQUE_BROOCH) || (player.getLevel() < 74)) ? "31453-00a.htm" : "31453-01.htm";
Выдача предметов, адены и опыта: выражения из Java
giveAdena(player, 68787, true);
Квесты содержат динамические условия Java. Выражения выдачи включают промежуточные предметы, варианты и случайные награды; это не гарантированная награда. Константы приведены выше. Полные условия — в исходнике.
Тексты квеста
[31453-00a.htm] Nameless Spirit: What do you need? I don't have anything to talk to you about. (Only characters of at least level 74 who have obtained the Antique Brooch through the Four Goblets quest may undertake this quest.)
[31453-00b.htm] Nameless Spirit: Hmmm? You already brought me the song. We don't need to talk further. I just need to settle with him. (This quest has already been completed. Please move on to the next step, Journey to a Settlement.)
[31453-01.htm] Nameless Spirit: It's about time! I've learned where another me... no... where the once-me is! I never know what he will do next! I must eliminate him as soon as possible! Unfortunately, at our current strength we can only put him to sleep... But when he wakes up, we can put him right back to sleep, and prevent him from amassing more power! It's not perfect, but there's no other way! "Tell me more."
[31453-02.htm] Nameless Spirit: Well, I found out where he was hiding, but it already had a magic force field around it. According to Wigoth, the force field uses a song as its password. Therefore, we need a certain type of continuous wavelength to pass through the force field. I hate to say it, but I'm afraid I know him better than anyone else... The song he chose for his password is probably... "What?"
[31453-03.htm] Nameless Spirit: He probably used the lullaby I heard when I was young. That has to be it! When I was young, my parents were always busy, so I was practically raised by my nurse! Sometimes when I couldn't fall asleep, the nurse would just smile with a sultry look and sing a beautiful lullaby. I'll bet he used that lullaby as the password for the force field... Too many years have passed! I can remember the melody, but I can't remember the lyrics at all! Could you do me a favor? Would you please go to Rune Township? "I'll go."
[31453-04.htm] Nameless Spirit: Thank you! Honestly, I heard from an adventurer who stopped by that Nurse Devorin is still alive in Rune Township! If you don't mind, would you go meet with her and learn the lyrics of the lullaby? If you show Nurse Devorin the Antique Brooch, she'll know I sent you. Please, help me!
[31453-04a.htm] Nameless Spirit: Please, go to Rune Township, meet with Nurse Devorin and learn the lyrics of the lullaby! If you show her the Antique Brooch, she'll know I sent you. Please, help me!
[31453-04b.htm] Nameless Spirit: Please, go to Rune Township and meet with Nurse Devorin so you can learn the lyrics of the lullaby! Show her the Antique Brooch so she'll know that I sent you. Please... Help! ... What? You don't have the brooch? I must've made a mistake. I'm sorry! (The Antique Brooch is essential to this quest. Try again after you obtain it. This quest is terminated.)
[31453-05.htm] Nameless Spirit: Ah, you're back! How's Nurse Devorin doing? I just can't let her see me like this! Do you have the lyrics? "Here they are."
[31453-06.htm] Nameless Spirit: That's right! I remember now! "Sleep now, my child, my beautiful rose blossom... Sleep now, my child, till the morning comes..." ...... Sob! I'm sorry! It brings back such precious memories... "What are you going to do now?"
[31453-07.htm] Nameless Spirit: First I must ask Wigoth if this song will get me through the force field... Thanks for all your help! Please accept this... It isn't much, but it's a token of my appreciation. By the way, could you come back to see me? I'll need your help with something else...I"ll need to settle up with my twin Frintezza soon.
[32009-01.htm] Nurse Devorin: You asked for a lullaby? Who are you? There's only one person I ever sang a lullaby to... Show her the Antique Brooch.
[32009-02.htm] Nurse Devorin: What is this? Oh my, it's the prince's - no doubt about it! It may be old and worn, but there's no way my old eyes could ever forget this brooch. The prince must have sent you! Tell me, where is he now? Is he well? Explain the situation.
[32009-02a.htm] Nurse Devorin: What brooch did you say you were going to show me? I see no brooch. What are you playing at?
[32009-03.htm] Nurse Devorin: Ah. So the prince's past is coming back to haunt him, is it? Poor man! Poor child! I cannot offer much help, but I will do whatever I can for him. The words to the lullaby are: "Sleep now, child, a beautiful rose blossoms for you. Sleep now, child, till the morning comes to." My mother sang it to me; I sang it to him. Remember it, and tell it to him, if it can help him at all. I do miss him so.
[32009-04.htm] Nurse Devorin: Again, the words are: "Sleep now, child, a beautiful rose blossoms for you. Sleep now, child, till the morning comes to." Go tell him the words; help him.
Исходник условий и наград (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.Q00119_LastImperialPrince;
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 Q00119_LastImperialPrince extends Quest
{
// NPCs
private static final int NAMELESS_SPIRIT = 31453;
private static final int DEVORIN = 32009;
// Item
private static final int ANTIQUE_BROOCH = 7262;
public Q00119_LastImperialPrince()
{
super(119, "Last Imperial Prince");
registerQuestItems(ANTIQUE_BROOCH);
addStartNpc(NAMELESS_SPIRIT);
addTalkId(NAMELESS_SPIRIT, DEVORIN);
}
@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 "31453-04.htm":
{
if (hasQuestItems(player, ANTIQUE_BROOCH))
{
st.startQuest();
}
else
{
htmltext = "31453-04b.htm";
st.exitQuest(true);
}
break;
}
case "32009-02.htm":
{
if (!hasQuestItems(player, ANTIQUE_BROOCH))
{
htmltext = "31453-02a.htm";
st.exitQuest(true);
}
break;
}
case "32009-03.htm":
{
st.setCond(2, true);
break;
}
case "31453-07.htm":
{
giveAdena(player, 68787, true);
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 = (!hasQuestItems(player, ANTIQUE_BROOCH) || (player.getLevel() < 74)) ? "31453-00a.htm" : "31453-01.htm";
break;
}
case State.STARTED:
{
final int cond = st.getCond();
switch (npc.getId())
{
case NAMELESS_SPIRIT:
{
if (cond == 1)
{
htmltext = "31453-04a.htm";
}
else if (cond == 2)
{
htmltext = "31453-05.htm";
}
break;
}
case DEVORIN:
{
if (cond == 1)
{
htmltext = "32009-01.htm";
}
else if (cond == 2)
{
htmltext = "32009-04.htm";
}
break;
}
}
break;
}
case State.COMPLETED:
{
htmltext = "31453-00b.htm";
break;
}
}
return htmltext;
}
}