Quest Letters From the Queen - Orc Barracs (10760).

Contributed by Stayway.
This commit is contained in:
MobiusDev 2016-01-20 09:29:44 +00:00
parent 36ba13be7a
commit a2e07c78b1
14 changed files with 329 additions and 5 deletions

View File

@ -0,0 +1,5 @@
<html><body>High Priestess Levian:<br>
You're back! Thank you for helping us last time. Thanks to you, Windy Hill is stable.<br>
But I didn't know that you were still here.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10760_LettersFromTheQueen_OrcBarracs 30037-02.html">"I was trying to see if there's any aftermath damage."</button>
</body></html>

View File

@ -0,0 +1,7 @@
<html><body>High Priestess Levian:<br>
Oh thank you. I heard that Ertheia are free-minded. But I didn't think that you'd be so considerate.<br>
I hope we remain good friends, your race and ours.<br>
By the way, there is actually a problem.<br>
Can you help us with that too?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10760_LettersFromTheQueen_OrcBarracs 30037-03.html">"Sure"</button>
</body></html>

View File

@ -0,0 +1,6 @@
<html><body>High Priestess Levian:<br>
Near Windy Hill, there are Orc Barracs. It's where the Turek Orcs have settled.<br>
But the Orcs have been behaving strangely lately.<br>
I'm worried if they intend to ivade this village using the odd happenings on Windy Hill. If that happens, it will catastrophic.<br>
First go to <font color="LEVEL">Orc Barracs</font> and talk to <font color="LEVEL">Piotur</font>. He will tell you what you need to know.<br>
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>High Priestess Levian:<br>
I'm worried if Orcs intend to invade this village using the odd happenings on Windy Hill.<br>
First go to the <font color="LEVEL">Orc Barracs</font> and talk to <font color="LEVEL">Piotur</font>. He will tell you what you need to know.
</body></html>

View File

@ -0,0 +1,5 @@
Message: <html><body>Piotur:<br>
Wait. Who are you?<br>
I've never seen your kind before. You don't look like an Elf.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10760_LettersFromTheQueen_OrcBarracs 30597-02.html">"I am Ertheia, child of the wind."</Button>
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Piotur:<br>
Ertheia? I've heard that name. You mean the legendary race made by Sayha?<br>
I can't believe it. But what are you doing in a place like this?
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10760_LettersFromTheQueen_OrcBarracs 30597-03.html">"I have High Priest Levian's message."</button></body></html>

View File

@ -0,0 +1,8 @@
<html><body>Piotur:<br>
High Priest Levian said she would send someone. So it is you.<br>
The Orcs have been acting strange lately. But I've never left this house, and I farmed all my life. So even watching the Orcs is a huge terror for me.<br>
Of course, it was a coincidence that I found the Orcs acting strange. Go see the weird Orc at the <font color="LEVEL">well</font>.<br>
He came running one day, asking me to help, saying the Turek Orcs were acting weird. Like he wasn't one himself!<br>
Unlike other Orcs, he is not aggressive. You should go see him.<br>
(You can obtain the next Letters from the Queen at Level 40.)
</body></html>

View File

@ -0,0 +1,6 @@
<html><body>The Queen's Letter.<br>
There's news that the energy from Wind Spirit Realm came out from the Dimensional Rift and is causing havoc.<br>
Go to <font color=LEVEL>Gludin Village</font> and help <font color=LEVEL>High Priest Raymond</font> in Einhasad Temple sort this out.<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="NORMAL" action="bypass -h Q10760_Teleport">"Here I go!"</button>
</body></html>

View File

@ -0,0 +1,255 @@
/*
* 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.Q10760_LettersFromTheQueen_OrcBarracs;
import com.l2jmobius.gameserver.ai.CtrlIntention;
import com.l2jmobius.gameserver.cache.HtmCache;
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 - Orc Barracs (10760)
* @author Stayway
*/
public class Q10760_LettersFromTheQueen_OrcBarracs extends Quest implements IBypassHandler
{
// NPCs
private static final int LEVIAN = 30037;
private static final int PIOTUR = 30597;
// Items
private static final ItemHolder SCROLL_OF_ESCAPE_ORC_BARRACS = new ItemHolder(39487, 1);
private static final ItemHolder SCROLL_OF_ESCAPE_GLUDIN_VILLAGE = new ItemHolder(39491, 1);
private static final ItemHolder STEEL_DOOR_GUILD = new ItemHolder(37045, 5);
// Requirements
private static final int MIN_LEVEL = 30;
private static final int MAX_LEVEL = 39;
// Rewards
private static final int EXP_REWARD = 242760;
private static final int SP_REWARD = 58;
// Teleport
private static final Location TP_LOC = new Location(-79816, 150828, -3040);
private static final String[] TP_COMMANDS =
{
"Q10760_Teleport"
};
public Q10760_LettersFromTheQueen_OrcBarracs()
{
super(10760, Q10760_LettersFromTheQueen_OrcBarracs.class.getSimpleName(), "Letters from the Queen: Orc Barracs");
addStartNpc(LEVIAN, PIOTUR);
addTalkId(LEVIAN, PIOTUR);
registerQuestItems(SCROLL_OF_ESCAPE_GLUDIN_VILLAGE.getId(), SCROLL_OF_ESCAPE_ORC_BARRACS.getId());
addCondLevel(MIN_LEVEL, MAX_LEVEL, "noLevel.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 "30037-03.html":
{
qs.startQuest();
if (qs.getQuestItemsCount(SCROLL_OF_ESCAPE_ORC_BARRACS.getId()) < 1)
{
giveItems(player, SCROLL_OF_ESCAPE_ORC_BARRACS);
showOnScreenMsg(player, NpcStringId.TRY_USING_THE_TELEPORT_SCROLL_LEVIAN_GAVE_YOU_TO_GO_TO_ORC_BARRACKS, ExShowScreenMessage.TOP_CENTER, 4500);
}
htmltext = event;
break;
}
case "30597-03.html":
{
if (qs.isCond(1))
{
giveItems(player, STEEL_DOOR_GUILD);
addExpAndSp(player, EXP_REWARD, SP_REWARD);
showOnScreenMsg(player, NpcStringId.TRY_TALKING_TO_VORBOS_BY_THE_WELL_NYOU_CAN_RECEIVE_QUEEN_NAVARI_S_NEXT_LETTER_AT_LV_40, ExShowScreenMessage.TOP_CENTER, 4500);
qs.exitQuest(false, true);
htmltext = event;
}
break;
}
case "30037-02.html":
case "30597-02.html":
{
htmltext = event;
break;
}
}
return htmltext;
}
@Override
public String onTalk(L2Npc npc, L2PcInstance player)
{
final QuestState qs = getQuestState(player, true);
String htmltext = getNoQuestMsg(player);
if (player.getRace() != Race.ERTHEIA)
{
return "noErtheia.html";
}
switch (qs.getState())
{
case State.CREATED:
{
switch (npc.getId())
{
case LEVIAN:
{
htmltext = "30037-01.htm";
break;
}
case PIOTUR:
{
if (player.getRace() != Race.ERTHEIA)
{
htmltext = getNoQuestMsg(player);
}
else if (qs.isCreated())
{
htmltext = getNoQuestMsg(player);
}
break;
}
}
break;
}
case State.STARTED:
{
switch (npc.getId())
{
case LEVIAN:
{
if (qs.isCond(1))
{
htmltext = "30037-04.html";
}
break;
}
case PIOTUR:
{
if (qs.isCond(1))
{
htmltext = "30597-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)
{
final L2PcInstance player = event.getActiveChar();
if ((player.getLevel() >= MIN_LEVEL) && (player.getLevel() <= MAX_LEVEL) && (player.getRace() == Race.ERTHEIA))
{
final QuestState qs = getQuestState(player, false);
if (qs == null)
{
if (player.getInventory().getInventoryItemCount(SCROLL_OF_ESCAPE_GLUDIN_VILLAGE.getId(), -1) == 0)
{
giveItems(player, SCROLL_OF_ESCAPE_GLUDIN_VILLAGE);
}
final NpcHtmlMessage html = new NpcHtmlMessage(0, 0);
html.setHtml(HtmCache.getInstance().getHtm(player.getHtmlPrefix(), "scripts/quests/Q10760_LettersFromTheQueen_OrcBarracs/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 are in combat.", 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>Head Blacksmith FLutter:<br>
You are not Ertheia, this quest is not for you.
</body></html>

View File

@ -0,0 +1,3 @@
<html><body>High Priestess Levian:<br>
Your level is wrong for this quest.
</body></html>

View File

@ -256,6 +256,7 @@ import quests.Q10755_LettersFromTheQueen_WindyHill.Q10755_LettersFromTheQueen_Wi
import quests.Q10756_AnInterdimensionalDraft.Q10756_AnInterdimensionalDraft;
import quests.Q10757_QuietingTheStorm.Q10757_QuietingTheStorm;
import quests.Q10758_TheOathOfTheWind.Q10758_TheOathOfTheWind;
import quests.Q10760_LettersFromTheQueen_OrcBarracs.Q10760_LettersFromTheQueen_OrcBarracs;
/**
* @author NosBit
@ -502,7 +503,8 @@ public class QuestMasterHandler
Q10755_LettersFromTheQueen_WindyHill.class,
Q10756_AnInterdimensionalDraft.class,
Q10757_QuietingTheStorm.class,
Q10758_TheOathOfTheWind.class
Q10758_TheOathOfTheWind.class,
Q10760_LettersFromTheQueen_OrcBarracs.class
};
public static void main(String[] args)

View File

@ -796,15 +796,20 @@
<!-- Teleports you to the Orc Barracks. -->
<set name="icon" val="icon.etc_scroll_of_return_i03" />
<set name="default_action" val="SKILL_REDUCE" />
<set name="etcitem_type" val="SCROLL" />
<set name="handler" val="ItemSkills" />
<set name="is_auctionable" val="false" />
<set name="is_depositable" val="false" />
<set name="is_destroyable" val="false" />
<set name="is_dropable" val="false" />
<set name="is_questitem" val="true" />
<set name="is_stackable" val="true" />
<set name="is_tradable" val="false" />
<set name="item_skill" val="17984-1" /> <!-- Scroll of Escape: Orc Barracks -->
<set name="material" val="PAPER" />
<set name="weight" val="30" />
<cond msgId="113" addName="1">
<player flyMounted="false" />
</cond>
</item>
<item id="39488" name="Magic Chain Key 1" type="EtcItem">
<!-- Seems like a key to undoing the magic chains binding the spirits. -->

View File

@ -1000,11 +1000,22 @@
</for>
</skill>
<skill id="17984" levels="1" name="Scroll of Escape: Orc Barracks">
<!-- AUTO GENERATED SKILL -->
<set name="icon" val="icon.skill0000" />
<set name="hitTime" val="200" />
<set name="isMagic" val="2" /> <!-- Static Skill -->
<set name="itemConsumeCount" val="1" />
<set name="itemConsumeId" val="39487" />
<set name="magicLvl" val="1" />
<set name="operateType" val="ACTIVE_INSTANT" />
<set name="rideState" val="NONE;STRIDER;WYVERN;WOLF" />
<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="-85585" y="106831" z="-3544" />
</effect>
</for>
</skill>
<skill id="17985" levels="1" name="Scroll of Escape: Town of Dion">
<!-- AUTO GENERATED SKILL -->