diff --git a/trunk/dist/game/data/scripts/quests/Q10770_InSearchOfTheGrail/30484-01.html b/trunk/dist/game/data/scripts/quests/Q10770_InSearchOfTheGrail/30484-01.html new file mode 100644 index 0000000000..3a3d2b2004 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10770_InSearchOfTheGrail/30484-01.html @@ -0,0 +1,5 @@ +Ivory Tower Wizard Janssen:
+Ho ho! So you're one of the newly arrived Ertheia. I've only read about your kind in books! How exciting.
+I heard about you from Researcher Lorain. You wanted me to analyze some Shining Mysterious Fragments?
+ + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10770_InSearchOfTheGrail/30484-02.html b/trunk/dist/game/data/scripts/quests/Q10770_InSearchOfTheGrail/30484-02.html new file mode 100644 index 0000000000..c1412783aa --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10770_InSearchOfTheGrail/30484-02.html @@ -0,0 +1,4 @@ +Ivory Tower Wizard Janssen:
+Well! You are as beautiful as an Elf...oh, let me get started on specially analyzing these fragments for you.
+I can do the analysis very quickly, please come back in a bit. + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10770_InSearchOfTheGrail/30484-03.html b/trunk/dist/game/data/scripts/quests/Q10770_InSearchOfTheGrail/30484-03.html new file mode 100644 index 0000000000..d6096cc9cc --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10770_InSearchOfTheGrail/30484-03.html @@ -0,0 +1,5 @@ +Ivory Tower Wizard Janssen:
+Ah, the analysis is complete. I'm sorry, but the fragment recovered from Cruma Tower is not what you thought it was.
+It simply looks like the fragment you're thinking about. I don't feel any of the Wind Spirit Realm's energy within it.
+ + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10770_InSearchOfTheGrail/30484-04.html b/trunk/dist/game/data/scripts/quests/Q10770_InSearchOfTheGrail/30484-04.html new file mode 100644 index 0000000000..5da8f1d24a --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10770_InSearchOfTheGrail/30484-04.html @@ -0,0 +1,6 @@ +Ivory Tower Wizard Janssen:
+Don't be so disappointed.
+Anyway, that fragment you recovered from Cruma Tower contains some dangerous energy.
+It looks shiny and precious on the outside, but the energy within it feels very unstable, like it could explode.
+Here, here. Will this cheer you up? Take this. + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10770_InSearchOfTheGrail/30673-01.htm b/trunk/dist/game/data/scripts/quests/Q10770_InSearchOfTheGrail/30673-01.htm new file mode 100644 index 0000000000..4bded3d401 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10770_InSearchOfTheGrail/30673-01.htm @@ -0,0 +1,6 @@ +Researcher Lorain:
+Hello! Ertheian adventurer. I just can't get used to it. Your ears look like wings... You think the ancient documents speak of you flying because of your ears?
+I'm sorry. I cannot hide my curiosity.
+I heard that you want to know about Cruma Tower. What is it?
+ + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10770_InSearchOfTheGrail/30673-02.htm b/trunk/dist/game/data/scripts/quests/Q10770_InSearchOfTheGrail/30673-02.htm new file mode 100644 index 0000000000..e5a9cac458 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10770_InSearchOfTheGrail/30673-02.htm @@ -0,0 +1,5 @@ +Researcher Lorain:
+You're looking for the Grail? I know what's going on now. You must find the giants in order to find the Grail. All the leads about Grail were connected with the giants.
+Cruma Tower is where the few ancient giants technology still remains. It's also the place you can find the ancient giants.
+ + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10770_InSearchOfTheGrail/30673-03.htm b/trunk/dist/game/data/scripts/quests/Q10770_InSearchOfTheGrail/30673-03.htm new file mode 100644 index 0000000000..8a7e4db9dd --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10770_InSearchOfTheGrail/30673-03.htm @@ -0,0 +1,6 @@ +Researcher Lorain:
+Hmm? Mysterious Fragment? You mean the Shining Mysterious Fragment? Where did you hear about it?
+I heard that Shining Mysterious Fragments were found on Cruma Tower. Not many have found it, so we don't know much either.
+According to my source, magical creatures in Cruma Tower Underground Level 3, which were created by the giants, have the fragment.
+ + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10770_InSearchOfTheGrail/30673-04.htm b/trunk/dist/game/data/scripts/quests/Q10770_InSearchOfTheGrail/30673-04.htm new file mode 100644 index 0000000000..05dff72bb9 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10770_InSearchOfTheGrail/30673-04.htm @@ -0,0 +1,5 @@ +Researcher Lorain:
+First, gather the fragments from the magical creatures and ask the Ivory Tower Wizards in Cruma Tower to analyze them.
+I'm sure those wizards can analyze the fragments. The Ivory Tower Wizards are the most powerful.
+ + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10770_InSearchOfTheGrail/30673-05.htm b/trunk/dist/game/data/scripts/quests/Q10770_InSearchOfTheGrail/30673-05.htm new file mode 100644 index 0000000000..a4915e0a7c --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10770_InSearchOfTheGrail/30673-05.htm @@ -0,0 +1,5 @@ +Researcher Lorain:
+Then go to Cruma Tower Underground Level 3 and kill the magical creatures. The magical creatures in Cruma Tower Underground Level 3 are Porta, Excuro, Ricenseo, Krator, Shindebarn. I'm sure you can get Shining Mysterious Fragments as you kill these magical creatures.
+Get 30 Shining Mysterious Fragments and go to Ivory Tower Wizard Janssen in Underground Level 3 to analyze the fragments you've gotten.
+Oh! In order to go there, use the entrance next to me to enter Cruma Tower and then talk to Ivory Tower Wizard Carsus. + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10770_InSearchOfTheGrail/30673-06.html b/trunk/dist/game/data/scripts/quests/Q10770_InSearchOfTheGrail/30673-06.html new file mode 100644 index 0000000000..f2d6c7cd95 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10770_InSearchOfTheGrail/30673-06.html @@ -0,0 +1,3 @@ +Researcher Lorain:
+I think you have enough fragments for analysis. Go to Ivory Tower Wizard Janssen now. + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10770_InSearchOfTheGrail/Q10770_InSearchOfTheGrail.java b/trunk/dist/game/data/scripts/quests/Q10770_InSearchOfTheGrail/Q10770_InSearchOfTheGrail.java new file mode 100644 index 0000000000..768c4be50e --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10770_InSearchOfTheGrail/Q10770_InSearchOfTheGrail.java @@ -0,0 +1,171 @@ +/* + * 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.Q10770_InSearchOfTheGrail; + +import com.l2jmobius.gameserver.enums.Race; +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; + +/** + * In Search of the Grail (10770) + * @URL https://l2wiki.com/In_Search_of_the_Grail + * @author Gigi + */ +public class Q10770_InSearchOfTheGrail extends Quest +{ + // NPCs + private static final int LORAIN = 30673; + private static final int JANSSEN = 30484; + // Items + private static final ItemHolder STEEL_DOOR_GUILD = new ItemHolder(37045, 30); + private static final ItemHolder EWC = new ItemHolder(951, 1); + private static final ItemHolder EAC = new ItemHolder(952, 2); + private static final int SHINING_MYSTERIOUS = 39711; + // Reward + private static final int EXP_REWARD = 2342300; + private static final int SP_REWARD = 562; + // Misc + private static final int MIN_LEVEL = 40; + // Mobs + private static final int[] MOBNSTERS = + { + 20213, // Porta + 20214, // Excuro + 20216, // Ricenseo + 20217, // Krator + 21036, // Shindebarn + }; + + public Q10770_InSearchOfTheGrail() + { + super(10770, Q10770_InSearchOfTheGrail.class.getSimpleName(), "In Search of the Grail"); + addStartNpc(LORAIN); + addTalkId(LORAIN, JANSSEN); + registerQuestItems(SHINING_MYSTERIOUS); + addKillId(MOBNSTERS); + addCondMinLevel(MIN_LEVEL, "noLevel.html"); + addCondRace(Race.ERTHEIA, "noErtheya.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 "30673-02.htm": + case "30673-03.htm": + case "30673-04.htm": + { + htmltext = event; + break; + } + case "30673-05.htm": + { + qs.startQuest(); + htmltext = event; + qs.set(Integer.toString(SHINING_MYSTERIOUS), 0); + break; + } + case "30484-02.html": + { + takeItems(player, SHINING_MYSTERIOUS, 30); + qs.setCond(3, true); + htmltext = event; + break; + } + case "30484-04.html": + { + addExpAndSp(player, EXP_REWARD, SP_REWARD); + giveItems(player, STEEL_DOOR_GUILD); + giveItems(player, EWC); + giveItems(player, EAC); + 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); + + switch (npc.getId()) + { + case LORAIN: + { + if (qs.isCreated()) + { + htmltext = "30673-01.htm"; + } + else if (qs.isStarted()) + { + if (qs.isCond(1)) + { + htmltext = "30673-06.html"; + } + } + else if (qs.isCompleted()) + { + htmltext = getAlreadyCompletedMsg(player); + } + break; + } + case JANSSEN: + { + if (qs.isCond(2)) + { + htmltext = "30484-01.html"; + } + else if (qs.isCond(3)) + { + htmltext = "30484-03.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, SHINING_MYSTERIOUS, 1, 30, 0.5, 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/Q10770_InSearchOfTheGrail/noErtheia.html b/trunk/dist/game/data/scripts/quests/Q10770_InSearchOfTheGrail/noErtheia.html new file mode 100644 index 0000000000..8fa8071adf --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10770_InSearchOfTheGrail/noErtheia.html @@ -0,0 +1,3 @@ +Researcher Lorain:
+This quest is only for Ertheia class. + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10770_InSearchOfTheGrail/noLevel.html b/trunk/dist/game/data/scripts/quests/Q10770_InSearchOfTheGrail/noLevel.html new file mode 100644 index 0000000000..b36f353d3e --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10770_InSearchOfTheGrail/noLevel.html @@ -0,0 +1,4 @@ +Researcher Lorain:
+This mission will be too hard for you. Don't be disappointed. Once you have grown a little more, please come back
+(You must be level 40 or above to start this quest.) + \ 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 84c2feebaf..f3d6beb05d 100644 --- a/trunk/dist/game/data/scripts/quests/QuestMasterHandler.java +++ b/trunk/dist/game/data/scripts/quests/QuestMasterHandler.java @@ -289,6 +289,7 @@ import quests.Q10762_MarionetteSpirit.Q10762_MarionetteSpirit; import quests.Q10763_TerrifyingChertuba.Q10763_TerrifyingChertuba; import quests.Q10764_FreeSpirit.Q10764_FreeSpirit; import quests.Q10769_LettersFromTheQueen_CrumaTower.Q10769_LettersFromTheQueen_CrumaTower; +import quests.Q10770_InSearchOfTheGrail.Q10770_InSearchOfTheGrail; import quests.Q10782_LettersFromTheQueen_ForsakenPlains.Q10782_LettersFromTheQueen_ForsakenPlains; import quests.Q10785_LettersFromTheQueen_FieldsOfMassacre.Q10785_LettersFromTheQueen_FieldsOfMassacre; import quests.Q10789_LettersFromTheQueen_SwampOfScreams.Q10789_LettersFromTheQueen_SwampOfScreams; @@ -573,6 +574,7 @@ final class QuestMasterHandler Q10763_TerrifyingChertuba.class, Q10764_FreeSpirit.class, Q10769_LettersFromTheQueen_CrumaTower.class, + Q10770_InSearchOfTheGrail.class, Q10782_LettersFromTheQueen_ForsakenPlains.class, Q10785_LettersFromTheQueen_FieldsOfMassacre.class, Q10789_LettersFromTheQueen_SwampOfScreams.class,