Kekropus Letter (10390) rework.

Contributed by spider.
This commit is contained in:
MobiusDev
2015-09-08 13:03:49 +00:00
parent 624214f7bb
commit 4e2af7c19a
16 changed files with 234 additions and 59 deletions

View File

@@ -0,0 +1,5 @@
<html><body>Grand Master Tobias:<br>
How was your transition? Do you feel stronger now? Don't get complacent, I've got a job for you.<br>
Are you ready to try out your new skills?<br>
<button ALIGN="LEFT" ICON="NORMAL" action="bypass -h Quest Q10390_KekropusLetter 30297-02.htm">"You know it!"</button>
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Grand Master Tobias:<br>
Shillien's advent put all lives at risk. The leaders of each race put their past conflicts behind them, agreed to tighten security and work together to prevent possible threats.<br>
<font color="LEVEL">Kekropus, the Great Hierarch of Kamaels</font> came to me with information about a new problem, and asked me if I knew someone trustworthy.<br>
I think you are the person he needs for this mission. Are you free to accept it?
<button ALIGN="LEFT" ICON="NORMAL" action="bypass -h Quest Q10390_KekropusLetter 30297-03.html">"You haven't told me what it is yet, but sure."</button>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Grand Master Tobias:
I'm glad... both for you, and all of us.<br>
Now go to <font color="LEVEL">Captain Bathis</font> in the Town of Gludio. He will tell you what you need to know.<br>
Go! May the Glory of Shadow be with you always!
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Grand Master Tobias:<br>
Don't waste time here talking to me. What you need to do is to go to <font color="LEVEL">Captain Bathis</font> in the Town of Gludio. Read the letter he'll give you and get instructions about your next mission.<br>
Go! May the Glory of Shadow be with you always!
</body></html>

View File

@@ -1,5 +1,5 @@
<html><body>Captain Bathis:<br> <html><body>Captain Bathis:<br>
Ah, you've arrived. I've heard that High Prefect Drikus is paying a lot of attention to you. I'm not surprised. You're the reason for our success.<br> Ah, you've arrived. I've heard that High Prefect Drikus is paying a lot of attention to you. I'm not surprised. You're the reason for our success.<br>
You probably know already, but that's why I'm giving you this letter. Here is it.<br> You probably know already, but that's why I'm giving you this <font color="LEVEL">letter</font>. Here is it.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10390_KekropusLetter 30332-02.html">Thank you.</button> <Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10390_KekropusLetter 30332-02.html">Thank you.</button>
</body></html> </body></html>

View File

@@ -0,0 +1,7 @@
<html><body>The Kekropus's Letter<br>
Remember the fragment you discovered last time?<br>
Trace the delegation's steps-to <font color=LEVEL>Gludio Village.</font><br>
For details, go to <font color=LEVEL>Grand Master Tobias</font> in the <font color=LEVEL>Town of Gludio.</font><br>
<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Q10390_Teleport">Here I go!</button>
</body></html>

View File

@@ -0,0 +1,7 @@
<html><body>The Kekropus's Letter<br>
Remember the fragment you discovered last time?<br>
Trace the delegation's steps-to <font color=LEVEL>Gludio Village.</font><br>
For details, go to <font color=LEVEL>Head Blacksmith Mendio</font> in the <font color=LEVEL>Town of Gludio.</font><br>
<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Q10390_Teleport">Here I go!</button>
</body></html>

View File

@@ -0,0 +1,7 @@
<html><body>The Kekropus's Letter<br>
Remember the fragment you discovered last time?<br>
Trace the delegation's steps-to <font color=LEVEL>Gludio Village.</font><br>
For details, go to <font color=LEVEL>Grand Master Ellenia</font> in the <font color=LEVEL>Town of Gludio.</font><br>
<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Q10390_Teleport">Here I go!</button>
</body></html>

View File

@@ -0,0 +1,7 @@
Announce_ORC.html<html><body>The Kekropus's Letter<br>
Remember the fragment you discovered last time?<br>
Trace the delegation's steps-to <font color=LEVEL>Gludio Village.</font><br>
For details, go to <font color=LEVEL>Grand Master Rains</font> in the <font color=LEVEL>Town of Gludio.</font><br>
<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Q10390_Teleport">Here I go!</button>
</body></html>

View File

@@ -0,0 +1,7 @@
<html><body>The Kekropus's Letter<br>
Remember the fragment you discovered last time?<br>
Trace the delegation's steps-to <font color=LEVEL>Gludio Village.</font><br>
For details, go to <font color=LEVEL>Grand Master Gershwin</font> in the <font color=LEVEL>Town of Gludio.</font><br>
<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Q10390_Teleport">Here I go!</button>
</body></html>

View File

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

View File

@@ -35,39 +35,64 @@ import com.l2jserver.gameserver.model.events.impl.character.player.OnPlayerLevel
import com.l2jserver.gameserver.model.holders.ItemHolder; import com.l2jserver.gameserver.model.holders.ItemHolder;
import com.l2jserver.gameserver.model.quest.Quest; import com.l2jserver.gameserver.model.quest.Quest;
import com.l2jserver.gameserver.model.quest.QuestState; import com.l2jserver.gameserver.model.quest.QuestState;
import com.l2jserver.gameserver.model.quest.State;
import com.l2jserver.gameserver.network.NpcStringId; import com.l2jserver.gameserver.network.NpcStringId;
import com.l2jserver.gameserver.network.serverpackets.ExShowScreenMessage; import com.l2jserver.gameserver.network.serverpackets.ExShowScreenMessage;
import com.l2jserver.gameserver.network.serverpackets.NpcHtmlMessage; import com.l2jserver.gameserver.network.serverpackets.NpcHtmlMessage;
/** /**
* @author Neanrakyr * Kekropus Letter (10390)
* @author Neanrakyr, spider
*/ */
public class Q10390_KekropusLetter extends Quest implements IBypassHandler public class Q10390_KekropusLetter extends Quest implements IBypassHandler
{ {
// NPCs // NPCs
private static final int RAYMOND = 30289;
private static final int RAINS = 30288;
private static final int ELLENIA = 30155;
private static final int ESRANDELL = 30158;
private static final int TOBIAS = 30297;
private static final int DRIKUS = 30505; private static final int DRIKUS = 30505;
private static final int MENDIO = 30504;
private static final int GERSHWIN = 32196;
private static final int BATHIS = 30332; private static final int BATHIS = 30332;
private static final int GOSTA = 30916; private static final int GOSTA = 30916;
private static final int ELI = 33858; private static final int ELI = 33858;
// Items // Items
private static final ItemHolder KEKROPUS_LETTER = new ItemHolder(36706, 1);
private static final ItemHolder SCROLL_OF_ESCAPE_HEINE = new ItemHolder(37112, 1);
private static final ItemHolder ENCHANT_WEAPON_C = new ItemHolder(951, 3); private static final ItemHolder ENCHANT_WEAPON_C = new ItemHolder(951, 3);
private static final ItemHolder SCROLL_OF_ESCAPE_ALIGATOR_ISLAND = new ItemHolder(37025, 1); private static final ItemHolder SCROLL_OF_ESCAPE_ALIGATOR_ISLAND = new ItemHolder(37025, 1);
private static final ItemHolder STEEL_DOOR_GUILD = new ItemHolder(37045, 21); private static final ItemHolder STEEL_DOOR_GUILD = new ItemHolder(37045, 21);
// Level Condition // Requirements
private static final int MIN_LEVEL = 40; private static final int MIN_LEVEL = 40;
private static final int MAX_LEVEL = 45; private static final int MAX_LEVEL = 45;
// Others // Rewards
private static final Location TELE_LOCATION = new Location(-12712, 124902, -3133); private static final int EXP_REWARD = 370440;
private static final String[] COMMAND = private static final int SP_REWARD = 88;
// Teleport from announce stuff
// Town masters locations to teleport should be same order as the Race enum
private static final Location[] TP_LOCS =
{
new Location(-13571, 122971, -3107), // human
new Location(-13561, 122657, -3105), // elf
new Location(-12829, 123163, -3102), // dark elf
new Location(-12712, 124902, -3133), // orc
new Location(-15236, 124713, -3115), // dwarf
new Location(-13520, 125522, -3128), // kamael
};
private static final String[] TP_COMMANDS =
{ {
"Q10390_Teleport" "Q10390_Teleport"
}; };
public Q10390_KekropusLetter() public Q10390_KekropusLetter()
{ {
super(10390, Q10390_KekropusLetter.class.getSimpleName(), "Kekropus Letter"); super(10390, Q10390_KekropusLetter.class.getSimpleName(), "Kekropus' Letter");
addStartNpc(DRIKUS); addStartNpc(DRIKUS, RAYMOND, RAINS, ELLENIA, ESRANDELL, TOBIAS, MENDIO, GERSHWIN);
addTalkId(DRIKUS, BATHIS, GOSTA, ELI); addTalkId(DRIKUS, BATHIS, GOSTA, ELI, RAYMOND, RAINS, ELLENIA, ESRANDELL, TOBIAS, MENDIO, GERSHWIN);
registerQuestItems(SCROLL_OF_ESCAPE_ALIGATOR_ISLAND.getId(), SCROLL_OF_ESCAPE_HEINE.getId(), KEKROPUS_LETTER.getId());
addCondLevel(MIN_LEVEL, MAX_LEVEL, "30505-noLevel.html"); addCondLevel(MIN_LEVEL, MAX_LEVEL, "30505-noLevel.html");
BypassHandler.getInstance().registerHandler(this); BypassHandler.getInstance().registerHandler(this);
} }
@@ -85,11 +110,21 @@ public class Q10390_KekropusLetter extends Quest implements IBypassHandler
switch (event) switch (event)
{ {
case "30505-03.html": case "30505-03.html":
case "30297-03.html":
{ {
qs.startQuest(); qs.startQuest();
htmltext = event; htmltext = event;
break; break;
} }
case "30332-02.html":
{
if (qs.getQuestItemsCount(KEKROPUS_LETTER.getId()) < 1)
{
giveItems(player, KEKROPUS_LETTER);
}
htmltext = event;
break;
}
case "30332-03.html": case "30332-03.html":
{ {
if (qs.isCond(1)) if (qs.isCond(1))
@@ -104,6 +139,7 @@ public class Q10390_KekropusLetter extends Quest implements IBypassHandler
if (qs.isCond(2)) if (qs.isCond(2))
{ {
qs.setCond(3); qs.setCond(3);
giveItems(player, SCROLL_OF_ESCAPE_HEINE);
htmltext = event; htmltext = event;
} }
break; break;
@@ -124,7 +160,7 @@ public class Q10390_KekropusLetter extends Quest implements IBypassHandler
{ {
giveItems(player, ENCHANT_WEAPON_C); giveItems(player, ENCHANT_WEAPON_C);
giveItems(player, STEEL_DOOR_GUILD); giveItems(player, STEEL_DOOR_GUILD);
addExpAndSp(player, 370440, 88); addExpAndSp(player, EXP_REWARD, SP_REWARD);
showOnScreenMsg(player, NpcStringId.GROW_STRONGER_HERE_UNTIL_YOU_RECEIVE_THE_NEXT_LETTER_FROM_KEKROPUS_AT_LV_46, ExShowScreenMessage.TOP_CENTER, 4500); showOnScreenMsg(player, NpcStringId.GROW_STRONGER_HERE_UNTIL_YOU_RECEIVE_THE_NEXT_LETTER_FROM_KEKROPUS_AT_LV_46, ExShowScreenMessage.TOP_CENTER, 4500);
qs.exitQuest(false, true); qs.exitQuest(false, true);
htmltext = event; htmltext = event;
@@ -132,7 +168,7 @@ public class Q10390_KekropusLetter extends Quest implements IBypassHandler
break; break;
} }
case "30505-02.htm": case "30505-02.htm":
case "30332-02.html": case "30297-02.htm":
case "30916-02.html": case "30916-02.html":
{ {
htmltext = event; htmltext = event;
@@ -147,74 +183,109 @@ public class Q10390_KekropusLetter extends Quest implements IBypassHandler
{ {
final QuestState qs = getQuestState(player, true); final QuestState qs = getQuestState(player, true);
String htmltext = getNoQuestMsg(player); String htmltext = getNoQuestMsg(player);
if (qs.isCompleted())
{
return getAlreadyCompletedMsg(player);
}
if (player.getRace() == Race.ERTHEIA) if (player.getRace() == Race.ERTHEIA)
{ {
return "30505-noErtheia.html"; return "30505-noErtheia.html";
} }
switch (npc.getId()) switch (qs.getState())
{ {
case DRIKUS: case State.CREATED:
{ {
if (qs.isCreated()) switch (npc.getId())
{ {
htmltext = "30505-01.htm"; case RAYMOND:
} case RAINS:
else if (qs.isStarted()) case ELLENIA:
{ case ESRANDELL:
htmltext = "30505-03.html"; case GERSHWIN:
} case MENDIO:
break; case TOBIAS: // TODO: get all race specified texts
}
case BATHIS:
{
switch (qs.getCond())
{
case 1:
{ {
htmltext = "30332-01.html"; htmltext = "30297-01.htm";
break; break;
} }
case 2: case DRIKUS:
{ {
htmltext = "30332-04.html"; if (player.getRace() == Race.ORC)
{
htmltext = "30505-01.htm";
}
else
{
htmltext = getNoQuestMsg(player);
}
break; break;
} }
case 3: default:
{ {
htmltext = "30332-05.html"; htmltext = getNoQuestMsg(player);
break; break;
} }
} }
break; break;
} }
case GOSTA: case State.STARTED:
{ {
switch (qs.getCond()) switch (npc.getId())
{ {
case 3: case RAYMOND:
case RAINS:
case ELLENIA:
case ESRANDELL:
case GERSHWIN:
case MENDIO:
case TOBIAS:// TODO: get all race specified texts
{ {
htmltext = "30916-01.html"; if (qs.isCond(1))
{
htmltext = "30297-03.html";
}
break; break;
} }
case 4: case DRIKUS:
{ {
htmltext = "30916-03.html"; if (qs.isCond(1))
{
htmltext = "30505-03.html";
}
break;
}
case BATHIS:
{
if (qs.isCond(1))
{
htmltext = "30332-01.html";
}
else if (qs.isCond(2))
{
htmltext = "30332-04.html";
}
break;
}
case GOSTA:
{
if (qs.isCond(3))
{
htmltext = "30916-01.html";
}
break;
}
case ELI:
{
if (qs.isCond(4))
{
htmltext = "33858-01.html";
}
break; break;
} }
} }
break; break;
} }
case ELI: case State.COMPLETED:
{ {
if (qs.isCond(4)) htmltext = getAlreadyCompletedMsg(player);
{
htmltext = "33858-01.html";
}
break; break;
} }
} }
@@ -235,8 +306,9 @@ public class Q10390_KekropusLetter extends Quest implements IBypassHandler
if (qs == null) if (qs == null)
{ {
final NpcHtmlMessage html = new NpcHtmlMessage(0, 0); final NpcHtmlMessage html = new NpcHtmlMessage(0, 0);
html.setHtml(HtmCache.getInstance().getHtm(player.getHtmlPrefix(), "scripts/quests/Q10390_KekropusLetter/Announce.html")); html.setHtml(HtmCache.getInstance().getHtm(player.getHtmlPrefix(), "scripts/quests/Q10390_KekropusLetter/" + "Announce_" + player.getRace().name() + ".html"));
player.sendPacket(html); player.sendPacket(html);
// todo: get proper announce html && handle it
} }
return; return;
} }
@@ -246,7 +318,7 @@ public class Q10390_KekropusLetter extends Quest implements IBypassHandler
public boolean useBypass(String command, L2PcInstance player, L2Character bypassOrigin) public boolean useBypass(String command, L2PcInstance player, L2Character bypassOrigin)
{ {
final QuestState qs = getQuestState(player, false); 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) || !command.equals("Q10390_Teleport"))
{ {
return false; return false;
} }
@@ -274,7 +346,7 @@ public class Q10390_KekropusLetter extends Quest implements IBypassHandler
else else
{ {
player.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE); player.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
player.teleToLocation(TELE_LOCATION); player.teleToLocation(TP_LOCS[player.getRace().ordinal()]);
} }
return true; return true;
} }
@@ -282,6 +354,6 @@ public class Q10390_KekropusLetter extends Quest implements IBypassHandler
@Override @Override
public String[] getBypassList() public String[] getBypassList()
{ {
return COMMAND; return TP_COMMANDS;
} }
} }

View File

@@ -173,8 +173,17 @@
<item id="37025" name="Scroll of Escape: Alligator Island" additionalName="" type="EtcItem"> <item id="37025" name="Scroll of Escape: Alligator Island" additionalName="" type="EtcItem">
<!-- Teleports you to Alligator Island. --> <!-- Teleports you to Alligator Island. -->
<set name="icon" val="icon.etc_scroll_of_return_i03" /> <set name="icon" val="icon.etc_scroll_of_return_i03" />
<set name="weight" val="30" /> <set name="default_action" val="SKILL_REDUCE" />
<set name="etcitem_type" val="SCROLL" />
<set name="material" val="PAPER" />
<set name="weight" val="120" />
<set name="is_stackable" val="true" /> <set name="is_stackable" val="true" />
<set name="is_oly_restricted" val="true" />
<set name="handler" val="ItemSkills" />
<set name="item_skill" val="9967-1" />
<cond msgId="113" addName="1">
<player flyMounted="false" />
</cond>
</item> </item>
<item id="37026" name="Scroll of Escape: Outlaw Forest" additionalName="" type="EtcItem"> <item id="37026" name="Scroll of Escape: Outlaw Forest" additionalName="" type="EtcItem">
<!-- Teleports you to Outlaw Forest. --> <!-- Teleports you to Outlaw Forest. -->

View File

@@ -77,7 +77,17 @@
<item id="37112" name="Scroll of Escape: Heine" additionalName="" type="EtcItem"> <item id="37112" name="Scroll of Escape: Heine" additionalName="" type="EtcItem">
<!-- Teleports you close to Captain Gosta in Heine. --> <!-- Teleports you close to Captain Gosta in Heine. -->
<set name="icon" val="icon.etc_scroll_of_return_i03" /> <set name="icon" val="icon.etc_scroll_of_return_i03" />
<set name="weight" val="30" /> <set name="default_action" val="SKILL_REDUCE" />
<set name="etcitem_type" val="SCROLL" />
<set name="material" val="PAPER" />
<set name="weight" val="120" />
<set name="is_stackable" val="true" />
<set name="is_oly_restricted" val="true" />
<set name="handler" val="ItemSkills" />
<set name="item_skill" val="18003-1" />
<cond msgId="113" addName="1">
<player flyMounted="false" />
</cond>
</item> </item>
<item id="37113" name="Scroll of Escape: Town of Oren" additionalName="" type="EtcItem"> <item id="37113" name="Scroll of Escape: Town of Oren" additionalName="" type="EtcItem">
<!-- Teleports you close to Head Blacksmith Flutter in the town of Oren. --> <!-- Teleports you close to Head Blacksmith Flutter in the town of Oren. -->

View File

@@ -523,12 +523,23 @@
<set name="isMagic" val="1" /> <set name="isMagic" val="1" />
</skill> </skill>
<skill id="9967" levels="1" name="Scroll of Escape: Alligator Island"> <skill id="9967" levels="1" name="Scroll of Escape: Alligator Island">
<!-- AUTO GENERATED SKILL -->
<!-- Return to Alligator Island. --> <!-- Return to Alligator Island. -->
<set name="icon" val="icon.skill0000" /> <set name="hitTime" val="20000" />
<set name="isMagic" val="2" /> <!-- Static Skill -->
<set name="itemConsumeCount" val="1" />
<set name="itemConsumeId" val="37025" />
<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="115205" y="191624" z="-3416" />
</effect>
</for>
</skill> </skill>
<skill id="9968" levels="1" name="Scroll of Escape: Outlaw Forest"> <skill id="9968" levels="1" name="Scroll of Escape: Outlaw Forest">
<!-- AUTO GENERATED SKILL --> <!-- AUTO GENERATED SKILL -->

View File

@@ -22,11 +22,22 @@
<set name="hitTime" val="1000" /> <set name="hitTime" val="1000" />
</skill> </skill>
<skill id="18003" levels="1" name="Scroll of Escape: Heine"> <skill id="18003" levels="1" name="Scroll of Escape: Heine">
<!-- AUTO GENERATED SKILL --> <set name="hitTime" val="20000" />
<set name="icon" val="icon.skill0000" /> <set name="isMagic" val="2" /> <!-- Static Skill -->
<set name="itemConsumeCount" val="1" />
<set name="itemConsumeId" val="37112" />
<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="108431" y="221567" z="-3598" />
</effect>
</for>
</skill> </skill>
<skill id="18004" levels="1" name="Scroll of Escape: Valley of Saints"> <skill id="18004" levels="1" name="Scroll of Escape: Valley of Saints">
<!-- AUTO GENERATED SKILL --> <!-- AUTO GENERATED SKILL -->