From ba3306f436338b53e1afc256ccfcf95a950167ae Mon Sep 17 00:00:00 2001 From: MobiusDev <8391001+MobiusDevelopment@users.noreply.github.com> Date: Thu, 21 Jul 2016 19:51:06 +0000 Subject: [PATCH] Quest Elikia's Letter (10455) improvements. Contributed by gigilo1968. --- .../data/scripts/ai/areas/Heine/33900.html | 4 + .../data/scripts/ai/areas/Heine/WrapGate.java | 70 +++++++++ .../quests/Q10455_ElikiasLetter/31590-01.html | 4 + .../quests/Q10455_ElikiasLetter/31590-02.html | 3 + .../quests/Q10455_ElikiasLetter/31590-03.html | 3 + .../quests/Q10455_ElikiasLetter/31595-01.html | 4 + .../quests/Q10455_ElikiasLetter/31595-02.html | 4 + .../quests/Q10455_ElikiasLetter/31595-03.html | 3 + .../quests/Q10455_ElikiasLetter/31620-00.htm | 4 + .../quests/Q10455_ElikiasLetter/31620-01.htm | 4 + .../quests/Q10455_ElikiasLetter/31620-02.htm | 5 + .../quests/Q10455_ElikiasLetter/31620-03.htm | 5 + .../quests/Q10455_ElikiasLetter/31620-04.htm | 3 + .../quests/Q10455_ElikiasLetter/31620-05.html | 3 + .../Q10455_ElikiasLetter.java | 144 ++++++++++++++++++ .../scripts/quests/QuestMasterHandler.java | 2 + 16 files changed, 265 insertions(+) create mode 100644 trunk/dist/game/data/scripts/ai/areas/Heine/33900.html create mode 100644 trunk/dist/game/data/scripts/ai/areas/Heine/WrapGate.java create mode 100644 trunk/dist/game/data/scripts/quests/Q10455_ElikiasLetter/31590-01.html create mode 100644 trunk/dist/game/data/scripts/quests/Q10455_ElikiasLetter/31590-02.html create mode 100644 trunk/dist/game/data/scripts/quests/Q10455_ElikiasLetter/31590-03.html create mode 100644 trunk/dist/game/data/scripts/quests/Q10455_ElikiasLetter/31595-01.html create mode 100644 trunk/dist/game/data/scripts/quests/Q10455_ElikiasLetter/31595-02.html create mode 100644 trunk/dist/game/data/scripts/quests/Q10455_ElikiasLetter/31595-03.html create mode 100644 trunk/dist/game/data/scripts/quests/Q10455_ElikiasLetter/31620-00.htm create mode 100644 trunk/dist/game/data/scripts/quests/Q10455_ElikiasLetter/31620-01.htm create mode 100644 trunk/dist/game/data/scripts/quests/Q10455_ElikiasLetter/31620-02.htm create mode 100644 trunk/dist/game/data/scripts/quests/Q10455_ElikiasLetter/31620-03.htm create mode 100644 trunk/dist/game/data/scripts/quests/Q10455_ElikiasLetter/31620-04.htm create mode 100644 trunk/dist/game/data/scripts/quests/Q10455_ElikiasLetter/31620-05.html create mode 100644 trunk/dist/game/data/scripts/quests/Q10455_ElikiasLetter/Q10455_ElikiasLetter.java diff --git a/trunk/dist/game/data/scripts/ai/areas/Heine/33900.html b/trunk/dist/game/data/scripts/ai/areas/Heine/33900.html new file mode 100644 index 0000000000..d5e41ddd5c --- /dev/null +++ b/trunk/dist/game/data/scripts/ai/areas/Heine/33900.html @@ -0,0 +1,4 @@ +Warp Gate:
+(Use this gate to go to the Refugee Camp in Hellbound.)
+ + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/ai/areas/Heine/WrapGate.java b/trunk/dist/game/data/scripts/ai/areas/Heine/WrapGate.java new file mode 100644 index 0000000000..08d8bb57dd --- /dev/null +++ b/trunk/dist/game/data/scripts/ai/areas/Heine/WrapGate.java @@ -0,0 +1,70 @@ +/* + * 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 . + */ +package ai.areas.Heine; + +import com.l2jmobius.gameserver.enums.Movie; +import com.l2jmobius.gameserver.model.Location; +import com.l2jmobius.gameserver.model.actor.L2Npc; +import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; +import com.l2jmobius.gameserver.model.quest.QuestState; + +import ai.AbstractNpcAI; +import quests.Q10455_ElikiasLetter.Q10455_ElikiasLetter; + +/** + * Warp Gate AI. + * @author Gigi + */ +public final class WrapGate extends AbstractNpcAI +{ + // NPC + private static final int WRAP_GATE = 33900; + // Location + private static final Location TELEPORT_LOC = new Location(-28575, 255984, -2195); + + private WrapGate() + { + addStartNpc(WRAP_GATE); + addFirstTalkId(WRAP_GATE); + } + + @Override + public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) + { + if ("enter_hellbound".equals(event)) + { + final QuestState qs = player.getQuestState(Q10455_ElikiasLetter.class.getSimpleName()); + if ((qs != null) && qs.isCond(1)) + { + playMovie(player, Movie.SC_HELLBOUND); + } + player.teleToLocation(TELEPORT_LOC); + } + return null; + } + + @Override + public String onFirstTalk(L2Npc npc, L2PcInstance player) + { + return "33900.html"; + } + + public static void main(String[] args) + { + new WrapGate(); + } +} \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10455_ElikiasLetter/31590-01.html b/trunk/dist/game/data/scripts/quests/Q10455_ElikiasLetter/31590-01.html new file mode 100644 index 0000000000..e58e4f5153 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10455_ElikiasLetter/31590-01.html @@ -0,0 +1,4 @@ +Truth Scholar Devianne:
+"Yes? Can I help you?"
+ + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10455_ElikiasLetter/31590-02.html b/trunk/dist/game/data/scripts/quests/Q10455_ElikiasLetter/31590-02.html new file mode 100644 index 0000000000..867551fbf0 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10455_ElikiasLetter/31590-02.html @@ -0,0 +1,3 @@ +Truth Seeker Devianne:
+So you're the one. I was the one who asked Elikia to send assistance from the continent. Things looked too dangerous -- I'm glad not everyone came to Hellbound with Leona as I did. Anyway, perhaps you should talk to her before anything else. + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10455_ElikiasLetter/31590-03.html b/trunk/dist/game/data/scripts/quests/Q10455_ElikiasLetter/31590-03.html new file mode 100644 index 0000000000..dbfb81a7e1 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10455_ElikiasLetter/31590-03.html @@ -0,0 +1,3 @@ +Truth Seeker Devianne:
+Perhaps it's best that you meet Leona now. + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10455_ElikiasLetter/31595-01.html b/trunk/dist/game/data/scripts/quests/Q10455_ElikiasLetter/31595-01.html new file mode 100644 index 0000000000..3c66576daa --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10455_ElikiasLetter/31595-01.html @@ -0,0 +1,4 @@ +Fire Dragon Bride Leona Blackbird:
+Do you have business here? Speak.
+ + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10455_ElikiasLetter/31595-02.html b/trunk/dist/game/data/scripts/quests/Q10455_ElikiasLetter/31595-02.html new file mode 100644 index 0000000000..b52ef7a3c3 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10455_ElikiasLetter/31595-02.html @@ -0,0 +1,4 @@ +Fire Dragon Bride Leona Blackbird:
+I see. If you are strong enough, I would like to ask for your help. Perhaps you will be the one to turn the tide in this war.
+ + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10455_ElikiasLetter/31595-03.html b/trunk/dist/game/data/scripts/quests/Q10455_ElikiasLetter/31595-03.html new file mode 100644 index 0000000000..d617b11a3d --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10455_ElikiasLetter/31595-03.html @@ -0,0 +1,3 @@ +Fire Dragon Bride Leona Blackbird:
+Good. I will give you the mission in no time. Please be on standby. + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10455_ElikiasLetter/31620-00.htm b/trunk/dist/game/data/scripts/quests/Q10455_ElikiasLetter/31620-00.htm new file mode 100644 index 0000000000..65daa720d8 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10455_ElikiasLetter/31620-00.htm @@ -0,0 +1,4 @@ +Verdure Elder Elikia:
+I do not believe our paths are meant to cross here. Perhaps later down the road.
+(Only characters Lv. 99 or above can perform this quest.) + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10455_ElikiasLetter/31620-01.htm b/trunk/dist/game/data/scripts/quests/Q10455_ElikiasLetter/31620-01.htm new file mode 100644 index 0000000000..72ba44919d --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10455_ElikiasLetter/31620-01.htm @@ -0,0 +1,4 @@ +Verdure Elder Elikia:
+So you are %name%. I am glad to meet you, especially in a place like this. Strange, isn't it?
+ + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10455_ElikiasLetter/31620-02.htm b/trunk/dist/game/data/scripts/quests/Q10455_ElikiasLetter/31620-02.htm new file mode 100644 index 0000000000..f1fa7aa53b --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10455_ElikiasLetter/31620-02.htm @@ -0,0 +1,5 @@ +Verdure Elder Elikia:
+Your feats are famous. People talk. I cannot help but hear.
+A great warrior is destined to be burdened with many requests. Will you hear out mine?
+ + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10455_ElikiasLetter/31620-03.htm b/trunk/dist/game/data/scripts/quests/Q10455_ElikiasLetter/31620-03.htm new file mode 100644 index 0000000000..f47a5f1d88 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10455_ElikiasLetter/31620-03.htm @@ -0,0 +1,5 @@ +Verdure Elder Elikia:
+Strange things -- to say the least -- have been happening on the continent. Slave trade, can you believe it? Behind it all was Beleth, and Hellbound.
+I am investigating with Leona Blackbird, but the work is too much for just the two of us.
+ + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10455_ElikiasLetter/31620-04.htm b/trunk/dist/game/data/scripts/quests/Q10455_ElikiasLetter/31620-04.htm new file mode 100644 index 0000000000..318bda6e0b --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10455_ElikiasLetter/31620-04.htm @@ -0,0 +1,3 @@ +Verdure Elder Elikia:
+If interested, go see Devianne at the Hellbound Refugee Camp. She is also called Truth Seeker Devianne. + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10455_ElikiasLetter/31620-05.html b/trunk/dist/game/data/scripts/quests/Q10455_ElikiasLetter/31620-05.html new file mode 100644 index 0000000000..e80a56f917 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10455_ElikiasLetter/31620-05.html @@ -0,0 +1,3 @@ +Verdure Elder Elikia:
+Go to Hellbound Refugee Camp and find Truth Seeker Devianne. Speak of me, and she will be kind. + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10455_ElikiasLetter/Q10455_ElikiasLetter.java b/trunk/dist/game/data/scripts/quests/Q10455_ElikiasLetter/Q10455_ElikiasLetter.java new file mode 100644 index 0000000000..8da421e2d8 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10455_ElikiasLetter/Q10455_ElikiasLetter.java @@ -0,0 +1,144 @@ +/* + * 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 . + */ +package quests.Q10455_ElikiasLetter; + +import com.l2jmobius.gameserver.enums.ChatType; +import com.l2jmobius.gameserver.model.actor.L2Npc; +import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; +import com.l2jmobius.gameserver.model.quest.Quest; +import com.l2jmobius.gameserver.model.quest.QuestState; +import com.l2jmobius.gameserver.network.NpcStringId; +import com.l2jmobius.gameserver.network.serverpackets.NpcSay; + +/** + * Elikia's Letter (10455) + * @URL https://l2wiki.com/Elikia%27s_Letter + * @author Gigi + */ +public class Q10455_ElikiasLetter extends Quest +{ + // NPCs + private static final int ELRIKIA_VERDURE_ELDER = 31620; + private static final int DEVIANNE_TRUTH_SEEKER = 31590; + private static final int LEONA_BLACKBIRD_FIRE_DRAGON_BRIDE = 31595; + // Items + private static final int ELRIKIAS_LETTER = 37765; + // Misc + private static final int MIN_LEVEL = 99; + + public Q10455_ElikiasLetter() + { + super(10455); + addStartNpc(ELRIKIA_VERDURE_ELDER); + addTalkId(ELRIKIA_VERDURE_ELDER, DEVIANNE_TRUTH_SEEKER, LEONA_BLACKBIRD_FIRE_DRAGON_BRIDE); + registerQuestItems(ELRIKIAS_LETTER); + addCondMinLevel(MIN_LEVEL, "31620-00.htm"); + } + + @Override + public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) + { + String htmltext = null; + final QuestState qs = getQuestState(player, false); + if (qs == null) + { + return null; + } + switch (event) + { + case "31620-02.htm": + case "31620-03.htm": + case "31595-02.html": + { + htmltext = event; + break; + } + case "31620-04.htm": + { + qs.startQuest(); + giveItems(player, ELRIKIAS_LETTER, 1); + npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, ELRIKIA_VERDURE_ELDER, NpcStringId.YOU_MUST_ACTIVATE_THE_WARP_GATE_BEHIND_ME_IN_ORDER_TO_TELEPORT_TO_HELLBOUND)); + htmltext = event; + break; + } + case "31590-02.html": + { + qs.setCond(2, true); + htmltext = event; + break; + } + case "31595-03.html": + { + giveAdena(player, 32962, true); + addExpAndSp(player, 3859143, 14816); + npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, LEONA_BLACKBIRD_FIRE_DRAGON_BRIDE, NpcStringId.HAVE_YOU_MADE_PREPARATIONS_FOR_THE_MISSION_THERE_ISN_T_MUCH_TIME)); + 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 = getNoQuestMsg(player); + if (qs == null) + { + return htmltext; + } + switch (npc.getId()) + { + case ELRIKIA_VERDURE_ELDER: + { + if (qs.isCreated()) + { + htmltext = htmltext.replaceAll("%name%", player.getName()); + htmltext = "31620-01.htm"; + } + else if (qs.isCond(1)) + { + htmltext = "31620-05.html"; + } + break; + } + case DEVIANNE_TRUTH_SEEKER: + { + if (qs.isCond(1)) + { + htmltext = "31590-01.html"; + } + else if (qs.isCond(2)) + { + htmltext = "31590-03.html"; + } + break; + } + case LEONA_BLACKBIRD_FIRE_DRAGON_BRIDE: + { + if (qs.isCond(2)) + { + htmltext = "31595-01.html"; + } + break; + } + } + return htmltext; + } +} \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/QuestMasterHandler.java b/trunk/dist/game/data/scripts/quests/QuestMasterHandler.java index 0f021764b7..6c71df8a26 100644 --- a/trunk/dist/game/data/scripts/quests/QuestMasterHandler.java +++ b/trunk/dist/game/data/scripts/quests/QuestMasterHandler.java @@ -259,6 +259,7 @@ import quests.Q10421_AssassinationOfTheVarkaSilenosCommander.Q10421_Assassinatio import quests.Q10442_TheAnnihilatedPlains1.Q10442_TheAnnihilatedPlains1; import quests.Q10445_AnImpendingThreat.Q10445_AnImpendingThreat; import quests.Q10450_ADarkAmbition.Q10450_ADarkAmbition; +import quests.Q10455_ElikiasLetter.Q10455_ElikiasLetter; import quests.Q10460_ReturnOfTheAlligatorHunter.Q10460_ReturnOfTheAlligatorHunter; import quests.Q10461_TappingThePowerWithin.Q10461_TappingThePowerWithin; import quests.Q10464_BePreparedForAnything.Q10464_BePreparedForAnything; @@ -579,6 +580,7 @@ public class QuestMasterHandler Q10442_TheAnnihilatedPlains1.class, Q10445_AnImpendingThreat.class, Q10450_ADarkAmbition.class, + Q10455_ElikiasLetter.class, Q10460_ReturnOfTheAlligatorHunter.class, Q10461_TappingThePowerWithin.class, Q10464_BePreparedForAnything.class,