From a9a929213aa4f11293648b217f10e5f920a1657e Mon Sep 17 00:00:00 2001 From: MobiusDevelopment <8391001+MobiusDevelopment@users.noreply.github.com> Date: Tue, 9 Feb 2021 19:33:16 +0000 Subject: [PATCH] Addition of quest Tomb Raiders (933). Contributed by Sero. --- .../quests/Q00933_TombRaiders/32594-03.htm | 4 + .../quests/Q00933_TombRaiders/32594-04.htm | 3 + .../quests/Q00933_TombRaiders/32594-06.htm | 4 + .../quests/Q00933_TombRaiders/34552-01.htm | 5 + .../quests/Q00933_TombRaiders/34552-02.htm | 4 + .../Q00933_TombRaiders.java | 163 ++++++++++++++++++ .../scripts/quests/QuestMasterHandler.java | 2 + 7 files changed, 185 insertions(+) create mode 100644 L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/quests/Q00933_TombRaiders/32594-03.htm create mode 100644 L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/quests/Q00933_TombRaiders/32594-04.htm create mode 100644 L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/quests/Q00933_TombRaiders/32594-06.htm create mode 100644 L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/quests/Q00933_TombRaiders/34552-01.htm create mode 100644 L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/quests/Q00933_TombRaiders/34552-02.htm create mode 100644 L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/quests/Q00933_TombRaiders/Q00933_TombRaiders.java diff --git a/L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/quests/Q00933_TombRaiders/32594-03.htm b/L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/quests/Q00933_TombRaiders/32594-03.htm new file mode 100644 index 0000000000..7b2475daaa --- /dev/null +++ b/L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/quests/Q00933_TombRaiders/32594-03.htm @@ -0,0 +1,4 @@ +Search Team's Teleporter:
+You have completed all the tasks and passed the trial.
+ + \ No newline at end of file diff --git a/L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/quests/Q00933_TombRaiders/32594-04.htm b/L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/quests/Q00933_TombRaiders/32594-04.htm new file mode 100644 index 0000000000..e0be8fe0b8 --- /dev/null +++ b/L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/quests/Q00933_TombRaiders/32594-04.htm @@ -0,0 +1,3 @@ +Search Team's Teleporter:
+Congratulations. You have completed all the tasks and passed the trial. + \ No newline at end of file diff --git a/L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/quests/Q00933_TombRaiders/32594-06.htm b/L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/quests/Q00933_TombRaiders/32594-06.htm new file mode 100644 index 0000000000..27930fbf17 --- /dev/null +++ b/L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/quests/Q00933_TombRaiders/32594-06.htm @@ -0,0 +1,4 @@ +Search Team's Teleporter:
+Password Decoder Leopard from the Town of Goddard asks you to defeat the monsters who have conquered the Imperial Tomb. You need to defeat 150 monsters in total.
+To hunt: Tomb Guardian, Tomb Raider, Tomb Watcher, Tomb Soultaker, Tomb Patrol. + \ No newline at end of file diff --git a/L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/quests/Q00933_TombRaiders/34552-01.htm b/L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/quests/Q00933_TombRaiders/34552-01.htm new file mode 100644 index 0000000000..0b6733754d --- /dev/null +++ b/L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/quests/Q00933_TombRaiders/34552-01.htm @@ -0,0 +1,5 @@ +Search Team's Teleporter:
+Password Decoder Leopard from the Town of Goddard asks you to defeat the monsters who have conquered the Imperial Tomb. You need to defeat 150 monsters in total.
+To hunt: Tomb Guardian, Tomb Raider, Tomb Watcher, Tomb Soultaker, Tomb Patrol..
+ + \ No newline at end of file diff --git a/L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/quests/Q00933_TombRaiders/34552-02.htm b/L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/quests/Q00933_TombRaiders/34552-02.htm new file mode 100644 index 0000000000..c462c0ba86 --- /dev/null +++ b/L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/quests/Q00933_TombRaiders/34552-02.htm @@ -0,0 +1,4 @@ +Search Team's Teleporter:
+Password Decoder Leopard from the Town of Goddard asks you to defeat the monsters who have conquered the Imperial Tomb. You need to defeat 150 monsters in total.
+To hunt: Tomb Guardian, Tomb Raider, Tomb Watcher, Tomb Soultaker, Tomb Patrol.. + \ No newline at end of file diff --git a/L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/quests/Q00933_TombRaiders/Q00933_TombRaiders.java b/L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/quests/Q00933_TombRaiders/Q00933_TombRaiders.java new file mode 100644 index 0000000000..fc9ca86480 --- /dev/null +++ b/L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/quests/Q00933_TombRaiders/Q00933_TombRaiders.java @@ -0,0 +1,163 @@ +/* + * 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.Q00933_TombRaiders; + +import java.util.HashSet; +import java.util.Set; + +import org.l2jmobius.gameserver.enums.QuestSound; +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; + +/** + * Tomb Raiders (933) + * @URL https://l2wiki.com/Tomb_Raiders + * @author Sero + */ +public class Q00933_TombRaiders extends Quest +{ + // NPCs + private static final int SEARCH_TEAM_TELEPORTER = 34552; + private static final int LEOPARD = 32594; + // Monsters + private static final int TOMB_GUARDIAN = 24580; + private static final int TOMB_RAIDER = 24581; + private static final int TOMB_WATCHER = 24584; + private static final int TOMB_SOULTAKER = 24583; + private static final int TOMB_PATROL = 24582; + // Item + private static final int BENUSTA_REWARD_BOX = 81151; + // Misc + private static final String KILL_COUNT_VAR = "KillCount"; + + public Q00933_TombRaiders() + { + super(933); + addStartNpc(SEARCH_TEAM_TELEPORTER); + addTalkId(SEARCH_TEAM_TELEPORTER, LEOPARD); + addKillId(TOMB_GUARDIAN, TOMB_RAIDER, TOMB_WATCHER, TOMB_SOULTAKER, TOMB_PATROL); + } + + @Override + public String onAdvEvent(String event, Npc npc, PlayerInstance player) + { + String htmltext = null; + final QuestState qs = getQuestState(player, false); + if (qs == null) + { + return htmltext; + } + switch (event) + { + case "34552-02.htm": + { + qs.startQuest(); + htmltext = event; + + break; + } + case "32594-04.htm": + { + if (qs.isCond(2)) + { + addExpAndSp(player, 20700253956096L, 1450359376); + giveItems(player, BENUSTA_REWARD_BOX, 1); + qs.exitQuest(true, true); + htmltext = event; + } + break; + } + } + return htmltext; + } + + @Override + public String onTalk(Npc npc, PlayerInstance player) + { + String htmltext = getNoQuestMsg(player); + final QuestState qs = getQuestState(player, true); + switch (qs.getState()) + { + case State.CREATED: + { + htmltext = "34552-01.htm"; + break; + } + case State.STARTED: + { + if (qs.isCond(2)) + { + htmltext = "32594-03.htm"; + } + else + { + htmltext = "32594-06.htm"; + } + break; + } + case State.COMPLETED: + { + htmltext = getAlreadyCompletedMsg(player); + break; + } + } + return htmltext; + } + + @Override + public String onKill(Npc npc, PlayerInstance killer, boolean isSummon) + { + final QuestState qs = getQuestState(killer, false); + if ((qs != null) && qs.isCond(1)) + { + final int killCount = qs.getInt(KILL_COUNT_VAR); + if (killCount < 150) + { + qs.set(KILL_COUNT_VAR, killCount + 1); + playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET); + sendNpcLogList(killer); + } + else + { + qs.setCond(2); + qs.unset(KILL_COUNT_VAR); + } + } + return super.onKill(npc, killer, isSummon); + } + + // TODO: + // public String onEnterZone(Creature creature, ZoneType zone) + + @Override + public Set getNpcLogList(PlayerInstance player) + { + final QuestState qs = getQuestState(player, false); + if ((qs != null) && qs.isCond(1)) + { + final Set holder = new HashSet<>(); + holder.add(new NpcLogListHolder(NpcStringId.DEFEAT_MONSTERS_IN_THE_IMPERIAL_TOMB.getId(), true, qs.getInt(KILL_COUNT_VAR))); + return holder; + } + return super.getNpcLogList(player); + } +} diff --git a/L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/quests/QuestMasterHandler.java b/L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/quests/QuestMasterHandler.java index c06996f3c0..5dac4ea248 100644 --- a/L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/quests/QuestMasterHandler.java +++ b/L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/quests/QuestMasterHandler.java @@ -26,6 +26,7 @@ import quests.Q00726_LightWithinTheDarkness.Q00726_LightWithinTheDarkness; import quests.Q00727_HopeWithinTheDarkness.Q00727_HopeWithinTheDarkness; import quests.Q00833_DevilsTreasureTauti.Q00833_DevilsTreasureTauti; import quests.Q00835_PitiableMelisa.Q00835_PitiableMelisa; +import quests.Q00933_TombRaiders.Q00933_TombRaiders; import quests.Q00937_ToReviveTheFishingGuild.Q00937_ToReviveTheFishingGuild; import quests.Q10423_EmbryoStrongholdRaid.Q10423_EmbryoStrongholdRaid; import quests.Q10454_FinalEmbryoApostle.Q10454_FinalEmbryoApostle; @@ -95,6 +96,7 @@ public class QuestMasterHandler Q00838_RequestFromTheMotherTreeGuardians.class, // TODO: Not done. Q00839_RequestFromTheUnworldlyVisitors.class, // TODO: Not done. Q00840_RequestFromTheKingdomsRoyalGuard.class, // TODO: Not done. + Q00933_TombRaiders.class, Q00937_ToReviveTheFishingGuild.class, Q01900_StormIsleSecretSpot.class, // TODO: Not done. Q01901_StormIsleFurtiveDeal.class, // TODO: Not done.