From 29dd14276052929ebf08580a90f3c2c36a17c552 Mon Sep 17 00:00:00 2001 From: MobiusDevelopment <8391001+MobiusDevelopment@users.noreply.github.com> Date: Wed, 30 Mar 2022 23:59:13 +0000 Subject: [PATCH] Addition of quest Protect At All Costs (10952). Contributed by Elison. --- .../scripts/ai/others/NewbieGuide/30602.htm | 6 +- .../Q10952_ProtectAtAllCosts/30602-01.htm | 8 + .../Q10952_ProtectAtAllCosts/30602-02.htm | 5 + .../Q10952_ProtectAtAllCosts/30602-03.htm | 5 + .../Q10952_ProtectAtAllCosts/30602-04.htm | 9 + .../Q10952_ProtectAtAllCosts/30602-05.htm | 4 + .../Q10952_ProtectAtAllCosts.java | 180 ++++++++++++++++++ .../Q10952_ProtectAtAllCosts/no_lvl.htm | 3 + .../scripts/quests/QuestMasterHandler.java | 2 + .../game/data/stats/items/97200-97299.xml | 22 +++ .../game/data/stats/skills/40400-40499.xml | 25 ++- 11 files changed, 263 insertions(+), 6 deletions(-) create mode 100644 L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/scripts/quests/Q10952_ProtectAtAllCosts/30602-01.htm create mode 100644 L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/scripts/quests/Q10952_ProtectAtAllCosts/30602-02.htm create mode 100644 L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/scripts/quests/Q10952_ProtectAtAllCosts/30602-03.htm create mode 100644 L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/scripts/quests/Q10952_ProtectAtAllCosts/30602-04.htm create mode 100644 L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/scripts/quests/Q10952_ProtectAtAllCosts/30602-05.htm create mode 100644 L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/scripts/quests/Q10952_ProtectAtAllCosts/Q10952_ProtectAtAllCosts.java create mode 100644 L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/scripts/quests/Q10952_ProtectAtAllCosts/no_lvl.htm create mode 100644 L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/stats/items/97200-97299.xml diff --git a/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/scripts/ai/others/NewbieGuide/30602.htm b/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/scripts/ai/others/NewbieGuide/30602.htm index ff62243a63..c084a71fe3 100644 --- a/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/scripts/ai/others/NewbieGuide/30602.htm +++ b/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/scripts/ai/others/NewbieGuide/30602.htm @@ -1,7 +1,5 @@ Newbie Guide:
-Do you want to become stronger? Then listen to me carefully! I will give you a few pieces of advice.
- - - +My name is Tanai. I am the keeper of our ancestors' legacy.
+Do you want to become stronger? Then listen carefully! I will tell you everything you need to know.
\ No newline at end of file diff --git a/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/scripts/quests/Q10952_ProtectAtAllCosts/30602-01.htm b/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/scripts/quests/Q10952_ProtectAtAllCosts/30602-01.htm new file mode 100644 index 0000000000..eab652f90a --- /dev/null +++ b/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/scripts/quests/Q10952_ProtectAtAllCosts/30602-01.htm @@ -0,0 +1,8 @@ +Guardian Tanai:
+I am called the Guardian. Do you want to know what my duties are?
+I preserve our ancestors' souls.
+I must not let anyone disturb their burial places in the Valley of Heroes.
+Also, I am to tell young Orcs what they must do to protect our legacy.
+You should know that lately monsters in the Valley of Heroes have been digging our ancestors' graves, and it worries me greatly.
+ + \ No newline at end of file diff --git a/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/scripts/quests/Q10952_ProtectAtAllCosts/30602-02.htm b/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/scripts/quests/Q10952_ProtectAtAllCosts/30602-02.htm new file mode 100644 index 0000000000..222a429a95 --- /dev/null +++ b/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/scripts/quests/Q10952_ProtectAtAllCosts/30602-02.htm @@ -0,0 +1,5 @@ +Guardian Tanai:
+Yes, these monsters must be killed, that is for certain.
+However, my mission is not only to preserve our ancestors' graves, but also to guide young Orcs.
+So I can't leave this place for too long and go monster hunting myself.
+ \ No newline at end of file diff --git a/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/scripts/quests/Q10952_ProtectAtAllCosts/30602-03.htm b/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/scripts/quests/Q10952_ProtectAtAllCosts/30602-03.htm new file mode 100644 index 0000000000..db116af9b4 --- /dev/null +++ b/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/scripts/quests/Q10952_ProtectAtAllCosts/30602-03.htm @@ -0,0 +1,5 @@ +Guardian Tanai:
+I like the way you're thinking.
+Well, young Orc, why don't you help me kill these monsters?
+And in return I will tell you about the auto-hunting.
+ \ No newline at end of file diff --git a/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/scripts/quests/Q10952_ProtectAtAllCosts/30602-04.htm b/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/scripts/quests/Q10952_ProtectAtAllCosts/30602-04.htm new file mode 100644 index 0000000000..d4bb1683b1 --- /dev/null +++ b/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/scripts/quests/Q10952_ProtectAtAllCosts/30602-04.htm @@ -0,0 +1,9 @@ +Guardian Tanai:
+The auto-hunting mode lets you find suitable targets and attack them without taking a break.
+Like this, you can hunt more efficiently.
+You can set up a distance to your target, loot pickup options, the manner mode, and so on.
+Just drag your basic attack or a selected skill on the shortcut panel and press the right mouse button to activate it.
+And now I will teleport you tothe Valley of Heroes. Kill monsters there using the auto-hunting mode.
+There you will encounter Kasha Wolves, Kasha Forest Wolves, Goblin Tomb Raiders and Rakeclaw Imp Hunters. Return to me when you kill 20 of them
+ + \ No newline at end of file diff --git a/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/scripts/quests/Q10952_ProtectAtAllCosts/30602-05.htm b/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/scripts/quests/Q10952_ProtectAtAllCosts/30602-05.htm new file mode 100644 index 0000000000..a70460ff43 --- /dev/null +++ b/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/scripts/quests/Q10952_ProtectAtAllCosts/30602-05.htm @@ -0,0 +1,4 @@ +Guardian Tanai:
+Have you dealt with monsters that desecrate our ancestors' graves in the Valley of Heroes?
+ + \ No newline at end of file diff --git a/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/scripts/quests/Q10952_ProtectAtAllCosts/Q10952_ProtectAtAllCosts.java b/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/scripts/quests/Q10952_ProtectAtAllCosts/Q10952_ProtectAtAllCosts.java new file mode 100644 index 0000000000..4c757085e2 --- /dev/null +++ b/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/scripts/quests/Q10952_ProtectAtAllCosts/Q10952_ProtectAtAllCosts.java @@ -0,0 +1,180 @@ +/* + * 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.Q10952_ProtectAtAllCosts; + +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.Player; +import org.l2jmobius.gameserver.model.holders.ItemHolder; +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.network.NpcStringId; +import org.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage; + +/** + * Protect At All Costs (10952) + * @author Ayurechko + * @Notee: Based on NA server on March, 31 2022 + */ +public class Q10952_ProtectAtAllCosts extends Quest +{ + // NPC + private static final int TANAI = 30602; + // Monsters + private static final int KASHA_WOLF = 20475; + private static final int KASHA_TIMBER_WOLF = 20477; // NOTE: Kasha Forest Wolf in old client + private static final int GOBLIN_TOMB_RAIDER = 20319; + private static final int RAKECLAW_IMP_HUNTER = 20312; + // Items + private static final ItemHolder SOE_TO_TANAI = new ItemHolder(97230, 1); + private static final ItemHolder SOE_NOVICE = new ItemHolder(10650, 10); + private static final ItemHolder RING_NOVICE = new ItemHolder(49041, 2); + private static final ItemHolder EARRING_NOVICE = new ItemHolder(49040, 2); + private static final ItemHolder NECKLACE_NOVICE = new ItemHolder(49039, 1); + // Misc + private static final int MIN_LEVEL = 2; + private static final int MAX_LEVEL = 15; + private static final String KILL_COUNT_VAR = "KillCount"; + + public Q10952_ProtectAtAllCosts() + { + super(10952); + addStartNpc(TANAI); + addTalkId(TANAI); + addKillId(KASHA_WOLF, KASHA_TIMBER_WOLF, GOBLIN_TOMB_RAIDER, RAKECLAW_IMP_HUNTER); + addCondMinLevel(MIN_LEVEL, "no_lvl.htm"); + addCondMaxLevel(MAX_LEVEL, "no_lvl.htm"); + setQuestNameNpcStringId(NpcStringId.LV_2_15_PROTECT_AT_ALL_COSTS); + } + + @Override + public String onAdvEvent(String event, Npc npc, Player player) + { + String htmltext = null; + final QuestState qs = getQuestState(player, false); + if (qs == null) + { + return htmltext; + } + + switch (event) + { + case "30602-01.htm": + case "30602-02.htm": + case "30602-03.htm": + { + htmltext = event; + break; + } + case "30602-04.htm": + { + qs.startQuest(); + htmltext = event; + break; + } + case "30602-00.htm": + { + if (qs.isStarted()) + { + addExpAndSp(player, 260000, 6000); + giveItems(player, SOE_NOVICE); + giveItems(player, RING_NOVICE); + giveItems(player, EARRING_NOVICE); + giveItems(player, NECKLACE_NOVICE); + qs.exitQuest(false, true); + htmltext = event; + break; + } + } + case "TELEPORT_TO_VALLEY_OF_HEROES": + { + player.teleToLocation(-40897, -119022, -1912); + break; + } + } + return htmltext; + } + + @Override + public String onTalk(Npc npc, Player player) + { + final QuestState qs = getQuestState(player, true); + String htmltext = getNoQuestMsg(player); + if (qs.isCreated()) + { + htmltext = "30602-01.htm"; + } + else if (qs.isStarted()) + { + if (qs.isCond(1)) + { + htmltext = "30602-04.htm"; + } + else if (qs.isCond(2)) + { + htmltext = "30602-05.htm"; + } + } + else if (qs.isCompleted()) + { + htmltext = getAlreadyCompletedMsg(player); + } + return htmltext; + } + + @Override + public String onKill(Npc npc, Player killer, boolean isSummon) + { + final QuestState qs = getQuestState(killer, false); + if ((qs != null) && qs.isCond(1)) + { + final int killCount = qs.getInt(KILL_COUNT_VAR) + 1; + if (killCount < 20) + { + qs.set(KILL_COUNT_VAR, killCount); + playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET); + sendNpcLogList(killer); + + } + else + { + qs.setCond(2, true); + qs.unset(KILL_COUNT_VAR); + giveItems(killer, SOE_TO_TANAI); + showOnScreenMsg(killer, NpcStringId.THE_TRAINING_IN_OVER_USE_A_SCROLL_OF_ESCAPE_IN_YOUR_INVENTORY_TO_GO_BACK_TO_TANAI, ExShowScreenMessage.TOP_CENTER, 10000); + } + } + return super.onKill(npc, killer, isSummon); + } + + @Override + public Set getNpcLogList(Player player) + { + final QuestState qs = getQuestState(player, false); + if ((qs != null) && qs.isCond(1)) + { + final Set holder = new HashSet<>(); + holder.add(new NpcLogListHolder(NpcStringId.SUBJUGATION_IN_THE_VALLEY_OF_HEROES.getId(), true, qs.getInt(KILL_COUNT_VAR))); + return holder; + } + return super.getNpcLogList(player); + } +} diff --git a/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/scripts/quests/Q10952_ProtectAtAllCosts/no_lvl.htm b/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/scripts/quests/Q10952_ProtectAtAllCosts/no_lvl.htm new file mode 100644 index 0000000000..2f7df84c23 --- /dev/null +++ b/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/scripts/quests/Q10952_ProtectAtAllCosts/no_lvl.htm @@ -0,0 +1,3 @@ +Guardian Tanai:
+You do not meet the requirements of the quest (Quest is only available to 2-15 levels). + \ No newline at end of file diff --git a/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/scripts/quests/QuestMasterHandler.java b/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/scripts/quests/QuestMasterHandler.java index a6eb3d2841..13726423cf 100644 --- a/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/scripts/quests/QuestMasterHandler.java +++ b/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/scripts/quests/QuestMasterHandler.java @@ -37,6 +37,7 @@ import quests.Q10300_ExploringTheCrumaTower.Q10300_ExploringTheCrumaTower; import quests.Q10301_NotSoSilentValley.Q10301_NotSoSilentValley; import quests.Q10673_SagaOfLegend.Q10673_SagaOfLegend; import quests.Q10951_NewFlameOfOrcs.Q10951_NewFlameOfOrcs; +import quests.Q10952_ProtectAtAllCosts.Q10952_ProtectAtAllCosts; import quests.Q10954_SayhaChildren.Q10954_SayhaChildren; import quests.Q10955_NewLifeLessons.Q10955_NewLifeLessons; import quests.Q10956_WeSylphs.Q10956_WeSylphs; @@ -89,6 +90,7 @@ public class QuestMasterHandler Q10300_ExploringTheCrumaTower.class, Q10301_NotSoSilentValley.class, Q10951_NewFlameOfOrcs.class, + Q10952_ProtectAtAllCosts.class, Q10954_SayhaChildren.class, Q10955_NewLifeLessons.class, Q10956_WeSylphs.class, diff --git a/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/stats/items/97200-97299.xml b/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/stats/items/97200-97299.xml new file mode 100644 index 0000000000..0dc1ce2423 --- /dev/null +++ b/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/stats/items/97200-97299.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/stats/skills/40400-40499.xml b/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/stats/skills/40400-40499.xml index 0c67ac6e04..5f67f28555 100644 --- a/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/stats/skills/40400-40499.xml +++ b/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/stats/skills/40400-40499.xml @@ -61,9 +61,30 @@ A1 - - icon.skill0000 + + 500 + 2 + 1 + 91651 + 1 A1 + 5 + SELF + SINGLE + + + CASTER + LAWFUL + + + + + + -45079 + -113511 + -208 + +