Quest Letters From The Queen: Swamp Of Screams (10789).

Contributed by gigilo1968.
This commit is contained in:
MobiusDev 2016-02-23 19:42:43 +00:00
parent fcf48b4efc
commit 8a2136ecda
13 changed files with 318 additions and 1 deletions

View File

@ -49696,3 +49696,7 @@ INSERT INTO `spawnlist` VALUES
INSERT INTO `spawnlist` VALUES
('Imperial Tomb', 1, 33372, 186611, -75975, -2824, 0, 0, 8465, 60, 0, 0, 0),
('Imperial Tomb', 1, 33372, 186569, -75928, -2824, 0, 0, 7980, 60, 0, 0, 0);
-- Dokara
INSERT INTO `spawnlist` VALUES
("Swamp of Screams", 1, 33847, 69540, -50392, -3292, 0, 0, 10000, 60, 0, 0, 0);

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 Q10789_LettersFromTheQueen_SwampOfScreams 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 Q10789_LettersFromTheQueen_SwampOfScreams 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>Swamp of Screams</font> and find <font color=LEVEL>Tracker Dokara</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>Swamp of Screams</font> and find <font color=LEVEL>Tracker Dokara</font>. He will tell you the details.
</body></html>

View File

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

View File

@ -0,0 +1,4 @@
<html><body>Tracker Dokara:<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 Q10789_LettersFromTheQueen_SwampOfScreams 33847-03.htm">Absolutely.</button>
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Tracker Dokara:<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,5 @@
<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 Swamp of Screams.<br>
<button align="left" icon="quest" action="bypass -h Q10789_Teleport">Here I go!</button>
</body></html>

View File

@ -0,0 +1,270 @@
/*
* 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.Q10789_LettersFromTheQueen_SwampOfScreams;
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.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: Swamp Of Screams (10789)
* @URL https://l2wiki.com/Letters_from_the_Queen:_Swamp_of_Screams
* @author Gigi
*/
public class Q10789_LettersFromTheQueen_SwampOfScreams extends Quest implements IBypassHandler
{
// NPCs
private static final int INNOCENTIN = 31328;
private static final int DOKARA = 33847;
// Items
private static final ItemHolder SCROLL_OF_ESCAPE_SWAMP_OF_SCREAMS = new ItemHolder(37030, 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(36563, -49178, -1128);
private static final String[] TP_COMMANDS =
{
"Q10789_Teleport"
};
public Q10789_LettersFromTheQueen_SwampOfScreams()
{
super(10789, Q10789_LettersFromTheQueen_SwampOfScreams.class.getSimpleName(), "Letters from the Queen: SwampOfScreams");
addStartNpc(INNOCENTIN);
addTalkId(INNOCENTIN, DOKARA);
addCondRace(Race.ERTHEIA, "noErtheia.html");
addCondMinLevel(MIN_LEVEL, "no_level.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 "33847-02.htm":
{
htmltext = event;
break;
}
case "31328-03.htm": // start the quest
{
qs.startQuest();
if (getQuestItemsCount(player, SCROLL_OF_ESCAPE_SWAMP_OF_SCREAMS.getId()) < 1)
{
giveItems(player, SCROLL_OF_ESCAPE_SWAMP_OF_SCREAMS);
player.sendPacket(new ExShowScreenMessage("Try using the teleport scroll Innocentin gave you to go to Swamp Of Screams.", 10000));
qs.setCond(2, true);
htmltext = event;
}
break;
}
case "33847-03.htm":
{
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 DOKARA:
{
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 DOKARA:
{
if (qs.isCond(2))
{
htmltext = "33847-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))
{
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/Q10789_LettersFromTheQueen_SwampOfScreams/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))
{
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

@ -291,6 +291,7 @@ import quests.Q10764_FreeSpirit.Q10764_FreeSpirit;
import quests.Q10769_LettersFromTheQueen_CrumaTower.Q10769_LettersFromTheQueen_CrumaTower;
import quests.Q10782_LettersFromTheQueen_ForsakenPlains.Q10782_LettersFromTheQueen_ForsakenPlains;
import quests.Q10785_LettersFromTheQueen_FieldsOfMassacre.Q10785_LettersFromTheQueen_FieldsOfMassacre;
import quests.Q10789_LettersFromTheQueen_SwampOfScreams.Q10789_LettersFromTheQueen_SwampOfScreams;
/**
* @author NosBit
@ -572,7 +573,8 @@ final class QuestMasterHandler
Q10764_FreeSpirit.class,
Q10769_LettersFromTheQueen_CrumaTower.class,
Q10782_LettersFromTheQueen_ForsakenPlains.class,
Q10785_LettersFromTheQueen_FieldsOfMassacre.class
Q10785_LettersFromTheQueen_FieldsOfMassacre.class,
Q10789_LettersFromTheQueen_SwampOfScreams.class
};
public static void main(String[] args)