From 7377b67b70ef65385472db0c9beddae33f40dcb7 Mon Sep 17 00:00:00 2001 From: MobiusDev <8391001+MobiusDevelopment@users.noreply.github.com> Date: Fri, 11 Jan 2019 08:03:07 +0000 Subject: [PATCH] Addition of quest The Dimensional Warp, Part 1 (10801). Contributed by gigilo1968. --- .../data/scripts/quests/MissingQuests.txt | 1 - .../33974-00.htm | 4 + .../33974-01.htm | 5 + .../33974-02.htm | 5 + .../33974-03.htm | 5 + .../33974-04.htm | 3 + .../33974-05.html | 4 + .../33974-06.html | 5 + .../33974-07.html | 4 + .../Q10801_TheDimensionalWarpPart1.java | 179 ++++++++++++++++++ .../scripts/quests/QuestMasterHandler.java | 4 +- .../data/scripts/quests/MissingQuests.txt | 1 - .../33974-00.htm | 4 + .../33974-01.htm | 5 + .../33974-02.htm | 5 + .../33974-03.htm | 5 + .../33974-04.htm | 3 + .../33974-05.html | 4 + .../33974-06.html | 5 + .../33974-07.html | 4 + .../Q10801_TheDimensionalWarpPart1.java | 179 ++++++++++++++++++ .../scripts/quests/QuestMasterHandler.java | 2 + .../data/scripts/quests/MissingQuests.txt | 1 - .../33974-00.htm | 4 + .../33974-01.htm | 5 + .../33974-02.htm | 5 + .../33974-03.htm | 5 + .../33974-04.htm | 3 + .../33974-05.html | 4 + .../33974-06.html | 5 + .../33974-07.html | 4 + .../Q10801_TheDimensionalWarpPart1.java | 179 ++++++++++++++++++ .../scripts/quests/QuestMasterHandler.java | 2 + .../data/scripts/quests/MissingQuests.txt | 1 - .../33974-00.htm | 4 + .../33974-01.htm | 5 + .../33974-02.htm | 5 + .../33974-03.htm | 5 + .../33974-04.htm | 3 + .../33974-05.html | 4 + .../33974-06.html | 5 + .../33974-07.html | 4 + .../Q10801_TheDimensionalWarpPart1.java | 179 ++++++++++++++++++ .../scripts/quests/QuestMasterHandler.java | 2 + .../data/scripts/quests/MissingQuests.txt | 1 - .../33974-00.htm | 4 + .../33974-01.htm | 5 + .../33974-02.htm | 5 + .../33974-03.htm | 5 + .../33974-04.htm | 3 + .../33974-05.html | 4 + .../33974-06.html | 5 + .../33974-07.html | 4 + .../Q10801_TheDimensionalWarpPart1.java | 179 ++++++++++++++++++ .../scripts/quests/QuestMasterHandler.java | 2 + .../data/scripts/quests/MissingQuests.txt | 1 - .../33974-00.htm | 4 + .../33974-01.htm | 5 + .../33974-02.htm | 5 + .../33974-03.htm | 5 + .../33974-04.htm | 3 + .../33974-05.html | 4 + .../33974-06.html | 5 + .../33974-07.html | 4 + .../Q10801_TheDimensionalWarpPart1.java | 179 ++++++++++++++++++ .../scripts/quests/QuestMasterHandler.java | 2 + 66 files changed, 1297 insertions(+), 7 deletions(-) create mode 100644 L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-00.htm create mode 100644 L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-01.htm create mode 100644 L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-02.htm create mode 100644 L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-03.htm create mode 100644 L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-04.htm create mode 100644 L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-05.html create mode 100644 L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-06.html create mode 100644 L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-07.html create mode 100644 L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/Q10801_TheDimensionalWarpPart1.java create mode 100644 L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-00.htm create mode 100644 L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-01.htm create mode 100644 L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-02.htm create mode 100644 L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-03.htm create mode 100644 L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-04.htm create mode 100644 L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-05.html create mode 100644 L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-06.html create mode 100644 L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-07.html create mode 100644 L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/Q10801_TheDimensionalWarpPart1.java create mode 100644 L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-00.htm create mode 100644 L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-01.htm create mode 100644 L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-02.htm create mode 100644 L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-03.htm create mode 100644 L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-04.htm create mode 100644 L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-05.html create mode 100644 L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-06.html create mode 100644 L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-07.html create mode 100644 L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/Q10801_TheDimensionalWarpPart1.java create mode 100644 L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-00.htm create mode 100644 L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-01.htm create mode 100644 L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-02.htm create mode 100644 L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-03.htm create mode 100644 L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-04.htm create mode 100644 L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-05.html create mode 100644 L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-06.html create mode 100644 L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-07.html create mode 100644 L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/Q10801_TheDimensionalWarpPart1.java create mode 100644 L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-00.htm create mode 100644 L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-01.htm create mode 100644 L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-02.htm create mode 100644 L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-03.htm create mode 100644 L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-04.htm create mode 100644 L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-05.html create mode 100644 L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-06.html create mode 100644 L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-07.html create mode 100644 L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/Q10801_TheDimensionalWarpPart1.java create mode 100644 L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-00.htm create mode 100644 L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-01.htm create mode 100644 L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-02.htm create mode 100644 L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-03.htm create mode 100644 L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-04.htm create mode 100644 L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-05.html create mode 100644 L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-06.html create mode 100644 L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-07.html create mode 100644 L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/Q10801_TheDimensionalWarpPart1.java diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/MissingQuests.txt b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/MissingQuests.txt index 898f7f64aa..6edf28c5d7 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/MissingQuests.txt +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/MissingQuests.txt @@ -46,7 +46,6 @@ 10747 The Hero's Journey: Pagan Temple 10748 Mysterious Suggestion - 1 10749 Mysterious Suggestion - 2 -10801 The Dimensional Warp, Part 1 10802 The Dimensional Warp, Part 2 10803 The Dimensional Warp, Part 3 10804 The Dimensional Warp, Part 4 diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-00.htm b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-00.htm new file mode 100644 index 0000000000..60df561273 --- /dev/null +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-00.htm @@ -0,0 +1,4 @@ +Resed:
+Are you trying to enter the Dimensional Warp? It's not a place for people like you.
+(Only characters Lv. 99 or above may undertake this quest.) + \ No newline at end of file diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-01.htm b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-01.htm new file mode 100644 index 0000000000..6c0b0ebbe1 --- /dev/null +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-01.htm @@ -0,0 +1,5 @@ +Resed:
+Have you been inside Dimensional Warp? My job is to send the explorers to the Dimensional Warp, but I don't have enough information here. I'm continuously collecting more, but it's still not enough.
+I know it won't be easy, but can you do me a favor?
+ + \ No newline at end of file diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-02.htm b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-02.htm new file mode 100644 index 0000000000..1589ad4b83 --- /dev/null +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-02.htm @@ -0,0 +1,5 @@ +Resed:
+In the early stages of a Dimensional Warp, Dimensional Bugbears come out.
+But we still don't have enough information about them. I need more information about them because people run into them the most.
+ + \ No newline at end of file diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-03.htm b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-03.htm new file mode 100644 index 0000000000..66cbd80773 --- /dev/null +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-03.htm @@ -0,0 +1,5 @@ +Resed:
+Can we start with 100?
+They come out often, so it won't be too hard. Thank you!
+ + \ No newline at end of file diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-04.htm b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-04.htm new file mode 100644 index 0000000000..0e95613c05 --- /dev/null +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-04.htm @@ -0,0 +1,3 @@ +Resed:
+Kill 100 Dimensional Bugbears and come back to me. + \ No newline at end of file diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-05.html b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-05.html new file mode 100644 index 0000000000..07ad7aa071 --- /dev/null +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-05.html @@ -0,0 +1,4 @@ +Resed:
+We still don't have enough information. That's not enough.
+Go kill more Dimensional Bugbears. + \ No newline at end of file diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-06.html b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-06.html new file mode 100644 index 0000000000..dfe15595b9 --- /dev/null +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-06.html @@ -0,0 +1,5 @@ +Resed:
+Thank you. This will be enough.
+Can You give me the information now?
+ + \ No newline at end of file diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-07.html b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-07.html new file mode 100644 index 0000000000..0bb0b71989 --- /dev/null +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-07.html @@ -0,0 +1,4 @@ +Resed:
+Good work. You're almost at the finish line.
+The reward is better than the last time. Take it. + \ No newline at end of file diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/Q10801_TheDimensionalWarpPart1.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/Q10801_TheDimensionalWarpPart1.java new file mode 100644 index 0000000000..f16e4a0045 --- /dev/null +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/Q10801_TheDimensionalWarpPart1.java @@ -0,0 +1,179 @@ +/* + * 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.Q10801_TheDimensionalWarpPart1; + +import java.util.HashSet; +import java.util.Set; + +import com.l2jmobius.Config; +import com.l2jmobius.gameserver.enums.QuestSound; +import com.l2jmobius.gameserver.model.L2Party; +import com.l2jmobius.gameserver.model.actor.L2Npc; +import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; +import com.l2jmobius.gameserver.model.holders.NpcLogListHolder; +import com.l2jmobius.gameserver.model.quest.Quest; +import com.l2jmobius.gameserver.model.quest.QuestState; +import com.l2jmobius.gameserver.model.quest.State; + +/** + * The Dimensional Warp, Part 1 (10801) + * @URL https://l2wiki.com/The_Dimensional_Warp,_Part_1 + * @author Gigi + * @date 2018-09-01 - [12:20:59] + */ +public class Q10801_TheDimensionalWarpPart1 extends Quest +{ + // NPC + private static final int RESED = 33974; + // Monsters + private static final int DIMENSIONAL_BUGBEAR = 23465; + // other + private static final int MIN_LEVEL = 99; + private static final int DIMENSIONAL_BRACELET_STAGE_1 = 39747; + private static final int WARP_CRYSTAL = 39597; + + public Q10801_TheDimensionalWarpPart1() + { + super(10801); + addStartNpc(RESED); + addTalkId(RESED); + addKillId(DIMENSIONAL_BUGBEAR); + addCondMinLevel(MIN_LEVEL, "33974-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 htmltext; + } + + switch (event) + { + case "33974-02.htm": + case "33974-03.htm": + { + htmltext = event; + break; + } + case "33974-04.htm": + { + qs.startQuest(); + htmltext = event; + break; + } + case "33974-07.html": + { + if (qs.isCond(2)) + { + if (player.getLevel() >= MIN_LEVEL) + { + addExpAndSp(player, 44442855977L, 0); + giveItems(player, DIMENSIONAL_BRACELET_STAGE_1, 1); + giveItems(player, WARP_CRYSTAL, 300); + qs.exitQuest(false, true); + htmltext = event; + } + else + { + htmltext = getNoQuestLevelRewardMsg(player); + } + } + break; + } + } + return htmltext; + } + + @Override + public String onTalk(L2Npc npc, L2PcInstance player) + { + final QuestState qs = getQuestState(player, true); + String htmltext = getNoQuestMsg(player); + + switch (qs.getState()) + { + case State.CREATED: + { + htmltext = "33974-01.htm"; + break; + } + case State.STARTED: + { + htmltext = (qs.isCond(1)) ? "33974-05.html" : "33974-06.html"; + break; + } + case State.COMPLETED: + { + htmltext = getAlreadyCompletedMsg(player); + break; + } + } + return htmltext; + } + + @Override + public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon) + { + L2Party party = killer.getParty(); + if (party != null) + { + party.getMembers().forEach(p -> onKill(npc, p)); + } + else + { + onKill(npc, killer); + } + return super.onKill(npc, killer, isSummon); + } + + private void onKill(L2Npc npc, L2PcInstance killer) + { + final QuestState qs = getQuestState(killer, false); + + if ((qs != null) && qs.isCond(1) && (npc.calculateDistance3D(killer) <= Config.ALT_PARTY_RANGE)) + { + int killedBugbear = qs.getInt("killed_" + DIMENSIONAL_BUGBEAR); + if (killedBugbear < 100) + { + qs.set("killed_" + DIMENSIONAL_BUGBEAR, ++killedBugbear); + playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET); + } + if (killedBugbear >= 100) + { + qs.setCond(2, true); + } + sendNpcLogList(killer); + } + } + + @Override + public Set getNpcLogList(L2PcInstance player) + { + final QuestState qs = getQuestState(player, false); + if ((qs != null) && qs.isCond(1)) + { + final Set holder = new HashSet<>(); + holder.add(new NpcLogListHolder(DIMENSIONAL_BUGBEAR, false, qs.getInt("killed_" + DIMENSIONAL_BUGBEAR))); + return holder; + } + return super.getNpcLogList(player); + } +} diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/QuestMasterHandler.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/QuestMasterHandler.java index 33fc74605a..d93285ba84 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/QuestMasterHandler.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/QuestMasterHandler.java @@ -449,6 +449,7 @@ import quests.Q10797_CrossingFate.Q10797_CrossingFate; import quests.Q10798_LettersFromTheQueenDragonValley.Q10798_LettersFromTheQueenDragonValley; import quests.Q10799_StrangeThingsAfootInTheValley.Q10799_StrangeThingsAfootInTheValley; import quests.Q10800_ReconnaissanceAtDragonValley.Q10800_ReconnaissanceAtDragonValley; +import quests.Q10801_TheDimensionalWarpPart1.Q10801_TheDimensionalWarpPart1; /** * @author NosBit @@ -888,7 +889,8 @@ public class QuestMasterHandler Q10797_CrossingFate.class, Q10798_LettersFromTheQueenDragonValley.class, Q10799_StrangeThingsAfootInTheValley.class, - Q10800_ReconnaissanceAtDragonValley.class + Q10800_ReconnaissanceAtDragonValley.class, + Q10801_TheDimensionalWarpPart1.class }; public static void main(String[] args) diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/MissingQuests.txt b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/MissingQuests.txt index 50e69176d6..45fa93b6b6 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/MissingQuests.txt +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/MissingQuests.txt @@ -53,7 +53,6 @@ 10747 The Hero's Journey: Pagan Temple 10748 Mysterious Suggestion - 1 10749 Mysterious Suggestion - 2 -10801 The Dimensional Warp, Part 1 10802 The Dimensional Warp, Part 2 10803 The Dimensional Warp, Part 3 10804 The Dimensional Warp, Part 4 diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-00.htm b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-00.htm new file mode 100644 index 0000000000..60df561273 --- /dev/null +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-00.htm @@ -0,0 +1,4 @@ +Resed:
+Are you trying to enter the Dimensional Warp? It's not a place for people like you.
+(Only characters Lv. 99 or above may undertake this quest.) + \ No newline at end of file diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-01.htm b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-01.htm new file mode 100644 index 0000000000..6c0b0ebbe1 --- /dev/null +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-01.htm @@ -0,0 +1,5 @@ +Resed:
+Have you been inside Dimensional Warp? My job is to send the explorers to the Dimensional Warp, but I don't have enough information here. I'm continuously collecting more, but it's still not enough.
+I know it won't be easy, but can you do me a favor?
+ + \ No newline at end of file diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-02.htm b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-02.htm new file mode 100644 index 0000000000..1589ad4b83 --- /dev/null +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-02.htm @@ -0,0 +1,5 @@ +Resed:
+In the early stages of a Dimensional Warp, Dimensional Bugbears come out.
+But we still don't have enough information about them. I need more information about them because people run into them the most.
+ + \ No newline at end of file diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-03.htm b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-03.htm new file mode 100644 index 0000000000..66cbd80773 --- /dev/null +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-03.htm @@ -0,0 +1,5 @@ +Resed:
+Can we start with 100?
+They come out often, so it won't be too hard. Thank you!
+ + \ No newline at end of file diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-04.htm b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-04.htm new file mode 100644 index 0000000000..0e95613c05 --- /dev/null +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-04.htm @@ -0,0 +1,3 @@ +Resed:
+Kill 100 Dimensional Bugbears and come back to me. + \ No newline at end of file diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-05.html b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-05.html new file mode 100644 index 0000000000..07ad7aa071 --- /dev/null +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-05.html @@ -0,0 +1,4 @@ +Resed:
+We still don't have enough information. That's not enough.
+Go kill more Dimensional Bugbears. + \ No newline at end of file diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-06.html b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-06.html new file mode 100644 index 0000000000..dfe15595b9 --- /dev/null +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-06.html @@ -0,0 +1,5 @@ +Resed:
+Thank you. This will be enough.
+Can You give me the information now?
+ + \ No newline at end of file diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-07.html b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-07.html new file mode 100644 index 0000000000..0bb0b71989 --- /dev/null +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-07.html @@ -0,0 +1,4 @@ +Resed:
+Good work. You're almost at the finish line.
+The reward is better than the last time. Take it. + \ No newline at end of file diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/Q10801_TheDimensionalWarpPart1.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/Q10801_TheDimensionalWarpPart1.java new file mode 100644 index 0000000000..f16e4a0045 --- /dev/null +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/Q10801_TheDimensionalWarpPart1.java @@ -0,0 +1,179 @@ +/* + * 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.Q10801_TheDimensionalWarpPart1; + +import java.util.HashSet; +import java.util.Set; + +import com.l2jmobius.Config; +import com.l2jmobius.gameserver.enums.QuestSound; +import com.l2jmobius.gameserver.model.L2Party; +import com.l2jmobius.gameserver.model.actor.L2Npc; +import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; +import com.l2jmobius.gameserver.model.holders.NpcLogListHolder; +import com.l2jmobius.gameserver.model.quest.Quest; +import com.l2jmobius.gameserver.model.quest.QuestState; +import com.l2jmobius.gameserver.model.quest.State; + +/** + * The Dimensional Warp, Part 1 (10801) + * @URL https://l2wiki.com/The_Dimensional_Warp,_Part_1 + * @author Gigi + * @date 2018-09-01 - [12:20:59] + */ +public class Q10801_TheDimensionalWarpPart1 extends Quest +{ + // NPC + private static final int RESED = 33974; + // Monsters + private static final int DIMENSIONAL_BUGBEAR = 23465; + // other + private static final int MIN_LEVEL = 99; + private static final int DIMENSIONAL_BRACELET_STAGE_1 = 39747; + private static final int WARP_CRYSTAL = 39597; + + public Q10801_TheDimensionalWarpPart1() + { + super(10801); + addStartNpc(RESED); + addTalkId(RESED); + addKillId(DIMENSIONAL_BUGBEAR); + addCondMinLevel(MIN_LEVEL, "33974-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 htmltext; + } + + switch (event) + { + case "33974-02.htm": + case "33974-03.htm": + { + htmltext = event; + break; + } + case "33974-04.htm": + { + qs.startQuest(); + htmltext = event; + break; + } + case "33974-07.html": + { + if (qs.isCond(2)) + { + if (player.getLevel() >= MIN_LEVEL) + { + addExpAndSp(player, 44442855977L, 0); + giveItems(player, DIMENSIONAL_BRACELET_STAGE_1, 1); + giveItems(player, WARP_CRYSTAL, 300); + qs.exitQuest(false, true); + htmltext = event; + } + else + { + htmltext = getNoQuestLevelRewardMsg(player); + } + } + break; + } + } + return htmltext; + } + + @Override + public String onTalk(L2Npc npc, L2PcInstance player) + { + final QuestState qs = getQuestState(player, true); + String htmltext = getNoQuestMsg(player); + + switch (qs.getState()) + { + case State.CREATED: + { + htmltext = "33974-01.htm"; + break; + } + case State.STARTED: + { + htmltext = (qs.isCond(1)) ? "33974-05.html" : "33974-06.html"; + break; + } + case State.COMPLETED: + { + htmltext = getAlreadyCompletedMsg(player); + break; + } + } + return htmltext; + } + + @Override + public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon) + { + L2Party party = killer.getParty(); + if (party != null) + { + party.getMembers().forEach(p -> onKill(npc, p)); + } + else + { + onKill(npc, killer); + } + return super.onKill(npc, killer, isSummon); + } + + private void onKill(L2Npc npc, L2PcInstance killer) + { + final QuestState qs = getQuestState(killer, false); + + if ((qs != null) && qs.isCond(1) && (npc.calculateDistance3D(killer) <= Config.ALT_PARTY_RANGE)) + { + int killedBugbear = qs.getInt("killed_" + DIMENSIONAL_BUGBEAR); + if (killedBugbear < 100) + { + qs.set("killed_" + DIMENSIONAL_BUGBEAR, ++killedBugbear); + playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET); + } + if (killedBugbear >= 100) + { + qs.setCond(2, true); + } + sendNpcLogList(killer); + } + } + + @Override + public Set getNpcLogList(L2PcInstance player) + { + final QuestState qs = getQuestState(player, false); + if ((qs != null) && qs.isCond(1)) + { + final Set holder = new HashSet<>(); + holder.add(new NpcLogListHolder(DIMENSIONAL_BUGBEAR, false, qs.getInt("killed_" + DIMENSIONAL_BUGBEAR))); + return holder; + } + return super.getNpcLogList(player); + } +} diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/QuestMasterHandler.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/QuestMasterHandler.java index cb179b8b87..1d83a564dc 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/QuestMasterHandler.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/QuestMasterHandler.java @@ -455,6 +455,7 @@ import quests.Q10797_CrossingFate.Q10797_CrossingFate; import quests.Q10798_LettersFromTheQueenDragonValley.Q10798_LettersFromTheQueenDragonValley; import quests.Q10799_StrangeThingsAfootInTheValley.Q10799_StrangeThingsAfootInTheValley; import quests.Q10800_ReconnaissanceAtDragonValley.Q10800_ReconnaissanceAtDragonValley; +import quests.Q10801_TheDimensionalWarpPart1.Q10801_TheDimensionalWarpPart1; import quests.Q10811_ExaltedOneWhoFacesTheLimit.Q10811_ExaltedOneWhoFacesTheLimit; import quests.Q10812_FacingSadness.Q10812_FacingSadness; import quests.Q10813_ForGlory.Q10813_ForGlory; @@ -928,6 +929,7 @@ public class QuestMasterHandler Q10798_LettersFromTheQueenDragonValley.class, Q10799_StrangeThingsAfootInTheValley.class, Q10800_ReconnaissanceAtDragonValley.class, + Q10801_TheDimensionalWarpPart1.class, Q10811_ExaltedOneWhoFacesTheLimit.class, Q10812_FacingSadness.class, Q10813_ForGlory.class, diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/MissingQuests.txt b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/MissingQuests.txt index a39c03af28..b2fad5f1bb 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/MissingQuests.txt +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/MissingQuests.txt @@ -83,7 +83,6 @@ 10731 The Minstrel's Song, Part 6 10748 Mysterious Suggestion - 1 10749 Mysterious Suggestion - 2 -10801 The Dimensional Warp, Part 1 10802 The Dimensional Warp, Part 2 10803 The Dimensional Warp, Part 3 10804 The Dimensional Warp, Part 4 diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-00.htm b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-00.htm new file mode 100644 index 0000000000..60df561273 --- /dev/null +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-00.htm @@ -0,0 +1,4 @@ +Resed:
+Are you trying to enter the Dimensional Warp? It's not a place for people like you.
+(Only characters Lv. 99 or above may undertake this quest.) + \ No newline at end of file diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-01.htm b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-01.htm new file mode 100644 index 0000000000..6c0b0ebbe1 --- /dev/null +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-01.htm @@ -0,0 +1,5 @@ +Resed:
+Have you been inside Dimensional Warp? My job is to send the explorers to the Dimensional Warp, but I don't have enough information here. I'm continuously collecting more, but it's still not enough.
+I know it won't be easy, but can you do me a favor?
+ + \ No newline at end of file diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-02.htm b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-02.htm new file mode 100644 index 0000000000..1589ad4b83 --- /dev/null +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-02.htm @@ -0,0 +1,5 @@ +Resed:
+In the early stages of a Dimensional Warp, Dimensional Bugbears come out.
+But we still don't have enough information about them. I need more information about them because people run into them the most.
+ + \ No newline at end of file diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-03.htm b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-03.htm new file mode 100644 index 0000000000..66cbd80773 --- /dev/null +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-03.htm @@ -0,0 +1,5 @@ +Resed:
+Can we start with 100?
+They come out often, so it won't be too hard. Thank you!
+ + \ No newline at end of file diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-04.htm b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-04.htm new file mode 100644 index 0000000000..0e95613c05 --- /dev/null +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-04.htm @@ -0,0 +1,3 @@ +Resed:
+Kill 100 Dimensional Bugbears and come back to me. + \ No newline at end of file diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-05.html b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-05.html new file mode 100644 index 0000000000..07ad7aa071 --- /dev/null +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-05.html @@ -0,0 +1,4 @@ +Resed:
+We still don't have enough information. That's not enough.
+Go kill more Dimensional Bugbears. + \ No newline at end of file diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-06.html b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-06.html new file mode 100644 index 0000000000..dfe15595b9 --- /dev/null +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-06.html @@ -0,0 +1,5 @@ +Resed:
+Thank you. This will be enough.
+Can You give me the information now?
+ + \ No newline at end of file diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-07.html b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-07.html new file mode 100644 index 0000000000..0bb0b71989 --- /dev/null +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-07.html @@ -0,0 +1,4 @@ +Resed:
+Good work. You're almost at the finish line.
+The reward is better than the last time. Take it. + \ No newline at end of file diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/Q10801_TheDimensionalWarpPart1.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/Q10801_TheDimensionalWarpPart1.java new file mode 100644 index 0000000000..f16e4a0045 --- /dev/null +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/Q10801_TheDimensionalWarpPart1.java @@ -0,0 +1,179 @@ +/* + * 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.Q10801_TheDimensionalWarpPart1; + +import java.util.HashSet; +import java.util.Set; + +import com.l2jmobius.Config; +import com.l2jmobius.gameserver.enums.QuestSound; +import com.l2jmobius.gameserver.model.L2Party; +import com.l2jmobius.gameserver.model.actor.L2Npc; +import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; +import com.l2jmobius.gameserver.model.holders.NpcLogListHolder; +import com.l2jmobius.gameserver.model.quest.Quest; +import com.l2jmobius.gameserver.model.quest.QuestState; +import com.l2jmobius.gameserver.model.quest.State; + +/** + * The Dimensional Warp, Part 1 (10801) + * @URL https://l2wiki.com/The_Dimensional_Warp,_Part_1 + * @author Gigi + * @date 2018-09-01 - [12:20:59] + */ +public class Q10801_TheDimensionalWarpPart1 extends Quest +{ + // NPC + private static final int RESED = 33974; + // Monsters + private static final int DIMENSIONAL_BUGBEAR = 23465; + // other + private static final int MIN_LEVEL = 99; + private static final int DIMENSIONAL_BRACELET_STAGE_1 = 39747; + private static final int WARP_CRYSTAL = 39597; + + public Q10801_TheDimensionalWarpPart1() + { + super(10801); + addStartNpc(RESED); + addTalkId(RESED); + addKillId(DIMENSIONAL_BUGBEAR); + addCondMinLevel(MIN_LEVEL, "33974-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 htmltext; + } + + switch (event) + { + case "33974-02.htm": + case "33974-03.htm": + { + htmltext = event; + break; + } + case "33974-04.htm": + { + qs.startQuest(); + htmltext = event; + break; + } + case "33974-07.html": + { + if (qs.isCond(2)) + { + if (player.getLevel() >= MIN_LEVEL) + { + addExpAndSp(player, 44442855977L, 0); + giveItems(player, DIMENSIONAL_BRACELET_STAGE_1, 1); + giveItems(player, WARP_CRYSTAL, 300); + qs.exitQuest(false, true); + htmltext = event; + } + else + { + htmltext = getNoQuestLevelRewardMsg(player); + } + } + break; + } + } + return htmltext; + } + + @Override + public String onTalk(L2Npc npc, L2PcInstance player) + { + final QuestState qs = getQuestState(player, true); + String htmltext = getNoQuestMsg(player); + + switch (qs.getState()) + { + case State.CREATED: + { + htmltext = "33974-01.htm"; + break; + } + case State.STARTED: + { + htmltext = (qs.isCond(1)) ? "33974-05.html" : "33974-06.html"; + break; + } + case State.COMPLETED: + { + htmltext = getAlreadyCompletedMsg(player); + break; + } + } + return htmltext; + } + + @Override + public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon) + { + L2Party party = killer.getParty(); + if (party != null) + { + party.getMembers().forEach(p -> onKill(npc, p)); + } + else + { + onKill(npc, killer); + } + return super.onKill(npc, killer, isSummon); + } + + private void onKill(L2Npc npc, L2PcInstance killer) + { + final QuestState qs = getQuestState(killer, false); + + if ((qs != null) && qs.isCond(1) && (npc.calculateDistance3D(killer) <= Config.ALT_PARTY_RANGE)) + { + int killedBugbear = qs.getInt("killed_" + DIMENSIONAL_BUGBEAR); + if (killedBugbear < 100) + { + qs.set("killed_" + DIMENSIONAL_BUGBEAR, ++killedBugbear); + playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET); + } + if (killedBugbear >= 100) + { + qs.setCond(2, true); + } + sendNpcLogList(killer); + } + } + + @Override + public Set getNpcLogList(L2PcInstance player) + { + final QuestState qs = getQuestState(player, false); + if ((qs != null) && qs.isCond(1)) + { + final Set holder = new HashSet<>(); + holder.add(new NpcLogListHolder(DIMENSIONAL_BUGBEAR, false, qs.getInt("killed_" + DIMENSIONAL_BUGBEAR))); + return holder; + } + return super.getNpcLogList(player); + } +} diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/QuestMasterHandler.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/QuestMasterHandler.java index 0a490222a6..d93c8c8080 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/QuestMasterHandler.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/QuestMasterHandler.java @@ -421,6 +421,7 @@ import quests.Q10797_CrossingFate.Q10797_CrossingFate; import quests.Q10798_LettersFromTheQueenDragonValley.Q10798_LettersFromTheQueenDragonValley; import quests.Q10799_StrangeThingsAfootInTheValley.Q10799_StrangeThingsAfootInTheValley; import quests.Q10800_ReconnaissanceAtDragonValley.Q10800_ReconnaissanceAtDragonValley; +import quests.Q10801_TheDimensionalWarpPart1.Q10801_TheDimensionalWarpPart1; import quests.Q10811_ExaltedOneWhoFacesTheLimit.Q10811_ExaltedOneWhoFacesTheLimit; import quests.Q10812_FacingSadness.Q10812_FacingSadness; import quests.Q10813_ForGlory.Q10813_ForGlory; @@ -860,6 +861,7 @@ public class QuestMasterHandler Q10798_LettersFromTheQueenDragonValley.class, Q10799_StrangeThingsAfootInTheValley.class, Q10800_ReconnaissanceAtDragonValley.class, + Q10801_TheDimensionalWarpPart1.class, Q10811_ExaltedOneWhoFacesTheLimit.class, Q10812_FacingSadness.class, Q10813_ForGlory.class, diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/MissingQuests.txt b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/MissingQuests.txt index df1ee20c9c..9a57d5a999 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/MissingQuests.txt +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/MissingQuests.txt @@ -152,7 +152,6 @@ 10731 The Minstrel's Song, Part 6 10748 Mysterious Suggestion - 1 10749 Mysterious Suggestion - 2 -10801 The Dimensional Warp, Part 1 10802 The Dimensional Warp, Part 2 10803 The Dimensional Warp, Part 3 10804 The Dimensional Warp, Part 4 diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-00.htm b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-00.htm new file mode 100644 index 0000000000..60df561273 --- /dev/null +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-00.htm @@ -0,0 +1,4 @@ +Resed:
+Are you trying to enter the Dimensional Warp? It's not a place for people like you.
+(Only characters Lv. 99 or above may undertake this quest.) + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-01.htm b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-01.htm new file mode 100644 index 0000000000..6c0b0ebbe1 --- /dev/null +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-01.htm @@ -0,0 +1,5 @@ +Resed:
+Have you been inside Dimensional Warp? My job is to send the explorers to the Dimensional Warp, but I don't have enough information here. I'm continuously collecting more, but it's still not enough.
+I know it won't be easy, but can you do me a favor?
+ + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-02.htm b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-02.htm new file mode 100644 index 0000000000..1589ad4b83 --- /dev/null +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-02.htm @@ -0,0 +1,5 @@ +Resed:
+In the early stages of a Dimensional Warp, Dimensional Bugbears come out.
+But we still don't have enough information about them. I need more information about them because people run into them the most.
+ + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-03.htm b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-03.htm new file mode 100644 index 0000000000..66cbd80773 --- /dev/null +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-03.htm @@ -0,0 +1,5 @@ +Resed:
+Can we start with 100?
+They come out often, so it won't be too hard. Thank you!
+ + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-04.htm b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-04.htm new file mode 100644 index 0000000000..0e95613c05 --- /dev/null +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-04.htm @@ -0,0 +1,3 @@ +Resed:
+Kill 100 Dimensional Bugbears and come back to me. + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-05.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-05.html new file mode 100644 index 0000000000..07ad7aa071 --- /dev/null +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-05.html @@ -0,0 +1,4 @@ +Resed:
+We still don't have enough information. That's not enough.
+Go kill more Dimensional Bugbears. + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-06.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-06.html new file mode 100644 index 0000000000..dfe15595b9 --- /dev/null +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-06.html @@ -0,0 +1,5 @@ +Resed:
+Thank you. This will be enough.
+Can You give me the information now?
+ + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-07.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-07.html new file mode 100644 index 0000000000..0bb0b71989 --- /dev/null +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-07.html @@ -0,0 +1,4 @@ +Resed:
+Good work. You're almost at the finish line.
+The reward is better than the last time. Take it. + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/Q10801_TheDimensionalWarpPart1.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/Q10801_TheDimensionalWarpPart1.java new file mode 100644 index 0000000000..f16e4a0045 --- /dev/null +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/Q10801_TheDimensionalWarpPart1.java @@ -0,0 +1,179 @@ +/* + * 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.Q10801_TheDimensionalWarpPart1; + +import java.util.HashSet; +import java.util.Set; + +import com.l2jmobius.Config; +import com.l2jmobius.gameserver.enums.QuestSound; +import com.l2jmobius.gameserver.model.L2Party; +import com.l2jmobius.gameserver.model.actor.L2Npc; +import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; +import com.l2jmobius.gameserver.model.holders.NpcLogListHolder; +import com.l2jmobius.gameserver.model.quest.Quest; +import com.l2jmobius.gameserver.model.quest.QuestState; +import com.l2jmobius.gameserver.model.quest.State; + +/** + * The Dimensional Warp, Part 1 (10801) + * @URL https://l2wiki.com/The_Dimensional_Warp,_Part_1 + * @author Gigi + * @date 2018-09-01 - [12:20:59] + */ +public class Q10801_TheDimensionalWarpPart1 extends Quest +{ + // NPC + private static final int RESED = 33974; + // Monsters + private static final int DIMENSIONAL_BUGBEAR = 23465; + // other + private static final int MIN_LEVEL = 99; + private static final int DIMENSIONAL_BRACELET_STAGE_1 = 39747; + private static final int WARP_CRYSTAL = 39597; + + public Q10801_TheDimensionalWarpPart1() + { + super(10801); + addStartNpc(RESED); + addTalkId(RESED); + addKillId(DIMENSIONAL_BUGBEAR); + addCondMinLevel(MIN_LEVEL, "33974-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 htmltext; + } + + switch (event) + { + case "33974-02.htm": + case "33974-03.htm": + { + htmltext = event; + break; + } + case "33974-04.htm": + { + qs.startQuest(); + htmltext = event; + break; + } + case "33974-07.html": + { + if (qs.isCond(2)) + { + if (player.getLevel() >= MIN_LEVEL) + { + addExpAndSp(player, 44442855977L, 0); + giveItems(player, DIMENSIONAL_BRACELET_STAGE_1, 1); + giveItems(player, WARP_CRYSTAL, 300); + qs.exitQuest(false, true); + htmltext = event; + } + else + { + htmltext = getNoQuestLevelRewardMsg(player); + } + } + break; + } + } + return htmltext; + } + + @Override + public String onTalk(L2Npc npc, L2PcInstance player) + { + final QuestState qs = getQuestState(player, true); + String htmltext = getNoQuestMsg(player); + + switch (qs.getState()) + { + case State.CREATED: + { + htmltext = "33974-01.htm"; + break; + } + case State.STARTED: + { + htmltext = (qs.isCond(1)) ? "33974-05.html" : "33974-06.html"; + break; + } + case State.COMPLETED: + { + htmltext = getAlreadyCompletedMsg(player); + break; + } + } + return htmltext; + } + + @Override + public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon) + { + L2Party party = killer.getParty(); + if (party != null) + { + party.getMembers().forEach(p -> onKill(npc, p)); + } + else + { + onKill(npc, killer); + } + return super.onKill(npc, killer, isSummon); + } + + private void onKill(L2Npc npc, L2PcInstance killer) + { + final QuestState qs = getQuestState(killer, false); + + if ((qs != null) && qs.isCond(1) && (npc.calculateDistance3D(killer) <= Config.ALT_PARTY_RANGE)) + { + int killedBugbear = qs.getInt("killed_" + DIMENSIONAL_BUGBEAR); + if (killedBugbear < 100) + { + qs.set("killed_" + DIMENSIONAL_BUGBEAR, ++killedBugbear); + playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET); + } + if (killedBugbear >= 100) + { + qs.setCond(2, true); + } + sendNpcLogList(killer); + } + } + + @Override + public Set getNpcLogList(L2PcInstance player) + { + final QuestState qs = getQuestState(player, false); + if ((qs != null) && qs.isCond(1)) + { + final Set holder = new HashSet<>(); + holder.add(new NpcLogListHolder(DIMENSIONAL_BUGBEAR, false, qs.getInt("killed_" + DIMENSIONAL_BUGBEAR))); + return holder; + } + return super.getNpcLogList(player); + } +} diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/QuestMasterHandler.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/QuestMasterHandler.java index fc788b5bc7..a47966894c 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/QuestMasterHandler.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/QuestMasterHandler.java @@ -419,6 +419,7 @@ import quests.Q10797_CrossingFate.Q10797_CrossingFate; import quests.Q10798_LettersFromTheQueenDragonValley.Q10798_LettersFromTheQueenDragonValley; import quests.Q10799_StrangeThingsAfootInTheValley.Q10799_StrangeThingsAfootInTheValley; import quests.Q10800_ReconnaissanceAtDragonValley.Q10800_ReconnaissanceAtDragonValley; +import quests.Q10801_TheDimensionalWarpPart1.Q10801_TheDimensionalWarpPart1; import quests.Q10811_ExaltedOneWhoFacesTheLimit.Q10811_ExaltedOneWhoFacesTheLimit; import quests.Q10812_FacingSadness.Q10812_FacingSadness; import quests.Q10813_ForGlory.Q10813_ForGlory; @@ -856,6 +857,7 @@ public class QuestMasterHandler Q10798_LettersFromTheQueenDragonValley.class, Q10799_StrangeThingsAfootInTheValley.class, Q10800_ReconnaissanceAtDragonValley.class, + Q10801_TheDimensionalWarpPart1.class, Q10811_ExaltedOneWhoFacesTheLimit.class, Q10812_FacingSadness.class, Q10813_ForGlory.class, diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/MissingQuests.txt b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/MissingQuests.txt index 667d392abb..f7cf89d1ec 100644 --- a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/MissingQuests.txt +++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/MissingQuests.txt @@ -216,7 +216,6 @@ 10731 The Minstrel's Song, Part 6 10748 Mysterious Suggestion - 1 10749 Mysterious Suggestion - 2 -10801 The Dimensional Warp, Part 1 10802 The Dimensional Warp, Part 2 10803 The Dimensional Warp, Part 3 10804 The Dimensional Warp, Part 4 diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-00.htm b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-00.htm new file mode 100644 index 0000000000..60df561273 --- /dev/null +++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-00.htm @@ -0,0 +1,4 @@ +Resed:
+Are you trying to enter the Dimensional Warp? It's not a place for people like you.
+(Only characters Lv. 99 or above may undertake this quest.) + \ No newline at end of file diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-01.htm b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-01.htm new file mode 100644 index 0000000000..6c0b0ebbe1 --- /dev/null +++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-01.htm @@ -0,0 +1,5 @@ +Resed:
+Have you been inside Dimensional Warp? My job is to send the explorers to the Dimensional Warp, but I don't have enough information here. I'm continuously collecting more, but it's still not enough.
+I know it won't be easy, but can you do me a favor?
+ + \ No newline at end of file diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-02.htm b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-02.htm new file mode 100644 index 0000000000..1589ad4b83 --- /dev/null +++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-02.htm @@ -0,0 +1,5 @@ +Resed:
+In the early stages of a Dimensional Warp, Dimensional Bugbears come out.
+But we still don't have enough information about them. I need more information about them because people run into them the most.
+ + \ No newline at end of file diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-03.htm b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-03.htm new file mode 100644 index 0000000000..66cbd80773 --- /dev/null +++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-03.htm @@ -0,0 +1,5 @@ +Resed:
+Can we start with 100?
+They come out often, so it won't be too hard. Thank you!
+ + \ No newline at end of file diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-04.htm b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-04.htm new file mode 100644 index 0000000000..0e95613c05 --- /dev/null +++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-04.htm @@ -0,0 +1,3 @@ +Resed:
+Kill 100 Dimensional Bugbears and come back to me. + \ No newline at end of file diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-05.html b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-05.html new file mode 100644 index 0000000000..07ad7aa071 --- /dev/null +++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-05.html @@ -0,0 +1,4 @@ +Resed:
+We still don't have enough information. That's not enough.
+Go kill more Dimensional Bugbears. + \ No newline at end of file diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-06.html b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-06.html new file mode 100644 index 0000000000..dfe15595b9 --- /dev/null +++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-06.html @@ -0,0 +1,5 @@ +Resed:
+Thank you. This will be enough.
+Can You give me the information now?
+ + \ No newline at end of file diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-07.html b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-07.html new file mode 100644 index 0000000000..0bb0b71989 --- /dev/null +++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-07.html @@ -0,0 +1,4 @@ +Resed:
+Good work. You're almost at the finish line.
+The reward is better than the last time. Take it. + \ No newline at end of file diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/Q10801_TheDimensionalWarpPart1.java b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/Q10801_TheDimensionalWarpPart1.java new file mode 100644 index 0000000000..f16e4a0045 --- /dev/null +++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/Q10801_TheDimensionalWarpPart1.java @@ -0,0 +1,179 @@ +/* + * 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.Q10801_TheDimensionalWarpPart1; + +import java.util.HashSet; +import java.util.Set; + +import com.l2jmobius.Config; +import com.l2jmobius.gameserver.enums.QuestSound; +import com.l2jmobius.gameserver.model.L2Party; +import com.l2jmobius.gameserver.model.actor.L2Npc; +import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; +import com.l2jmobius.gameserver.model.holders.NpcLogListHolder; +import com.l2jmobius.gameserver.model.quest.Quest; +import com.l2jmobius.gameserver.model.quest.QuestState; +import com.l2jmobius.gameserver.model.quest.State; + +/** + * The Dimensional Warp, Part 1 (10801) + * @URL https://l2wiki.com/The_Dimensional_Warp,_Part_1 + * @author Gigi + * @date 2018-09-01 - [12:20:59] + */ +public class Q10801_TheDimensionalWarpPart1 extends Quest +{ + // NPC + private static final int RESED = 33974; + // Monsters + private static final int DIMENSIONAL_BUGBEAR = 23465; + // other + private static final int MIN_LEVEL = 99; + private static final int DIMENSIONAL_BRACELET_STAGE_1 = 39747; + private static final int WARP_CRYSTAL = 39597; + + public Q10801_TheDimensionalWarpPart1() + { + super(10801); + addStartNpc(RESED); + addTalkId(RESED); + addKillId(DIMENSIONAL_BUGBEAR); + addCondMinLevel(MIN_LEVEL, "33974-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 htmltext; + } + + switch (event) + { + case "33974-02.htm": + case "33974-03.htm": + { + htmltext = event; + break; + } + case "33974-04.htm": + { + qs.startQuest(); + htmltext = event; + break; + } + case "33974-07.html": + { + if (qs.isCond(2)) + { + if (player.getLevel() >= MIN_LEVEL) + { + addExpAndSp(player, 44442855977L, 0); + giveItems(player, DIMENSIONAL_BRACELET_STAGE_1, 1); + giveItems(player, WARP_CRYSTAL, 300); + qs.exitQuest(false, true); + htmltext = event; + } + else + { + htmltext = getNoQuestLevelRewardMsg(player); + } + } + break; + } + } + return htmltext; + } + + @Override + public String onTalk(L2Npc npc, L2PcInstance player) + { + final QuestState qs = getQuestState(player, true); + String htmltext = getNoQuestMsg(player); + + switch (qs.getState()) + { + case State.CREATED: + { + htmltext = "33974-01.htm"; + break; + } + case State.STARTED: + { + htmltext = (qs.isCond(1)) ? "33974-05.html" : "33974-06.html"; + break; + } + case State.COMPLETED: + { + htmltext = getAlreadyCompletedMsg(player); + break; + } + } + return htmltext; + } + + @Override + public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon) + { + L2Party party = killer.getParty(); + if (party != null) + { + party.getMembers().forEach(p -> onKill(npc, p)); + } + else + { + onKill(npc, killer); + } + return super.onKill(npc, killer, isSummon); + } + + private void onKill(L2Npc npc, L2PcInstance killer) + { + final QuestState qs = getQuestState(killer, false); + + if ((qs != null) && qs.isCond(1) && (npc.calculateDistance3D(killer) <= Config.ALT_PARTY_RANGE)) + { + int killedBugbear = qs.getInt("killed_" + DIMENSIONAL_BUGBEAR); + if (killedBugbear < 100) + { + qs.set("killed_" + DIMENSIONAL_BUGBEAR, ++killedBugbear); + playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET); + } + if (killedBugbear >= 100) + { + qs.setCond(2, true); + } + sendNpcLogList(killer); + } + } + + @Override + public Set getNpcLogList(L2PcInstance player) + { + final QuestState qs = getQuestState(player, false); + if ((qs != null) && qs.isCond(1)) + { + final Set holder = new HashSet<>(); + holder.add(new NpcLogListHolder(DIMENSIONAL_BUGBEAR, false, qs.getInt("killed_" + DIMENSIONAL_BUGBEAR))); + return holder; + } + return super.getNpcLogList(player); + } +} diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/QuestMasterHandler.java b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/QuestMasterHandler.java index e6681093d3..eddbaac5cc 100644 --- a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/QuestMasterHandler.java +++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/QuestMasterHandler.java @@ -407,6 +407,7 @@ import quests.Q10797_CrossingFate.Q10797_CrossingFate; import quests.Q10798_LettersFromTheQueenDragonValley.Q10798_LettersFromTheQueenDragonValley; import quests.Q10799_StrangeThingsAfootInTheValley.Q10799_StrangeThingsAfootInTheValley; import quests.Q10800_ReconnaissanceAtDragonValley.Q10800_ReconnaissanceAtDragonValley; +import quests.Q10801_TheDimensionalWarpPart1.Q10801_TheDimensionalWarpPart1; import quests.Q10811_ExaltedOneWhoFacesTheLimit.Q10811_ExaltedOneWhoFacesTheLimit; import quests.Q10812_FacingSadness.Q10812_FacingSadness; import quests.Q10813_ForGlory.Q10813_ForGlory; @@ -832,6 +833,7 @@ public class QuestMasterHandler Q10798_LettersFromTheQueenDragonValley.class, Q10799_StrangeThingsAfootInTheValley.class, Q10800_ReconnaissanceAtDragonValley.class, + Q10801_TheDimensionalWarpPart1.class, Q10811_ExaltedOneWhoFacesTheLimit.class, Q10812_FacingSadness.class, Q10813_ForGlory.class, diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/MissingQuests.txt b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/MissingQuests.txt index 3ee0415a46..aac7ee5702 100644 --- a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/MissingQuests.txt +++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/MissingQuests.txt @@ -231,7 +231,6 @@ 10731 The Minstrel's Song, Part 6 10748 Mysterious Suggestion - 1 10749 Mysterious Suggestion - 2 -10801 The Dimensional Warp, Part 1 10802 The Dimensional Warp, Part 2 10803 The Dimensional Warp, Part 3 10804 The Dimensional Warp, Part 4 diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-00.htm b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-00.htm new file mode 100644 index 0000000000..60df561273 --- /dev/null +++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-00.htm @@ -0,0 +1,4 @@ +Resed:
+Are you trying to enter the Dimensional Warp? It's not a place for people like you.
+(Only characters Lv. 99 or above may undertake this quest.) + \ No newline at end of file diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-01.htm b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-01.htm new file mode 100644 index 0000000000..6c0b0ebbe1 --- /dev/null +++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-01.htm @@ -0,0 +1,5 @@ +Resed:
+Have you been inside Dimensional Warp? My job is to send the explorers to the Dimensional Warp, but I don't have enough information here. I'm continuously collecting more, but it's still not enough.
+I know it won't be easy, but can you do me a favor?
+ + \ No newline at end of file diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-02.htm b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-02.htm new file mode 100644 index 0000000000..1589ad4b83 --- /dev/null +++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-02.htm @@ -0,0 +1,5 @@ +Resed:
+In the early stages of a Dimensional Warp, Dimensional Bugbears come out.
+But we still don't have enough information about them. I need more information about them because people run into them the most.
+ + \ No newline at end of file diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-03.htm b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-03.htm new file mode 100644 index 0000000000..66cbd80773 --- /dev/null +++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-03.htm @@ -0,0 +1,5 @@ +Resed:
+Can we start with 100?
+They come out often, so it won't be too hard. Thank you!
+ + \ No newline at end of file diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-04.htm b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-04.htm new file mode 100644 index 0000000000..0e95613c05 --- /dev/null +++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-04.htm @@ -0,0 +1,3 @@ +Resed:
+Kill 100 Dimensional Bugbears and come back to me. + \ No newline at end of file diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-05.html b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-05.html new file mode 100644 index 0000000000..07ad7aa071 --- /dev/null +++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-05.html @@ -0,0 +1,4 @@ +Resed:
+We still don't have enough information. That's not enough.
+Go kill more Dimensional Bugbears. + \ No newline at end of file diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-06.html b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-06.html new file mode 100644 index 0000000000..dfe15595b9 --- /dev/null +++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-06.html @@ -0,0 +1,5 @@ +Resed:
+Thank you. This will be enough.
+Can You give me the information now?
+ + \ No newline at end of file diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-07.html b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-07.html new file mode 100644 index 0000000000..0bb0b71989 --- /dev/null +++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/33974-07.html @@ -0,0 +1,4 @@ +Resed:
+Good work. You're almost at the finish line.
+The reward is better than the last time. Take it. + \ No newline at end of file diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/Q10801_TheDimensionalWarpPart1.java b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/Q10801_TheDimensionalWarpPart1.java new file mode 100644 index 0000000000..f16e4a0045 --- /dev/null +++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q10801_TheDimensionalWarpPart1/Q10801_TheDimensionalWarpPart1.java @@ -0,0 +1,179 @@ +/* + * 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.Q10801_TheDimensionalWarpPart1; + +import java.util.HashSet; +import java.util.Set; + +import com.l2jmobius.Config; +import com.l2jmobius.gameserver.enums.QuestSound; +import com.l2jmobius.gameserver.model.L2Party; +import com.l2jmobius.gameserver.model.actor.L2Npc; +import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; +import com.l2jmobius.gameserver.model.holders.NpcLogListHolder; +import com.l2jmobius.gameserver.model.quest.Quest; +import com.l2jmobius.gameserver.model.quest.QuestState; +import com.l2jmobius.gameserver.model.quest.State; + +/** + * The Dimensional Warp, Part 1 (10801) + * @URL https://l2wiki.com/The_Dimensional_Warp,_Part_1 + * @author Gigi + * @date 2018-09-01 - [12:20:59] + */ +public class Q10801_TheDimensionalWarpPart1 extends Quest +{ + // NPC + private static final int RESED = 33974; + // Monsters + private static final int DIMENSIONAL_BUGBEAR = 23465; + // other + private static final int MIN_LEVEL = 99; + private static final int DIMENSIONAL_BRACELET_STAGE_1 = 39747; + private static final int WARP_CRYSTAL = 39597; + + public Q10801_TheDimensionalWarpPart1() + { + super(10801); + addStartNpc(RESED); + addTalkId(RESED); + addKillId(DIMENSIONAL_BUGBEAR); + addCondMinLevel(MIN_LEVEL, "33974-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 htmltext; + } + + switch (event) + { + case "33974-02.htm": + case "33974-03.htm": + { + htmltext = event; + break; + } + case "33974-04.htm": + { + qs.startQuest(); + htmltext = event; + break; + } + case "33974-07.html": + { + if (qs.isCond(2)) + { + if (player.getLevel() >= MIN_LEVEL) + { + addExpAndSp(player, 44442855977L, 0); + giveItems(player, DIMENSIONAL_BRACELET_STAGE_1, 1); + giveItems(player, WARP_CRYSTAL, 300); + qs.exitQuest(false, true); + htmltext = event; + } + else + { + htmltext = getNoQuestLevelRewardMsg(player); + } + } + break; + } + } + return htmltext; + } + + @Override + public String onTalk(L2Npc npc, L2PcInstance player) + { + final QuestState qs = getQuestState(player, true); + String htmltext = getNoQuestMsg(player); + + switch (qs.getState()) + { + case State.CREATED: + { + htmltext = "33974-01.htm"; + break; + } + case State.STARTED: + { + htmltext = (qs.isCond(1)) ? "33974-05.html" : "33974-06.html"; + break; + } + case State.COMPLETED: + { + htmltext = getAlreadyCompletedMsg(player); + break; + } + } + return htmltext; + } + + @Override + public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon) + { + L2Party party = killer.getParty(); + if (party != null) + { + party.getMembers().forEach(p -> onKill(npc, p)); + } + else + { + onKill(npc, killer); + } + return super.onKill(npc, killer, isSummon); + } + + private void onKill(L2Npc npc, L2PcInstance killer) + { + final QuestState qs = getQuestState(killer, false); + + if ((qs != null) && qs.isCond(1) && (npc.calculateDistance3D(killer) <= Config.ALT_PARTY_RANGE)) + { + int killedBugbear = qs.getInt("killed_" + DIMENSIONAL_BUGBEAR); + if (killedBugbear < 100) + { + qs.set("killed_" + DIMENSIONAL_BUGBEAR, ++killedBugbear); + playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET); + } + if (killedBugbear >= 100) + { + qs.setCond(2, true); + } + sendNpcLogList(killer); + } + } + + @Override + public Set getNpcLogList(L2PcInstance player) + { + final QuestState qs = getQuestState(player, false); + if ((qs != null) && qs.isCond(1)) + { + final Set holder = new HashSet<>(); + holder.add(new NpcLogListHolder(DIMENSIONAL_BUGBEAR, false, qs.getInt("killed_" + DIMENSIONAL_BUGBEAR))); + return holder; + } + return super.getNpcLogList(player); + } +} diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/QuestMasterHandler.java b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/QuestMasterHandler.java index aeaf4de158..019a83fcd3 100644 --- a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/QuestMasterHandler.java +++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/QuestMasterHandler.java @@ -356,6 +356,7 @@ import quests.Q10797_CrossingFate.Q10797_CrossingFate; import quests.Q10798_LettersFromTheQueenDragonValley.Q10798_LettersFromTheQueenDragonValley; import quests.Q10799_StrangeThingsAfootInTheValley.Q10799_StrangeThingsAfootInTheValley; import quests.Q10800_ReconnaissanceAtDragonValley.Q10800_ReconnaissanceAtDragonValley; +import quests.Q10801_TheDimensionalWarpPart1.Q10801_TheDimensionalWarpPart1; import quests.Q10811_ExaltedOneWhoFacesTheLimit.Q10811_ExaltedOneWhoFacesTheLimit; import quests.Q10812_FacingSadness.Q10812_FacingSadness; import quests.Q10813_ForGlory.Q10813_ForGlory; @@ -730,6 +731,7 @@ public class QuestMasterHandler Q10798_LettersFromTheQueenDragonValley.class, Q10799_StrangeThingsAfootInTheValley.class, Q10800_ReconnaissanceAtDragonValley.class, + Q10801_TheDimensionalWarpPart1.class, Q10811_ExaltedOneWhoFacesTheLimit.class, Q10812_FacingSadness.class, Q10813_ForGlory.class,