Quest Letters from the Queen: Forest of the Dead (10792).

Contributed by gigilo1968.
This commit is contained in:
MobiusDev 2016-02-25 20:13:09 +00:00
parent b29c0a8df7
commit df69128073
25 changed files with 372 additions and 4 deletions

View File

@ -49700,3 +49700,7 @@ INSERT INTO `spawnlist` VALUES
-- Dokara
INSERT INTO `spawnlist` VALUES
("Swamp of Screams", 1, 33847, 69540, -50392, -3292, 0, 0, 10000, 60, 0, 0, 0);
-- Hatuba
INSERT INTO `spawnlist` VALUES
("ForestOfTheDead", 1, 33849, 52480, -54127, -3090, 0, 0, 32600, 60, 0, 0, 0);

View File

@ -0,0 +1,6 @@
<html><body>Tracker Dokara:<br>
The Steel Door Guild tops all Dwarven guilds in power and prestige. As such, it is our duty to aid adventures who work to restore peace unto this war-torn land. We will be happy to offer special assistance if you have Steel Door Guild Coins.<br>
Well?<br>
<button align="left" icon="NORMAL" action="bypass -h npc_%objectId%_Chat 2">"How do I use Steel Door Guild Coins?"</button>
<button align="left" icon="NORMAL" action="bypass -h npc_%objectId%_Chat 3">"Here, I have some Steel Door Guild Coins."</button>
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Tracker Dokara:<br>
You can use Steel Door Guild Coins to purchase virious items. These items will be more than enough to help you on your journey.
<button align="left" icon="RETURN" action="bypass -h npc_%objectId%_Chat 1">Back</button>
</body></html>

View File

@ -0,0 +1,5 @@
<html><body>Tracker Dokara:<br>
You can purchase various items with Steel Door Guild Coins.<br>
Well?<br>
<button align="left" icon="NORMAL" action="bypass -h npc_%objectId%_multisell 3386601">"I want to buy some things."</button>
</body></html>

View File

@ -3,6 +3,7 @@
<body>Tracker Dokara:
<br>
What's your business here?<br>
<button align="left" icon="NORMAL" action="bypass -h npc_%objectId%_Chat 1">"I want to use some Steel Door Guild Coins".</button>
<button align="left" icon="quest" action="bypass -h npc_%objectId%_Quest">Quest</button>
</body>
</html>

View File

@ -0,0 +1,7 @@
<html><head><body>
Tracker Hatuba:<br>
The Steel Door Guild tops all Dwarven guilds in power and prestige. As such, it is our duty to aid adventurers who work to restore peace unto this war-torn land. We will be happy to offer special assistance if you have Steel Door Guild Coins.<br>
Well?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Chat 2">"How do I use Steel Door Guild Coins?"</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Chat 3">"I want to use Steel Door Guild Coins."</Button>
</body></html>

View File

@ -0,0 +1,5 @@
<html><head><body>
Tracker Hatuba:<br>
You can use Steel Door Guild Coins to purchase various items. These items will be more than enough to help you on your journey.<br>
<Button ALIGN=LEFT ICON="RETURN" action="bypass -h npc_%objectId%_Chat 1">Back</Button>
</body></html>

View File

@ -0,0 +1,6 @@
<html><head><body>
Tracker Hatuba:<br>
You can purchase various items with Steel Door Guild Coins.<br>
Well?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_multisell 3386601">"I want to buy some things."</Button>
</body></head></html>

View File

@ -0,0 +1,6 @@
<html><head>
<body>Tracker Hatuba:<br>
Shh! Evil lingers in this forest.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Chat 1">"I want to use some Steel Door Guild Coins."
</Button> <Button ALIGN=LEFT ICON="QUEST" action="bypass -h npc_%objectId%_Quest">Quest</Button>
</body></html>

View File

@ -3,6 +3,8 @@
<npcs>
<npc>33866</npc> <!-- Novain -->
<npc>33867</npc> <!-- Shuvann -->
<npc>33847</npc> <!-- Tracker Dokara -->
<npc>33849</npc> <!-- Tracker Hatuba -->
</npcs>
<item>
<!-- Steel Door Guild Coins -->

View File

@ -27,6 +27,7 @@ import com.l2jmobius.gameserver.model.Location;
import com.l2jmobius.gameserver.model.actor.L2Character;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.base.ClassId;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.ListenerRegisterType;
import com.l2jmobius.gameserver.model.events.annotations.RegisterEvent;
@ -73,7 +74,8 @@ public class Q10789_LettersFromTheQueen_SwampOfScreams extends Quest implements
addStartNpc(INNOCENTIN);
addTalkId(INNOCENTIN, DOKARA);
addCondRace(Race.ERTHEIA, "noErtheia.html");
addCondMinLevel(MIN_LEVEL, "no_level.html");
addCondLevel(MIN_LEVEL, MAX_LEVEL, "no_level.html");
addCondClassId(ClassId.MARAUDER, "no_quest.html");
BypassHandler.getInstance().registerHandler(this);
}
@ -214,7 +216,7 @@ public class Q10789_LettersFromTheQueen_SwampOfScreams extends Quest implements
final L2PcInstance player = event.getActiveChar();
final int oldLevel = event.getOldLevel();
final int newLevel = event.getNewLevel();
if ((oldLevel == (newLevel - 1)) && (player.getLevel() >= MIN_LEVEL) && (player.getLevel() <= MAX_LEVEL) && (player.getRace() == Race.ERTHEIA))
if ((oldLevel == (newLevel - 1)) && (player.getLevel() >= MIN_LEVEL) && (player.getLevel() <= MAX_LEVEL) && (player.getRace() == Race.ERTHEIA) && (player.getClassId() == ClassId.MARAUDER))
{
final QuestState qs = getQuestState(player, false);
if (qs == null)
@ -230,7 +232,7 @@ public class Q10789_LettersFromTheQueen_SwampOfScreams extends Quest implements
public boolean useBypass(String command, L2PcInstance player, L2Character bypassOrigin)
{
final QuestState qs = getQuestState(player, false);
if ((qs != null) || (player.getLevel() < MIN_LEVEL) || (player.getLevel() > MAX_LEVEL) || (player.getRace() != Race.ERTHEIA))
if ((qs != null) || (player.getLevel() < MIN_LEVEL) || (player.getLevel() > MAX_LEVEL) || ((player.getRace() != Race.ERTHEIA) && (player.getClassId() != ClassId.MARAUDER)))
{
return false;
}

View File

@ -0,0 +1 @@
<html><body>You either don't meet this NPC's minimum quest requirements, or your level is too low to start this quest.</body></html>

View File

@ -0,0 +1,5 @@
<html><body>High Priest Innocentin:<br>
What brings you here?<br>
I'm just an empthy shell that can't hear the goddess' voice anymore.<br>
<button align="left" icon="normal" action="bypass -h Quest Q10792_LettersFromTheQueen_ForestOfTheDead 31328-02.htm">You asked for help from the Ertheia?</button>
</body></html>

View File

@ -0,0 +1,5 @@
<html><body>High Priest Innocentin:<br>
Oh, you are the Ertheia That the messengers promised would help us? Lately, we've had a lot of problems here in Rune Castle. We haven't been able to take care of everything because of the sheer amout.<br>
Do you think you can help us?<br>
<button align="left" icon="normal" action="bypass -h Quest Q10792_LettersFromTheQueen_ForestOfTheDead 31328-03.htm">I'll help.</button>
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>High Priest Innocentin:<br>
Thank you. I never thought that one of the Ertheia that only come out in legends would come to help us like this... It looks like the gods haven't forsaken us.<br>
First, go to the <font color=LEVEL>Forest of the Dead</font> and find <font color=LEVEL>Tracker Hatuba</font>. He will tell you the details.
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>High Priest Innocentin:<br>
I'm sure an Ertheia knows much better than us.<br>
First, go to the <font color=LEVEL>Forest of the Dead</font> and find <font color=LEVEL>Tracker Hatuba</font>. He will tell you the details.
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Tracker Hatuba:<br>
Who are you and why are you here?<br>
<button align="left" icon="normal" action="bypass -h Quest Q10792_LettersFromTheQueen_ForestOfTheDead 33849-02.htm">I have a message from High priest Innocentin.</button>
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Tracker Hatuba:<br>
Innocentin sent you? Hm. I did mention in passing that I needed some help. Looks like he hadn't forgotten.<br>
<button align="left" icon="normal" action="bypass -h Quest Q10792_LettersFromTheQueen_ForestOfTheDead 33849-03.html">Absolutely.</button>
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Tracker Hatuba:<br>
Good. They've sent us someone who could actually be of some help.<br>
(You can get next Letters from the Queen at Lv.70.)
</body></html>

View File

@ -0,0 +1,6 @@
<html><body>The Queen's Letter<br>
The Town of Rune asked for help.<br>
We are held by an oath to help. Go see <font color=LEVEL>High Priest Innocentin</font> in Town of Rune.<br>
He will tell you about the incidents in the Forest of the Dead.<br>
<button align="left" icon="quest" action="bypass -h Q10792_Teleport">Here I go!</button>
</body></html>

View File

@ -0,0 +1,273 @@
/*
* This file is part of the L2J Mobius project.
*
* This program 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.
*
* This program 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.Q10792_LettersFromTheQueen_ForestOfTheDead;
import com.l2jmobius.Config;
import com.l2jmobius.gameserver.ai.CtrlIntention;
import com.l2jmobius.gameserver.cache.HtmCache;
import com.l2jmobius.gameserver.enums.QuestSound;
import com.l2jmobius.gameserver.enums.Race;
import com.l2jmobius.gameserver.handler.BypassHandler;
import com.l2jmobius.gameserver.handler.IBypassHandler;
import com.l2jmobius.gameserver.model.Location;
import com.l2jmobius.gameserver.model.actor.L2Character;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.base.ClassId;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.ListenerRegisterType;
import com.l2jmobius.gameserver.model.events.annotations.RegisterEvent;
import com.l2jmobius.gameserver.model.events.annotations.RegisterType;
import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerLevelChanged;
import com.l2jmobius.gameserver.model.holders.ItemHolder;
import com.l2jmobius.gameserver.model.quest.Quest;
import com.l2jmobius.gameserver.model.quest.QuestState;
import com.l2jmobius.gameserver.model.quest.State;
import com.l2jmobius.gameserver.network.NpcStringId;
import com.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage;
import com.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage;
/**
* Letters from the Queen: Forest of the Dead (10792)
* @URL https://l2wiki.com/Letters_from_the_Queen:_Forest_of_the_Dead
* @author Gigi
*/
public class Q10792_LettersFromTheQueen_ForestOfTheDead extends Quest implements IBypassHandler
{
// NPCs
private static final int INNOCENTIN = 31328;
private static final int HATUBA = 33849;
// Items
private static final ItemHolder SCROLL_OF_ESCAPE_FOREST_OF_THE_DEAD = new ItemHolder(37031, 1);
private static final ItemHolder STEEL_DOOR_GUILD = new ItemHolder(37045, 91);
private static final ItemHolder EWA = new ItemHolder(729, 1);
// Reward
private static final int EXP_REWARD = 942690;
private static final int SP_REWARD = 226;
// Misc
private static final int MIN_LEVEL = 65;
private static final int MAX_LEVEL = 69;
// Teleport
private static final Location TP_LOC = new Location(36599, -49238, -1133);
private static final String[] TP_COMMANDS =
{
"Q10792_Teleport"
};
public Q10792_LettersFromTheQueen_ForestOfTheDead()
{
super(10792, Q10792_LettersFromTheQueen_ForestOfTheDead.class.getSimpleName(), "Letters from the Queen: ForestOfTheDead");
addStartNpc(INNOCENTIN);
addTalkId(INNOCENTIN, HATUBA);
addCondRace(Race.ERTHEIA, "noErtheia.html");
addCondLevel(MIN_LEVEL, MAX_LEVEL, "no_level.html");
addCondClassId(ClassId.CLOUD_BREAKER, "no_quest.html");
BypassHandler.getInstance().registerHandler(this);
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
final QuestState qs = getQuestState(player, false);
if (qs == null)
{
return null;
}
String htmltext = null;
switch (event)
{
case "31328-02.htm":
case "31328-04.html":
case "33849-02.htm":
{
htmltext = event;
break;
}
case "31328-03.htm":
{
qs.startQuest();
if (getQuestItemsCount(player, SCROLL_OF_ESCAPE_FOREST_OF_THE_DEAD.getId()) < 1)
{
giveItems(player, SCROLL_OF_ESCAPE_FOREST_OF_THE_DEAD);
player.sendPacket(new ExShowScreenMessage("Try using the teleport scroll Innocentin gave you to go to Forest of the Dead.", 10000));
qs.setCond(2, true);
htmltext = event;
}
break;
}
case "33849-03.html":
{
if (qs.isCond(2))
{
showOnScreenMsg(player, NpcStringId.GROW_STRONGER_HERE_UNTIL_YOU_RECEIVE_THE_NEXT_LETTER_FROM_QUEEN_NAVARI_AT_LV_70, ExShowScreenMessage.TOP_CENTER, 5000);
giveItems(player, STEEL_DOOR_GUILD);
giveItems(player, EWA);
addExpAndSp(player, EXP_REWARD, SP_REWARD);
playSound(player, QuestSound.ITEMSOUND_QUEST_FINISH);
qs.exitQuest(false, true);
htmltext = event;
}
break;
}
}
return htmltext;
}
@Override
public String onTalk(L2Npc npc, L2PcInstance player)
{
final QuestState qs = getQuestState(player, true);
String htmltext = null;
if (qs == null)
{
return htmltext;
}
if (player.getRace() != Race.ERTHEIA)
{
return "noErtheia.html";
}
switch (qs.getState())
{
case State.CREATED:
{
switch (npc.getId())
{
case INNOCENTIN:
{
htmltext = "31328-01.html";
break;
}
case HATUBA:
{
if ((player.getRace() != Race.ERTHEIA))
{
htmltext = getNoQuestMsg(player);
}
else if (qs.isCreated())
{
htmltext = getNoQuestMsg(player);
}
break;
}
}
break;
}
case State.STARTED:
{
switch (npc.getId())
{
case INNOCENTIN:
{
if (qs.isCond(1))
{
playSound(player, QuestSound.ITEMSOUND_QUEST_MIDDLE);
htmltext = "31328-03.htm";
}
else if (qs.isCond(2))
{
htmltext = "31328-04.html";
}
break;
}
case HATUBA:
{
if (qs.isCond(2))
{
htmltext = "33849-01.html";
}
break;
}
}
break;
}
case State.COMPLETED:
{
htmltext = getAlreadyCompletedMsg(player);
break;
}
}
return htmltext;
}
@RegisterEvent(EventType.ON_PLAYER_LEVEL_CHANGED)
@RegisterType(ListenerRegisterType.GLOBAL)
public void OnPlayerLevelChanged(OnPlayerLevelChanged event)
{
if (Config.DISABLE_TUTORIAL)
{
return;
}
final L2PcInstance player = event.getActiveChar();
final int oldLevel = event.getOldLevel();
final int newLevel = event.getNewLevel();
if ((oldLevel == (newLevel - 1)) && (player.getLevel() >= MIN_LEVEL) && (player.getLevel() <= MAX_LEVEL) && (player.getRace() == Race.ERTHEIA) && (player.getClassId() == ClassId.CLOUD_BREAKER))
{
final QuestState qs = getQuestState(player, false);
if (qs == null)
{
final NpcHtmlMessage html = new NpcHtmlMessage(0, 0);
html.setHtml(HtmCache.getInstance().getHtm(player.getHtmlPrefix(), "scripts/quests/Q10792_LettersFromTheQueen_ForestOfTheDead/Announce.html"));
player.sendPacket(html);
}
}
}
@Override
public boolean useBypass(String command, L2PcInstance player, L2Character bypassOrigin)
{
final QuestState qs = getQuestState(player, false);
if ((qs != null) || (player.getLevel() < MIN_LEVEL) || (player.getLevel() > MAX_LEVEL) || ((player.getRace() != Race.ERTHEIA) && (player.getClassId() != ClassId.CLOUD_BREAKER)))
{
return false;
}
if (player.isInParty())
{
player.sendPacket(new ExShowScreenMessage("You cannot teleport when you are in party.", 5000));
}
else if (player.isInCombat())
{
player.sendPacket(new ExShowScreenMessage("You cannot teleport when you in combat status.", 5000));
}
else if (player.isInDuel())
{
player.sendPacket(new ExShowScreenMessage("You cannot teleport when you are in a duel.", 5000));
}
else if (player.isInOlympiadMode())
{
player.sendPacket(new ExShowScreenMessage("You cannot teleport when you are in Olympiad.", 5000));
}
else if (player.isInVehicle())
{
player.sendPacket(new ExShowScreenMessage("You cannot teleport when you are in any vehicle or mount.", 5000));
}
else
{
player.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
player.teleToLocation(TP_LOC);
}
return true;
}
@Override
public String[] getBypassList()
{
return TP_COMMANDS;
}
}

View File

@ -0,0 +1,3 @@
<html><body>High Priest Orven:<br>
You are not Ertheia, this quest is not for you.
</body></html>

View File

@ -0,0 +1,3 @@
<html><body>You don't meet level requirements<br>
(Quest available from level 65 - 69)
</body></html>

View File

@ -0,0 +1,2 @@
<html><body>You either don't meet this NPC's minimum quest requirements, or your level is too low to start this quest.
</body></html>

View File

@ -292,6 +292,7 @@ import quests.Q10769_LettersFromTheQueen_CrumaTower.Q10769_LettersFromTheQueen_C
import quests.Q10782_LettersFromTheQueen_ForsakenPlains.Q10782_LettersFromTheQueen_ForsakenPlains;
import quests.Q10785_LettersFromTheQueen_FieldsOfMassacre.Q10785_LettersFromTheQueen_FieldsOfMassacre;
import quests.Q10789_LettersFromTheQueen_SwampOfScreams.Q10789_LettersFromTheQueen_SwampOfScreams;
import quests.Q10792_LettersFromTheQueen_ForestOfTheDead.Q10792_LettersFromTheQueen_ForestOfTheDead;
/**
* @author NosBit
@ -574,7 +575,8 @@ final class QuestMasterHandler
Q10769_LettersFromTheQueen_CrumaTower.class,
Q10782_LettersFromTheQueen_ForsakenPlains.class,
Q10785_LettersFromTheQueen_FieldsOfMassacre.class,
Q10789_LettersFromTheQueen_SwampOfScreams.class
Q10789_LettersFromTheQueen_SwampOfScreams.class,
Q10792_LettersFromTheQueen_ForestOfTheDead.class
};
public static void main(String[] args)