From 0fd029fdc64db970949f545f890fd30c58b6712a Mon Sep 17 00:00:00 2001 From: MobiusDevelopment <8391001+MobiusDevelopment@users.noreply.github.com> Date: Tue, 11 Jan 2022 23:26:03 +0000 Subject: [PATCH] Addition of Eraton AI. Contributed by Index. --- .../events/RedLibra/Eraton/34584-1.html | 4 + .../events/RedLibra/Eraton/34584-2.html | 4 + .../events/RedLibra/Eraton/34584-3.html | 6 + .../events/RedLibra/Eraton/34584-4.html | 6 + .../events/RedLibra/Eraton/34584-5.html | 4 + .../events/RedLibra/Eraton/34584-6.html | 5 + .../events/RedLibra/Eraton/34584-7.html | 5 + .../events/RedLibra/Eraton/34584-8.html | 4 + .../events/RedLibra/Eraton/34584-9.html | 7 + .../scripts/events/RedLibra/Eraton/34584.html | 8 + .../events/RedLibra/Eraton/Eraton.java | 420 +++++++++++++++++ .../data/scripts/events/RedLibra/config.xml | 11 +- .../dist/game/data/spawns/Aden/TownOfAden.xml | 1 - .../events/RedLibra/Eraton/34584-1.html | 4 + .../events/RedLibra/Eraton/34584-2.html | 4 + .../events/RedLibra/Eraton/34584-3.html | 6 + .../events/RedLibra/Eraton/34584-4.html | 6 + .../events/RedLibra/Eraton/34584-5.html | 4 + .../events/RedLibra/Eraton/34584-6.html | 5 + .../events/RedLibra/Eraton/34584-7.html | 5 + .../events/RedLibra/Eraton/34584-8.html | 4 + .../events/RedLibra/Eraton/34584-9.html | 7 + .../scripts/events/RedLibra/Eraton/34584.html | 8 + .../events/RedLibra/Eraton/Eraton.java | 426 ++++++++++++++++++ .../data/scripts/events/RedLibra/config.xml | 11 +- .../dist/game/data/spawns/Aden/TownOfAden.xml | 1 - 26 files changed, 964 insertions(+), 12 deletions(-) create mode 100644 L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/events/RedLibra/Eraton/34584-1.html create mode 100644 L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/events/RedLibra/Eraton/34584-2.html create mode 100644 L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/events/RedLibra/Eraton/34584-3.html create mode 100644 L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/events/RedLibra/Eraton/34584-4.html create mode 100644 L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/events/RedLibra/Eraton/34584-5.html create mode 100644 L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/events/RedLibra/Eraton/34584-6.html create mode 100644 L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/events/RedLibra/Eraton/34584-7.html create mode 100644 L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/events/RedLibra/Eraton/34584-8.html create mode 100644 L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/events/RedLibra/Eraton/34584-9.html create mode 100644 L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/events/RedLibra/Eraton/34584.html create mode 100644 L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/events/RedLibra/Eraton/Eraton.java create mode 100644 L2J_Mobius_10.0_MasterClass/dist/game/data/scripts/events/RedLibra/Eraton/34584-1.html create mode 100644 L2J_Mobius_10.0_MasterClass/dist/game/data/scripts/events/RedLibra/Eraton/34584-2.html create mode 100644 L2J_Mobius_10.0_MasterClass/dist/game/data/scripts/events/RedLibra/Eraton/34584-3.html create mode 100644 L2J_Mobius_10.0_MasterClass/dist/game/data/scripts/events/RedLibra/Eraton/34584-4.html create mode 100644 L2J_Mobius_10.0_MasterClass/dist/game/data/scripts/events/RedLibra/Eraton/34584-5.html create mode 100644 L2J_Mobius_10.0_MasterClass/dist/game/data/scripts/events/RedLibra/Eraton/34584-6.html create mode 100644 L2J_Mobius_10.0_MasterClass/dist/game/data/scripts/events/RedLibra/Eraton/34584-7.html create mode 100644 L2J_Mobius_10.0_MasterClass/dist/game/data/scripts/events/RedLibra/Eraton/34584-8.html create mode 100644 L2J_Mobius_10.0_MasterClass/dist/game/data/scripts/events/RedLibra/Eraton/34584-9.html create mode 100644 L2J_Mobius_10.0_MasterClass/dist/game/data/scripts/events/RedLibra/Eraton/34584.html create mode 100644 L2J_Mobius_10.0_MasterClass/dist/game/data/scripts/events/RedLibra/Eraton/Eraton.java diff --git a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/events/RedLibra/Eraton/34584-1.html b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/events/RedLibra/Eraton/34584-1.html new file mode 100644 index 0000000000..55b34bfab9 --- /dev/null +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/events/RedLibra/Eraton/34584-1.html @@ -0,0 +1,4 @@ +Eraton:
+Select on of the classes below.
+%CLASS_NAMES% + \ No newline at end of file diff --git a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/events/RedLibra/Eraton/34584-2.html b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/events/RedLibra/Eraton/34584-2.html new file mode 100644 index 0000000000..e7f696c681 --- /dev/null +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/events/RedLibra/Eraton/34584-2.html @@ -0,0 +1,4 @@ +Eraton:
+Please select a class.
+%CLASS_LIST% + \ No newline at end of file diff --git a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/events/RedLibra/Eraton/34584-3.html b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/events/RedLibra/Eraton/34584-3.html new file mode 100644 index 0000000000..620e64f61a --- /dev/null +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/events/RedLibra/Eraton/34584-3.html @@ -0,0 +1,6 @@ +Eraton:
+I will ask one last time. +Once you make this choice, you will not be able to go back, unless you pay the price.
+Are you absolutely sure about your decision?
+%CONFIRM_BUTTON% + \ No newline at end of file diff --git a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/events/RedLibra/Eraton/34584-4.html b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/events/RedLibra/Eraton/34584-4.html new file mode 100644 index 0000000000..c7a75489fa --- /dev/null +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/events/RedLibra/Eraton/34584-4.html @@ -0,0 +1,6 @@ +Eraton:
+You cannot change your destiny without a %required_item%.
+When changing your main class, you need %required_item_count% %required_item%, and the Main Class Cloak.
+Please prepare a %required_item% first.
+ + \ No newline at end of file diff --git a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/events/RedLibra/Eraton/34584-5.html b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/events/RedLibra/Eraton/34584-5.html new file mode 100644 index 0000000000..bf66ecc01f --- /dev/null +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/events/RedLibra/Eraton/34584-5.html @@ -0,0 +1,4 @@ +Eraton:
+You cannot change your destiny when you transform or have summoned pet.
+ + \ No newline at end of file diff --git a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/events/RedLibra/Eraton/34584-6.html b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/events/RedLibra/Eraton/34584-6.html new file mode 100644 index 0000000000..7232044ffa --- /dev/null +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/events/RedLibra/Eraton/34584-6.html @@ -0,0 +1,5 @@ +Eraton:
+New %s1% Class will not be the same with your %s2% Class.
+Choose another class.
+ + \ No newline at end of file diff --git a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/events/RedLibra/Eraton/34584-7.html b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/events/RedLibra/Eraton/34584-7.html new file mode 100644 index 0000000000..0b7bd285e0 --- /dev/null +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/events/RedLibra/Eraton/34584-7.html @@ -0,0 +1,5 @@ +Eraton:
+I can't change destiny for you, who is not choose it.
+Will wait after found your destiny.
+ + \ No newline at end of file diff --git a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/events/RedLibra/Eraton/34584-8.html b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/events/RedLibra/Eraton/34584-8.html new file mode 100644 index 0000000000..41798e09fc --- /dev/null +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/events/RedLibra/Eraton/34584-8.html @@ -0,0 +1,4 @@ +Eraton:
+I cannot change destiny for Death Knights.
+ + \ No newline at end of file diff --git a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/events/RedLibra/Eraton/34584-9.html b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/events/RedLibra/Eraton/34584-9.html new file mode 100644 index 0000000000..1fc80344a9 --- /dev/null +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/events/RedLibra/Eraton/34584-9.html @@ -0,0 +1,7 @@ +Eraton:
+I can change destiny only for characters, who already do reawakening.
+You cannot change your destiny without a %required_item%.
+When changing your main class, you need %required_item_count% %required_item%, and the Main Class Cloak.
+Please prepare a %required_item% first.
+ + \ No newline at end of file diff --git a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/events/RedLibra/Eraton/34584.html b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/events/RedLibra/Eraton/34584.html new file mode 100644 index 0000000000..e8a95d0b2e --- /dev/null +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/events/RedLibra/Eraton/34584.html @@ -0,0 +1,8 @@ +Eraton:
+Have you ever through oh wanting to change your destiny? Normally... that's impossible. But the %required_item% makes the impossible, possible.
+If you bring me a %required_item%, I will change your main class for you. Also, don't forget bring me the Main Class Cloak as well.
+Please remember that you may obtain new things by changing your destiny, but you may also lose some things. If this worries you, I can tell you about these things.
+What can I help you with?
+ + + \ No newline at end of file diff --git a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/events/RedLibra/Eraton/Eraton.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/events/RedLibra/Eraton/Eraton.java new file mode 100644 index 0000000000..0717e168d3 --- /dev/null +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/events/RedLibra/Eraton/Eraton.java @@ -0,0 +1,420 @@ +/* + * 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 events.RedLibra.Eraton; + +import java.util.List; + +import org.l2jmobius.Config; +import org.l2jmobius.gameserver.data.xml.ClassListData; +import org.l2jmobius.gameserver.data.xml.SkillData; +import org.l2jmobius.gameserver.data.xml.SkillTreeData; +import org.l2jmobius.gameserver.enums.ClassId; +import org.l2jmobius.gameserver.enums.Race; +import org.l2jmobius.gameserver.enums.SubclassInfoType; +import org.l2jmobius.gameserver.model.SkillLearn; +import org.l2jmobius.gameserver.model.actor.Npc; +import org.l2jmobius.gameserver.model.actor.Player; +import org.l2jmobius.gameserver.model.events.EventType; +import org.l2jmobius.gameserver.model.events.ListenerRegisterType; +import org.l2jmobius.gameserver.model.events.annotations.Id; +import org.l2jmobius.gameserver.model.events.annotations.RegisterEvent; +import org.l2jmobius.gameserver.model.events.annotations.RegisterType; +import org.l2jmobius.gameserver.model.events.impl.creature.npc.OnNpcMenuSelect; +import org.l2jmobius.gameserver.model.holders.ItemHolder; +import org.l2jmobius.gameserver.model.skill.Skill; +import org.l2jmobius.gameserver.network.SystemMessageId; +import org.l2jmobius.gameserver.network.serverpackets.ExSubjobInfo; +import org.l2jmobius.gameserver.network.serverpackets.ExUserInfoInvenWeight; +import org.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage; +import org.l2jmobius.gameserver.network.serverpackets.SocialAction; + +import ai.AbstractNpcAI; + +/** + * Red Libra
+ * Step 1.
+ * Contact Red to move to Eraton in the Aden Temple where the class change is taking place. (Must have the Stone of Destiny and the Main Class cloak.)
+ * Step 2.
+ * Contact Eraton in the Aden Temple to learn the details of the class change. Once everything is ready, select the desired class and confirm your choice.
+ * Step 3.
+ * Congratulations! The main character class has been changed. The process is accompanied by a distinctive animation with a character jumping up. + * @author Index, Gaikotsu + */ +public class Eraton extends AbstractNpcAI +{ + // NPC + private static final int ERATON = 34584; + // Items + private static final ItemHolder STONE_OF_DESTINY = new ItemHolder(17722, 1); + private static final ItemHolder CHAOS_POMANDER = new ItemHolder(37374, 2); + private static final ItemHolder CLASS_CLOAK_SIGEL = new ItemHolder(30310, 1); + private static final ItemHolder CLASS_CLOAK_TYRR = new ItemHolder(30311, 1); + private static final ItemHolder CLASS_CLOAK_OTHELL = new ItemHolder(30312, 1); + private static final ItemHolder CLASS_CLOAK_YUL = new ItemHolder(30313, 1); + private static final ItemHolder CLASS_CLOAK_FEOH = new ItemHolder(30314, 1); + private static final ItemHolder CLASS_CLOAK_WYNN = new ItemHolder(30315, 1); + private static final ItemHolder CLASS_CLOAK_ISS = new ItemHolder(30316, 1); + private static final ItemHolder CLASS_CLOAK_AEORE = new ItemHolder(30317, 1); + private static final ItemHolder CLASS_CLOAK_EVISCERATOR = new ItemHolder(40200, 1); + private static final ItemHolder CLASS_CLOAK_SAYHA_SEER = new ItemHolder(40201, 1); + // Misc + private static final String ITEM_NAME_PATTERN = "&#" + STONE_OF_DESTINY.getId() + ";"; + + private Eraton() + { + addStartNpc(ERATON); + addFirstTalkId(ERATON); + addTalkId(ERATON); + } + + @Override + public String onAdvEvent(String event, Npc npc, Player player) + { + String htmltext = null; + switch (event) + { + case ("back"): + { + htmltext = getHtm(player, "34584.html").replace("%required_item%", ITEM_NAME_PATTERN); + break; + } + case ("ERATON_HELP"): + { + // TODO: NEED TO BE FOUND!! + htmltext = getHtm(player, "34584-9.html").replace("%required_item%", ITEM_NAME_PATTERN).replace("%required_item_count%", String.valueOf(STONE_OF_DESTINY.getCount())); + break; + } + case ("ERATON_LIST"): + { + final StringBuilder sb = new StringBuilder(); + sb.append(""); + sb.append(""); + sb.append(""); + sb.append(""); + sb.append(""); + sb.append(""); + sb.append(""); + sb.append(""); + htmltext = getHtm(player, "34584-1.html").replace("%CLASS_NAMES%", sb.toString()); + break; + } + case ("ERATON_SIGEL"): + { + final StringBuilder sb = new StringBuilder(); + sb.append(""); + sb.append(""); + sb.append(""); + sb.append(""); + // Death Knights cannot use the Stone of Destiny. + // sb.append(""); + htmltext = getHtm(player, "34584-2.html").replace("%CLASS_LIST%", sb.toString()); + break; + } + case ("ERATON_TYRR"): + { + final StringBuilder sb = new StringBuilder(); + sb.append(""); + sb.append(""); + sb.append(""); + sb.append(""); + if (player.getRace() == Race.DWARF) + { + sb.append(""); + } + if ((player.getRace() == Race.KAMAEL) && !player.getAppearance().isFemale()) + { + sb.append(""); + } + if (player.getRace() == Race.ERTHEIA) + { + sb.append(""); + } + htmltext = getHtm(player, "34584-2.html").replace("%CLASS_LIST%", sb.toString()); + break; + } + case ("ERATON_OTHELL"): + { + final StringBuilder sb = new StringBuilder(); + sb.append(""); + sb.append(""); + sb.append(""); + if (player.getRace() == Race.DWARF) + { + sb.append(""); + } + htmltext = getHtm(player, "34584-2.html").replace("%CLASS_LIST%", sb.toString()); + break; + } + case ("ERATON_YUL"): + { + final StringBuilder sb = new StringBuilder(); + sb.append(""); + sb.append(""); + sb.append(""); + if ((player.getRace() == Race.KAMAEL) && player.getAppearance().isFemale()) + { + sb.append(""); + } + htmltext = getHtm(player, "34584-2.html").replace("%CLASS_LIST%", sb.toString()); + break; + } + case ("ERATON_FEOH"): + { + final StringBuilder sb = new StringBuilder(); + sb.append(""); + sb.append(""); + sb.append(""); + sb.append(""); + sb.append(""); + if (player.getRace() == Race.ERTHEIA) + { + sb.append(""); + } + htmltext = getHtm(player, "34584-2.html").replace("%CLASS_LIST%", sb.toString()); + break; + } + case ("ERATON_ISS"): + { + final StringBuilder sb = new StringBuilder(); + sb.append(""); + sb.append(""); + sb.append(""); + sb.append(""); + if (player.getRace() == Race.ORC) + { + sb.append(""); + } + htmltext = getHtm(player, "34584-2.html").replace("%CLASS_LIST%", sb.toString()); + break; + } + case ("ERATON_WYNN"): + { + final StringBuilder sb = new StringBuilder(); + sb.append(""); + sb.append(""); + sb.append(""); + htmltext = getHtm(player, "34584-2.html").replace("%CLASS_LIST%", sb.toString()); + break; + } + case ("ERATON_AEORE"): + { + final StringBuilder sb = new StringBuilder(); + sb.append(""); + sb.append(""); + sb.append(""); + htmltext = getHtm(player, "34584-2.html").replace("%CLASS_LIST%", sb.toString()); + break; + } + default: + { + final ClassId classId = ClassId.valueOf(event.replace("ERATON_", "")); + if (classId != null) + { + final StringBuilder sb = new StringBuilder(); + sb.append(""); + htmltext = getHtm(player, "34584-3.html").replace("%CONFIRM_BUTTON%", sb.toString()); + } + } + } + return htmltext; + } + + @Override + public String onFirstTalk(Npc npc, Player player) + { + String htmltext; + htmltext = getHtm(player, "34584.html").replace("%required_item%", ITEM_NAME_PATTERN); + return htmltext; + } + + @RegisterEvent(EventType.ON_NPC_MENU_SELECT) + @RegisterType(ListenerRegisterType.NPC) + @Id(ERATON) + public void onNpcMenuSelect(OnNpcMenuSelect event) + { + final Player player = event.getTalker(); + final int ask = event.getAsk(); + switch (ask) + { + case 1: + { + final int classId = event.getReply(); + if (!player.isAwakenedClass()) + { + player.sendPacket(new NpcHtmlMessage(getHtm(player, "34584-7.html"))); + return; + } + if (!hasQuestItems(player, STONE_OF_DESTINY.getId()) || !hasAtLeastOneQuestItem(player, CLASS_CLOAK_SIGEL.getId(), CLASS_CLOAK_TYRR.getId(), CLASS_CLOAK_OTHELL.getId(), CLASS_CLOAK_YUL.getId(), CLASS_CLOAK_FEOH.getId(), CLASS_CLOAK_WYNN.getId(), CLASS_CLOAK_ISS.getId(), CLASS_CLOAK_AEORE.getId(), CLASS_CLOAK_EVISCERATOR.getId(), CLASS_CLOAK_SAYHA_SEER.getId())) + { + player.sendPacket(new NpcHtmlMessage(getHtm(player, "34584-4.html").replace("%required_item%", ITEM_NAME_PATTERN).replace("%required_item_count%", String.valueOf(STONE_OF_DESTINY.getCount())))); + return; + } + if ((player.getDualClass() != null) && (player.getDualClass().getClassId() == classId)) + { + player.sendPacket(new NpcHtmlMessage(getHtm(player, "34584-6.html").replace("%s1%", "Main").replace("%s2%", "Dual"))); + return; + } + if ((player.getClass() != null) && (player.getBaseClass() == classId)) + { + player.sendPacket(new NpcHtmlMessage(getHtm(player, "34584-6.html").replace("%s1%", "Main").replace("%s2%", "Current"))); + return; + } + if (player.isTransformed() || player.hasSummon() || player.isDualClassActive()) + { + player.sendPacket(new NpcHtmlMessage(getHtm(player, "34584-5.html"))); + return; + } + if (player.isHero() || player.isTrueHero()) + { + player.sendPacket(SystemMessageId.YOU_CANNOT_AWAKEN_WHEN_YOU_ARE_A_HERO_OR_ON_THE_WAIT_LIST_FOR_HERO_STATUS); + return; + } + // TODO: SET 1000 points for Olympiad after change main class. + if (player.getOriginalClass() == null) + { + player.setOriginalClass(player.getClassId()); + } + takeItem(player, STONE_OF_DESTINY); + takeItem(player, getCloakItemId(player)); + player.abortCast(); + player.stopAllEffectsExceptThoseThatLastThroughDeath(); + player.stopAllEffects(); + player.stopCubics(); + player.setClassId(classId); + player.setBaseClass(player.getActiveClass()); + SkillTreeData.getInstance().cleanSkillUponChangeClass(player); + for (SkillLearn skill : SkillTreeData.getInstance().getRaceSkillTree(player.getRace())) + { + player.addSkill(SkillData.getInstance().getSkill(skill.getSkillId(), skill.getSkillLevel()), true); + } + final List removedSkillIds = Config.HARDIN_REMOVED_SKILLS.get(classId); + if (removedSkillIds != null) + { + for (int skillId : removedSkillIds) + { + final Skill skill = player.getKnownSkill(skillId); + if (skill != null) + { + player.removeSkill(skill); + } + } + } + if (player.getWarehouse().getItemByItemId(CHAOS_POMANDER.getId()) != null) + { + final long warehouseCount = (player.getWarehouse().getItemByItemId(CHAOS_POMANDER.getId())).getCount(); + if (warehouseCount > 0) + { + player.getWarehouse().destroyItemByItemId("Eraton", CHAOS_POMANDER.getId(), warehouseCount, player, null); + } + } + if (hasAtLeastOneQuestItem(player, CHAOS_POMANDER.getId())) + { + takeItems(player, CHAOS_POMANDER.getId(), -1); + } + player.restoreDualSkills(); + player.store(false); + player.broadcastUserInfo(); + player.sendSkillList(); + player.sendPacket(new ExSubjobInfo(player, SubclassInfoType.CLASS_CHANGED)); + player.sendPacket(new ExUserInfoInvenWeight(player)); + giveItems(player, getCloakItemId(player)); + giveItems(player, CHAOS_POMANDER); + player.sendPacket(new SocialAction(player.getObjectId(), 20)); + break; + } + } + } + + private ItemHolder getCloakItemId(Player player) + { + switch (player.getClassId()) + { + case SIGEL_PHOENIX_KNIGHT: + case SIGEL_HELL_KNIGHT: + case SIGEL_EVA_TEMPLAR: + case SIGEL_SHILLIEN_TEMPLAR: + { + return CLASS_CLOAK_SIGEL; + } + case TYRR_DUELIST: + case TYRR_DREADNOUGHT: + case TYRR_TITAN: + case TYRR_GRAND_KHAVATARI: + case TYRR_MAESTRO: + case TYRR_DOOMBRINGER: + { + return CLASS_CLOAK_TYRR; + } + case OTHELL_ADVENTURER: + case OTHELL_WIND_RIDER: + case OTHELL_GHOST_HUNTER: + case OTHELL_FORTUNE_SEEKER: + { + return CLASS_CLOAK_OTHELL; + } + case YUL_SAGITTARIUS: + case YUL_MOONLIGHT_SENTINEL: + case YUL_GHOST_SENTINEL: + case YUL_TRICKSTER: + { + return CLASS_CLOAK_YUL; + } + case FEOH_ARCHMAGE: + case FEOH_SOULTAKER: + case FEOH_MYSTIC_MUSE: + case FEOH_STORM_SCREAMER: + case FEOH_SOUL_HOUND: + { + return CLASS_CLOAK_FEOH; + } + case ISS_HIEROPHANT: + case ISS_SWORD_MUSE: + case ISS_SPECTRAL_DANCER: + case ISS_DOOMCRYER: + case ISS_DOMINATOR: + { + return CLASS_CLOAK_ISS; + } + case WYNN_ARCANA_LORD: + case WYNN_ELEMENTAL_MASTER: + case WYNN_SPECTRAL_MASTER: + { + return CLASS_CLOAK_WYNN; + } + case AEORE_CARDINAL: + case AEORE_EVA_SAINT: + case AEORE_SHILLIEN_SAINT: + { + return CLASS_CLOAK_WYNN; + } + case EVISCERATOR: + { + return CLASS_CLOAK_EVISCERATOR; + } + case SAYHA_SEER: + { + return CLASS_CLOAK_SAYHA_SEER; + } + } + return null; + } + + public static void main(String[] args) + { + new Eraton(); + } +} \ No newline at end of file diff --git a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/events/RedLibra/config.xml b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/events/RedLibra/config.xml index 4045dd546f..1089897b31 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/events/RedLibra/config.xml +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/events/RedLibra/config.xml @@ -1,14 +1,15 @@ - - - - - + + + + + + diff --git a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/spawns/Aden/TownOfAden.xml b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/spawns/Aden/TownOfAden.xml index ad0153eae9..d951c8f9e7 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/spawns/Aden/TownOfAden.xml +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/spawns/Aden/TownOfAden.xml @@ -68,7 +68,6 @@ - diff --git a/L2J_Mobius_10.0_MasterClass/dist/game/data/scripts/events/RedLibra/Eraton/34584-1.html b/L2J_Mobius_10.0_MasterClass/dist/game/data/scripts/events/RedLibra/Eraton/34584-1.html new file mode 100644 index 0000000000..55b34bfab9 --- /dev/null +++ b/L2J_Mobius_10.0_MasterClass/dist/game/data/scripts/events/RedLibra/Eraton/34584-1.html @@ -0,0 +1,4 @@ +Eraton:
+Select on of the classes below.
+%CLASS_NAMES% + \ No newline at end of file diff --git a/L2J_Mobius_10.0_MasterClass/dist/game/data/scripts/events/RedLibra/Eraton/34584-2.html b/L2J_Mobius_10.0_MasterClass/dist/game/data/scripts/events/RedLibra/Eraton/34584-2.html new file mode 100644 index 0000000000..e7f696c681 --- /dev/null +++ b/L2J_Mobius_10.0_MasterClass/dist/game/data/scripts/events/RedLibra/Eraton/34584-2.html @@ -0,0 +1,4 @@ +Eraton:
+Please select a class.
+%CLASS_LIST% + \ No newline at end of file diff --git a/L2J_Mobius_10.0_MasterClass/dist/game/data/scripts/events/RedLibra/Eraton/34584-3.html b/L2J_Mobius_10.0_MasterClass/dist/game/data/scripts/events/RedLibra/Eraton/34584-3.html new file mode 100644 index 0000000000..620e64f61a --- /dev/null +++ b/L2J_Mobius_10.0_MasterClass/dist/game/data/scripts/events/RedLibra/Eraton/34584-3.html @@ -0,0 +1,6 @@ +Eraton:
+I will ask one last time. +Once you make this choice, you will not be able to go back, unless you pay the price.
+Are you absolutely sure about your decision?
+%CONFIRM_BUTTON% + \ No newline at end of file diff --git a/L2J_Mobius_10.0_MasterClass/dist/game/data/scripts/events/RedLibra/Eraton/34584-4.html b/L2J_Mobius_10.0_MasterClass/dist/game/data/scripts/events/RedLibra/Eraton/34584-4.html new file mode 100644 index 0000000000..c7a75489fa --- /dev/null +++ b/L2J_Mobius_10.0_MasterClass/dist/game/data/scripts/events/RedLibra/Eraton/34584-4.html @@ -0,0 +1,6 @@ +Eraton:
+You cannot change your destiny without a %required_item%.
+When changing your main class, you need %required_item_count% %required_item%, and the Main Class Cloak.
+Please prepare a %required_item% first.
+ + \ No newline at end of file diff --git a/L2J_Mobius_10.0_MasterClass/dist/game/data/scripts/events/RedLibra/Eraton/34584-5.html b/L2J_Mobius_10.0_MasterClass/dist/game/data/scripts/events/RedLibra/Eraton/34584-5.html new file mode 100644 index 0000000000..bf66ecc01f --- /dev/null +++ b/L2J_Mobius_10.0_MasterClass/dist/game/data/scripts/events/RedLibra/Eraton/34584-5.html @@ -0,0 +1,4 @@ +Eraton:
+You cannot change your destiny when you transform or have summoned pet.
+ + \ No newline at end of file diff --git a/L2J_Mobius_10.0_MasterClass/dist/game/data/scripts/events/RedLibra/Eraton/34584-6.html b/L2J_Mobius_10.0_MasterClass/dist/game/data/scripts/events/RedLibra/Eraton/34584-6.html new file mode 100644 index 0000000000..7232044ffa --- /dev/null +++ b/L2J_Mobius_10.0_MasterClass/dist/game/data/scripts/events/RedLibra/Eraton/34584-6.html @@ -0,0 +1,5 @@ +Eraton:
+New %s1% Class will not be the same with your %s2% Class.
+Choose another class.
+ + \ No newline at end of file diff --git a/L2J_Mobius_10.0_MasterClass/dist/game/data/scripts/events/RedLibra/Eraton/34584-7.html b/L2J_Mobius_10.0_MasterClass/dist/game/data/scripts/events/RedLibra/Eraton/34584-7.html new file mode 100644 index 0000000000..0b7bd285e0 --- /dev/null +++ b/L2J_Mobius_10.0_MasterClass/dist/game/data/scripts/events/RedLibra/Eraton/34584-7.html @@ -0,0 +1,5 @@ +Eraton:
+I can't change destiny for you, who is not choose it.
+Will wait after found your destiny.
+ + \ No newline at end of file diff --git a/L2J_Mobius_10.0_MasterClass/dist/game/data/scripts/events/RedLibra/Eraton/34584-8.html b/L2J_Mobius_10.0_MasterClass/dist/game/data/scripts/events/RedLibra/Eraton/34584-8.html new file mode 100644 index 0000000000..41798e09fc --- /dev/null +++ b/L2J_Mobius_10.0_MasterClass/dist/game/data/scripts/events/RedLibra/Eraton/34584-8.html @@ -0,0 +1,4 @@ +Eraton:
+I cannot change destiny for Death Knights.
+ + \ No newline at end of file diff --git a/L2J_Mobius_10.0_MasterClass/dist/game/data/scripts/events/RedLibra/Eraton/34584-9.html b/L2J_Mobius_10.0_MasterClass/dist/game/data/scripts/events/RedLibra/Eraton/34584-9.html new file mode 100644 index 0000000000..1fc80344a9 --- /dev/null +++ b/L2J_Mobius_10.0_MasterClass/dist/game/data/scripts/events/RedLibra/Eraton/34584-9.html @@ -0,0 +1,7 @@ +Eraton:
+I can change destiny only for characters, who already do reawakening.
+You cannot change your destiny without a %required_item%.
+When changing your main class, you need %required_item_count% %required_item%, and the Main Class Cloak.
+Please prepare a %required_item% first.
+ + \ No newline at end of file diff --git a/L2J_Mobius_10.0_MasterClass/dist/game/data/scripts/events/RedLibra/Eraton/34584.html b/L2J_Mobius_10.0_MasterClass/dist/game/data/scripts/events/RedLibra/Eraton/34584.html new file mode 100644 index 0000000000..e8a95d0b2e --- /dev/null +++ b/L2J_Mobius_10.0_MasterClass/dist/game/data/scripts/events/RedLibra/Eraton/34584.html @@ -0,0 +1,8 @@ +Eraton:
+Have you ever through oh wanting to change your destiny? Normally... that's impossible. But the %required_item% makes the impossible, possible.
+If you bring me a %required_item%, I will change your main class for you. Also, don't forget bring me the Main Class Cloak as well.
+Please remember that you may obtain new things by changing your destiny, but you may also lose some things. If this worries you, I can tell you about these things.
+What can I help you with?
+ + + \ No newline at end of file diff --git a/L2J_Mobius_10.0_MasterClass/dist/game/data/scripts/events/RedLibra/Eraton/Eraton.java b/L2J_Mobius_10.0_MasterClass/dist/game/data/scripts/events/RedLibra/Eraton/Eraton.java new file mode 100644 index 0000000000..d450e58221 --- /dev/null +++ b/L2J_Mobius_10.0_MasterClass/dist/game/data/scripts/events/RedLibra/Eraton/Eraton.java @@ -0,0 +1,426 @@ +/* + * 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 events.RedLibra.Eraton; + +import java.util.List; + +import org.l2jmobius.Config; +import org.l2jmobius.gameserver.data.xml.ClassListData; +import org.l2jmobius.gameserver.data.xml.SkillData; +import org.l2jmobius.gameserver.data.xml.SkillTreeData; +import org.l2jmobius.gameserver.enums.ClassId; +import org.l2jmobius.gameserver.enums.Race; +import org.l2jmobius.gameserver.enums.SubclassInfoType; +import org.l2jmobius.gameserver.model.SkillLearn; +import org.l2jmobius.gameserver.model.actor.Npc; +import org.l2jmobius.gameserver.model.actor.Player; +import org.l2jmobius.gameserver.model.events.EventType; +import org.l2jmobius.gameserver.model.events.ListenerRegisterType; +import org.l2jmobius.gameserver.model.events.annotations.Id; +import org.l2jmobius.gameserver.model.events.annotations.RegisterEvent; +import org.l2jmobius.gameserver.model.events.annotations.RegisterType; +import org.l2jmobius.gameserver.model.events.impl.creature.npc.OnNpcMenuSelect; +import org.l2jmobius.gameserver.model.holders.ItemHolder; +import org.l2jmobius.gameserver.model.skill.Skill; +import org.l2jmobius.gameserver.network.SystemMessageId; +import org.l2jmobius.gameserver.network.serverpackets.ExSubjobInfo; +import org.l2jmobius.gameserver.network.serverpackets.ExUserInfoInvenWeight; +import org.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage; +import org.l2jmobius.gameserver.network.serverpackets.SocialAction; + +import ai.AbstractNpcAI; + +/** + * Red Libra
+ * Step 1.
+ * Contact Red to move to Eraton in the Aden Temple where the class change is taking place. (Must have the Stone of Destiny and the Main Class cloak.)
+ * Step 2.
+ * Contact Eraton in the Aden Temple to learn the details of the class change. Once everything is ready, select the desired class and confirm your choice.
+ * Step 3.
+ * Congratulations! The main character class has been changed. The process is accompanied by a distinctive animation with a character jumping up. + * @author Index, Gaikotsu + */ +public class Eraton extends AbstractNpcAI +{ + // NPC + private static final int ERATON = 34584; + // Items + private static final ItemHolder STONE_OF_DESTINY = new ItemHolder(17722, 1); + private static final ItemHolder CHAOS_POMANDER = new ItemHolder(37374, 2); + private static final ItemHolder CLASS_CLOAK_SIGEL = new ItemHolder(30310, 1); + private static final ItemHolder CLASS_CLOAK_TYRR = new ItemHolder(30311, 1); + private static final ItemHolder CLASS_CLOAK_OTHELL = new ItemHolder(30312, 1); + private static final ItemHolder CLASS_CLOAK_YUL = new ItemHolder(30313, 1); + private static final ItemHolder CLASS_CLOAK_FEOH = new ItemHolder(30314, 1); + private static final ItemHolder CLASS_CLOAK_WYNN = new ItemHolder(30315, 1); + private static final ItemHolder CLASS_CLOAK_ISS = new ItemHolder(30316, 1); + private static final ItemHolder CLASS_CLOAK_AEORE = new ItemHolder(30317, 1); + private static final ItemHolder CLASS_CLOAK_EVISCERATOR = new ItemHolder(40200, 1); + private static final ItemHolder CLASS_CLOAK_SAYHA_SEER = new ItemHolder(40201, 1); + // Misc + private static final String ITEM_NAME_PATTERN = "&#" + STONE_OF_DESTINY.getId() + ";"; + + private Eraton() + { + addStartNpc(ERATON); + addFirstTalkId(ERATON); + addTalkId(ERATON); + } + + @Override + public String onAdvEvent(String event, Npc npc, Player player) + { + String htmltext = null; + switch (event) + { + case ("back"): + { + htmltext = getHtm(player, "34584.html").replace("%required_item%", ITEM_NAME_PATTERN); + break; + } + case ("ERATON_HELP"): + { + // TODO: NEED TO BE FOUND!! + htmltext = getHtm(player, "34584-9.html").replace("%required_item%", ITEM_NAME_PATTERN).replace("%required_item_count%", String.valueOf(STONE_OF_DESTINY.getCount())); + break; + } + case ("ERATON_LIST"): + { + final StringBuilder sb = new StringBuilder(); + sb.append(""); + sb.append(""); + sb.append(""); + sb.append(""); + sb.append(""); + sb.append(""); + sb.append(""); + sb.append(""); + htmltext = getHtm(player, "34584-1.html").replace("%CLASS_NAMES%", sb.toString()); + break; + } + case ("ERATON_SIGEL"): + { + final StringBuilder sb = new StringBuilder(); + sb.append(""); + sb.append(""); + sb.append(""); + sb.append(""); + // Death Knights cannot use the Stone of Destiny. + // sb.append(""); + htmltext = getHtm(player, "34584-2.html").replace("%CLASS_LIST%", sb.toString()); + break; + } + case ("ERATON_TYRR"): + { + final StringBuilder sb = new StringBuilder(); + sb.append(""); + sb.append(""); + sb.append(""); + sb.append(""); + if (player.getRace() == Race.DWARF) + { + sb.append(""); + } + if ((player.getRace() == Race.KAMAEL) && !player.getAppearance().isFemale()) + { + sb.append(""); + } + if (player.getRace() == Race.ERTHEIA) + { + sb.append(""); + } + htmltext = getHtm(player, "34584-2.html").replace("%CLASS_LIST%", sb.toString()); + break; + } + case ("ERATON_OTHELL"): + { + final StringBuilder sb = new StringBuilder(); + sb.append(""); + sb.append(""); + sb.append(""); + if (player.getRace() == Race.DWARF) + { + sb.append(""); + } + htmltext = getHtm(player, "34584-2.html").replace("%CLASS_LIST%", sb.toString()); + break; + } + case ("ERATON_YUL"): + { + final StringBuilder sb = new StringBuilder(); + sb.append(""); + sb.append(""); + sb.append(""); + if ((player.getRace() == Race.KAMAEL) && player.getAppearance().isFemale()) + { + sb.append(""); + } + htmltext = getHtm(player, "34584-2.html").replace("%CLASS_LIST%", sb.toString()); + break; + } + case ("ERATON_FEOH"): + { + final StringBuilder sb = new StringBuilder(); + sb.append(""); + sb.append(""); + sb.append(""); + sb.append(""); + sb.append(""); + if (player.getRace() == Race.ERTHEIA) + { + sb.append(""); + } + htmltext = getHtm(player, "34584-2.html").replace("%CLASS_LIST%", sb.toString()); + break; + } + case ("ERATON_ISS"): + { + final StringBuilder sb = new StringBuilder(); + sb.append(""); + sb.append(""); + sb.append(""); + sb.append(""); + if (player.getRace() == Race.ORC) + { + sb.append(""); + } + htmltext = getHtm(player, "34584-2.html").replace("%CLASS_LIST%", sb.toString()); + break; + } + case ("ERATON_WYNN"): + { + final StringBuilder sb = new StringBuilder(); + sb.append(""); + sb.append(""); + sb.append(""); + htmltext = getHtm(player, "34584-2.html").replace("%CLASS_LIST%", sb.toString()); + break; + } + case ("ERATON_AEORE"): + { + final StringBuilder sb = new StringBuilder(); + sb.append(""); + sb.append(""); + sb.append(""); + htmltext = getHtm(player, "34584-2.html").replace("%CLASS_LIST%", sb.toString()); + break; + } + default: + { + final ClassId classId = ClassId.valueOf(event.replace("ERATON_", "")); + if (classId != null) + { + final StringBuilder sb = new StringBuilder(); + sb.append(""); + htmltext = getHtm(player, "34584-3.html").replace("%CONFIRM_BUTTON%", sb.toString()); + } + } + } + return htmltext; + } + + @Override + public String onFirstTalk(Npc npc, Player player) + { + String htmltext; + htmltext = getHtm(player, "34584.html").replace("%required_item%", ITEM_NAME_PATTERN); + return htmltext; + } + + @RegisterEvent(EventType.ON_NPC_MENU_SELECT) + @RegisterType(ListenerRegisterType.NPC) + @Id(ERATON) + public void onNpcMenuSelect(OnNpcMenuSelect event) + { + final Player player = event.getTalker(); + final int ask = event.getAsk(); + switch (ask) + { + case 1: + { + final int classId = event.getReply(); + if (!player.isAwakenedClass()) + { + player.sendPacket(new NpcHtmlMessage(getHtm(player, "34584-7.html"))); + return; + } + if (!hasQuestItems(player, STONE_OF_DESTINY.getId()) || !hasAtLeastOneQuestItem(player, CLASS_CLOAK_SIGEL.getId(), CLASS_CLOAK_TYRR.getId(), CLASS_CLOAK_OTHELL.getId(), CLASS_CLOAK_YUL.getId(), CLASS_CLOAK_FEOH.getId(), CLASS_CLOAK_WYNN.getId(), CLASS_CLOAK_ISS.getId(), CLASS_CLOAK_AEORE.getId(), CLASS_CLOAK_EVISCERATOR.getId(), CLASS_CLOAK_SAYHA_SEER.getId())) + { + player.sendPacket(new NpcHtmlMessage(getHtm(player, "34584-4.html").replace("%required_item%", ITEM_NAME_PATTERN).replace("%required_item_count%", String.valueOf(STONE_OF_DESTINY.getCount())))); + return; + } + if ((player.getDualClass() != null) && (player.getDualClass().getClassId() == classId)) + { + player.sendPacket(new NpcHtmlMessage(getHtm(player, "34584-6.html").replace("%s1%", "Main").replace("%s2%", "Dual"))); + return; + } + if ((player.getClass() != null) && (player.getBaseClass() == classId)) + { + player.sendPacket(new NpcHtmlMessage(getHtm(player, "34584-6.html").replace("%s1%", "Main").replace("%s2%", "Current"))); + return; + } + if (player.isTransformed() || player.hasSummon() || player.isDualClassActive()) + { + player.sendPacket(new NpcHtmlMessage(getHtm(player, "34584-5.html"))); + return; + } + if (player.isDeathKnight()) + { + player.sendPacket(new NpcHtmlMessage(getHtm(player, "34584-8.html"))); + return; + } + if (player.isHero() || player.isTrueHero()) + { + player.sendPacket(SystemMessageId.YOU_CANNOT_AWAKEN_WHEN_YOU_ARE_A_HERO_OR_ON_THE_WAIT_LIST_FOR_HERO_STATUS); + return; + } + // TODO: SET 1000 points for Olympiad after change main class. + if (player.getOriginalClass() == null) + { + player.setOriginalClass(player.getClassId()); + } + takeItem(player, STONE_OF_DESTINY); + takeItem(player, getCloakItemId(player)); + player.abortCast(); + player.stopAllEffectsExceptThoseThatLastThroughDeath(); + player.stopAllEffects(); + player.stopCubics(); + player.setClassId(classId); + player.setBaseClass(player.getActiveClass()); + SkillTreeData.getInstance().cleanSkillUponChangeClass(player); + for (SkillLearn skill : SkillTreeData.getInstance().getRaceSkillTree(player.getRace())) + { + player.addSkill(SkillData.getInstance().getSkill(skill.getSkillId(), skill.getSkillLevel()), true); + } + final List removedSkillIds = Config.HARDIN_REMOVED_SKILLS.get(classId); + if (removedSkillIds != null) + { + for (int skillId : removedSkillIds) + { + final Skill skill = player.getKnownSkill(skillId); + if (skill != null) + { + player.removeSkill(skill); + } + } + } + if (player.getWarehouse().getItemByItemId(CHAOS_POMANDER.getId()) != null) + { + final long warehouseCount = (player.getWarehouse().getItemByItemId(CHAOS_POMANDER.getId())).getCount(); + if (warehouseCount > 0) + { + player.getWarehouse().destroyItemByItemId("Eraton", CHAOS_POMANDER.getId(), warehouseCount, player, null); + } + } + if (hasAtLeastOneQuestItem(player, CHAOS_POMANDER.getId())) + { + takeItems(player, CHAOS_POMANDER.getId(), -1); + } + player.restoreDualSkills(); + player.store(false); + player.broadcastUserInfo(); + player.sendSkillList(); + player.sendPacket(new ExSubjobInfo(player, SubclassInfoType.CLASS_CHANGED)); + player.sendPacket(new ExUserInfoInvenWeight(player)); + giveItems(player, getCloakItemId(player)); + giveItems(player, CHAOS_POMANDER); + player.sendPacket(new SocialAction(player.getObjectId(), 20)); + break; + } + } + } + + private ItemHolder getCloakItemId(Player player) + { + switch (player.getClassId()) + { + case SIGEL_PHOENIX_KNIGHT: + case SIGEL_HELL_KNIGHT: + case SIGEL_EVA_TEMPLAR: + case SIGEL_SHILLIEN_TEMPLAR: + case SIGEL_DEATH_KNIGHT: + { + return CLASS_CLOAK_SIGEL; + } + case TYRR_DUELIST: + case TYRR_DREADNOUGHT: + case TYRR_TITAN: + case TYRR_GRAND_KHAVATARI: + case TYRR_MAESTRO: + case TYRR_DOOMBRINGER: + { + return CLASS_CLOAK_TYRR; + } + case OTHELL_ADVENTURER: + case OTHELL_WIND_RIDER: + case OTHELL_GHOST_HUNTER: + case OTHELL_FORTUNE_SEEKER: + { + return CLASS_CLOAK_OTHELL; + } + case YUL_SAGITTARIUS: + case YUL_MOONLIGHT_SENTINEL: + case YUL_GHOST_SENTINEL: + case YUL_TRICKSTER: + { + return CLASS_CLOAK_YUL; + } + case FEOH_ARCHMAGE: + case FEOH_SOULTAKER: + case FEOH_MYSTIC_MUSE: + case FEOH_STORM_SCREAMER: + case FEOH_SOUL_HOUND: + { + return CLASS_CLOAK_FEOH; + } + case ISS_HIEROPHANT: + case ISS_SWORD_MUSE: + case ISS_SPECTRAL_DANCER: + case ISS_DOOMCRYER: + case ISS_DOMINATOR: + { + return CLASS_CLOAK_ISS; + } + case WYNN_ARCANA_LORD: + case WYNN_ELEMENTAL_MASTER: + case WYNN_SPECTRAL_MASTER: + { + return CLASS_CLOAK_WYNN; + } + case AEORE_CARDINAL: + case AEORE_EVA_SAINT: + case AEORE_SHILLIEN_SAINT: + { + return CLASS_CLOAK_WYNN; + } + case EVISCERATOR: + { + return CLASS_CLOAK_EVISCERATOR; + } + case SAYHA_SEER: + { + return CLASS_CLOAK_SAYHA_SEER; + } + } + return null; + } + + public static void main(String[] args) + { + new Eraton(); + } +} \ No newline at end of file diff --git a/L2J_Mobius_10.0_MasterClass/dist/game/data/scripts/events/RedLibra/config.xml b/L2J_Mobius_10.0_MasterClass/dist/game/data/scripts/events/RedLibra/config.xml index 4045dd546f..1089897b31 100644 --- a/L2J_Mobius_10.0_MasterClass/dist/game/data/scripts/events/RedLibra/config.xml +++ b/L2J_Mobius_10.0_MasterClass/dist/game/data/scripts/events/RedLibra/config.xml @@ -1,14 +1,15 @@ - - - - - + + + + + + diff --git a/L2J_Mobius_10.0_MasterClass/dist/game/data/spawns/Aden/TownOfAden.xml b/L2J_Mobius_10.0_MasterClass/dist/game/data/spawns/Aden/TownOfAden.xml index ad0153eae9..d951c8f9e7 100644 --- a/L2J_Mobius_10.0_MasterClass/dist/game/data/spawns/Aden/TownOfAden.xml +++ b/L2J_Mobius_10.0_MasterClass/dist/game/data/spawns/Aden/TownOfAden.xml @@ -68,7 +68,6 @@ -