From b7301fd73f3e2142331b1e3aa60f3fbea950f934 Mon Sep 17 00:00:00 2001 From: Zoey76 <zoey_76@msn.com> Date: Mon, 7 Jan 2013 03:58:00 +0000 Subject: [PATCH] BETA: Adding two missing quests: * Jewel of Antharas (10504) * Jewel of Valakas (10505) * Minor improvements to quests * The Call of Antharas (903) * Dragon Trophy - Antharas (904) * The Call of Valakas (906) * Dragon Trophy - Valakas (907) --- L2J_DataPack_BETA/dist/game/data/scripts.cfg | 2 + .../Q00903_TheCallOfAntharas.java | 14 +- .../Q00904_DragonTrophyAntharas.java | 23 +-- .../Q00906_TheCallOfValakas.java | 14 +- .../Q00907_DragonTrophyValakas.java | 23 +-- .../Q10504_JewelOfAntharas/30755-01.htm | 4 + .../Q10504_JewelOfAntharas/30755-02.html | 4 + .../Q10504_JewelOfAntharas/30755-03.html | 4 + .../Q10504_JewelOfAntharas/30755-04.html | 4 + .../Q10504_JewelOfAntharas/30755-05.htm | 4 + .../Q10504_JewelOfAntharas/30755-06.htm | 4 + .../Q10504_JewelOfAntharas/30755-07.html | 5 + .../Q10504_JewelOfAntharas/30755-08.html | 3 + .../Q10504_JewelOfAntharas/30755-09.html | 3 + .../Q10504_JewelOfAntharas/30755-10.html | 7 + .../Q10504_JewelOfAntharas.java | 173 ++++++++++++++++++ .../quests/Q10505_JewelOfValakas/31540-01.htm | 4 + .../Q10505_JewelOfValakas/31540-02.html | 4 + .../Q10505_JewelOfValakas/31540-03.html | 4 + .../Q10505_JewelOfValakas/31540-04.html | 4 + .../quests/Q10505_JewelOfValakas/31540-05.htm | 5 + .../quests/Q10505_JewelOfValakas/31540-06.htm | 5 + .../Q10505_JewelOfValakas/31540-07.html | 5 + .../Q10505_JewelOfValakas/31540-08.html | 3 + .../Q10505_JewelOfValakas/31540-09.html | 6 + .../Q10505_JewelOfValakas/31540-10.html | 7 + .../Q10505_JewelOfValakas.java | 170 +++++++++++++++++ 27 files changed, 452 insertions(+), 56 deletions(-) create mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10504_JewelOfAntharas/30755-01.htm create mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10504_JewelOfAntharas/30755-02.html create mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10504_JewelOfAntharas/30755-03.html create mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10504_JewelOfAntharas/30755-04.html create mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10504_JewelOfAntharas/30755-05.htm create mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10504_JewelOfAntharas/30755-06.htm create mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10504_JewelOfAntharas/30755-07.html create mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10504_JewelOfAntharas/30755-08.html create mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10504_JewelOfAntharas/30755-09.html create mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10504_JewelOfAntharas/30755-10.html create mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10504_JewelOfAntharas/Q10504_JewelOfAntharas.java create mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10505_JewelOfValakas/31540-01.htm create mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10505_JewelOfValakas/31540-02.html create mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10505_JewelOfValakas/31540-03.html create mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10505_JewelOfValakas/31540-04.html create mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10505_JewelOfValakas/31540-05.htm create mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10505_JewelOfValakas/31540-06.htm create mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10505_JewelOfValakas/31540-07.html create mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10505_JewelOfValakas/31540-08.html create mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10505_JewelOfValakas/31540-09.html create mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10505_JewelOfValakas/31540-10.html create mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10505_JewelOfValakas/Q10505_JewelOfValakas.java diff --git a/L2J_DataPack_BETA/dist/game/data/scripts.cfg b/L2J_DataPack_BETA/dist/game/data/scripts.cfg index 682958c798..1f8087eaa7 100644 --- a/L2J_DataPack_BETA/dist/game/data/scripts.cfg +++ b/L2J_DataPack_BETA/dist/game/data/scripts.cfg @@ -724,6 +724,8 @@ quests/Q10288_SecretMission/Q10288_SecretMission.java quests/Q10289_FadeToBlack/Q10289_FadeToBlack.java quests/Q10290_LandDragonConqueror/Q10290_LandDragonConqueror.java quests/Q10291_FireDragonDestroyer/Q10291_FireDragonDestroyer.java +quests/Q10504_JewelOfAntharas/Q10504_JewelOfAntharas.java +quests/Q10505_JewelOfValakas/Q10505_JewelOfValakas.java # Custom custom/Nottingale/Nottingale.java diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00903_TheCallOfAntharas/Q00903_TheCallOfAntharas.java b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00903_TheCallOfAntharas/Q00903_TheCallOfAntharas.java index 53bbd4b2e8..c7def6e45e 100644 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00903_TheCallOfAntharas/Q00903_TheCallOfAntharas.java +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00903_TheCallOfAntharas/Q00903_TheCallOfAntharas.java @@ -64,25 +64,19 @@ public class Q00903_TheCallOfAntharas extends Quest } String htmltext = null; - if (player.getLevel() >= MIN_LEVEL) + if ((player.getLevel() >= MIN_LEVEL) && st.hasQuestItems(PORTAL_STONE)) { switch (event) { case "30755-05.htm": { - if ((player.getLevel() >= MIN_LEVEL) && st.hasQuestItems(PORTAL_STONE)) - { - htmltext = event; - } + htmltext = event; break; } case "30755-06.html": { - if ((player.getLevel() >= MIN_LEVEL) && st.hasQuestItems(PORTAL_STONE)) - { - st.startQuest(); - htmltext = event; - } + st.startQuest(); + htmltext = event; break; } } diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00904_DragonTrophyAntharas/Q00904_DragonTrophyAntharas.java b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00904_DragonTrophyAntharas/Q00904_DragonTrophyAntharas.java index 49548111fe..4a3661d3ff 100644 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00904_DragonTrophyAntharas/Q00904_DragonTrophyAntharas.java +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00904_DragonTrophyAntharas/Q00904_DragonTrophyAntharas.java @@ -63,33 +63,20 @@ public class Q00904_DragonTrophyAntharas extends Quest } String htmltext = null; - if (player.getLevel() >= MIN_LEVEL) + if ((player.getLevel() >= MIN_LEVEL) && st.hasQuestItems(PORTAL_STONE)) { switch (event) { case "30755-05.htm": - { - if ((player.getLevel() >= MIN_LEVEL) && st.hasQuestItems(PORTAL_STONE)) - { - htmltext = event; - } - break; - } case "30755-06.htm": { - if ((player.getLevel() >= MIN_LEVEL) && st.hasQuestItems(PORTAL_STONE)) - { - htmltext = event; - } + htmltext = event; break; } case "30755-07.html": { - if ((player.getLevel() >= MIN_LEVEL) && st.hasQuestItems(PORTAL_STONE)) - { - st.startQuest(); - htmltext = event; - } + st.startQuest(); + htmltext = event; break; } } @@ -177,7 +164,7 @@ public class Q00904_DragonTrophyAntharas extends Quest public String onKill(L2Npc npc, L2PcInstance killer, boolean isPet) { final QuestState st = killer.getQuestState(getName()); - if ((st != null) && Util.checkIfInRange(1500, npc, killer, false)) + if ((st != null) && st.isCond(1) && Util.checkIfInRange(1500, npc, killer, false)) { st.setCond(2, true); } diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00906_TheCallOfValakas/Q00906_TheCallOfValakas.java b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00906_TheCallOfValakas/Q00906_TheCallOfValakas.java index 53cb0fa751..1aaefab289 100644 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00906_TheCallOfValakas/Q00906_TheCallOfValakas.java +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00906_TheCallOfValakas/Q00906_TheCallOfValakas.java @@ -62,25 +62,19 @@ public class Q00906_TheCallOfValakas extends Quest } String htmltext = null; - if (player.getLevel() >= MIN_LEVEL) + if ((player.getLevel() >= MIN_LEVEL) && st.hasQuestItems(VACUALITE_FLOATING_STONE)) { switch (event) { case "31540-05.htm": { - if ((player.getLevel() >= MIN_LEVEL) && st.hasQuestItems(VACUALITE_FLOATING_STONE)) - { - htmltext = event; - } + htmltext = event; break; } case "31540-06.html": { - if ((player.getLevel() >= MIN_LEVEL) && st.hasQuestItems(VACUALITE_FLOATING_STONE)) - { - st.startQuest(); - htmltext = event; - } + st.startQuest(); + htmltext = event; break; } } diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00907_DragonTrophyValakas/Q00907_DragonTrophyValakas.java b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00907_DragonTrophyValakas/Q00907_DragonTrophyValakas.java index cc8deeb827..60a295d17e 100644 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00907_DragonTrophyValakas/Q00907_DragonTrophyValakas.java +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00907_DragonTrophyValakas/Q00907_DragonTrophyValakas.java @@ -60,33 +60,20 @@ public class Q00907_DragonTrophyValakas extends Quest } String htmltext = null; - if (player.getLevel() >= MIN_LEVEL) + if ((player.getLevel() >= MIN_LEVEL) && st.hasQuestItems(VACUALITE_FLOATING_STONE)) { switch (event) { case "31540-05.htm": - { - if ((player.getLevel() >= MIN_LEVEL) && st.hasQuestItems(VACUALITE_FLOATING_STONE)) - { - htmltext = event; - } - break; - } case "31540-06.htm": { - if ((player.getLevel() >= MIN_LEVEL) && st.hasQuestItems(VACUALITE_FLOATING_STONE)) - { - htmltext = event; - } + htmltext = event; break; } case "31540-07.html": { - if ((player.getLevel() >= MIN_LEVEL) && st.hasQuestItems(VACUALITE_FLOATING_STONE)) - { - st.startQuest(); - htmltext = event; - } + st.startQuest(); + htmltext = event; break; } } @@ -174,7 +161,7 @@ public class Q00907_DragonTrophyValakas extends Quest public String onKill(L2Npc npc, L2PcInstance killer, boolean isPet) { final QuestState st = killer.getQuestState(getName()); - if ((st != null) && Util.checkIfInRange(1500, npc, killer, false)) + if ((st != null) && st.isCond(1) && Util.checkIfInRange(1500, npc, killer, false)) { st.setCond(2, true); } diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10504_JewelOfAntharas/30755-01.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10504_JewelOfAntharas/30755-01.htm new file mode 100644 index 0000000000..3eaeec9fdd --- /dev/null +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10504_JewelOfAntharas/30755-01.htm @@ -0,0 +1,4 @@ +<html><body>Watcher of Antharas Theodric:<br> +You have a <font color="LEVEL">Portal Stone</font>... it means that you are one of the few who can challenge Antharas. I have a task that may interest you.<br> +<a action="bypass -h Quest Q10504_JewelOfAntharas 30755-05.htm">Continue listening.</a> +</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10504_JewelOfAntharas/30755-02.html b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10504_JewelOfAntharas/30755-02.html new file mode 100644 index 0000000000..e2d0bf7a24 --- /dev/null +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10504_JewelOfAntharas/30755-02.html @@ -0,0 +1,4 @@ +<html><body>Watcher of Antharas Theodric:<br> +You do not have the ability to hear my request... Please come back after raising your caliber...<br> +(Only characters above level 84 can undertake this quest.) +</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10504_JewelOfAntharas/30755-03.html b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10504_JewelOfAntharas/30755-03.html new file mode 100644 index 0000000000..255562fb30 --- /dev/null +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10504_JewelOfAntharas/30755-03.html @@ -0,0 +1,4 @@ +<html><body>Watcher of Antharas Theodric:<br> +Praise unto you for your great achievement in fulfilling my request...<br> +(You have already completed this quest.) +</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10504_JewelOfAntharas/30755-04.html b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10504_JewelOfAntharas/30755-04.html new file mode 100644 index 0000000000..450a16bd4a --- /dev/null +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10504_JewelOfAntharas/30755-04.html @@ -0,0 +1,4 @@ +<html><body>Watcher of Antharas Theodric:<br> +The fact that you don't have the <font color="LEVEL">Portal Stone</font> means you did not satisfy the minimum requirement for this mission.<br> +If you really want to hear my request, you must first be recognized by <font color="LEVEL">Gabriel</font> in Giran Village. +</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10504_JewelOfAntharas/30755-05.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10504_JewelOfAntharas/30755-05.htm new file mode 100644 index 0000000000..03179ce8e9 --- /dev/null +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10504_JewelOfAntharas/30755-05.htm @@ -0,0 +1,4 @@ +<html><body>Watcher of Antharas Theodric:<br> +Actually, it is more of a challenge than a task. I have this <font color="LEVEL">Clear Crystal</font> I would like you to fill with the energy of Antharas.<br> +<a action="bypass -h Quest Q10504_JewelOfAntharas 30755-06.htm">"Fill the crystal with energy... this sounds familiar."</a> +</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10504_JewelOfAntharas/30755-06.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10504_JewelOfAntharas/30755-06.htm new file mode 100644 index 0000000000..4e794408b7 --- /dev/null +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10504_JewelOfAntharas/30755-06.htm @@ -0,0 +1,4 @@ +<html><body>Watcher of Antharas Theodric:<br> +I have no idea what you are talking about. Maybe you are mistaking me for another Watcher and another Dragon. With this crystal in your possession, once you have defeated Antharas it should draw the energy of the land dragon into the crystal.<br> +<a action="bypass -h Quest Q10504_JewelOfAntharas 30755-07.html">Accept the mission.</a> +</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10504_JewelOfAntharas/30755-07.html b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10504_JewelOfAntharas/30755-07.html new file mode 100644 index 0000000000..a7032bc270 --- /dev/null +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10504_JewelOfAntharas/30755-07.html @@ -0,0 +1,5 @@ +<html><body>Watcher of Antharas Theodric:<br> +Excellent. Take this <font color="LEVEL">Clear Crystal</font>.<br> +I must warn you however, you will need <font color="LEVEL">many soldiers of equal skill in order to challenge Antharas.</font><br> +Best of luck to you, sir! +</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10504_JewelOfAntharas/30755-08.html b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10504_JewelOfAntharas/30755-08.html new file mode 100644 index 0000000000..decd790ac9 --- /dev/null +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10504_JewelOfAntharas/30755-08.html @@ -0,0 +1,3 @@ +<html><body>Watcher of Antharas Theodric:<br> +Apologies, sir! It does not appear as though you have defeated the land dragon. If you did that <font color="LEVEL">Clear Crystal</font> would be filled with Antharas’s energy. Good try though, sir! I’ll be keeping an eye on you and your shenanigans. +</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10504_JewelOfAntharas/30755-09.html b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10504_JewelOfAntharas/30755-09.html new file mode 100644 index 0000000000..61537a1baa --- /dev/null +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10504_JewelOfAntharas/30755-09.html @@ -0,0 +1,3 @@ +<html><body>Watcher of Antharas Theodric:<br> +Without the <font color="LEVEL">Clear Crystal</font>, you cannot contain Antharas's energy even after defeating it. So please take this Clear Crystal. +</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10504_JewelOfAntharas/30755-10.html b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10504_JewelOfAntharas/30755-10.html new file mode 100644 index 0000000000..e37ccc9435 --- /dev/null +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10504_JewelOfAntharas/30755-10.html @@ -0,0 +1,7 @@ +<html><body>Watcher of Antharas Theodric:<br> +Amazing! I congratulate you on your accomplishment!<br> +The crystal is filled with the energy of the land dragon.<br> +You have brought back the land dragon's energy.<br> +Alas... this victory is short lived. Though Antharas has been defeated and we may celebrate peace for now... the land dragon will return some day. <br> +As always, I shall sit here and wait for that time to come. And when it does I await your return to vanquish the land dragon again. Please, take this... it should help you when the time comes again. +</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10504_JewelOfAntharas/Q10504_JewelOfAntharas.java b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10504_JewelOfAntharas/Q10504_JewelOfAntharas.java new file mode 100644 index 0000000000..894b8d409d --- /dev/null +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10504_JewelOfAntharas/Q10504_JewelOfAntharas.java @@ -0,0 +1,173 @@ +/* + * Copyright (C) 2004-2013 L2J Server + * + * This file is part of L2J Server. + * + * L2J Server 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. + * + * L2J Server 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.Q10504_JewelOfAntharas; + +import com.l2jserver.gameserver.model.actor.L2Npc; +import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; +import com.l2jserver.gameserver.model.quest.Quest; +import com.l2jserver.gameserver.model.quest.QuestState; +import com.l2jserver.gameserver.model.quest.State; +import com.l2jserver.gameserver.util.Util; + +/** + * Jewel of Antharas (10504) + * @author Zoey76 + */ +public class Q10504_JewelOfAntharas extends Quest +{ + // NPC + private static final int THEODRIC = 30755; + // Monsters + private static final int ANTHARAS_OLD = 29019; + private static final int ANTHARAS_WEAK = 29066; + private static final int ANTHARAS_NORMAL = 29067; + private static final int ANTHARAS_STRONG = 29068; + // Items + private static final int CLEAR_CRYSTAL = 21905; + private static final int FILLED_CRYSTAL_ANTHARAS_ENERGY = 21907; + private static final int JEWEL_OF_ANTHARAS = 21898; + private static final int PORTAL_STONE = 3865; + // Misc + private static final int MIN_LEVEL = 84; + + private Q10504_JewelOfAntharas(int questId, String name, String descr) + { + super(questId, name, descr); + addStartNpc(THEODRIC); + addTalkId(THEODRIC); + addKillId(ANTHARAS_OLD, ANTHARAS_WEAK, ANTHARAS_NORMAL, ANTHARAS_STRONG); + registerQuestItems(CLEAR_CRYSTAL, FILLED_CRYSTAL_ANTHARAS_ENERGY); + } + + @Override + public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) + { + final QuestState st = player.getQuestState(getName()); + if (st == null) + { + return null; + } + + String htmltext = null; + if ((player.getLevel() >= MIN_LEVEL) && st.hasQuestItems(PORTAL_STONE)) + { + switch (event) + { + case "30755-05.htm": + case "30755-06.htm": + { + htmltext = event; + break; + } + case "30755-07.html": + { + st.startQuest(); + st.giveItems(CLEAR_CRYSTAL, 1); + htmltext = event; + break; + } + } + } + return htmltext; + } + + @Override + public String onTalk(L2Npc npc, L2PcInstance player) + { + final QuestState st = player.getQuestState(getName()); + if (st == null) + { + return getNoQuestMsg(player); + } + + String htmltext = getNoQuestMsg(player); + switch (st.getState()) + { + case State.CREATED: + { + if (player.getLevel() < MIN_LEVEL) + { + htmltext = "30755-02.html"; + } + else if (!st.hasQuestItems(PORTAL_STONE)) + { + htmltext = "30755-04.html"; + } + else + { + htmltext = "30755-01.htm"; + } + break; + } + case State.STARTED: + { + switch (st.getCond()) + { + case 1: + { + if (st.hasQuestItems(CLEAR_CRYSTAL)) + { + htmltext = "30755-08.html"; + } + else + { + st.giveItems(CLEAR_CRYSTAL, 1); + htmltext = "30755-09.html"; + } + break; + } + case 2: + { + st.giveItems(JEWEL_OF_ANTHARAS, 1); + st.playSound(QuestSound.ITEMSOUND_QUEST_ITEMGET); + st.exitQuest(false, true); + htmltext = "30755-10.html"; + break; + } + } + break; + } + case State.COMPLETED: + { + htmltext = "30755-03.html"; + break; + } + } + return htmltext; + } + + @Override + public String onKill(L2Npc npc, L2PcInstance killer, boolean isPet) + { + final QuestState st = killer.getQuestState(getName()); + if ((st != null) && st.isCond(1) && Util.checkIfInRange(1500, npc, killer, false)) + { + st.takeItems(CLEAR_CRYSTAL, -1); + st.giveItems(FILLED_CRYSTAL_ANTHARAS_ENERGY, 1); + st.playSound(QuestSound.ITEMSOUND_QUEST_ITEMGET); + st.setCond(2, true); + } + return super.onKill(npc, killer, isPet); + } + + public static void main(String[] args) + { + new Q10504_JewelOfAntharas(10504, Q10504_JewelOfAntharas.class.getSimpleName(), "Jewel of Antharas"); + } +} diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10505_JewelOfValakas/31540-01.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10505_JewelOfValakas/31540-01.htm new file mode 100644 index 0000000000..53a21281b1 --- /dev/null +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10505_JewelOfValakas/31540-01.htm @@ -0,0 +1,4 @@ +<html><body>Watcher of Valakas Klein:<br> +You again... I thought I gave you a different errand. Or was it someone else?<br> +<a action="bypass -h Quest Q10505_JewelOfValakas 31540-05.htm">"No, you've given me a few things to do."</a> +</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10505_JewelOfValakas/31540-02.html b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10505_JewelOfValakas/31540-02.html new file mode 100644 index 0000000000..9d6b0a9480 --- /dev/null +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10505_JewelOfValakas/31540-02.html @@ -0,0 +1,4 @@ +<html><body>Watcher of Valakas Klein:<br> +You do not have the ability to hear my request... Please come back after raising your caliber...<br> +(Only characters above level 83 can undertake this quest.) +</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10505_JewelOfValakas/31540-03.html b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10505_JewelOfValakas/31540-03.html new file mode 100644 index 0000000000..0924200323 --- /dev/null +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10505_JewelOfValakas/31540-03.html @@ -0,0 +1,4 @@ +<html><body>Watcher of Valakas Klein:<br> +Praise unto you for your great achievement in fulfilling my request...<br> +(You have already completed this quest.) +</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10505_JewelOfValakas/31540-04.html b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10505_JewelOfValakas/31540-04.html new file mode 100644 index 0000000000..7d246074fd --- /dev/null +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10505_JewelOfValakas/31540-04.html @@ -0,0 +1,4 @@ +<html><body>Watcher of Valakas Klein:<br> +The fact that you don't have the <font color="LEVEL">Vacualite Floating Stone</font> means you did not satisfy the minimum requirement for this mission.<br> +If you really want to hear my request, you must first obtain a <font color="LEVEL">Vacualite Floating Stone</font>. +</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10505_JewelOfValakas/31540-05.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10505_JewelOfValakas/31540-05.htm new file mode 100644 index 0000000000..87cc64d47a --- /dev/null +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10505_JewelOfValakas/31540-05.htm @@ -0,0 +1,5 @@ +<html><body>Watcher of Valakas Klein:<br> +Really? Okay... Hmm... <br> +Why don't you take... ah... this <font color="LEVEL">Empty Crystal</font> and... fill it with... the energy of Valakas.<br> +<a action="bypass -h Quest Q10505_JewelOfValakas 31540-06.htm">"Fill the crystal with energy... why?"</a> +</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10505_JewelOfValakas/31540-06.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10505_JewelOfValakas/31540-06.htm new file mode 100644 index 0000000000..581998c062 --- /dev/null +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10505_JewelOfValakas/31540-06.htm @@ -0,0 +1,5 @@ +<html><body>Watcher of Valakas Klein:<br> +Never you mind, that's why! <br> +You think it is easy coming up with different reasons for you adventurers to go fight Valakas? He's big, bad, evil and scary. You want a reward for killing him then you bring me back a <font color="LEVEL">Crystal filled with the energy of Valakas!</font><br> +<a action="bypass -h Quest Q10505_JewelOfValakas 31540-07.html">"Okay... I'll go fill the crystal with the energy of Valakas"</a> +</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10505_JewelOfValakas/31540-07.html b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10505_JewelOfValakas/31540-07.html new file mode 100644 index 0000000000..c6d5e45588 --- /dev/null +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10505_JewelOfValakas/31540-07.html @@ -0,0 +1,5 @@ +<html><body>Watcher of Valakas Klein:<br> +Good. Here is the <font color="LEVEL">Empty Crystal</font>.<br> +As always, the same rules apply. Don't go alone, it's dangerous in there, be sure to <font color="LEVEL">gather a large group of skilled adventurers</font>, and try not to die.<br> +Kill the beast, grab the energy, and visit me once you have completed your task. +</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10505_JewelOfValakas/31540-08.html b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10505_JewelOfValakas/31540-08.html new file mode 100644 index 0000000000..74335e8803 --- /dev/null +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10505_JewelOfValakas/31540-08.html @@ -0,0 +1,3 @@ +<html><body>Watcher of Valakas Klein:<br> +If you truly defeat the fire dragon, that <font color="LEVEL">Empty Crystal</font> shall be filled with Valakas's energy. Now, please be on your way. I shall be watching you. +</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10505_JewelOfValakas/31540-09.html b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10505_JewelOfValakas/31540-09.html new file mode 100644 index 0000000000..2d26abab03 --- /dev/null +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10505_JewelOfValakas/31540-09.html @@ -0,0 +1,6 @@ +<html><body>Watcher of Valakas Klein:<br> +Excellent. I can finally make my Valakas Martini. I would share with you, but given your condition of being alive I wouldn't recommend it. It has a killer bite... literally.<br> +Oh, don't look so upset... once you've become undead maybe you can try a sip, but until that time you are just going to have to accept the consolation prize.<br> +The Jewel of Valakas... a one way trip straight to the doorstep of Valakas himself. It will come in handy so you don't have to go through the business just to get there.<br> +Now if you will excuse me... its me time. +</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10505_JewelOfValakas/31540-10.html b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10505_JewelOfValakas/31540-10.html new file mode 100644 index 0000000000..ff573de26a --- /dev/null +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10505_JewelOfValakas/31540-10.html @@ -0,0 +1,7 @@ +<html><body>Watcher of Valakas Klein:<br> +Praise unto you for your great feat!<br> +You have heard my request.<br> +You have obtained the fire dragon's energy.<br> +But the fire dragon has not fully retreated...<br> +When you go against the beast in earnest, I shall give this to you... +</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10505_JewelOfValakas/Q10505_JewelOfValakas.java b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10505_JewelOfValakas/Q10505_JewelOfValakas.java new file mode 100644 index 0000000000..a0586d8180 --- /dev/null +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10505_JewelOfValakas/Q10505_JewelOfValakas.java @@ -0,0 +1,170 @@ +/* + * Copyright (C) 2004-2013 L2J Server + * + * This file is part of L2J Server. + * + * L2J Server 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. + * + * L2J Server 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.Q10505_JewelOfValakas; + +import com.l2jserver.gameserver.model.actor.L2Npc; +import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; +import com.l2jserver.gameserver.model.quest.Quest; +import com.l2jserver.gameserver.model.quest.QuestState; +import com.l2jserver.gameserver.model.quest.State; +import com.l2jserver.gameserver.util.Util; + +/** + * Jewel of Valakas (10505) + * @author Zoey76 + */ +public class Q10505_JewelOfValakas extends Quest +{ + // NPC + private static final int KLEIN = 31540; + // Monster + private static final int VALAKAS = 29028; + // Items + private static final int EMPTY_CRYSTAL = 21906; + private static final int FILLED_CRYSTAL_VALAKAS_ENERGY = 21908; + private static final int JEWEL_OF_VALAKAS = 21898; + private static final int VACUALITE_FLOATING_STONE = 7267; + // Misc + private static final int MIN_LEVEL = 83; + + private Q10505_JewelOfValakas(int questId, String name, String descr) + { + super(questId, name, descr); + addStartNpc(KLEIN); + addTalkId(KLEIN); + addKillId(VALAKAS); + registerQuestItems(EMPTY_CRYSTAL, FILLED_CRYSTAL_VALAKAS_ENERGY); + } + + @Override + public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) + { + final QuestState st = player.getQuestState(getName()); + if (st == null) + { + return null; + } + + String htmltext = null; + if ((player.getLevel() >= MIN_LEVEL) && st.hasQuestItems(VACUALITE_FLOATING_STONE)) + { + switch (event) + { + case "31540-05.htm": + case "31540-06.htm": + { + htmltext = event; + break; + } + case "31540-07.html": + { + st.startQuest(); + st.giveItems(EMPTY_CRYSTAL, 1); + htmltext = event; + break; + } + } + } + return htmltext; + } + + @Override + public String onTalk(L2Npc npc, L2PcInstance player) + { + final QuestState st = player.getQuestState(getName()); + if (st == null) + { + return getNoQuestMsg(player); + } + + String htmltext = getNoQuestMsg(player); + switch (st.getState()) + { + case State.CREATED: + { + if (player.getLevel() < MIN_LEVEL) + { + htmltext = "31540-02.html"; + } + else if (!st.hasQuestItems(VACUALITE_FLOATING_STONE)) + { + htmltext = "31540-04.html"; + } + else + { + htmltext = "31540-01.htm"; + } + break; + } + case State.STARTED: + { + switch (st.getCond()) + { + case 1: + { + if (st.hasQuestItems(EMPTY_CRYSTAL)) + { + htmltext = "31540-08.html"; + } + else + { + st.giveItems(EMPTY_CRYSTAL, 1); + htmltext = "31540-09.html"; + } + break; + } + case 2: + { + st.giveItems(JEWEL_OF_VALAKAS, 1); + st.playSound(QuestSound.ITEMSOUND_QUEST_ITEMGET); + st.exitQuest(false, true); + htmltext = "31540-10.html"; + break; + } + } + break; + } + case State.COMPLETED: + { + htmltext = "31540-03.html"; + break; + } + } + return htmltext; + } + + @Override + public String onKill(L2Npc npc, L2PcInstance killer, boolean isPet) + { + final QuestState st = killer.getQuestState(getName()); + if ((st != null) && st.isCond(1) && Util.checkIfInRange(1500, npc, killer, false)) + { + st.takeItems(EMPTY_CRYSTAL, -1); + st.giveItems(FILLED_CRYSTAL_VALAKAS_ENERGY, 1); + st.playSound(QuestSound.ITEMSOUND_QUEST_ITEMGET); + st.setCond(2, true); + } + return super.onKill(npc, killer, isPet); + } + + public static void main(String[] args) + { + new Q10505_JewelOfValakas(10505, Q10505_JewelOfValakas.class.getSimpleName(), "Jewel of Valakas"); + } +} -- GitLab