From 25f791b0ad86958e954d148a0d276ee91b13f166 Mon Sep 17 00:00:00 2001
From: MobiusDevelopment <8391001+MobiusDevelopment@users.noreply.github.com>
Date: Thu, 18 Apr 2019 00:21:17 +0000
Subject: [PATCH] Addition of missing Fafurion temple quests.
---
.../data/scripts/quests/MissingQuests.txt | 3 -
.../scripts/quests/QuestMasterHandler.java | 9 +-
.../Q10518_SucceedingThePriestess.java | 258 ++++++++++++++++++
.../accept_1.htm | 3 +
.../accept_2.html | 3 +
.../finish_1.html | 4 +
.../finish_2.html | 4 +
.../Q10518_SucceedingThePriestess/reward.html | 3 +
.../Q10518_SucceedingThePriestess/start.htm | 5 +
.../Q10519_ControllingYourTemper.java | 158 +++++++++++
.../Q10519_ControllingYourTemper/accept.htm | 3 +
.../Q10519_ControllingYourTemper/finish.html | 4 +
.../Q10519_ControllingYourTemper/reward.html | 3 +
.../Q10519_ControllingYourTemper/start.htm | 5 +
.../Q10520_TempleGuardians.java | 158 +++++++++++
.../custom/Q10520_TempleGuardians/accept.htm | 3 +
.../custom/Q10520_TempleGuardians/finish.html | 4 +
.../custom/Q10520_TempleGuardians/reward.html | 3 +
.../custom/Q10520_TempleGuardians/start.htm | 5 +
.../Q10518_SucceedingThePriestess.java | 36 ---
.../Q10519_ControllingYourTemper.java | 36 ---
.../not_done/Q10520_TempleGuardians.java | 36 ---
.../game/data/stats/items/80300-80399.xml | 2 +
23 files changed, 634 insertions(+), 114 deletions(-)
create mode 100644 L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/custom/Q10518_SucceedingThePriestess/Q10518_SucceedingThePriestess.java
create mode 100644 L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/custom/Q10518_SucceedingThePriestess/accept_1.htm
create mode 100644 L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/custom/Q10518_SucceedingThePriestess/accept_2.html
create mode 100644 L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/custom/Q10518_SucceedingThePriestess/finish_1.html
create mode 100644 L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/custom/Q10518_SucceedingThePriestess/finish_2.html
create mode 100644 L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/custom/Q10518_SucceedingThePriestess/reward.html
create mode 100644 L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/custom/Q10518_SucceedingThePriestess/start.htm
create mode 100644 L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/custom/Q10519_ControllingYourTemper/Q10519_ControllingYourTemper.java
create mode 100644 L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/custom/Q10519_ControllingYourTemper/accept.htm
create mode 100644 L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/custom/Q10519_ControllingYourTemper/finish.html
create mode 100644 L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/custom/Q10519_ControllingYourTemper/reward.html
create mode 100644 L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/custom/Q10519_ControllingYourTemper/start.htm
create mode 100644 L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/custom/Q10520_TempleGuardians/Q10520_TempleGuardians.java
create mode 100644 L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/custom/Q10520_TempleGuardians/accept.htm
create mode 100644 L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/custom/Q10520_TempleGuardians/finish.html
create mode 100644 L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/custom/Q10520_TempleGuardians/reward.html
create mode 100644 L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/custom/Q10520_TempleGuardians/start.htm
delete mode 100644 L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/not_done/Q10518_SucceedingThePriestess.java
delete mode 100644 L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/not_done/Q10519_ControllingYourTemper.java
delete mode 100644 L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/not_done/Q10520_TempleGuardians.java
diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/MissingQuests.txt b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/MissingQuests.txt
index 9b83b08163..e010c1e3e0 100644
--- a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/MissingQuests.txt
+++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/MissingQuests.txt
@@ -179,9 +179,6 @@
10423 Embryo Stronghold Ambush
10454 Final Embryo Apostle
10457 Kefensis' Illusion
-10518 Succeeding the Priestess
-10519 Controlling Your Temper
-10520 Temple Guardians
10531 Odd Happenings at Dragon Valley Strange Things Afoot in the Valley
10532 Uncovering the Conspiracy Eliminate the Undead and Dragons
10533 Orfen's Ambition
diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/QuestMasterHandler.java b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/QuestMasterHandler.java
index 1039835716..defbc166b6 100644
--- a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/QuestMasterHandler.java
+++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/QuestMasterHandler.java
@@ -410,6 +410,9 @@ import quests.custom.Q00683_AdventOfKrofinSubspecies.Q00683_AdventOfKrofinSubspe
import quests.custom.Q00684_DisturbedFields.Q00684_DisturbedFields;
import quests.custom.Q10516_UnveiledFafurionTemple.Q10516_UnveiledFafurionTemple;
import quests.custom.Q10517_FafurionsMinions.Q10517_FafurionsMinions;
+import quests.custom.Q10518_SucceedingThePriestess.Q10518_SucceedingThePriestess;
+import quests.custom.Q10519_ControllingYourTemper.Q10519_ControllingYourTemper;
+import quests.custom.Q10520_TempleGuardians.Q10520_TempleGuardians;
import quests.custom.Q10529_IvoryTowersResearchFloatingSeaJournal.Q10529_IvoryTowersResearchFloatingSeaJournal;
import quests.not_done.*;
@@ -787,9 +790,9 @@ public class QuestMasterHandler
Q10505_JewelOfValakas.class,
Q10516_UnveiledFafurionTemple.class, // FIXME: Custom.
Q10517_FafurionsMinions.class, // FIXME: Custom.
- Q10518_SucceedingThePriestess.class, // TODO: Not done.
- Q10519_ControllingYourTemper.class, // TODO: Not done.
- Q10520_TempleGuardians.class, // TODO: Not done.
+ Q10518_SucceedingThePriestess.class, // FIXME: Custom.
+ Q10519_ControllingYourTemper.class, // FIXME: Custom.
+ Q10520_TempleGuardians.class, // FIXME: Custom.
Q10521_QueenNavarisLetterVarkaSilenosBarracks.class,
Q10522_TheDarkSecretOfVarkaSilenos.class,
Q10523_TheAssassinationOfTheVarkaSilenosCommander.class,
diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/custom/Q10518_SucceedingThePriestess/Q10518_SucceedingThePriestess.java b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/custom/Q10518_SucceedingThePriestess/Q10518_SucceedingThePriestess.java
new file mode 100644
index 0000000000..78cdad881d
--- /dev/null
+++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/custom/Q10518_SucceedingThePriestess/Q10518_SucceedingThePriestess.java
@@ -0,0 +1,258 @@
+/*
+ * 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.custom.Q10518_SucceedingThePriestess;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import org.l2jmobius.commons.util.CommonUtil;
+import org.l2jmobius.gameserver.enums.QuestSound;
+import org.l2jmobius.gameserver.enums.QuestType;
+import org.l2jmobius.gameserver.model.actor.Npc;
+import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
+import org.l2jmobius.gameserver.model.holders.NpcLogListHolder;
+import org.l2jmobius.gameserver.model.quest.Quest;
+import org.l2jmobius.gameserver.model.quest.QuestState;
+import org.l2jmobius.gameserver.model.quest.State;
+import org.l2jmobius.gameserver.network.NpcStringId;
+
+/**
+ * Succeeding the Priestess (10518)
+ * @URL https://l2wiki.com/Succeeding_the_Priestess
+ * @author Mobius
+ */
+public class Q10518_SucceedingThePriestess extends Quest
+{
+ // NPCs
+ private static final int START_NPC = 33907;
+ private static final int[] MONSTERS_1 =
+ {
+ 24304,
+ 24305,
+ 24306,
+ 24307,
+ 24308,
+ 24309,
+ 24310,
+ 24311,
+ 24312,
+ 24313,
+ 24314,
+ 24315,
+ 24316,
+ };
+ private static final int[] MONSTERS_2 =
+ {
+ 24318,
+ 24319,
+ 24320,
+ 24321,
+ 24322,
+ 24323,
+ 24324,
+ 24325,
+ 24326,
+ 24327,
+ 24328,
+ 24329,
+ };
+ // Item
+ private static final int MONSTER_DROP_1 = 80325;
+ private static final int MONSTER_DROP_2 = 80326;
+ // Misc
+ private static final int REQUIRED_DROP_COUNT_1 = 10;
+ private static final int REQUIRED_DROP_COUNT_2 = 30;
+ private static final int REQUIRED_KILL_COUNT = 50;
+ private static final String KILL_COUNT_VAR = "KillCount";
+ private static final int KILLING_NPCSTRING_ID_1 = NpcStringId.DEFEAT_KROFINS.getId();
+ private static final int KILLING_NPCSTRING_ID_2 = NpcStringId.LV_110_SUCCEEDING_THE_PRIESTESS_2.getId();
+ private static final QuestType QUEST_TYPE = QuestType.ONE_TIME; // REPEATABLE, ONE_TIME, DAILY
+ private static final boolean PARTY_QUEST = false;
+ private static final int KILLING_COND_1 = 1;
+ private static final int FINISH_COND_1 = 2;
+ private static final int KILLING_COND_2 = 3;
+ private static final int FINISH_COND_2 = 4;
+ private static final int MIN_LEVEL = 110;
+
+ public Q10518_SucceedingThePriestess()
+ {
+ super(10518);
+ addStartNpc(START_NPC);
+ addTalkId(START_NPC);
+ addKillId(MONSTERS_1);
+ addKillId(MONSTERS_2);
+ registerQuestItems(MONSTER_DROP_1, MONSTER_DROP_2);
+ addCondMinLevel(MIN_LEVEL, getNoQuestMsg(null));
+ }
+
+ @Override
+ public String onAdvEvent(String event, Npc npc, PlayerInstance player)
+ {
+ final QuestState qs = getQuestState(player, false);
+ if (qs == null)
+ {
+ return null;
+ }
+
+ switch (event)
+ {
+ case "accept_1.htm":
+ {
+ if (qs.isCreated())
+ {
+ qs.startQuest();
+ qs.setCond(KILLING_COND_1);
+ }
+ break;
+ }
+ case "accept_2.html":
+ {
+ if (qs.isCond(FINISH_COND_1) && (getQuestItemsCount(player, MONSTER_DROP_1) >= REQUIRED_DROP_COUNT_1) && (qs.getInt(KILL_COUNT_VAR) >= REQUIRED_KILL_COUNT))
+ {
+ takeItems(player, MONSTER_DROP_1, -1);
+ qs.setCond(KILLING_COND_2, true);
+ }
+ break;
+ }
+ case "reward.html":
+ {
+ if (qs.isCond(FINISH_COND_2) && (getQuestItemsCount(player, MONSTER_DROP_2) >= REQUIRED_DROP_COUNT_2))
+ {
+ takeItems(player, MONSTER_DROP_2, -1);
+ // Reward.
+ addExpAndSp(player, 500056821000L, 500056740);
+ rewardItems(player, 45932, 1);
+ qs.exitQuest(QUEST_TYPE, true);
+ }
+ break;
+ }
+ default:
+ {
+ return null;
+ }
+ }
+ return event;
+ }
+
+ @Override
+ public String onTalk(Npc npc, PlayerInstance player)
+ {
+ final QuestState qs = getQuestState(player, true);
+ String htmltext = getNoQuestMsg(player);
+
+ if (npc.getId() == START_NPC)
+ {
+ switch (qs.getState())
+ {
+ case State.CREATED:
+ {
+ htmltext = "start.htm";
+ break;
+ }
+ case State.STARTED:
+ {
+ if (qs.isCond(KILLING_COND_1))
+ {
+ htmltext = "accept.htm";
+ }
+ else if (qs.isCond(FINISH_COND_1))
+ {
+ htmltext = "finish_1.html";
+ }
+ else if (qs.isCond(KILLING_COND_2))
+ {
+ htmltext = "accept_2.html";
+ }
+ else if (qs.isCond(FINISH_COND_2))
+ {
+ htmltext = "finish_2.html";
+ }
+ break;
+ }
+ case State.COMPLETED:
+ {
+ if (qs.isNowAvailable())
+ {
+ qs.setState(State.CREATED);
+ htmltext = "start.htm";
+ }
+ else
+ {
+ htmltext = getAlreadyCompletedMsg(player, QUEST_TYPE);
+ }
+ break;
+ }
+ }
+ }
+ return htmltext;
+ }
+
+ @Override
+ public String onKill(Npc npc, PlayerInstance killer, boolean isSummon)
+ {
+ QuestState qs = PARTY_QUEST ? getRandomPartyMemberState(killer, -1, 3, npc) : getQuestState(killer, false);
+ if (qs != null)
+ {
+ if (qs.isCond(KILLING_COND_1) && CommonUtil.contains(MONSTERS_1, npc.getId()))
+ {
+ final PlayerInstance player = qs.getPlayer();
+ giveItemRandomly(player, npc, MONSTER_DROP_1, 1, REQUIRED_DROP_COUNT_1, 0.5, true);
+
+ final int killCount = qs.getInt(KILL_COUNT_VAR) + 1;
+ if (killCount <= REQUIRED_KILL_COUNT)
+ {
+ qs.set(KILL_COUNT_VAR, killCount);
+ playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
+ }
+
+ if ((killCount >= REQUIRED_KILL_COUNT) && (getQuestItemsCount(player, MONSTER_DROP_1) >= REQUIRED_DROP_COUNT_1))
+ {
+ qs.setCond(FINISH_COND_1, true);
+ }
+
+ sendNpcLogList(player);
+ }
+ else if (qs.isCond(KILLING_COND_2) && CommonUtil.contains(MONSTERS_2, npc.getId()))
+ {
+ final PlayerInstance player = qs.getPlayer();
+ if (giveItemRandomly(player, npc, MONSTER_DROP_2, 1, REQUIRED_DROP_COUNT_2, 1, true))
+ {
+ qs.setCond(FINISH_COND_2, true);
+ }
+ }
+ }
+
+ return super.onKill(npc, killer, isSummon);
+ }
+
+ @Override
+ public Set getNpcLogList(PlayerInstance player)
+ {
+ final QuestState qs = getQuestState(player, false);
+ if (qs != null)
+ {
+ if (qs.isCond(KILLING_COND_1))
+ {
+ final Set holder = new HashSet<>();
+ holder.add(new NpcLogListHolder(KILLING_NPCSTRING_ID_1, true, qs.getInt(KILL_COUNT_VAR)));
+ holder.add(new NpcLogListHolder(KILLING_NPCSTRING_ID_2, true, (int) getQuestItemsCount(player, MONSTER_DROP_1)));
+ return holder;
+ }
+ }
+ return super.getNpcLogList(player);
+ }
+}
diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/custom/Q10518_SucceedingThePriestess/accept_1.htm b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/custom/Q10518_SucceedingThePriestess/accept_1.htm
new file mode 100644
index 0000000000..b30e222b88
--- /dev/null
+++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/custom/Q10518_SucceedingThePriestess/accept_1.htm
@@ -0,0 +1,3 @@
+Lionel:
+You will have to hunt monsters on the territory of Field of Whispers and Field of Silence. Hunt Krophy, Krotany, Kropiora, Krotania, Spiz Krophy, Spiz Krotany, Spiz Kropiora, Spiz Krotania, Groz Kropiora, Groz Krotania, Groz Krophy, Groz Krotany, Water Drake. You need to get 10 Deformed Claw.
+
\ No newline at end of file
diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/custom/Q10518_SucceedingThePriestess/accept_2.html b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/custom/Q10518_SucceedingThePriestess/accept_2.html
new file mode 100644
index 0000000000..f1c54c003f
--- /dev/null
+++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/custom/Q10518_SucceedingThePriestess/accept_2.html
@@ -0,0 +1,3 @@
+Lionel:
+In order to get the full power of Parme you need to contract once made by her with Fafurion. However, after her death the document is torn into pieces. You need to go to Fafurion Temple, to defeat Temple Guard Captain, Temple Guard Captain, Elite Guardian Warrior, Elite Guardian Archer, Temple Patrol Guard, Temple Knight Recruit, Temple Guard, Temple Guardian Warrior, Temple Wizard, Temple Guardian Wizard, Temple Priest, Temple Guardian Priest, Starving Water Dragon and get 30 Broken Contract Fragments carried by the beasts...
+
\ No newline at end of file
diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/custom/Q10518_SucceedingThePriestess/finish_1.html b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/custom/Q10518_SucceedingThePriestess/finish_1.html
new file mode 100644
index 0000000000..27bd0a8668
--- /dev/null
+++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/custom/Q10518_SucceedingThePriestess/finish_1.html
@@ -0,0 +1,4 @@
+Lionel:
+Have you retrieved the items I asked for?
+
+
\ No newline at end of file
diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/custom/Q10518_SucceedingThePriestess/finish_2.html b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/custom/Q10518_SucceedingThePriestess/finish_2.html
new file mode 100644
index 0000000000..e7efd27c32
--- /dev/null
+++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/custom/Q10518_SucceedingThePriestess/finish_2.html
@@ -0,0 +1,4 @@
+Lionel:
+Have you retrieved the items I asked for?
+
+
\ No newline at end of file
diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/custom/Q10518_SucceedingThePriestess/reward.html b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/custom/Q10518_SucceedingThePriestess/reward.html
new file mode 100644
index 0000000000..e7d9d1fe33
--- /dev/null
+++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/custom/Q10518_SucceedingThePriestess/reward.html
@@ -0,0 +1,3 @@
+Lionel:
+Thank you for your assistance.
+
\ No newline at end of file
diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/custom/Q10518_SucceedingThePriestess/start.htm b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/custom/Q10518_SucceedingThePriestess/start.htm
new file mode 100644
index 0000000000..12c905ab63
--- /dev/null
+++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/custom/Q10518_SucceedingThePriestess/start.htm
@@ -0,0 +1,5 @@
+Lionel:
+If you have time I have a mission for you.
+This area needs to be cleansed.
+
+
\ No newline at end of file
diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/custom/Q10519_ControllingYourTemper/Q10519_ControllingYourTemper.java b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/custom/Q10519_ControllingYourTemper/Q10519_ControllingYourTemper.java
new file mode 100644
index 0000000000..acb5027381
--- /dev/null
+++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/custom/Q10519_ControllingYourTemper/Q10519_ControllingYourTemper.java
@@ -0,0 +1,158 @@
+/*
+ * 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.custom.Q10519_ControllingYourTemper;
+
+import org.l2jmobius.Config;
+import org.l2jmobius.gameserver.enums.QuestType;
+import org.l2jmobius.gameserver.model.actor.Npc;
+import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
+import org.l2jmobius.gameserver.model.quest.Quest;
+import org.l2jmobius.gameserver.model.quest.QuestState;
+import org.l2jmobius.gameserver.model.quest.State;
+
+import quests.custom.Q10518_SucceedingThePriestess.Q10518_SucceedingThePriestess;
+
+/**
+ * Controlling Your Temper (10519)
+ * @URL https://l2wiki.com/Controlling_Your_Temper
+ * @author Mobius
+ */
+public class Q10519_ControllingYourTemper extends Quest
+{
+ // NPCs
+ private static final int START_NPC = 34490;
+ private static final int[] BOSS_IDS =
+ {
+ 29367
+ };
+ // Misc
+ private static final QuestType QUEST_TYPE = QuestType.ONE_TIME; // REPEATABLE, ONE_TIME, DAILY
+ private static final int KILLING_COND = 1;
+ private static final int FINISH_COND = 2;
+ private static final int MIN_LEVEL = 110;
+
+ public Q10519_ControllingYourTemper()
+ {
+ super(10519);
+ addStartNpc(START_NPC);
+ addTalkId(START_NPC);
+ addKillId(BOSS_IDS);
+ addCondMinLevel(MIN_LEVEL, getNoQuestMsg(null));
+ addCondCompletedQuest(Q10518_SucceedingThePriestess.class.getSimpleName(), getNoQuestMsg(null));
+ }
+
+ @Override
+ public String onAdvEvent(String event, Npc npc, PlayerInstance player)
+ {
+ final QuestState qs = getQuestState(player, false);
+ if (qs == null)
+ {
+ return null;
+ }
+
+ switch (event)
+ {
+ case "accept.htm":
+ {
+ if (qs.isCreated())
+ {
+ qs.startQuest();
+ qs.setCond(KILLING_COND);
+ }
+ break;
+ }
+ case "reward.html":
+ {
+ if (qs.isCond(FINISH_COND))
+ {
+ // Reward.
+ addExpAndSp(player, 333371214000L, 333371160);
+ rewardItems(player, 46151, 1);
+ qs.exitQuest(QUEST_TYPE, true);
+ }
+ break;
+ }
+ default:
+ {
+ return null;
+ }
+ }
+ return event;
+ }
+
+ @Override
+ public String onTalk(Npc npc, PlayerInstance player)
+ {
+ final QuestState qs = getQuestState(player, true);
+ String htmltext = getNoQuestMsg(player);
+
+ if (npc.getId() == START_NPC)
+ {
+ switch (qs.getState())
+ {
+ case State.CREATED:
+ {
+ htmltext = "start.htm";
+ break;
+ }
+ case State.STARTED:
+ {
+ if (qs.isCond(KILLING_COND))
+ {
+ htmltext = "accept.htm";
+ }
+ else if (qs.isCond(FINISH_COND))
+ {
+ htmltext = "finish.html";
+ }
+ break;
+ }
+ case State.COMPLETED:
+ {
+ if (qs.isNowAvailable())
+ {
+ qs.setState(State.CREATED);
+ htmltext = "start.htm";
+ }
+ else
+ {
+ htmltext = getAlreadyCompletedMsg(player, QUEST_TYPE);
+ }
+ break;
+ }
+ }
+ }
+ return htmltext;
+ }
+
+ @Override
+ public String onKill(Npc npc, PlayerInstance player, boolean isSummon)
+ {
+ executeForEachPlayer(player, npc, isSummon, true, false);
+ return super.onKill(npc, player, isSummon);
+ }
+
+ @Override
+ public void actionForEachPlayer(PlayerInstance player, Npc npc, boolean isSummon)
+ {
+ final QuestState qs = getQuestState(player, false);
+ if ((qs != null) && player.isInsideRadius3D(npc, Config.ALT_PARTY_RANGE))
+ {
+ qs.setCond(FINISH_COND);
+ }
+ }
+}
diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/custom/Q10519_ControllingYourTemper/accept.htm b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/custom/Q10519_ControllingYourTemper/accept.htm
new file mode 100644
index 0000000000..fbe9df96f9
--- /dev/null
+++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/custom/Q10519_ControllingYourTemper/accept.htm
@@ -0,0 +1,3 @@
+Okayti:
+You will have to defeat the Water Dragon Fafurion.
+
\ No newline at end of file
diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/custom/Q10519_ControllingYourTemper/finish.html b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/custom/Q10519_ControllingYourTemper/finish.html
new file mode 100644
index 0000000000..cf88727748
--- /dev/null
+++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/custom/Q10519_ControllingYourTemper/finish.html
@@ -0,0 +1,4 @@
+Okayti:
+Did you subdue the great enemy I spoke you about?
+
+
\ No newline at end of file
diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/custom/Q10519_ControllingYourTemper/reward.html b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/custom/Q10519_ControllingYourTemper/reward.html
new file mode 100644
index 0000000000..36a04281cd
--- /dev/null
+++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/custom/Q10519_ControllingYourTemper/reward.html
@@ -0,0 +1,3 @@
+Okayti:
+Thank you for your assistance.
+
\ No newline at end of file
diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/custom/Q10519_ControllingYourTemper/start.htm b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/custom/Q10519_ControllingYourTemper/start.htm
new file mode 100644
index 0000000000..e7ea3b3454
--- /dev/null
+++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/custom/Q10519_ControllingYourTemper/start.htm
@@ -0,0 +1,5 @@
+Okayti:
+If you have time I have a mission for you.
+I need you to subdue a great enemy.
+
+
\ No newline at end of file
diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/custom/Q10520_TempleGuardians/Q10520_TempleGuardians.java b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/custom/Q10520_TempleGuardians/Q10520_TempleGuardians.java
new file mode 100644
index 0000000000..fdd634f3a1
--- /dev/null
+++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/custom/Q10520_TempleGuardians/Q10520_TempleGuardians.java
@@ -0,0 +1,158 @@
+/*
+ * 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.custom.Q10520_TempleGuardians;
+
+import org.l2jmobius.Config;
+import org.l2jmobius.gameserver.enums.QuestType;
+import org.l2jmobius.gameserver.model.actor.Npc;
+import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
+import org.l2jmobius.gameserver.model.quest.Quest;
+import org.l2jmobius.gameserver.model.quest.QuestState;
+import org.l2jmobius.gameserver.model.quest.State;
+
+import quests.custom.Q10516_UnveiledFafurionTemple.Q10516_UnveiledFafurionTemple;
+
+/**
+ * Temple Guardians (10520)
+ * @URL https://l2wiki.com/Temple_Guardians
+ * @author Mobius
+ */
+public class Q10520_TempleGuardians extends Quest
+{
+ // NPCs
+ private static final int START_NPC = 34490;
+ private static final int[] BOSS_IDS =
+ {
+ 29367
+ };
+ // Misc
+ private static final QuestType QUEST_TYPE = QuestType.ONE_TIME; // REPEATABLE, ONE_TIME, DAILY
+ private static final int KILLING_COND = 1;
+ private static final int FINISH_COND = 2;
+ private static final int MIN_LEVEL = 110;
+
+ public Q10520_TempleGuardians()
+ {
+ super(10520);
+ addStartNpc(START_NPC);
+ addTalkId(START_NPC);
+ addKillId(BOSS_IDS);
+ addCondMinLevel(MIN_LEVEL, getNoQuestMsg(null));
+ addCondCompletedQuest(Q10516_UnveiledFafurionTemple.class.getSimpleName(), getNoQuestMsg(null));
+ }
+
+ @Override
+ public String onAdvEvent(String event, Npc npc, PlayerInstance player)
+ {
+ final QuestState qs = getQuestState(player, false);
+ if (qs == null)
+ {
+ return null;
+ }
+
+ switch (event)
+ {
+ case "accept.htm":
+ {
+ if (qs.isCreated())
+ {
+ qs.startQuest();
+ qs.setCond(KILLING_COND);
+ }
+ break;
+ }
+ case "reward.html":
+ {
+ if (qs.isCond(FINISH_COND))
+ {
+ // Reward.
+ addExpAndSp(player, 166685607000L, 166685580);
+ giveAdena(player, 4190158, false);
+ qs.exitQuest(QUEST_TYPE, true);
+ }
+ break;
+ }
+ default:
+ {
+ return null;
+ }
+ }
+ return event;
+ }
+
+ @Override
+ public String onTalk(Npc npc, PlayerInstance player)
+ {
+ final QuestState qs = getQuestState(player, true);
+ String htmltext = getNoQuestMsg(player);
+
+ if (npc.getId() == START_NPC)
+ {
+ switch (qs.getState())
+ {
+ case State.CREATED:
+ {
+ htmltext = "start.htm";
+ break;
+ }
+ case State.STARTED:
+ {
+ if (qs.isCond(KILLING_COND))
+ {
+ htmltext = "accept.htm";
+ }
+ else if (qs.isCond(FINISH_COND))
+ {
+ htmltext = "finish.html";
+ }
+ break;
+ }
+ case State.COMPLETED:
+ {
+ if (qs.isNowAvailable())
+ {
+ qs.setState(State.CREATED);
+ htmltext = "start.htm";
+ }
+ else
+ {
+ htmltext = getAlreadyCompletedMsg(player, QUEST_TYPE);
+ }
+ break;
+ }
+ }
+ }
+ return htmltext;
+ }
+
+ @Override
+ public String onKill(Npc npc, PlayerInstance player, boolean isSummon)
+ {
+ executeForEachPlayer(player, npc, isSummon, true, false);
+ return super.onKill(npc, player, isSummon);
+ }
+
+ @Override
+ public void actionForEachPlayer(PlayerInstance player, Npc npc, boolean isSummon)
+ {
+ final QuestState qs = getQuestState(player, false);
+ if ((qs != null) && player.isInsideRadius3D(npc, Config.ALT_PARTY_RANGE))
+ {
+ qs.setCond(FINISH_COND);
+ }
+ }
+}
diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/custom/Q10520_TempleGuardians/accept.htm b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/custom/Q10520_TempleGuardians/accept.htm
new file mode 100644
index 0000000000..6ff2ff2323
--- /dev/null
+++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/custom/Q10520_TempleGuardians/accept.htm
@@ -0,0 +1,3 @@
+Okayti:
+You need to get rid of Fafurion's most loyal disciple, Cyrax.
+
\ No newline at end of file
diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/custom/Q10520_TempleGuardians/finish.html b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/custom/Q10520_TempleGuardians/finish.html
new file mode 100644
index 0000000000..ae6bb71692
--- /dev/null
+++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/custom/Q10520_TempleGuardians/finish.html
@@ -0,0 +1,4 @@
+Okayti:
+Did you subdue the great enemy I spoke you about?
+
+
\ No newline at end of file
diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/custom/Q10520_TempleGuardians/reward.html b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/custom/Q10520_TempleGuardians/reward.html
new file mode 100644
index 0000000000..36a04281cd
--- /dev/null
+++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/custom/Q10520_TempleGuardians/reward.html
@@ -0,0 +1,3 @@
+Okayti:
+Thank you for your assistance.
+
\ No newline at end of file
diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/custom/Q10520_TempleGuardians/start.htm b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/custom/Q10520_TempleGuardians/start.htm
new file mode 100644
index 0000000000..66ef520c26
--- /dev/null
+++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/custom/Q10520_TempleGuardians/start.htm
@@ -0,0 +1,5 @@
+Okayti:
+If you have time I have a mission for you.
+I need you to subdue a great enemy.
+
+
\ No newline at end of file
diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/not_done/Q10518_SucceedingThePriestess.java b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/not_done/Q10518_SucceedingThePriestess.java
deleted file mode 100644
index ca1993442b..0000000000
--- a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/not_done/Q10518_SucceedingThePriestess.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * 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.not_done;
-
-import org.l2jmobius.Config;
-import org.l2jmobius.gameserver.model.quest.Quest;
-
-/**
- * @author Mobius
- */
-public class Q10518_SucceedingThePriestess extends Quest
-{
- private static final int START_NPC = 33907;
-
- public Q10518_SucceedingThePriestess()
- {
- super(10518);
- addStartNpc(START_NPC);
- addTalkId(START_NPC);
- addCondMinLevel(Config.PLAYER_MAXIMUM_LEVEL, getNoQuestMsg(null));
- }
-}
diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/not_done/Q10519_ControllingYourTemper.java b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/not_done/Q10519_ControllingYourTemper.java
deleted file mode 100644
index cbe661447e..0000000000
--- a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/not_done/Q10519_ControllingYourTemper.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * 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.not_done;
-
-import org.l2jmobius.Config;
-import org.l2jmobius.gameserver.model.quest.Quest;
-
-/**
- * @author Mobius
- */
-public class Q10519_ControllingYourTemper extends Quest
-{
- private static final int START_NPC = 34490;
-
- public Q10519_ControllingYourTemper()
- {
- super(10519);
- addStartNpc(START_NPC);
- addTalkId(START_NPC);
- addCondMinLevel(Config.PLAYER_MAXIMUM_LEVEL, getNoQuestMsg(null));
- }
-}
diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/not_done/Q10520_TempleGuardians.java b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/not_done/Q10520_TempleGuardians.java
deleted file mode 100644
index 080cefd012..0000000000
--- a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/not_done/Q10520_TempleGuardians.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * 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.not_done;
-
-import org.l2jmobius.Config;
-import org.l2jmobius.gameserver.model.quest.Quest;
-
-/**
- * @author Mobius
- */
-public class Q10520_TempleGuardians extends Quest
-{
- private static final int START_NPC = 34490;
-
- public Q10520_TempleGuardians()
- {
- super(10520);
- addStartNpc(START_NPC);
- addTalkId(START_NPC);
- addCondMinLevel(Config.PLAYER_MAXIMUM_LEVEL, getNoQuestMsg(null));
- }
-}
diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/stats/items/80300-80399.xml b/L2J_Mobius_6.0_Fafurion/dist/game/data/stats/items/80300-80399.xml
index 001dab5d42..75f9da0f50 100644
--- a/L2J_Mobius_6.0_Fafurion/dist/game/data/stats/items/80300-80399.xml
+++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/stats/items/80300-80399.xml
@@ -346,6 +346,7 @@
+
@@ -357,6 +358,7 @@
+