This commit is contained in:
mobius
2015-01-01 20:02:50 +00:00
parent eeae660458
commit a6a3718849
17894 changed files with 2818932 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
<html><body>Ghost of the Railroad Engineer:<br>
I am 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.<br>
If you don't mind, I ask you 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.<br>
<a action="bypass -h Quest Q00650_ABrokenDream 32054-03.htm">Agree to put them out of their misery.</a>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Ghost of the Railroad Engineer:<br>
If you were more experienced, I would ask a favor of you...<br>
(Only characters above level 39 who have cleared the Beyond the Sea of Stars quest can perform this quest.)
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Ghost of the Railroad Engineer:<br>
Thank you. Please help my poor fellow ghosts to rest in peace, even if only for a while...<br>
Some might share their <font color="LEVEL">dream fragments</font> with you as they expire, which may be informative.<br>
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...<br>
Oh, but watch out for Nellis. He and his followers have gone completely mad and there is no getting through to them.
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Ghost of the Railroad Engineer:<br>
How did you come to be here? I have nothing to tell you.<br>
(You must be above level 39 and have cleared the Beyond the Sea of Stars quest in order to perform this quest.)
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Ghost of the Railroad Engineer:<br>
Ah, you return...<br>
So, how did you fare with my fellow ghosts? Were any of them sane? No, never mind, I know it's no use asking. I suppose you helped some of my fellow ghosts achieve some peace... you did, didn't you?<br>
<a action="bypass -h Quest Q00650_ABrokenDream 32054-07.html">Yes.</a>
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Ghost of the Railroad Engineer:<br>
Thank you. Please help my poor fellow ghosts to rest in peace, even if only for a while...<br>
Some might share their <font color="LEVEL">dream fragments</font> with you as they expire, and they may be informative.<br>
If you give them peace, I will find some things among the keepsakes my friends left me that might be helpful to your quest and give them to you...<br>
Oh, but watch out for Nellis. He and his followers have gone completely mad. There is no getting through to them.
</body></html>

View File

@@ -0,0 +1,10 @@
<html><body>Ghost of the Railroad Engineer:<br>
Ah, that doesn't surprise me. Did any of the ghosts show you a dream fragment?<br>
What they showed you was our forgotten dream, the dream we tried to realize even after our death and failed, our hopeless dream...<br>
Well, that's how the world is. If you fail at achieving something in your lifetime, it is better to give it up than to carry the regret to your grave. What can I do as a ghost, other than to bother people like you?<br>
My poor friends... they had no idea that it would come to this.<br>
So, do you want to exchange that dream fragment for our keepsake? Or do you want to give up now? I am warning you in advance, the dream fragment is all but useless... <font color="LEVEL">If you tell me you want to give up, then I will simply fade away...</font><br>
<a action="bypass -h npc_%objectId%_multisell 320540001">Exchange the dream fragment for the keepsake.</a><br>
<a action="bypass -h Quest Q00650_ABrokenDream 32054-08.html">Say that you want to return with even more dream fragments.</a><br>
<a action="bypass -h Quest Q00650_ABrokenDream 32054-09.html">Say you want to give up.</a>
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Ghost of the Railroad Engineer:<br>
Really, you'll do this? It's going to be challenging, so good luck. Many of my friends are so looking forward to finally resting in peace...
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Ghost of the Railroad Engineer:<br>
Yes, I see. You have done enough. We should have realized that our dreams were foolish and unattainable. Sometimes we need an outsider to tell us when we've lost our perspective, when it's time to rest.<br>
Thank you. I wish you great blessings in your life of adventure.
</body></html>

View File

@@ -0,0 +1,178 @@
/*
* Copyright (C) 2004-2014 L2J DataPack
*
* This file is part of L2J DataPack.
*
* L2J DataPack is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* L2J DataPack is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package quests.Q00650_ABrokenDream;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import quests.Q00117_TheOceanOfDistantStars.Q00117_TheOceanOfDistantStars;
import com.l2jserver.gameserver.enums.QuestSound;
import com.l2jserver.gameserver.model.actor.L2Npc;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.quest.Quest;
import com.l2jserver.gameserver.model.quest.QuestState;
import com.l2jserver.gameserver.model.quest.State;
import com.l2jserver.gameserver.util.Util;
/**
* A Broken Dream (650)
* @author netvirus
*/
public final class Q00650_ABrokenDream extends Quest
{
// Npc
private static final int GHOST_OF_A_RAILROAD_ENGINEER = 32054;
// Item
private static final int REMNANTS_OF_OLD_DWARVES_DREAMS = 8514;
// Misc
private static final int MIN_LVL = 39;
// Monsters
private static final Map<Integer, Integer> MONSTER_DROP_CHANCES = new HashMap<>();
static
{
MONSTER_DROP_CHANCES.put(22027, 575); // Forgotten Crewman
MONSTER_DROP_CHANCES.put(22028, 515); // Vagabond of the Ruins
}
public Q00650_ABrokenDream()
{
super(650, Q00650_ABrokenDream.class.getSimpleName(), "A Broken Dream");
addStartNpc(GHOST_OF_A_RAILROAD_ENGINEER);
addTalkId(GHOST_OF_A_RAILROAD_ENGINEER);
addKillId(MONSTER_DROP_CHANCES.keySet());
registerQuestItems(REMNANTS_OF_OLD_DWARVES_DREAMS);
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
final QuestState st = getQuestState(player, false);
String htmltext = null;
if (st == null)
{
return htmltext;
}
switch (event)
{
case "32054-03.htm":
{
if (st.isCreated())
{
st.startQuest();
htmltext = event;
}
break;
}
case "32054-07.html":
case "32054-08.html":
{
if (st.isStarted())
{
htmltext = event;
}
break;
}
case "32054-09.html":
{
if (st.isStarted())
{
st.exitQuest(true, true);
htmltext = event;
}
break;
}
}
return htmltext;
}
@Override
public String onTalk(L2Npc npc, L2PcInstance player)
{
final QuestState st = getQuestState(player, true);
String htmltext = getNoQuestMsg(player);
if (st == null)
{
return htmltext;
}
switch (st.getState())
{
case State.CREATED:
{
if (player.getLevel() < MIN_LVL)
{
htmltext = "32054-02.htm";
}
else
{
final QuestState q117 = player.getQuestState(Q00117_TheOceanOfDistantStars.class.getSimpleName());
htmltext = (q117 != null) && q117.isCompleted() ? "32054-01.htm" : "32054-04.htm";
}
break;
}
case State.STARTED:
{
htmltext = st.hasQuestItems(REMNANTS_OF_OLD_DWARVES_DREAMS) ? "32054-05.html" : "32054-06.html";
break;
}
}
return htmltext;
}
@Override
public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
{
final List<L2PcInstance> randomList = new ArrayList<>();
final QuestState st = getQuestState(killer, false);
if ((st != null) && st.isStarted())
{
randomList.add(killer);
randomList.add(killer);
}
final int monsterChance = MONSTER_DROP_CHANCES.get(npc.getId());
if (killer.isInParty())
{
for (L2PcInstance member : killer.getParty().getMembers())
{
final QuestState qs = getQuestState(member, false);
if ((qs != null) && qs.isStarted())
{
randomList.add(member);
}
}
}
if (!randomList.isEmpty())
{
final L2PcInstance player = randomList.get(getRandom(randomList.size()));
if ((getRandom(1000) < monsterChance) && Util.checkIfInRange(1500, npc, player, true))
{
giveItems(player, REMNANTS_OF_OLD_DWARVES_DREAMS, 1);
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
}
return super.onKill(npc, killer, isSummon);
}
}