From cb4589d808a261a3160bb1efb98b84825e172bc0 Mon Sep 17 00:00:00 2001 From: MobiusDev <8391001+MobiusDevelopment@users.noreply.github.com> Date: Fri, 1 Apr 2016 07:49:38 +0000 Subject: [PATCH] Quest Divinity Protector (470). Contributed by gigilo1968. --- .../Q00470_DivinityProtector/31348-01.html | 3 + .../Q00470_DivinityProtector/32327-01.htm | 7 + .../Q00470_DivinityProtector/32327-02.htm | 5 + .../Q00470_DivinityProtector/32327-03.htm | 4 + .../Q00470_DivinityProtector/32327-04.htm | 4 + .../Q00470_DivinityProtector/32327-05.html | 3 + .../Q00470_DivinityProtector/32327-07.html | 5 + .../Q00470_DivinityProtector.java | 164 ++++++++++++++++++ .../Q00470_DivinityProtector/no_level.html | 3 + .../scripts/quests/QuestMasterHandler.java | 2 + 10 files changed, 200 insertions(+) create mode 100644 trunk/dist/game/data/scripts/quests/Q00470_DivinityProtector/31348-01.html create mode 100644 trunk/dist/game/data/scripts/quests/Q00470_DivinityProtector/32327-01.htm create mode 100644 trunk/dist/game/data/scripts/quests/Q00470_DivinityProtector/32327-02.htm create mode 100644 trunk/dist/game/data/scripts/quests/Q00470_DivinityProtector/32327-03.htm create mode 100644 trunk/dist/game/data/scripts/quests/Q00470_DivinityProtector/32327-04.htm create mode 100644 trunk/dist/game/data/scripts/quests/Q00470_DivinityProtector/32327-05.html create mode 100644 trunk/dist/game/data/scripts/quests/Q00470_DivinityProtector/32327-07.html create mode 100644 trunk/dist/game/data/scripts/quests/Q00470_DivinityProtector/Q00470_DivinityProtector.java create mode 100644 trunk/dist/game/data/scripts/quests/Q00470_DivinityProtector/no_level.html diff --git a/trunk/dist/game/data/scripts/quests/Q00470_DivinityProtector/31348-01.html b/trunk/dist/game/data/scripts/quests/Q00470_DivinityProtector/31348-01.html new file mode 100644 index 0000000000..7bc1d7c2c3 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q00470_DivinityProtector/31348-01.html @@ -0,0 +1,3 @@ +High Priest Agripel:
+Praise to the Gods for sending a divine adventurer to save Rune Township from the evils that spread from the Valley of Saints. Here is your reward for completing this task. + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q00470_DivinityProtector/32327-01.htm b/trunk/dist/game/data/scripts/quests/Q00470_DivinityProtector/32327-01.htm new file mode 100644 index 0000000000..a06cdbf1b9 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q00470_DivinityProtector/32327-01.htm @@ -0,0 +1,7 @@ +Adventurers' Guide:
+Are you still looking for work? High Priest Agripel of Rune Township needs some help.
+Agripel suspects the rise in evil around Rune Township is due to creatures inhabiting the Valley of Saints. He suggests a "cleansing."
+Agripel is not looking for zealots, just mercenaries willing to do a task for rewards.
+ + + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q00470_DivinityProtector/32327-02.htm b/trunk/dist/game/data/scripts/quests/Q00470_DivinityProtector/32327-02.htm new file mode 100644 index 0000000000..4006796675 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q00470_DivinityProtector/32327-02.htm @@ -0,0 +1,5 @@ +Adventurers' Guide:
+By request, you are to destroy creatures that inhabit the Valley of Saints... specifically the Splendors, Judges, and Pilgrims.
+After death they should fade from existence, leaving behind some Remnant Ash. Gather 20 piles of Remnant Ash and deliver it to High Priest Agripel.
+ + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q00470_DivinityProtector/32327-03.htm b/trunk/dist/game/data/scripts/quests/Q00470_DivinityProtector/32327-03.htm new file mode 100644 index 0000000000..bf5749eaac --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q00470_DivinityProtector/32327-03.htm @@ -0,0 +1,4 @@ +Adventurers' Guide:
+Not exactly, but I suppose it might seem like that depending on your process. Haven't you ever noticed that after killing a monster the corpse tends to vanish? It does not completely disappear, just dissolves into a fine, powdery substance resembling ash. It's usually blown away by the wind. Possibly more information than you need... just collect the Remnant Ash and return it to High Priest Agripel in Rune Township's Einhasad Temple for payment.
Will you work on this task?
+ + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q00470_DivinityProtector/32327-04.htm b/trunk/dist/game/data/scripts/quests/Q00470_DivinityProtector/32327-04.htm new file mode 100644 index 0000000000..797fc259b5 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q00470_DivinityProtector/32327-04.htm @@ -0,0 +1,4 @@ +Adventurers' Guide:
+Good. Here is a list of all the creatures you should hunt.
+Kill the following: Eyes of Splendor, Claws of Splendor, Flashes of Splendor, Blades of Splendor, Wisdom of Splendor, Pilgrim's Disciples, Pilgrim's Servants, Fury of Splendor, Souls of Splendor, Pilgrims of Splendor, Victories of Splendor, Punishments of Splendor, Shouts of Splendor, Alliances of Splendor, Signets of Splendor, Crowns of Splendor, Judges of Fire, Judges of Light, Fangs of Splendor, Wailings of Splendor, and Judges of Splendor. Collect 20 Piles of Remnant Ash and deliver them to High Priest Agripel in the Town of Rune. + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q00470_DivinityProtector/32327-05.html b/trunk/dist/game/data/scripts/quests/Q00470_DivinityProtector/32327-05.html new file mode 100644 index 0000000000..cf7f7cc89b --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q00470_DivinityProtector/32327-05.html @@ -0,0 +1,3 @@ +Adventurers' Guide:
+Here's a quick recap:
Kill the following: Eyes of Splendor, Claws of Splendor, Flashes of Splendor, Blades of Splendor, Wisdom of Splendor, Pilgrim's Disciples, Pilgrim's Servants, Fury of Splendor, Souls of Splendor, Pilgrims of Splendor, Victories of Splendor, Punishments of Splendor, Shouts of Splendor, Alliances of Splendor, Signets of Splendor, Crowns of Splendor, Judges of Fire, Judges of Light, Fangs of Splendor, Wailings of Splendor, and Judges of Splendor. Collect 20 Piles of Remnant Ash and deliver them to High Priest Agripel in the Town of Rune. + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q00470_DivinityProtector/32327-07.html b/trunk/dist/game/data/scripts/quests/Q00470_DivinityProtector/32327-07.html new file mode 100644 index 0000000000..9d743ea29d --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q00470_DivinityProtector/32327-07.html @@ -0,0 +1,5 @@ +Adventurers' Guide:
+You already did what I asked today, remember?
+Thanks, but I don't need anything else right now.
+(You can only undertake this quest once a day. It resets every day at 6:30 AM.) + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q00470_DivinityProtector/Q00470_DivinityProtector.java b/trunk/dist/game/data/scripts/quests/Q00470_DivinityProtector/Q00470_DivinityProtector.java new file mode 100644 index 0000000000..ecbbdb5d9a --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q00470_DivinityProtector/Q00470_DivinityProtector.java @@ -0,0 +1,164 @@ +/* + * 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.Q00470_DivinityProtector; + +import com.l2jmobius.gameserver.enums.QuestType; +import com.l2jmobius.gameserver.model.actor.L2Npc; +import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; +import com.l2jmobius.gameserver.model.holders.ItemHolder; +import com.l2jmobius.gameserver.model.quest.Quest; +import com.l2jmobius.gameserver.model.quest.QuestState; + +/** + * Divinity Protector (470) + * @URL https://l2wiki.com/Divinity_Protector + * @author Gigi + */ +public class Q00470_DivinityProtector extends Quest +{ + // NPC + private static final int ADVANTURES_GUIDE = 32327; + private static final int AGRIPEL = 31348; + // MONSTERS + private static final int[] MOBS = + { + 21520, // Eye of Splendor + 21521, // Claws of Splendor + 21523, // Flash of Splendor + 21524, // Blade of Splendor + 21526, // Wisdom of Splendor + 21527, // Fury of Splendor + 21529, // Soul of Splendor + 21530, // Victory of Splendor + 21531, // Punishment of Splendor + 21532, // Shout of Splendor + 21533, // Alliance of Splendor + 21535, // Signet of Splendor + 21536, // Crown of Splendor + 21537, // Fang of Splendor + 21539, // Wailing of Splendor + 21541, // Pilgrim of Splendor + 21542, // Pilgrim's Disciple + 21543, // Pilgrim's Servant + 21545, // Judge of Fire + 21546 // Judge of Light + }; + // Items + private static final int REMNANT_ASH = 19489; // Remnant Ash + private static final ItemHolder ADENA = new ItemHolder(57, 194000); // Adena + // Misc + private static final int MIN_LEVEL = 60; + private static final int MAX_LEVEL = 64; + // Reward + private static final int EXP_REWARD = 1879400; + private static final int SP_REWARD = 451; + + public Q00470_DivinityProtector() + { + super(470, Q00470_DivinityProtector.class.getSimpleName(), "Divinity Protector"); + addStartNpc(ADVANTURES_GUIDE); + addTalkId(ADVANTURES_GUIDE, AGRIPEL); + registerQuestItems(REMNANT_ASH); + addKillId(MOBS); + addCondLevel(MIN_LEVEL, MAX_LEVEL, "no_level.html"); + } + + @Override + public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) + { + String htmltext = event; + final QuestState qs = getQuestState(player, false); + if (qs == null) + { + return getNoQuestMsg(player); + } + + switch (event) + { + case "32327-02.htm": + case "32327-03.htm": + { + htmltext = event; + break; + } + case "32327-04.htm": + { + qs.startQuest(); + htmltext = event; + break; + } + } + return htmltext; + } + + @Override + public String onTalk(L2Npc npc, L2PcInstance player) + { + final QuestState qs = getQuestState(player, true); + String htmltext = getNoQuestMsg(player); + + switch (npc.getId()) + { + case ADVANTURES_GUIDE: + { + if (qs.isCreated()) + { + htmltext = "32327-01.htm"; + } + else if (qs.getCond() > 0) + { + htmltext = "32327-05.html"; + } + else if (qs.isCompleted()) + { + if (!qs.isNowAvailable()) + { + htmltext = "32327-07.html"; + } + } + break; + } + case AGRIPEL: + { + if ((qs.isCond(2)) && (getQuestItemsCount(player, REMNANT_ASH) >= 20)) + { + takeItems(player, REMNANT_ASH, 20); + giveItems(player, ADENA); + addExpAndSp(player, EXP_REWARD, SP_REWARD); + qs.exitQuest(QuestType.DAILY, true); + htmltext = "31348-01.html"; + } + break; + } + } + return htmltext; + } + + @Override + public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon) + { + final QuestState qs = getQuestState(killer, false); + if ((qs != null) && qs.isCond(1)) + { + if (giveItemRandomly(killer, npc, REMNANT_ASH, 1, 20, 0.1, true)) + { + qs.setCond(2, true); + } + } + return super.onKill(npc, killer, isSummon); + } +} \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q00470_DivinityProtector/no_level.html b/trunk/dist/game/data/scripts/quests/Q00470_DivinityProtector/no_level.html new file mode 100644 index 0000000000..5b45094dc1 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q00470_DivinityProtector/no_level.html @@ -0,0 +1,3 @@ +You don't meet level requirements
+(Quest available from level 60 - 64) + \ 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 0eb0016a84..4d5fb83fd1 100644 --- a/trunk/dist/game/data/scripts/quests/QuestMasterHandler.java +++ b/trunk/dist/game/data/scripts/quests/QuestMasterHandler.java @@ -129,6 +129,7 @@ import quests.Q00457_LostAndFound.Q00457_LostAndFound; import quests.Q00458_PerfectForm.Q00458_PerfectForm; import quests.Q00463_IMustBeaGenius.Q00463_IMustBeaGenius; import quests.Q00464_Oath.Q00464_Oath; +import quests.Q00470_DivinityProtector.Q00470_DivinityProtector; import quests.Q00471_BreakingThroughTheEmeraldSquare.Q00471_BreakingThroughTheEmeraldSquare; import quests.Q00472_ChallengeSteamCorridor.Q00472_ChallengeSteamCorridor; import quests.Q00473_InTheCoralGarden.Q00473_InTheCoralGarden; @@ -422,6 +423,7 @@ final class QuestMasterHandler Q00458_PerfectForm.class, Q00463_IMustBeaGenius.class, Q00464_Oath.class, + Q00470_DivinityProtector.class, Q00471_BreakingThroughTheEmeraldSquare.class, Q00472_ChallengeSteamCorridor.class, Q00473_InTheCoralGarden.class,