diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/quests/MissingQuests.txt b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/quests/MissingQuests.txt index 5a38f7415c..afa32d8455 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/quests/MissingQuests.txt +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/quests/MissingQuests.txt @@ -11,7 +11,6 @@ 912 Request from the Red Libra Guild - Advanced 913 Request from the Red Libra Guild - Super Advanced 914 Request from the Red Libra Guild - Lv. 5 -10673 10861 Monster Arena - The Birth of a Warrior 10862 Monster Arena - Challenge: 10 battles 10863 Monster Arena - New Challenge: 15 battles diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/quests/Q10673_SagaOfLegend/30857-00.htm b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/quests/Q10673_SagaOfLegend/30857-00.htm new file mode 100644 index 0000000000..5638805341 --- /dev/null +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/quests/Q10673_SagaOfLegend/30857-00.htm @@ -0,0 +1,5 @@ +Orven:
+It's wrong to take advantages of others just because they don't know any better.
+Isn't it?
+(This quest is only available for characters Lv. 76 or above after 2nd class change.) + \ No newline at end of file diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/quests/Q10673_SagaOfLegend/30857-01.htm b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/quests/Q10673_SagaOfLegend/30857-01.htm new file mode 100644 index 0000000000..17f80a92ec --- /dev/null +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/quests/Q10673_SagaOfLegend/30857-01.htm @@ -0,0 +1,5 @@ +Orven:
+Do you know about the gems from the Wind Realm being traded in the Material Realm?
+Recently, a small box with a letter came from Alchemist Veruti in the Town of Rune.
+ + \ No newline at end of file diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/quests/Q10673_SagaOfLegend/30857-02.htm b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/quests/Q10673_SagaOfLegend/30857-02.htm new file mode 100644 index 0000000000..d11678c723 --- /dev/null +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/quests/Q10673_SagaOfLegend/30857-02.htm @@ -0,0 +1,5 @@ +Orven:
+When Veruti first heard about the gems from the Wind Realm, she thought they could be minerals.
+Someone gave this to Veruti when she was left alone in the Town of Rune as a gift from home. She thought it was strange and sent it to me.
+ + \ No newline at end of file diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/quests/Q10673_SagaOfLegend/30857-03.htm b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/quests/Q10673_SagaOfLegend/30857-03.htm new file mode 100644 index 0000000000..be531c63dd --- /dev/null +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/quests/Q10673_SagaOfLegend/30857-03.htm @@ -0,0 +1,4 @@ +Orven:
+If it's powerless and only sold as a trinket, it is not a problem. But if someone knows about it and is trying to create it...that is dangerous.
+ + \ No newline at end of file diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/quests/Q10673_SagaOfLegend/30857-04.htm b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/quests/Q10673_SagaOfLegend/30857-04.htm new file mode 100644 index 0000000000..753f8ed6d6 --- /dev/null +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/quests/Q10673_SagaOfLegend/30857-04.htm @@ -0,0 +1,5 @@ +Orven:
+If items with such power gets in the wrong hands, the outcome could be catastrophic.
+I need you to find out who is making the fake items and why.
+ + \ No newline at end of file diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/quests/Q10673_SagaOfLegend/30857-05.htm b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/quests/Q10673_SagaOfLegend/30857-05.htm new file mode 100644 index 0000000000..7575f5d527 --- /dev/null +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/quests/Q10673_SagaOfLegend/30857-05.htm @@ -0,0 +1,4 @@ +Orven:
+You will need to investigate Silent Valley or Devil's Isle. Go to the hunting zone of your choice, defeat any monsters. You need to defeat 700 monsters in total.
+ + \ No newline at end of file diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/quests/Q10673_SagaOfLegend/30857-06.html b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/quests/Q10673_SagaOfLegend/30857-06.html new file mode 100644 index 0000000000..6230b3fa48 --- /dev/null +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/quests/Q10673_SagaOfLegend/30857-06.html @@ -0,0 +1,5 @@ +Orven:
+Go investigate Silent Valley or Devil's Isle. Go to the hunting zone of your choice, defeat any monsters. You need to defeat 700 monsters in total.
+ + + \ No newline at end of file diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/quests/Q10673_SagaOfLegend/30857-07.html b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/quests/Q10673_SagaOfLegend/30857-07.html new file mode 100644 index 0000000000..4412a5970e --- /dev/null +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/quests/Q10673_SagaOfLegend/30857-07.html @@ -0,0 +1,3 @@ +Orven:
+Investigate Silent Valley. You need to defeat 700 monsters in total. + \ No newline at end of file diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/quests/Q10673_SagaOfLegend/30857-07a.html b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/quests/Q10673_SagaOfLegend/30857-07a.html new file mode 100644 index 0000000000..9d35f1547a --- /dev/null +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/quests/Q10673_SagaOfLegend/30857-07a.html @@ -0,0 +1,3 @@ +Orven:
+Investigate Devil's Isle. You need to defeat 700 monsters in total. + \ No newline at end of file diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/quests/Q10673_SagaOfLegend/30857-08.html b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/quests/Q10673_SagaOfLegend/30857-08.html new file mode 100644 index 0000000000..a74293942f --- /dev/null +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/quests/Q10673_SagaOfLegend/30857-08.html @@ -0,0 +1,4 @@ +Orven:
+Go investigate Silent Valley or Devil's Isle. +You need to defeat 700 monsters in total. + \ No newline at end of file diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/quests/Q10673_SagaOfLegend/30857-08a.html b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/quests/Q10673_SagaOfLegend/30857-08a.html new file mode 100644 index 0000000000..a74293942f --- /dev/null +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/quests/Q10673_SagaOfLegend/30857-08a.html @@ -0,0 +1,4 @@ +Orven:
+Go investigate Silent Valley or Devil's Isle. +You need to defeat 700 monsters in total. + \ No newline at end of file diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/quests/Q10673_SagaOfLegend/30857-09.html b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/quests/Q10673_SagaOfLegend/30857-09.html new file mode 100644 index 0000000000..0efcad35ce --- /dev/null +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/quests/Q10673_SagaOfLegend/30857-09.html @@ -0,0 +1,5 @@ +Orven:
+I see a big smile on your face... +You have completed the task?
+ + \ No newline at end of file diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/quests/Q10673_SagaOfLegend/30857-10.html b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/quests/Q10673_SagaOfLegend/30857-10.html new file mode 100644 index 0000000000..e536b0e7ea --- /dev/null +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/quests/Q10673_SagaOfLegend/30857-10.html @@ -0,0 +1,4 @@ +Orven:
+You got stronger very quickly!
+Now you may change to your third class. + \ No newline at end of file diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/quests/Q10673_SagaOfLegend/Q10673_SagaOfLegend.java b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/quests/Q10673_SagaOfLegend/Q10673_SagaOfLegend.java new file mode 100644 index 0000000000..9e48cd51f8 --- /dev/null +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/quests/Q10673_SagaOfLegend/Q10673_SagaOfLegend.java @@ -0,0 +1,344 @@ +/* + * 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.Q10673_SagaOfLegend; + +import java.util.HashSet; +import java.util.Set; + +import org.l2jmobius.Config; +import org.l2jmobius.gameserver.data.xml.impl.CategoryData; +import org.l2jmobius.gameserver.enums.CategoryType; +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.events.EventType; +import org.l2jmobius.gameserver.model.events.ListenerRegisterType; +import org.l2jmobius.gameserver.model.events.annotations.RegisterEvent; +import org.l2jmobius.gameserver.model.events.annotations.RegisterType; +import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerLogin; +import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerProfessionChange; +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; +import org.l2jmobius.gameserver.network.serverpackets.classchange.ExRequestClassChangeUi; + +/** + * Saga of Legend (10673) + * @URL https://l2wiki.com/classic/Saga_of_Legend + * @TODO: Retail htmls. + * @author Dmitri, Mobius + */ +public class Q10673_SagaOfLegend extends Quest +{ + // NPCs + private static final int ORVEN = 30857; + // Monsters + private static final int[] MOBS = + { + 20965, // Chimera Piece 72 + 20970, // Soldier of Ancient Times 73 + 20966, // Mutated Creation 74 + 20971, // Warrior of Ancient Times 74 + 20967, // Creature of the Past 75 + 20973, // Forgotten Ancient People 75 + 20968, // Forgotten Face 75 + 20969, // Giant's Shadow 75 + 20972, // Shaman of Ancient Times 75 + 24025, // Bloody Purple 70 + 24046, // Floating Eye Seer 70 + 24032, // Seer 70 + 24041, // Bloody Mourner 71 + 24026, // Clipher 71 + 24042, // Clumsy Wimp 71 + 24047, // Floating Eye Seer 71 + 24033, // Guardian Spirit 71 + 24048, // Immortal Spirit 71 + 24043, // Mysterious Creature 71 + 24050, // Starving Spirit 71 + 24049, // Immortal Spirit 72 + 24034, // Midnight Sairon 72 + 24027, // Sairon 72 + 24052, // Starving Soldier 72 + 24051, // Starving Spirit 72 + 24035, // Daymen 73 + 24028, // Demon Warrior 73 + 24053, // Starving Soldier 73 + 24054, // Starving Warrior 73 + 24036, // Dolores 74 + 24037, // Maiden Doll 74 + 24055, // Starving Warrior 74 + 24030, // Stone Vanul 74 + 24029, // Veil Master 74 + 24044, // Zaken's Treasure Chest 74 + 24045, // Zaken's Treasure Chest 74 + 24031, // Death Flyer 75 + 24040, // Midnight Nightmare 75 + 24039, // Pearl Horror 75 + 24038, // Tor Scorpion 75 + }; + // Rewards + private static final int MAGICAL_TABLET = 90045; + private static final int SPELLBOOK_HUMAN = 90038; // Spellbook: Mount Golden Lion + private static final int SPELLBOOK_ELF = 90039; // Spellbook: Mount Pegasus + private static final int SPELLBOOK_DELF = 90040; // Spellbook: Mount Saber Tooth Cougar + private static final int SPELLBOOK_ORC = 90042; // Spellbook: Mount Black Bear + private static final int SPELLBOOK_DWARF = 90041; // Spellbook: Mount Kukuru + private static final int SPELLBOOK_KAMAEL = 91946; // Spellbook: Mount Griffin + // Misc + private static final int MIN_LEVEL = 76; + private static final String KILL_COUNT_VAR = "KillCount"; + + public Q10673_SagaOfLegend() + { + super(10673); + addStartNpc(ORVEN); + addTalkId(ORVEN); + addKillId(MOBS); + addCondMinLevel(MIN_LEVEL, "30857-00.htm"); + addCondInCategory(CategoryType.THIRD_CLASS_GROUP, "30857-00.htm"); + } + + @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 "30857-02.htm": + case "30857-03.htm": + case "30857-04.htm": + case "30857-06.html": + { + htmltext = event; + break; + } + case "30857-05.htm": + { + qs.startQuest(); + htmltext = event; + break; + } + case "30857-07.html": + { + qs.setCond(2, true); + htmltext = event; + break; + } + case "30857-07a.html": + { + qs.setCond(3, true); + htmltext = event; + break; + } + case "30857-10.html": + { + if (qs.isCond(4)) + { + giveItems(player, MAGICAL_TABLET, 10); + qs.exitQuest(false, true); + if (CategoryData.getInstance().isInCategory(CategoryType.THIRD_CLASS_GROUP, player.getClassId().getId())) + { + player.sendPacket(ExRequestClassChangeUi.STATIC_PACKET); + } + htmltext = event; + } + break; + } + } + return htmltext; + } + + @Override + public String onTalk(Npc npc, PlayerInstance player) + { + final QuestState qs = getQuestState(player, true); + String htmltext = getNoQuestMsg(player); + + switch (qs.getState()) + { + case State.CREATED: + { + htmltext = "30857-01.htm"; + } + case State.STARTED: + { + switch (qs.getCond()) + { + case 1: + { + htmltext = "30857-05.htm"; + break; + } + case 2: + { + htmltext = "30857-08.html"; + break; + } + case 3: + { + htmltext = "30857-08a.html"; + break; + } + case 4: + { + htmltext = "30857-09.html"; + break; + } + } + 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.getCond() > 1)) + { + final int killCount = qs.getInt(KILL_COUNT_VAR) + 1; + if (killCount < 700) + { + qs.set(KILL_COUNT_VAR, killCount); + playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET); + sendNpcLogList(killer); + } + else + { + qs.setCond(4, true); + qs.unset(KILL_COUNT_VAR); + } + } + return super.onKill(npc, killer, isSummon); + } + + @Override + public Set getNpcLogList(PlayerInstance player) + { + final QuestState qs = getQuestState(player, false); + if ((qs != null) && (qs.getCond() > 1)) + { + final Set holder = new HashSet<>(); + holder.add(new NpcLogListHolder(NpcStringId.ORVEN_S_REQUEST.getId(), true, qs.getInt(KILL_COUNT_VAR))); + return holder; + } + return super.getNpcLogList(player); + } + + @RegisterEvent(EventType.ON_PLAYER_LOGIN) + @RegisterType(ListenerRegisterType.GLOBAL_PLAYERS) + public void OnPlayerLogin(OnPlayerLogin event) + { + if (Config.DISABLE_TUTORIAL) + { + return; + } + + final PlayerInstance player = event.getPlayer(); + if (player == null) + { + return; + } + + if (!CategoryData.getInstance().isInCategory(CategoryType.THIRD_CLASS_GROUP, player.getClassId().getId())) + { + return; + } + + final QuestState qs = getQuestState(player, false); + if ((qs != null) && qs.isCompleted()) + { + player.sendPacket(ExRequestClassChangeUi.STATIC_PACKET); + } + } + + @RegisterEvent(EventType.ON_PLAYER_PROFESSION_CHANGE) + @RegisterType(ListenerRegisterType.GLOBAL_PLAYERS) + public void onProfessionChange(OnPlayerProfessionChange event) + { + final PlayerInstance player = event.getPlayer(); + if (player == null) + { + return; + } + + if (!CategoryData.getInstance().isInCategory(CategoryType.THIRD_CLASS_GROUP, player.getClassId().getId())) + { + return; + } + + // Avoid reward more than once. + if (player.getVariables().getBoolean("ITEMS_REWARDED", false)) + { + return; + } + + final QuestState qs = getQuestState(player, false); + if ((qs != null) && qs.isCompleted()) + { + player.getVariables().set("ITEMS_REWARDED", true); + + switch (player.getRace()) + { + case ELF: + { + giveItems(player, SPELLBOOK_ELF, 1); + break; + } + case DARK_ELF: + { + giveItems(player, SPELLBOOK_DELF, 1); + break; + } + case ORC: + { + giveItems(player, SPELLBOOK_ORC, 1); + break; + } + case DWARF: + { + giveItems(player, SPELLBOOK_DWARF, 1); + break; + } + case KAMAEL: + { + giveItems(player, SPELLBOOK_KAMAEL, 1); + break; + } + case HUMAN: + { + giveItems(player, SPELLBOOK_HUMAN, 1); + break; + } + } + } + } +} \ No newline at end of file diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/quests/QuestMasterHandler.java b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/quests/QuestMasterHandler.java index d5e1c179f5..2416a3614e 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/quests/QuestMasterHandler.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/quests/QuestMasterHandler.java @@ -40,6 +40,7 @@ import quests.Q00500_BrothersBoundInChains.Q00500_BrothersBoundInChains; import quests.Q00662_AGameOfCards.Q00662_AGameOfCards; import quests.Q00933_ExploringTheWestWingOfTheDungeonOfAbyss.Q00933_ExploringTheWestWingOfTheDungeonOfAbyss; import quests.Q00935_ExploringTheEastWingOfTheDungeonOfAbyss.Q00935_ExploringTheEastWingOfTheDungeonOfAbyss; +import quests.Q10673_SagaOfLegend.Q10673_SagaOfLegend; import quests.Q10866_PunitiveOperationOnTheDevilIsle.Q10866_PunitiveOperationOnTheDevilIsle; import quests.Q10961_EffectiveTraining.Q10961_EffectiveTraining; import quests.Q10962_NewHorizons.Q10962_NewHorizons; @@ -112,6 +113,7 @@ public class QuestMasterHandler Q00914_RequestFromTheRedLibraGuildLv5.class, // TODO: Not done. Q00933_ExploringTheWestWingOfTheDungeonOfAbyss.class, Q00935_ExploringTheEastWingOfTheDungeonOfAbyss.class, + Q10673_SagaOfLegend.class, Q10861_MonsterArenaTheBirthOfAWarrior.class, // TODO: Not done. Q10862_MonsterArenaChallenge10Battles.class, // TODO: Not done. Q10863_MonsterArenaNewChallenge15Battles.class, // TODO: Not done.