From a03637f276859adb363fa6cd7a4f11efb27fd100 Mon Sep 17 00:00:00 2001 From: MobiusDev <8391001+MobiusDevelopment@users.noreply.github.com> Date: Thu, 28 Apr 2016 08:32:36 +0000 Subject: [PATCH] Quest Wonders of Caring (488). Contributed by gigilo1968. --- .../Q00488_WondersOfCaring/32327-01.htm | 6 + .../Q00488_WondersOfCaring/32327-02.htm | 3 + .../Q00488_WondersOfCaring/32327-03.htm | 4 + .../Q00488_WondersOfCaring/32327-04.htm | 4 + .../Q00488_WondersOfCaring/32327-05.html | 4 + .../Q00488_WondersOfCaring/32327-07.html | 5 + .../Q00488_WondersOfCaring/32880-01.html | 4 + .../Q00488_WondersOfCaring.java | 144 ++++++++++++++++++ .../Q00488_WondersOfCaring/no_level.html | 3 + .../scripts/quests/QuestMasterHandler.java | 2 + 10 files changed, 179 insertions(+) create mode 100644 trunk/dist/game/data/scripts/quests/Q00488_WondersOfCaring/32327-01.htm create mode 100644 trunk/dist/game/data/scripts/quests/Q00488_WondersOfCaring/32327-02.htm create mode 100644 trunk/dist/game/data/scripts/quests/Q00488_WondersOfCaring/32327-03.htm create mode 100644 trunk/dist/game/data/scripts/quests/Q00488_WondersOfCaring/32327-04.htm create mode 100644 trunk/dist/game/data/scripts/quests/Q00488_WondersOfCaring/32327-05.html create mode 100644 trunk/dist/game/data/scripts/quests/Q00488_WondersOfCaring/32327-07.html create mode 100644 trunk/dist/game/data/scripts/quests/Q00488_WondersOfCaring/32880-01.html create mode 100644 trunk/dist/game/data/scripts/quests/Q00488_WondersOfCaring/Q00488_WondersOfCaring.java create mode 100644 trunk/dist/game/data/scripts/quests/Q00488_WondersOfCaring/no_level.html diff --git a/trunk/dist/game/data/scripts/quests/Q00488_WondersOfCaring/32327-01.htm b/trunk/dist/game/data/scripts/quests/Q00488_WondersOfCaring/32327-01.htm new file mode 100644 index 0000000000..140089135e --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q00488_WondersOfCaring/32327-01.htm @@ -0,0 +1,6 @@ +Adventurers' Guide:
+Calling all adventurers!
+Dolphren is looking for brave warriors to help collect research materials! Listen in for details.
+Research on the Giant relics is progressing at a slower than expected pace. Our efforts are hampered by both monsters and ongoing wars. Dolphren suggests concentrating forces on the Silent Valley and is offering significant compensation for all those who agree to help! Are you interested?
+ + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q00488_WondersOfCaring/32327-02.htm b/trunk/dist/game/data/scripts/quests/Q00488_WondersOfCaring/32327-02.htm new file mode 100644 index 0000000000..b5ec790d50 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q00488_WondersOfCaring/32327-02.htm @@ -0,0 +1,3 @@ +Adventurers' Guide:
Certainly!Chimera Pieces, Soldiers of Ancient Times, Mutated Creations, Warriors of Ancient Times, Shamans of Ancient Times, Creatures of the Past, Forgotten Ancient People, Forgotten Faces, and Giant's Shadows are raiding our digs, and have carried away 50 Relic Boxes. We need those research materials!
+ + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q00488_WondersOfCaring/32327-03.htm b/trunk/dist/game/data/scripts/quests/Q00488_WondersOfCaring/32327-03.htm new file mode 100644 index 0000000000..44f4c38532 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q00488_WondersOfCaring/32327-03.htm @@ -0,0 +1,4 @@ +Adventurers' Guide:
+The usual remnants of ancient civilizations. But this dig is the only one in Silent Valley we've found worth exploiting. When you're done, return to Aden and give them to Recipe Merchant Dolphren. He's willing to pay well for intact relics.
+ + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q00488_WondersOfCaring/32327-04.htm b/trunk/dist/game/data/scripts/quests/Q00488_WondersOfCaring/32327-04.htm new file mode 100644 index 0000000000..82f377a9ba --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q00488_WondersOfCaring/32327-04.htm @@ -0,0 +1,4 @@ +Adventurers' Guide:
+I know you've got the particulars down, but I like to review sometimes.
+Hunt Chimera Pieces, Soldiers of Ancient Times, Mutated Creations, Warriors of Ancient Times, Shamans of Ancient Times, Creatures of the Past, Forgotten Ancient People, Forgotten Faces and Giant's Shadows. Collect 50 Relic Boxes and take them to Recipe Merchant Dolphren. + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q00488_WondersOfCaring/32327-05.html b/trunk/dist/game/data/scripts/quests/Q00488_WondersOfCaring/32327-05.html new file mode 100644 index 0000000000..b56fe76bb0 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q00488_WondersOfCaring/32327-05.html @@ -0,0 +1,4 @@ +Adventurers' Guide:
+Just so you don't forget...
+Hunt Chimera Pieces, Soldiers of Ancient Times, Mutated Creations, Warriors of Ancient Times, Shamans of Ancient Times, Creatures of the Past, Forgotten Ancient People, Forgotten Faces and Giant's Shadows. Collect 50 Relic Boxes and take them to Recipe Merchant Dolphren. He has a good eye for antiquities, so don't try to pass off junk! + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q00488_WondersOfCaring/32327-07.html b/trunk/dist/game/data/scripts/quests/Q00488_WondersOfCaring/32327-07.html new file mode 100644 index 0000000000..9d743ea29d --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q00488_WondersOfCaring/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/Q00488_WondersOfCaring/32880-01.html b/trunk/dist/game/data/scripts/quests/Q00488_WondersOfCaring/32880-01.html new file mode 100644 index 0000000000..3fed3c22d7 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q00488_WondersOfCaring/32880-01.html @@ -0,0 +1,4 @@ +Recipe Merchant Dolphren:
+You're here! Oh! These are the Relic Boxes? Good! And here is your compensation!
+You helped us and I compensated for it. Now, we can be friends. Thank you. Goodbye, friend! + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q00488_WondersOfCaring/Q00488_WondersOfCaring.java b/trunk/dist/game/data/scripts/quests/Q00488_WondersOfCaring/Q00488_WondersOfCaring.java new file mode 100644 index 0000000000..cc5bd95297 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q00488_WondersOfCaring/Q00488_WondersOfCaring.java @@ -0,0 +1,144 @@ +/* + * 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.Q00488_WondersOfCaring; + +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; + +/** + * Wonders of Caring (488) + * @URL https://l2wiki.com/Wonders_of_Caring + * @author Gigi + */ +public class Q00488_WondersOfCaring extends Quest +{ + // NPCs + private static final int ADVANTURES_GUIDE = 32327; + private static final int DOLPHREN = 32880; + // MONSTERS + private static final int CNIMERA_PRICE = 20965; + private static final int MUTATED_CREATION = 20966; + private static final int CREATURE_OF_THE_PAST = 20967; + private static final int FORGOTTEN_FACE = 20968; + private static final int GIANTS_SHADOW = 20969; + private static final int SOLDIER_OS_ANCIENT_TIMESS = 20970; + private static final int WARRIOR_OS_ANCIENT_TIME = 20971; + private static final int SHAMAN_ON_ANCIENT_TIMES = 20972; + private static final int FORGOTTEN_ANCIENT_PEOPLE = 20973; + // Items + private static final int RELIC_BOX = 19500; + private static final ItemHolder ADENA = new ItemHolder(57, 283800); + // Misc + private static final int MIN_LEVEL = 75; + private static final int MAX_LEVEL = 79; + // Reward + private static final int EXP_REWARD = 22901550; + private static final int SP_REWARD = 5496; + + public Q00488_WondersOfCaring() + { + super(488, Q00488_WondersOfCaring.class.getSimpleName(), "Wonders of Caring"); + addStartNpc(ADVANTURES_GUIDE); + addTalkId(ADVANTURES_GUIDE, DOLPHREN); + registerQuestItems(RELIC_BOX); + addKillId(CNIMERA_PRICE, MUTATED_CREATION, CREATURE_OF_THE_PAST, FORGOTTEN_FACE, GIANTS_SHADOW, SOLDIER_OS_ANCIENT_TIMESS, WARRIOR_OS_ANCIENT_TIME, SHAMAN_ON_ANCIENT_TIMES, FORGOTTEN_ANCIENT_PEOPLE); + 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() && !qs.isNowAvailable()) + { + htmltext = "32327-07.html"; + } + break; + } + case DOLPHREN: + { + if (qs.isCond(2) && (getQuestItemsCount(player, RELIC_BOX) >= 50)) + { + takeItems(player, RELIC_BOX, -1); + giveItems(player, ADENA); + addExpAndSp(player, EXP_REWARD, SP_REWARD); + qs.exitQuest(QuestType.DAILY, true); + htmltext = "32880-01.html"; + } + break; + } + } + return htmltext; + } + + @Override + public String onKill(L2Npc monster, L2PcInstance killer, boolean isSummon) + { + final QuestState qs = getQuestState(killer, false); + if ((qs != null) && qs.isCond(1) && giveItemRandomly(killer, monster, RELIC_BOX, 1, 50, 0.2, true)) + { + qs.setCond(2, true); + } + return super.onKill(monster, killer, isSummon); + } +} \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q00488_WondersOfCaring/no_level.html b/trunk/dist/game/data/scripts/quests/Q00488_WondersOfCaring/no_level.html new file mode 100644 index 0000000000..3d3b8d32b6 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q00488_WondersOfCaring/no_level.html @@ -0,0 +1,3 @@ +You don't meet level requirements
+(Quest available from level 75 - 79) + \ 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 4f3b454351..0278092be7 100644 --- a/trunk/dist/game/data/scripts/quests/QuestMasterHandler.java +++ b/trunk/dist/game/data/scripts/quests/QuestMasterHandler.java @@ -134,6 +134,7 @@ import quests.Q00471_BreakingThroughTheEmeraldSquare.Q00471_BreakingThroughTheEm import quests.Q00472_ChallengeSteamCorridor.Q00472_ChallengeSteamCorridor; import quests.Q00473_InTheCoralGarden.Q00473_InTheCoralGarden; import quests.Q00485_HotSpringWater.Q00485_HotSpringWater; +import quests.Q00488_WondersOfCaring.Q00488_WondersOfCaring; import quests.Q00490_DutyOfTheSurvivor.Q00490_DutyOfTheSurvivor; import quests.Q00492_TombRaiders.Q00492_TombRaiders; import quests.Q00494_IncarnationOfGreedZellakaGroup.Q00494_IncarnationOfGreedZellakaGroup; @@ -566,6 +567,7 @@ final class QuestMasterHandler Q10453_StoppingTheWindDragon.class, Q10465_SoulFrostSword.class, Q10472_WindsOfFate_EncroachingShadows.class, + Q00488_WondersOfCaring.class, Q10501_ZakenEmbroideredSoulCloak.class, Q10502_FreyaEmbroideredSoulCloak.class, Q10503_FrintezzaEmbroideredSoulCloak.class,