Quest Letters from the Queen: Dragon Valley (10798).

Contributed by gigilo1968.
This commit is contained in:
MobiusDev
2016-05-02 15:16:32 +00:00
parent c950d04c56
commit 1755dc6d32
15 changed files with 372 additions and 15 deletions

View File

@@ -0,0 +1,5 @@
<html><body>High Priest Maximilian:<br>
What's going on? Oh, an Ertheia.<br>
Did you come here at Queen Navari's request?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10798_LettersFromTheQueen_DragonValley 30120-02.html">"Yes."</button>
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>High Priest Maximilian:<br>
Nice to meet you. I know that Queen Navari and the Ertheia are helping us, and will not forget this fact.<br>
We asked for help because of the Dimensional Rift in Dragon Valley. <br>
So far we learned that it's different from the the Dimensional Rift the Ertheia came though, but it would still need investigating. Could you help?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10798_LettersFromTheQueen_DragonValley 30120-03.html">"I will help."</button>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>High Priest Maximilian:<br>
Thank you for your kind gesture. Dragon Valley is a dangerous place. You need to be extra careful.<br>
First go to <font color="LEVEL">Namo</font> in <font color="LEVEL">Dragon Valley</font> and talk about the details.
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>High Priest Maximilian:<br>
First go to <font color="LEVEL">Namo</font> in <font color="LEVEL">Dragon Valley</font> and talk about the details.
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Namo:<br>
What brings you here?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10798_LettersFromTheQueen_DragonValley 33973-02.html">"Tell me what's going on in Dragon Valley."</button>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Namo:<br>
Right now, Dragon Valley is a very dangerous place. As the 6th Seal was broken, the Dimensional Rift caused the Undead to appear whenever night fell.<br>
You're really not going to change your mind about investigating such a dangerous place?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10798_LettersFromTheQueen_DragonValley 33973-03.html">"No, I'm not changing my mind."</button>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Namo:<br>
Good. Here's your mission.<br>
(You have completed all "Letters from the Queen". You can start "The Minstrel's Song" after reaching Lv. 85.)
</body></html>

View File

@@ -0,0 +1,7 @@
<html><body>The Queen's Letter:<br>
I got an emergency request from the Town of Giran. Near the Town of Giran at Dragon Valley, a Dimensional Rift was spotted.<br>
It's different from the one we came in, but it's worth looking into. Go see <font color="LEVEL">High Priest Maximilian</font>.<br>
(A <font color="LEVEL">Scroll of Escape</font> is enclosed. If you want to go now, use it to travel immediately.)<br>
<button align="left" icon="quest" action="bypass -h Q10798_Teleport">Here I go!</button>
<button align="left" icon="normal" action="bypass -h Quest Q10798_LettersFromTheQueen_DragonValley close">close</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.Q10798_LettersFromTheQueen_DragonValley;
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: Dragon Valley (10798)
* @URL https://l2wiki.com/Letters_from_the_Queen:_Dragon_Valley
* @author Gigi
*/
public class Q10798_LettersFromTheQueen_DragonValley extends Quest implements IBypassHandler
{
// NPCs
private static final int MAXIMILIAN = 30120;
private static final int NAMO = 33973;
// Items
private static final ItemHolder SCROLL_OF_ESCAPE_DRAGON_VALLEY = new ItemHolder(39587, 1);
private static final ItemHolder SCROLL_OF_ESCAPE_TOWN_OF_GIRAN = new ItemHolder(39586, 1);
private static final ItemHolder STEEL_DOOR_GUILD = new ItemHolder(37045, 182);
private static final ItemHolder EWS = new ItemHolder(959, 1);
// Reward
private static final int EXP_REWARD = 1277640;
private static final int SP_REWARD = 306;
// Misc
private static final int MIN_LEVEL = 76;
private static final int MAX_LEVEL = 84;
// Teleport
private static final Location TP_LOC = new Location(86674, 148630, -3401);
private static final String[] TP_COMMANDS =
{
"Q10798_Teleport"
};
public Q10798_LettersFromTheQueen_DragonValley()
{
super(10798, Q10798_LettersFromTheQueen_DragonValley.class.getSimpleName(), "Letters from the Queen: Dragon Valley");
addStartNpc(MAXIMILIAN);
addTalkId(MAXIMILIAN, NAMO);
registerQuestItems(SCROLL_OF_ESCAPE_DRAGON_VALLEY.getId(), SCROLL_OF_ESCAPE_TOWN_OF_GIRAN.getId());
addCondRace(Race.ERTHEIA, "noErtheia.html");
addCondLevel(MIN_LEVEL, MAX_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 "30120-02.html":
case "33973-02.html":
{
htmltext = event;
break;
}
case "close":
{
return null;
}
case "30120-03.html":
{
qs.startQuest();
if (getQuestItemsCount(player, SCROLL_OF_ESCAPE_DRAGON_VALLEY.getId()) < 1)
{
giveItems(player, SCROLL_OF_ESCAPE_DRAGON_VALLEY);
player.sendPacket(new ExShowScreenMessage("Try using the teleport scroll Innocentin gave you to go to Dragon Valley.", 10000));
qs.setCond(2, true);
htmltext = event;
}
break;
}
case "33973-03.html":
{
if (qs.isCond(2))
{
showOnScreenMsg(player, NpcStringId.YOU_HAVE_FINISHED_ALL_OF_QUEEN_NAVARI_S_LETTERS_GROW_STRONGER_HERE_UNTIL_YOU_RECEIVE_LETTERS_FROM_A_MINSTREL_AT_LV_85, ExShowScreenMessage.TOP_CENTER, 8000);
giveItems(player, STEEL_DOOR_GUILD);
giveItems(player, EWS);
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 MAXIMILIAN:
{
htmltext = "30120-01.html";
break;
}
case NAMO:
{
if ((player.getRace() != Race.ERTHEIA) || (qs.isCreated()))
{
htmltext = getNoQuestMsg(player);
}
break;
}
}
break;
}
case State.STARTED:
{
switch (npc.getId())
{
case MAXIMILIAN:
{
if (qs.isCond(2))
{
htmltext = "30120-04.html";
}
break;
}
case NAMO:
{
if (qs.isCond(2))
{
htmltext = "33973-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 QuestState qs = getQuestState(player, false);
if ((qs == null) && (player.getLevel() >= MIN_LEVEL) && (player.getLevel() <= MAX_LEVEL) && (player.getRace() == Race.ERTHEIA))
{
final NpcHtmlMessage html = new NpcHtmlMessage(0, 0);
html.setHtml(HtmCache.getInstance().getHtm(player.getHtmlPrefix(), "scripts/quests/Q10798_LettersFromTheQueen_DragonValley/Announce.html"));
player.sendPacket(html);
if (getQuestItemsCount(player, SCROLL_OF_ESCAPE_TOWN_OF_GIRAN.getId()) < 1)
{
giveItems(player, SCROLL_OF_ESCAPE_TOWN_OF_GIRAN);
}
}
}
@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);
if (getQuestItemsCount(player, SCROLL_OF_ESCAPE_TOWN_OF_GIRAN.getId()) > 0)
{
takeItem(player, SCROLL_OF_ESCAPE_TOWN_OF_GIRAN);
}
}
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 76 - 84)
</body></html>

View File

@@ -297,6 +297,7 @@ import quests.Q10790_AMercenaryHelper.Q10790_AMercenaryHelper;
import quests.Q10791_TheManOfMystery.Q10791_TheManOfMystery; import quests.Q10791_TheManOfMystery.Q10791_TheManOfMystery;
import quests.Q10792_LettersFromTheQueen_ForestOfTheDead.Q10792_LettersFromTheQueen_ForestOfTheDead; import quests.Q10792_LettersFromTheQueen_ForestOfTheDead.Q10792_LettersFromTheQueen_ForestOfTheDead;
import quests.Q10795_LettersFromTheQueen_WallOfAgros.Q10795_LettersFromTheQueen_WallOfAgros; import quests.Q10795_LettersFromTheQueen_WallOfAgros.Q10795_LettersFromTheQueen_WallOfAgros;
import quests.Q10798_LettersFromTheQueen_DragonValley.Q10798_LettersFromTheQueen_DragonValley;
/** /**
* @author NosBit * @author NosBit
@@ -584,7 +585,8 @@ final class QuestMasterHandler
Q10790_AMercenaryHelper.class, Q10790_AMercenaryHelper.class,
Q10791_TheManOfMystery.class, Q10791_TheManOfMystery.class,
Q10792_LettersFromTheQueen_ForestOfTheDead.class, Q10792_LettersFromTheQueen_ForestOfTheDead.class,
Q10795_LettersFromTheQueen_WallOfAgros.class Q10795_LettersFromTheQueen_WallOfAgros.class,
Q10798_LettersFromTheQueen_DragonValley.class
}; };
public static void main(String[] args) public static void main(String[] args)

View File

@@ -1146,28 +1146,38 @@
<item id="39586" name="Scroll of Escape: Town of Giran" type="EtcItem"> <item id="39586" name="Scroll of Escape: Town of Giran" type="EtcItem">
<!-- Teleports you to Town of Giran. --> <!-- Teleports you to Town of Giran. -->
<set name="icon" val="icon.etc_scroll_of_return_i03" /> <set name="icon" val="icon.etc_scroll_of_return_i03" />
<set name="handler" val="ItemSkills" />
<set name="default_action" val="SKILL_REDUCE" /> <set name="default_action" val="SKILL_REDUCE" />
<set name="is_auctionable" val="false" /> <set name="is_auctionable" val="false" />
<set name="is_depositable" val="false" /> <set name="is_depositable" val="false" />
<set name="is_destroyable" val="false" /> <set name="is_destroyable" val="false" />
<set name="is_dropable" val="false" /> <set name="is_dropable" val="false" />
<set name="is_questitem" val="true" /> <set name="is_questitem" val="false" />
<set name="is_tradable" val="false" /> <set name="is_tradable" val="false" />
<set name="item_skill" val="17961-1" /> <!-- Scroll of Escape: Giran -->
<set name="material" val="PAPER" /> <set name="material" val="PAPER" />
<set name="weight" val="30" /> <set name="weight" val="30" />
<cond msgId="113" addName="1">
<player flyMounted="false" />
</cond>
</item> </item>
<item id="39587" name="Scroll of Escape: Dragon Valley" type="EtcItem"> <item id="39587" name="Scroll of Escape: Dragon Valley" type="EtcItem">
<!-- Teleports you to Dragon Valley. --> <!-- Teleports you to Dragon Valley. -->
<set name="icon" val="icon.etc_scroll_of_return_i03" /> <set name="icon" val="icon.etc_scroll_of_return_i03" />
<set name="handler" val="ItemSkills" />
<set name="default_action" val="SKILL_REDUCE" /> <set name="default_action" val="SKILL_REDUCE" />
<set name="is_auctionable" val="false" /> <set name="is_auctionable" val="false" />
<set name="is_depositable" val="false" /> <set name="is_depositable" val="false" />
<set name="is_destroyable" val="false" /> <set name="is_destroyable" val="false" />
<set name="is_dropable" val="false" /> <set name="is_dropable" val="false" />
<set name="is_questitem" val="true" /> <set name="is_questitem" val="false" />
<set name="is_tradable" val="false" /> <set name="is_tradable" val="false" />
<set name="item_skill" val="17962-1" /> <!-- Scroll of Escape: Dragon Valley -->
<set name="material" val="PAPER" /> <set name="material" val="PAPER" />
<set name="weight" val="30" /> <set name="weight" val="30" />
<cond msgId="113" addName="1">
<player flyMounted="false" />
</cond>
</item> </item>
<item id="39588" name="Yum Yum Candy Box" additionalName="Event" type="EtcItem"> <item id="39588" name="Yum Yum Candy Box" additionalName="Event" type="EtcItem">
<!-- Wrapped Pack containing a Yum Yum Candy (30-day). Cannot be shared once open. The coupon that came with this gives you the Nom Nom Candy Box. Cannot be used in the Olympiad / Ceremony of Chaos. --> <!-- Wrapped Pack containing a Yum Yum Candy (30-day). Cannot be shared once open. The coupon that came with this gives you the Nom Nom Candy Box. Cannot be used in the Olympiad / Ceremony of Chaos. -->

View File

@@ -811,20 +811,40 @@
<set name="hitTime" val="1500" /> <set name="hitTime" val="1500" />
</skill> </skill>
<skill id="17961" levels="1" name="Scroll of Escape: Town of Giran"> <skill id="17961" levels="1" name="Scroll of Escape: Town of Giran">
<!-- AUTO GENERATED SKILL --> <set name="hitTime" val="200" />
<!-- Teleports you to the Town of Giran. --> <set name="isMagic" val="2" /> <!-- Static Skill -->
<set name="icon" val="icon.skill0000" /> <set name="itemConsumeCount" val="1" />
<set name="itemConsumeId" val="39586" />
<set name="magicLvl" val="1" />
<set name="operateType" val="ACTIVE_INSTANT" /> <set name="operateType" val="ACTIVE_INSTANT" />
<set name="rideState" val="NONE;STRIDER;WYVERN;WOLF" />
<set name="targetType" val="SELF" /> <set name="targetType" val="SELF" />
<set name="hitTime" val="1500" /> <cond msgId="113" addName="1">
<player canEscape="true" />
</cond>
<for>
<effect name="Teleport">
<param x="86674" y="148630" z="-3401" />
</effect>
</for>
</skill> </skill>
<skill id="17962" levels="1" name="Scroll of Escape: Dragon Valley"> <skill id="17962" levels="1" name="Scroll of Escape: Dragon Valley">
<!-- AUTO GENERATED SKILL --> <set name="hitTime" val="200" />
<!-- Teleports you to Dragon Valley. --> <set name="isMagic" val="2" /> <!-- Static Skill -->
<set name="icon" val="icon.skill0000" /> <set name="itemConsumeCount" val="1" />
<set name="itemConsumeId" val="39587" />
<set name="magicLvl" val="1" />
<set name="operateType" val="ACTIVE_INSTANT" /> <set name="operateType" val="ACTIVE_INSTANT" />
<set name="rideState" val="NONE;STRIDER;WYVERN;WOLF" />
<set name="targetType" val="SELF" /> <set name="targetType" val="SELF" />
<set name="hitTime" val="1500" /> <cond msgId="113" addName="1">
<player canEscape="true" />
</cond>
<for>
<effect name="Teleport">
<param x="72090" y="116824" z="-3688" />
</effect>
</for>
</skill> </skill>
<skill id="17963" levels="1" name="Alchemy Acquisition"> <skill id="17963" levels="1" name="Alchemy Acquisition">
<!-- AUTO GENERATED SKILL --> <!-- AUTO GENERATED SKILL -->
@@ -1028,11 +1048,22 @@
</for> </for>
</skill> </skill>
<skill id="17985" levels="1" name="Scroll of Escape: Town of Dion"> <skill id="17985" levels="1" name="Scroll of Escape: Town of Dion">
<!-- AUTO GENERATED SKILL --> <set name="hitTime" val="200" />
<set name="icon" val="icon.skill0000" /> <set name="isMagic" val="2" /> <!-- Static Skill -->
<set name="itemConsumeCount" val="1" />
<set name="itemConsumeId" val="39595" />
<set name="magicLvl" val="1" />
<set name="operateType" val="ACTIVE_INSTANT" /> <set name="operateType" val="ACTIVE_INSTANT" />
<set name="rideState" val="NONE;STRIDER;WYVERN;WOLF" />
<set name="targetType" val="SELF" /> <set name="targetType" val="SELF" />
<set name="hitTime" val="1000" /> <cond msgId="113" addName="1">
<player canEscape="true" />
</cond>
<for>
<effect name="Teleport">
<param x="16218" y="142300" z="-2700" />
</effect>
</for>
</skill> </skill>
<skill id="17986" levels="1" name="Scroll of Escape: Cruma Tower"> <skill id="17986" levels="1" name="Scroll of Escape: Cruma Tower">
<set name="icon" val="icon.skill0000" /> <set name="icon" val="icon.skill0000" />
@@ -1075,7 +1106,7 @@
</cond> </cond>
<for> <for>
<effect name="Teleport"> <effect name="Teleport">
<param x="17720" y="115185" z="-6585" /> <param x="17732" y="114846" z="-11696" />
</effect> </effect>
</for> </for>
</skill> </skill>