From 2f117781ed983cecfaba2d16e6f3a6ccbc4ada97 Mon Sep 17 00:00:00 2001 From: MobiusDev <8391001+MobiusDevelopment@users.noreply.github.com> Date: Fri, 12 Aug 2016 20:04:31 +0000 Subject: [PATCH] Quest Placing My Small Power (466). Contributed by gigilo1968. --- trunk/dist/game/data/Recipes.xml | 2 +- .../data/scripts/quests/MissingQuests.txt | 1 - .../Q00466_PlacingMySmallPower/30154-00.htm | 4 + .../Q00466_PlacingMySmallPower/30154-00a.htm | 5 + .../Q00466_PlacingMySmallPower/30154-01.htm | 5 + .../Q00466_PlacingMySmallPower/30154-02.htm | 7 + .../Q00466_PlacingMySmallPower/30154-03.htm | 6 + .../Q00466_PlacingMySmallPower/30154-04.html | 3 + .../Q00466_PlacingMySmallPower/30154-05.html | 4 + .../Q00466_PlacingMySmallPower/30154-05a.html | 4 + .../Q00466_PlacingMySmallPower/32895-01.html | 6 + .../Q00466_PlacingMySmallPower/32895-02.html | 5 + .../Q00466_PlacingMySmallPower/32895-03.html | 3 + .../Q00466_PlacingMySmallPower/32895-04.html | 3 + .../Q00466_PlacingMySmallPower/32895-05.html | 5 + .../Q00466_PlacingMySmallPower/32895-06.html | 3 + .../Q00466_PlacingMySmallPower/32895-07.html | 4 + .../Q00466_PlacingMySmallPower/33853-08.html | 4 + .../Q00466_PlacingMySmallPower.java | 251 ++++++++++++++++++ .../scripts/quests/QuestMasterHandler.java | 2 + 20 files changed, 325 insertions(+), 2 deletions(-) create mode 100644 trunk/dist/game/data/scripts/quests/Q00466_PlacingMySmallPower/30154-00.htm create mode 100644 trunk/dist/game/data/scripts/quests/Q00466_PlacingMySmallPower/30154-00a.htm create mode 100644 trunk/dist/game/data/scripts/quests/Q00466_PlacingMySmallPower/30154-01.htm create mode 100644 trunk/dist/game/data/scripts/quests/Q00466_PlacingMySmallPower/30154-02.htm create mode 100644 trunk/dist/game/data/scripts/quests/Q00466_PlacingMySmallPower/30154-03.htm create mode 100644 trunk/dist/game/data/scripts/quests/Q00466_PlacingMySmallPower/30154-04.html create mode 100644 trunk/dist/game/data/scripts/quests/Q00466_PlacingMySmallPower/30154-05.html create mode 100644 trunk/dist/game/data/scripts/quests/Q00466_PlacingMySmallPower/30154-05a.html create mode 100644 trunk/dist/game/data/scripts/quests/Q00466_PlacingMySmallPower/32895-01.html create mode 100644 trunk/dist/game/data/scripts/quests/Q00466_PlacingMySmallPower/32895-02.html create mode 100644 trunk/dist/game/data/scripts/quests/Q00466_PlacingMySmallPower/32895-03.html create mode 100644 trunk/dist/game/data/scripts/quests/Q00466_PlacingMySmallPower/32895-04.html create mode 100644 trunk/dist/game/data/scripts/quests/Q00466_PlacingMySmallPower/32895-05.html create mode 100644 trunk/dist/game/data/scripts/quests/Q00466_PlacingMySmallPower/32895-06.html create mode 100644 trunk/dist/game/data/scripts/quests/Q00466_PlacingMySmallPower/32895-07.html create mode 100644 trunk/dist/game/data/scripts/quests/Q00466_PlacingMySmallPower/33853-08.html create mode 100644 trunk/dist/game/data/scripts/quests/Q00466_PlacingMySmallPower/Q00466_PlacingMySmallPower.java diff --git a/trunk/dist/game/data/Recipes.xml b/trunk/dist/game/data/Recipes.xml index 78ba182006..0d5287f111 100644 --- a/trunk/dist/game/data/Recipes.xml +++ b/trunk/dist/game/data/Recipes.xml @@ -11162,7 +11162,7 @@ - + diff --git a/trunk/dist/game/data/scripts/quests/MissingQuests.txt b/trunk/dist/game/data/scripts/quests/MissingQuests.txt index a0c1f19261..73405cdab3 100644 --- a/trunk/dist/game/data/scripts/quests/MissingQuests.txt +++ b/trunk/dist/game/data/scripts/quests/MissingQuests.txt @@ -7,7 +7,6 @@ 460 Precious Research Material 462 Stuffed Ancient Heroes 465 We Are Friends -466 Placing My Small Power 468 Be Lost in the Mysterious Scent 469 Suspicious Gardener 471 Breaking through the Emerald Square diff --git a/trunk/dist/game/data/scripts/quests/Q00466_PlacingMySmallPower/30154-00.htm b/trunk/dist/game/data/scripts/quests/Q00466_PlacingMySmallPower/30154-00.htm new file mode 100644 index 0000000000..93dc229380 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q00466_PlacingMySmallPower/30154-00.htm @@ -0,0 +1,4 @@ +Hierarch Asterios:
+How are we going to revive the Mother Tree? How can we live without her?
+(Only characters Lv. 90 or above may perform this quest.) + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q00466_PlacingMySmallPower/30154-00a.htm b/trunk/dist/game/data/scripts/quests/Q00466_PlacingMySmallPower/30154-00a.htm new file mode 100644 index 0000000000..765a0771ab --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q00466_PlacingMySmallPower/30154-00a.htm @@ -0,0 +1,5 @@ +Hierarch Asterios:
+I always appreciate your help.
+May the blessing of Eva comfort and strengthen your soul.
+(This quest can be taken only once a day. This quest is reset daily at 6:30 a.m.) + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q00466_PlacingMySmallPower/30154-01.htm b/trunk/dist/game/data/scripts/quests/Q00466_PlacingMySmallPower/30154-01.htm new file mode 100644 index 0000000000..125fec995e --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q00466_PlacingMySmallPower/30154-01.htm @@ -0,0 +1,5 @@ +Hierarch Asterios:
+Just so you know...Mother Tree is the center of our Elf society. She is the mother of all living creatures and it is believed that the Elves were birthed from her very leaves. We exist only because of her and her health is vital to our existence.
+But, we fear that Mother Tree is dying. Her bark is rough, her leaves are falling. If we don't do something quickly, she may die! We can not allow that to happen!
+ +Hierarch Asterios:
+It all started after the Rain of Blood. You've heard of Shilen? Yes?
+Well, after Mother Tree fell sick, we heard about the Supernal Light that protects Magmeld and thought that perhaps it might be used to restore Mother Tree. But what I've discovered is that Agahel, the king of Catastrophe, has awakened. And there's a terrible Decaying Darkness oozing out from him, sickening all it touches! Troubles upon troubles!
+Still, there is hope. +If we can save Mother Tree, she may be able to vanquish this spreading darkness. Would you help?
+ + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q00466_PlacingMySmallPower/30154-03.htm b/trunk/dist/game/data/scripts/quests/Q00466_PlacingMySmallPower/30154-03.htm new file mode 100644 index 0000000000..5220a97ba1 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q00466_PlacingMySmallPower/30154-03.htm @@ -0,0 +1,6 @@ +Hierarch Asterios:
+The Decaying Darkness is driving Fairies in the Fairy Settlement wild and violent, and also making the cocoons that produce those wild Fairies grow even larger.
+However, the trees growing there still retain their mystique and fantastic features. +It's because Fairy Hierarch Noeti Minirede has been looking after the trees in the Fairy Settlement using Timiniel's Tonic.
+I would like you to go to Noeti Minirede and ask for some of that tonic. + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q00466_PlacingMySmallPower/30154-04.html b/trunk/dist/game/data/scripts/quests/Q00466_PlacingMySmallPower/30154-04.html new file mode 100644 index 0000000000..00ed47aba7 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q00466_PlacingMySmallPower/30154-04.html @@ -0,0 +1,3 @@ +Hierarch Asterios:
+Please go to Elder Hierarch Fairy Noeti Mimilead and retrieve Timiniel's Tonic. + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q00466_PlacingMySmallPower/30154-05.html b/trunk/dist/game/data/scripts/quests/Q00466_PlacingMySmallPower/30154-05.html new file mode 100644 index 0000000000..c81d9cfcbb --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q00466_PlacingMySmallPower/30154-05.html @@ -0,0 +1,4 @@ +Hierarch Asterios:
+You brought Timiniel's Tonic! Oh, thank you! This will help us sustain Mother Tree.
+Can I look forward to your continued help in the future? + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q00466_PlacingMySmallPower/30154-05a.html b/trunk/dist/game/data/scripts/quests/Q00466_PlacingMySmallPower/30154-05a.html new file mode 100644 index 0000000000..d8eb48572f --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q00466_PlacingMySmallPower/30154-05a.html @@ -0,0 +1,4 @@ +Hierarch Asterios:
+Well, how was your research, have got everything you need, I think for you it is not difficult to. + +Elder Hierarch Fairy Noeti Mimilead:
+Large cocoons have been appearing everywhere, and the fairies are growing frustrated... the Decaying darkness makes everything impoverished, everything desperate. Even the trees are dying, and we all know we won't be far behind once they're gone.
+We can't stop the Fairies from becoming enraged. but we must protect the threes.
+How about you? What brought you here?
+ + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q00466_PlacingMySmallPower/32895-02.html b/trunk/dist/game/data/scripts/quests/Q00466_PlacingMySmallPower/32895-02.html new file mode 100644 index 0000000000..1e59c64ad7 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q00466_PlacingMySmallPower/32895-02.html @@ -0,0 +1,5 @@ +Elder Hierarch Fairy Noeti Mimilead:
+The trees of the Fairy Settlement will need Timiniel's Tonic if they're to have any chance to fight off the poison. The reason that the trees of Fairy Settlement are okay is all thanks to Timiniel's Tonic, see?
+My heart aches when I look at Elven Hierarch Asterios, because he reminds me so much of myself, and while I am glad that I can help yuo, you must know that collecting Timiniel's Tonic is extremely dangerous. Are you ready?
+ + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q00466_PlacingMySmallPower/32895-03.html b/trunk/dist/game/data/scripts/quests/Q00466_PlacingMySmallPower/32895-03.html new file mode 100644 index 0000000000..5df0030f3a --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q00466_PlacingMySmallPower/32895-03.html @@ -0,0 +1,3 @@ +Elder Hierarch Fairy Noeti Mimilead:
+You must collect 5 of each of the following: Cocoons Fragments from attacking the Large Cocoons in the Fairy Settlement; Fairy Wings from the Fairies released from the Large Cocoons; and Kimerian's Breath from the Slightly Enraged Fairies that came from the Large Cocoons which ware attacked by using a skill. +Elder Hierarch Fairy Noeti Mimilead:
+Still not done? I understand that it is not easy, but once again I ask you.
+ \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q00466_PlacingMySmallPower/32895-05.html b/trunk/dist/game/data/scripts/quests/Q00466_PlacingMySmallPower/32895-05.html new file mode 100644 index 0000000000..139919b9da --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q00466_PlacingMySmallPower/32895-05.html @@ -0,0 +1,5 @@ +Elder Hierarch Fairy Noeti Mimilead:
+Thank you! +Now we have ingredients. I'll give you the recipe for Timiniel's Tonic.
+Let me know when you've made the recipe! + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q00466_PlacingMySmallPower/32895-06.html b/trunk/dist/game/data/scripts/quests/Q00466_PlacingMySmallPower/32895-06.html new file mode 100644 index 0000000000..ca6de3f7c0 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q00466_PlacingMySmallPower/32895-06.html @@ -0,0 +1,3 @@ +Elder Hierarch Fairy Noeti Mimilead:
+To help the trees of the Fairy Settlement you have to make a sufficient number Timiniel's Tonic + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q00466_PlacingMySmallPower/32895-07.html b/trunk/dist/game/data/scripts/quests/Q00466_PlacingMySmallPower/32895-07.html new file mode 100644 index 0000000000..6b69185cae --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q00466_PlacingMySmallPower/32895-07.html @@ -0,0 +1,4 @@ +Elder Hierarch Fairy Noeti Mimilead:
+The trees in our Fairy Settlement will become more stronger thanks to the Nutrition you made for us, and when the trees are strong, we are strong.
+Please take one sample of Timiniel's Tonic to Hierarch Asterios. + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q00466_PlacingMySmallPower/33853-08.html b/trunk/dist/game/data/scripts/quests/Q00466_PlacingMySmallPower/33853-08.html new file mode 100644 index 0000000000..d3e0ae6175 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q00466_PlacingMySmallPower/33853-08.html @@ -0,0 +1,4 @@ +Elder Hierarch Fairy Noeti Mimilead:
+The trees in our Fairy Settlement will become more stronger thanks to the Nutrition you made for us, and when the trees are strong, we are strong.
+Please take one sample of Timiniel's Tonic to Hierarch Asterios. + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q00466_PlacingMySmallPower/Q00466_PlacingMySmallPower.java b/trunk/dist/game/data/scripts/quests/Q00466_PlacingMySmallPower/Q00466_PlacingMySmallPower.java new file mode 100644 index 0000000000..4d9b999b97 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q00466_PlacingMySmallPower/Q00466_PlacingMySmallPower.java @@ -0,0 +1,251 @@ +/* + * 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.Q00466_PlacingMySmallPower; + +import com.l2jmobius.commons.util.CommonUtil; +import com.l2jmobius.gameserver.enums.QuestSound; +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.quest.Quest; +import com.l2jmobius.gameserver.model.quest.QuestState; +import com.l2jmobius.gameserver.model.quest.State; + +/** + * Placing My Small Power (466) + * @URL https://l2wiki.com/Placing_My_Small_Power + * @VIDEO http://www.dailymotion.com/video/x24y1jl_quest-placing-my-small-power_videogames + * @author Gigi + */ +public class Q00466_PlacingMySmallPower extends Quest +{ + // NPCs + private static final int ASTERIOS = 30154; + public static final int NOETI_MIMILEAD = 32895; + public static final int[] COCON = + { + 19394 // Large Cocoon + }; + private static final int[] WING = + { + 22863, // Fairy Warrior + 22864, // Fairy Warrior + 22907, // Satyr Witch + 22899, // Satyr Summoner + 22891, // Satyr Wizard + 22875, // Fairy Rogue + 22867, // Fairy Warrior + 22883 // Fairy Knight + }; + private static final int[] BREATH = + { + 22870, // Fairy Warrior + 22886, // Fairy Knight + 22902, // Satyr Summoner + 22894, // Satyr Wizard + 22878 // Fairy Rogue + }; + // Items + public static final int FAIRY_WING = 17597; + public static final int COCOON_FRAGMENT = 17598; + public static final int KIMERIANS_BREATH = 17599; + public static final int TEMINIELS_TONIC = 17596; + public static final int TONIC_RECIPE = 17603; + // Reward + public static final int CERTIFICATE_OF_PROMISE = 30384; + // Misc + private static final int MIN_LEVEL = 90; + + public Q00466_PlacingMySmallPower() + { + super(466); + addStartNpc(ASTERIOS); + addTalkId(ASTERIOS, NOETI_MIMILEAD); + addKillId(COCON); + addKillId(WING); + addKillId(BREATH); + registerQuestItems(FAIRY_WING, COCOON_FRAGMENT, KIMERIANS_BREATH, TEMINIELS_TONIC, TONIC_RECIPE); + addCondMinLevel(MIN_LEVEL, "30154-00.htm"); + } + + @Override + public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) + { + String htmltext = null; + final QuestState qs = getQuestState(player, false); + if (qs == null) + { + return getNoQuestMsg(player); + } + switch (event) + { + case "30154-02.htm": + case "32895-02.html": + { + htmltext = event; + break; + } + case "30154-03.htm": + { + qs.startQuest(); + htmltext = event; + break; + } + case "32895-03.html": + { + qs.setCond(2, true); + htmltext = event; + break; + } + case "30154-05.html": + { + giveItems(player, CERTIFICATE_OF_PROMISE, 1); + qs.exitQuest(QuestType.DAILY, true); + htmltext = event; + break; + } + case "32895-07.html": + { + if (qs.isCond(4)) + { + qs.setCond(5); + } + break; + } + } + return htmltext; + } + + @Override + public String onTalk(L2Npc npc, L2PcInstance player) + { + final QuestState qs = getQuestState(player, true); + String htmltext = getNoQuestMsg(player); + if (qs == null) + { + return htmltext; + } + switch (qs.getState()) + { + case State.COMPLETED: + { + if ((npc.getId() == ASTERIOS) && !qs.isNowAvailable()) + { + htmltext = "30154-00a.htm"; + break; + } + qs.setState(State.CREATED); + } + case State.CREATED: + { + htmltext = "30154-01.htm"; + break; + } + case State.STARTED: + { + switch (npc.getId()) + { + case ASTERIOS: + { + if (qs.isCond(1)) + { + htmltext = "30154-04.html"; + } + else if (qs.isCond(5)) + { + htmltext = "30154-05a.html"; + } + break; + } + case NOETI_MIMILEAD: + { + + switch (qs.getCond()) + { + case 1: + { + htmltext = "32895-01.html"; + break; + } + case 2: + { + htmltext = "32895-04.html"; + break; + } + case 3: + { + giveItems(player, TONIC_RECIPE, 1); + qs.setCond(4, true); + htmltext = "32895-05.html"; + break; + } + case 4: + { + if (getQuestItemsCount(player, TEMINIELS_TONIC) < 5) + { + htmltext = "32895-06.html"; + } + else + { + htmltext = "32895-07.html"; + } + break; + } + } + break; + } + } + break; + } + } + return htmltext; + } + + @Override + public String onKill(L2Npc npc, L2PcInstance player, boolean isSummon) + { + final QuestState qs = getQuestState(player, false); + if (qs == null) + { + return null; + } + if (qs.isCond(2)) + { + if (CommonUtil.contains(COCON, npc.getId()) && (getQuestItemsCount(player, COCOON_FRAGMENT) < 5) && (getRandom(100) < 7)) + { + giveItems(player, COCOON_FRAGMENT, 1); + playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET); + } + if (CommonUtil.contains(WING, npc.getId()) && (getQuestItemsCount(player, FAIRY_WING) < 5) && (getRandom(100) < 10)) + { + giveItems(player, FAIRY_WING, 1); + playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET); + } + if (CommonUtil.contains(BREATH, npc.getId()) && (getQuestItemsCount(player, KIMERIANS_BREATH) < 5) && (getRandom(100) < 12)) + { + giveItems(player, KIMERIANS_BREATH, 1); + playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET); + } + } + if ((getQuestItemsCount(player, COCOON_FRAGMENT) == 5) && (getQuestItemsCount(player, FAIRY_WING) == 5) && (getQuestItemsCount(player, KIMERIANS_BREATH) == 5)) + { + qs.setCond(1); + qs.setCond(3, true); + } + return super.onKill(npc, player, isSummon); + } +} \ 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 31e2f30873..2bd70323ae 100644 --- a/trunk/dist/game/data/scripts/quests/QuestMasterHandler.java +++ b/trunk/dist/game/data/scripts/quests/QuestMasterHandler.java @@ -122,6 +122,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.Q00466_PlacingMySmallPower.Q00466_PlacingMySmallPower; import quests.Q00470_DivinityProtector.Q00470_DivinityProtector; import quests.Q00474_WaitingForTheSummer.Q00474_WaitingForTheSummer; import quests.Q00476_PlainMission.Q00476_PlainMission; @@ -493,6 +494,7 @@ public class QuestMasterHandler Q00458_PerfectForm.class, Q00463_IMustBeaGenius.class, Q00464_Oath.class, + Q00466_PlacingMySmallPower.class, Q00470_DivinityProtector.class, Q00474_WaitingForTheSummer.class, Q00476_PlainMission.class,