A Broken Dream
- ID
- 650
- Название
- A Broken Dream
- start_npcs_json
- [32054]
- npc_ids_json
- [22027,22028,32054]
- constants_json
- {"GHOST":32054,"CREWMAN":22027,"VAGABOND":22028,"DREAM_FRAGMENT":8514}
- Статус разбора
- metadata_only; dynamic Java conditions/rewards retained in source; unresolved starts: []
- Источник
- game/data/scripts/quests/Q00650_ABrokenDream/Q00650_ABrokenDream.java
NPC квеста
| ID | Название | Старт квеста | Уровень |
|---|---|---|---|
| 22027 | Forgotten Crewman | Нет | 39 |
| 22028 | Vagabond of the Ruins | Нет | 40 |
| 32054 | Ghost of a Railroad Engineer | Да | 70 |
Условия уровней: выражения из Java
if ((st2 != null) && st2.isCompleted() && (player.getLevel() >= 39))
Выдача предметов, адены и опыта: выражения из Java
giveItems(player, DREAM_FRAGMENT, 1);
Квесты содержат динамические условия Java. Выражения выдачи включают промежуточные предметы, варианты и случайные награды; это не гарантированная награда. Константы приведены выше. Полные условия — в исходнике.
Тексты квеста
[32054-00.htm] Ghost of a Railroad Engineer: How did you come to be here? I have nothing to tell you. (This quest may only be undertaken by a character of level 39 and above who has cleared The Ocean of Distant Stars quest.)
[32054-01.htm] Ghost of a Railroad Engineer: I'm sure you've heard, but...we, the ghosts of this station, are all unhappy souls who have gone mad because we are unable to hold a hammer or do any work. We were members of the Grey Pillar Guild, and as such, we wanted to reach the stars. If you don't mind, I ask to give the ghosts a merciful end. They are dead already so you can't really kill them, but if you make them fall, they will finally be at peace. Agree to put them out of their misery.
[32054-01a.htm] Ghost of a Railroad Engineer: Thank you. Please help my poor fellow ghosts to rest in peace, even if only for a while... Some might share their dream fragments with you as they expire, which may be informative. If you give them peace, I will find some things among the keepsakes my friends left me that may be helpful to your quest and give them to you... Oh, but watch out for Nellis. He and his followers have gone completely mad and there is no getting through to them.
[32054-02.htm] Ghost of a Railroad Engineer: Ah, you return... So, how did you fare with my fellow ghosts? Were any of them sane? No, nevermind, I know it's no use asking. I suppose you helped some of my fellow ghosts achieve some peace... you did, didn't you? "Yes."
[32054-03.htm] Ghost of a Railroad Engineer: Wonderful, you found some of their dream fragments! Would you dare to exchange them for some useful items? "I want to exchange them." "I wish to stop."
[32054-04.htm] Ghost of a Railroad Engineer: Mh... it seems you still didn't find any dream fragment. Please help my poor fellow ghosts to rest in peace, even if only for a while... Some might share their dream fragments with you as they expire. Or perhaps do you prefer to stop to help me? I could understand. "I will continue to help you." "I wish to stop."
[32054-05.htm] Ghost of a Railroad Engineer: I found hope in your precious help! Thanks again, and speak back to me if you want to help us anew.
[32054-06.htm] Ghost of a Railroad Engineer: I find hope in your precious help! I will wait you here.
Исходник условий и наград (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.Q00650_ABrokenDream;
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.QuestSound;
import org.l2jmobius.gameserver.mechanics.script.QuestState;
import org.l2jmobius.gameserver.mechanics.script.State;
import quests.Q00117_TheOceanOfDistantStars.Q00117_TheOceanOfDistantStars;
public class Q00650_ABrokenDream extends Quest
{
// NPC
private static final int GHOST = 32054;
// Monsters
private static final int CREWMAN = 22027;
private static final int VAGABOND = 22028;
// Item
private static final int DREAM_FRAGMENT = 8514;
public Q00650_ABrokenDream()
{
super(650, "A Broken Dream");
registerQuestItems(DREAM_FRAGMENT);
addStartNpc(GHOST);
addTalkId(GHOST);
addKillId(CREWMAN, VAGABOND);
}
@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 "32054-01a.htm":
{
st.startQuest();
break;
}
case "32054-03.htm":
{
if (!hasQuestItems(player, DREAM_FRAGMENT))
{
htmltext = "32054-04.htm";
}
break;
}
case "32054-05.htm":
{
st.exitQuest(true, 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:
{
final QuestState st2 = player.getQuestState(Q00117_TheOceanOfDistantStars.class.getSimpleName());
if ((st2 != null) && st2.isCompleted() && (player.getLevel() >= 39))
{
htmltext = "32054-01.htm";
}
else
{
htmltext = "32054-00.htm";
st.exitQuest(true);
}
break;
}
case State.STARTED:
{
htmltext = "32054-02.htm";
break;
}
}
return htmltext;
}
@Override
public void onKill(Npc npc, Player player, boolean isPet)
{
final QuestState st = getQuestState(player, false);
if ((st == null) || !st.isStarted())
{
return;
}
if (getRandom(100) < 25)
{
giveItems(player, DREAM_FRAGMENT, 1);
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
}
}