Quest Letters From The Queen: Cruma Tower part1 (10769).

Contributed by gigilo1968.
This commit is contained in:
MobiusDev 2016-02-07 10:13:12 +00:00
parent a49d2aa056
commit 42860c9dbd
12 changed files with 311 additions and 1 deletions

View File

@ -0,0 +1,6 @@
<html><body>High Priest Sylvain:<br>
Ertheia, are you here to see me? I heard from the High priest in the Einhasad Temple in Gludin Village.<br>
He said that the people of Sayha are back on this land. It's an honor to meet you.<br>
But what brings you to Town of Dion?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10769_LettersFromTheQueen_CrumaTower 30070-02.html">I'm investigating this fragment and the Grail.</button>
</body></html>

View File

@ -0,0 +1,5 @@
<html><body>High Priest Sylvain:<br>
The Grail... So you're looking for the leads about the Grail at the giant's relics.<br>
Near Town of Dion, there is a place the giants used as a fortress and a laboratory during the Era of the lesser Giants. It's Cruma Tower.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10769_LettersFromTheQueen_CrumaTower 30070-03.html">Yes.</button>
</body></html>

View File

@ -0,0 +1,6 @@
<html><body>High Priest Sylvain:<br>
Good.<br>
I heard that there are ways to see the ancient giants in Cruma Tower. You may ask the ones there to obtain useful information. I hope you learn information that is helpful for the Ertheia.<br>
First go to Cruma Tower and find <font color=LEVEL>Researcher Lorain near the entrance</font>.<br>
You won't find a better helper.
</body></html>

View File

@ -0,0 +1,6 @@
<html><body>High Priest Sylvain:<br>
<br>
Learn full story from Lorain
Go to Cruma Tower and find <font color=LEVEL>Researcher Lorain near the entrance</font>.<br>
You won't find a better helper.
</body></html>

View File

@ -0,0 +1,3 @@
<html><body>High Priest Sylvain:<br>
This quest is only for Ertheia class.
</body></html>

View File

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

View File

@ -0,0 +1,5 @@
<html><body>Researcher Lorain:<br>
Who are you? I've never seen you before. You're not an Elf... those ears...<br>
Who are you?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10769_LettersFromTheQueen_CrumaTower 30673-02.htm">I'm Ertheia, child of the wind.</button>
</body></html>

View File

@ -0,0 +1,5 @@
<html><body>Researcher Lorain:<br>
Ertheia? The race in the ancient documents? I cannot believe it. I thought it was just a legend.<br>
Where did you come from? I want to explore your place instead of Cruma Tower now.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10769_LettersFromTheQueen_CrumaTower 30673-03.html">I have High Priest Sylvain message.</button>
</body></html>

View File

@ -0,0 +1,5 @@
<html><body>Researcher Lorain:<br>
So you're the one High Priest Sylvain was talking about. I never imagined that you'd be Ertheia.<br>
He told me that someone was looking for information about Cruma Tower. I will help you with what I know.<br>
(You can obtain the next Letters from the Queen at Level 46.)
</body></html>

View File

@ -0,0 +1,7 @@
<html><body>The Queen's Letter<br>
Remember the fragment you discovered last time?<br>
Trace the delegation's steps-to <font color=LEVEL>Gludin Village.</font><br1>
For details, go to <font color=LEVEL>High Priest Sylvain</font> in the <font color=LEVEL>Town of Dion Einhasad Temple</font><br>
<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Q10769_Teleport">Here I go!</button>
</body></html>

View File

@ -0,0 +1,257 @@
/*
* 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.Q10769_LettersFromTheQueen_CrumaTower;
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.serverpackets.ExShowScreenMessage;
import com.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage;
/**
* Letters From The Queen: Cruma Tower part1
* @author Gigi
*/
public class Q10769_LettersFromTheQueen_CrumaTower extends Quest implements IBypassHandler
{
// NPCs
private static final int SYLVAIN = 30070;
private static final int LORAIN = 30673;
// ITEMs
private static final ItemHolder SCROLL_OF_ESCAPE_CRUMA_TOWER = new ItemHolder(39594, 1);
private static final ItemHolder STEEL_DOOR_GUILD = new ItemHolder(37045, 11);
private static final ItemHolder EAC = new ItemHolder(952, 1);
// Reward
private static final int EXP_REWARD = 370440;
private static final int SP_REWARD = 88;
// Misc
private static final int MIN_LEVEL = 40;
private static final int MAX_LEVEL = 45;
// Teleport
private static final Location TP_LOC = new Location(16218, 142300, -2700);
private static final String[] TP_COMMANDS =
{
"Q10769_Teleport"
};
public Q10769_LettersFromTheQueen_CrumaTower()
{
super(10769, Q10769_LettersFromTheQueen_CrumaTower.class.getSimpleName(), "Letters from the Queen: CrumaTower");
addStartNpc(SYLVAIN);
addTalkId(SYLVAIN, LORAIN);
addCondRace(Race.ERTHEIA, "no.html");
addCondMinLevel(MIN_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 "30070-03.html": // start the quest
{
qs.startQuest();
if (qs.getQuestItemsCount(SCROLL_OF_ESCAPE_CRUMA_TOWER.getId()) < 1)
{
qs.giveItems(SCROLL_OF_ESCAPE_CRUMA_TOWER);
player.sendPacket(new ExShowScreenMessage("Try using the teleport scroll Sylvain gave you to go to Cruma Tower.", 10000));
}
htmltext = event;
break;
}
case "30673-03.html":
{
if (qs.isCond(2))
{
player.sendPacket(new ExShowScreenMessage("Grow stronger here until you receive the next letter from Queen Navari at Lv. 46!", 10000));
qs.giveItems(STEEL_DOOR_GUILD);
qs.giveItems(EAC);
qs.addExpAndSp(EXP_REWARD, SP_REWARD);
qs.exitQuest(false, true);
}
htmltext = event;
break;
}
case "30070-02.html":
case "30673-02.htm":
{
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 "30070-no.html";
}
switch (qs.getState())
{
case State.CREATED:
{
switch (npc.getId())
{
case SYLVAIN:
{
htmltext = "30070-01.html";
break;
}
case LORAIN:
{
if (player.getRace() != Race.ERTHEIA)
{
htmltext = getNoQuestMsg(player);
}
else if (qs.isCreated())
{
htmltext = getNoQuestMsg(player);
}
break;
}
}
break;
}
case State.STARTED:
{
switch (npc.getId())
{
case SYLVAIN:
{
if (qs.isCond(1))
{
qs.setCond(2, true);
htmltext = "30070-03.html";
}
else if (qs.isCond(2))
{
htmltext = "30070-04.html";
}
break;
}
case LORAIN:
{
if (qs.isCond(2))
{
htmltext = "30673-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)
{
final NpcHtmlMessage html = new NpcHtmlMessage(0, 0);
html.setHtml(HtmCache.getInstance().getHtm(player.getHtmlPrefix(), "scripts/quests/Q10769_LettersFromTheQueen_CrumaTower/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

@ -265,6 +265,7 @@ import quests.Q10761_AnOrcInLove.Q10761_AnOrcInLove;
import quests.Q10762_MarionetteSpirit.Q10762_MarionetteSpirit;
import quests.Q10763_TerrifyingChertuba.Q10763_TerrifyingChertuba;
import quests.Q10764_FreeSpirit.Q10764_FreeSpirit;
import quests.Q10769_LettersFromTheQueen_CrumaTower.Q10769_LettersFromTheQueen_CrumaTower;
/**
* @author NosBit
@ -520,7 +521,8 @@ final class QuestMasterHandler
Q10761_AnOrcInLove.class,
Q10762_MarionetteSpirit.class,
Q10763_TerrifyingChertuba.class,
Q10764_FreeSpirit.class
Q10764_FreeSpirit.class,
Q10769_LettersFromTheQueen_CrumaTower.class
};
public static void main(String[] args)