From c6b7ca7b68886f8d25e077fd3f1545887a8dafc2 Mon Sep 17 00:00:00 2001 From: MobiusDev <8391001+MobiusDevelopment@users.noreply.github.com> Date: Sat, 18 Nov 2017 01:29:17 +0000 Subject: [PATCH] Config to upgrade sub-class to dualclass from Raina without finish Split Destiny. --- .../dist/game/config/Character.ini | 4 ++ .../ai/areas/TalkingIsland/Raina/Raina.java | 48 +++++++++++++++++++ .../Raina/addDualClassWithoutQuest.html | 11 +++++ .../Raina/addDualClassWithoutQuestFailed.html | 5 ++ .../java/com/l2jmobius/Config.java | 2 + .../dist/game/config/Character.ini | 4 ++ .../ai/areas/TalkingIsland/Raina/Raina.java | 48 +++++++++++++++++++ .../Raina/addDualClassWithoutQuest.html | 11 +++++ .../Raina/addDualClassWithoutQuestFailed.html | 5 ++ .../java/com/l2jmobius/Config.java | 2 + .../dist/game/config/Character.ini | 4 ++ .../ai/areas/TalkingIsland/Raina/Raina.java | 48 +++++++++++++++++++ .../Raina/addDualClassWithoutQuest.html | 11 +++++ .../Raina/addDualClassWithoutQuestFailed.html | 5 ++ .../java/com/l2jmobius/Config.java | 2 + .../dist/game/config/Character.ini | 4 ++ .../ai/areas/TalkingIsland/Raina/Raina.java | 48 +++++++++++++++++++ .../Raina/addDualClassWithoutQuest.html | 11 +++++ .../Raina/addDualClassWithoutQuestFailed.html | 5 ++ .../java/com/l2jmobius/Config.java | 2 + 20 files changed, 280 insertions(+) create mode 100644 L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/TalkingIsland/Raina/addDualClassWithoutQuest.html create mode 100644 L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/TalkingIsland/Raina/addDualClassWithoutQuestFailed.html create mode 100644 L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/areas/TalkingIsland/Raina/addDualClassWithoutQuest.html create mode 100644 L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/areas/TalkingIsland/Raina/addDualClassWithoutQuestFailed.html create mode 100644 L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/areas/TalkingIsland/Raina/addDualClassWithoutQuest.html create mode 100644 L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/areas/TalkingIsland/Raina/addDualClassWithoutQuestFailed.html create mode 100644 L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/areas/TalkingIsland/Raina/addDualClassWithoutQuest.html create mode 100644 L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/areas/TalkingIsland/Raina/addDualClassWithoutQuestFailed.html diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/config/Character.ini b/L2J_Mobius_1.0_Ertheia/dist/game/config/Character.ini index 1124e06eda..5146157c60 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/config/Character.ini +++ b/L2J_Mobius_1.0_Ertheia/dist/game/config/Character.ini @@ -163,6 +163,10 @@ DivineInspirationSpBookNeeded = True # Default: False AltSubClassWithoutQuests = False +# Allow player to upgrade sub-class to dualclass from Raina without finish Split Destiny quest. +# Default: False +AltDualClassWithoutQuest = False + # Allow player to learn transformations without quest. # Default: False AltTransformationWithoutQuest = False diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/TalkingIsland/Raina/Raina.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/TalkingIsland/Raina/Raina.java index 44073aba11..443c4bbfc5 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/TalkingIsland/Raina/Raina.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/TalkingIsland/Raina/Raina.java @@ -51,6 +51,8 @@ import com.l2jmobius.gameserver.network.SystemMessageId; import com.l2jmobius.gameserver.network.serverpackets.AcquireSkillList; import com.l2jmobius.gameserver.network.serverpackets.ExSubjobInfo; import com.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage; +import com.l2jmobius.gameserver.network.serverpackets.SocialAction; +import com.l2jmobius.gameserver.network.serverpackets.SystemMessage; import ai.AbstractNpcAI; import quests.Q10385_RedThreadOfFate.Q10385_RedThreadOfFate; @@ -419,6 +421,42 @@ public final class Raina extends AbstractNpcAI player.sendPacket(html); break; } + case "upgradeSubClassToDualClass": + { + if (player.isTransformed()) + { + htmltext = "noTransform.html"; + } + else if (player.hasSummon()) + { + htmltext = "noSummon.html"; + } + else if (player.getRace() == Race.ERTHEIA) + { + htmltext = "noErtheia.html"; + } + else if (!player.isInventoryUnder90(true) || (player.getWeightPenalty() >= 2)) + { + htmltext = "inventoryLimit.html"; + } + else if (player.hasDualClass() || !player.isSubClassActive() || (player.getLevel() < 80)) + { + htmltext = "addDualClassWithoutQuestFailed.html"; + } + else + { + player.getSubClasses().get(player.getClassIndex()).setIsDualClass(true); + + final SystemMessage msg = SystemMessage.getSystemMessage(SystemMessageId.SUBCLASS_S1_HAS_BEEN_UPGRADED_TO_DUEL_CLASS_S2_CONGRATULATIONS); + msg.addClassId(player.getClassId().getId()); + msg.addClassId(player.getClassId().getId()); + player.sendPacket(msg); + + player.sendPacket(new ExSubjobInfo(player, SubclassInfoType.CLASS_CHANGED)); + player.broadcastSocialAction(SocialAction.LEVEL_UP); + } + break; + } } return htmltext; } @@ -837,6 +875,16 @@ public final class Raina extends AbstractNpcAI return subclasses; } + @Override + public String onFirstTalk(L2Npc npc, L2PcInstance player) + { + if (Config.ALT_GAME_DUALCLASS_WITHOUT_QUEST) + { + return "addDualClassWithoutQuest.html"; + } + return "33491.html"; + } + private NpcHtmlMessage getNpcHtmlMessage(L2PcInstance player, L2Npc npc, String fileName) { final NpcHtmlMessage html = new NpcHtmlMessage(npc.getObjectId()); diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/TalkingIsland/Raina/addDualClassWithoutQuest.html b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/TalkingIsland/Raina/addDualClassWithoutQuest.html new file mode 100644 index 0000000000..2fd1a42c3d --- /dev/null +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/TalkingIsland/Raina/addDualClassWithoutQuest.html @@ -0,0 +1,11 @@ +Subclass/Dual Class Master Raina:
+Hello! +You have a question about subclass or dual class?
+ + + + + + + + \ No newline at end of file diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/TalkingIsland/Raina/addDualClassWithoutQuestFailed.html b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/TalkingIsland/Raina/addDualClassWithoutQuestFailed.html new file mode 100644 index 0000000000..5d8a06768e --- /dev/null +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/TalkingIsland/Raina/addDualClassWithoutQuestFailed.html @@ -0,0 +1,5 @@ +Subclass/Dual Class Master Raina:

+You do not meet the conditions to add a dual class.
+Come back when you're ready, or ask for something else.
+(Only characters with a subclass of Lv. 80 or above may change it to a dual class once.) + \ No newline at end of file diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/Config.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/Config.java index 484a322826..dd62606fa2 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/Config.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/Config.java @@ -175,6 +175,7 @@ public final class Config public static boolean ES_SP_BOOK_NEEDED; public static boolean DIVINE_SP_BOOK_NEEDED; public static boolean ALT_GAME_SUBCLASS_WITHOUT_QUESTS; + public static boolean ALT_GAME_DUALCLASS_WITHOUT_QUEST; public static boolean ALLOW_TRANSFORM_WITHOUT_QUEST; public static int FEE_DELETE_TRANSFER_SKILLS; public static int FEE_DELETE_SUBCLASS_SKILLS; @@ -1507,6 +1508,7 @@ public final class Config ES_SP_BOOK_NEEDED = Character.getBoolean("EnchantSkillSpBookNeeded", true); DIVINE_SP_BOOK_NEEDED = Character.getBoolean("DivineInspirationSpBookNeeded", true); ALT_GAME_SUBCLASS_WITHOUT_QUESTS = Character.getBoolean("AltSubClassWithoutQuests", false); + ALT_GAME_DUALCLASS_WITHOUT_QUEST = Character.getBoolean("AltDualClassWithoutQuest", false); RESTORE_SERVITOR_ON_RECONNECT = Character.getBoolean("RestoreServitorOnReconnect", true); RESTORE_PET_ON_RECONNECT = Character.getBoolean("RestorePetOnReconnect", true); ALLOW_TRANSFORM_WITHOUT_QUEST = Character.getBoolean("AltTransformationWithoutQuest", false); diff --git a/L2J_Mobius_2.5_Underground/dist/game/config/Character.ini b/L2J_Mobius_2.5_Underground/dist/game/config/Character.ini index 3cb4b0882b..f731e8144e 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/config/Character.ini +++ b/L2J_Mobius_2.5_Underground/dist/game/config/Character.ini @@ -163,6 +163,10 @@ DivineInspirationSpBookNeeded = True # Default: False AltSubClassWithoutQuests = False +# Allow player to upgrade sub-class to dualclass from Raina without finish Split Destiny quest. +# Default: False +AltDualClassWithoutQuest = False + # Allow player to learn transformations without quest. # Default: False AltTransformationWithoutQuest = False diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/areas/TalkingIsland/Raina/Raina.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/areas/TalkingIsland/Raina/Raina.java index 44073aba11..443c4bbfc5 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/areas/TalkingIsland/Raina/Raina.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/areas/TalkingIsland/Raina/Raina.java @@ -51,6 +51,8 @@ import com.l2jmobius.gameserver.network.SystemMessageId; import com.l2jmobius.gameserver.network.serverpackets.AcquireSkillList; import com.l2jmobius.gameserver.network.serverpackets.ExSubjobInfo; import com.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage; +import com.l2jmobius.gameserver.network.serverpackets.SocialAction; +import com.l2jmobius.gameserver.network.serverpackets.SystemMessage; import ai.AbstractNpcAI; import quests.Q10385_RedThreadOfFate.Q10385_RedThreadOfFate; @@ -419,6 +421,42 @@ public final class Raina extends AbstractNpcAI player.sendPacket(html); break; } + case "upgradeSubClassToDualClass": + { + if (player.isTransformed()) + { + htmltext = "noTransform.html"; + } + else if (player.hasSummon()) + { + htmltext = "noSummon.html"; + } + else if (player.getRace() == Race.ERTHEIA) + { + htmltext = "noErtheia.html"; + } + else if (!player.isInventoryUnder90(true) || (player.getWeightPenalty() >= 2)) + { + htmltext = "inventoryLimit.html"; + } + else if (player.hasDualClass() || !player.isSubClassActive() || (player.getLevel() < 80)) + { + htmltext = "addDualClassWithoutQuestFailed.html"; + } + else + { + player.getSubClasses().get(player.getClassIndex()).setIsDualClass(true); + + final SystemMessage msg = SystemMessage.getSystemMessage(SystemMessageId.SUBCLASS_S1_HAS_BEEN_UPGRADED_TO_DUEL_CLASS_S2_CONGRATULATIONS); + msg.addClassId(player.getClassId().getId()); + msg.addClassId(player.getClassId().getId()); + player.sendPacket(msg); + + player.sendPacket(new ExSubjobInfo(player, SubclassInfoType.CLASS_CHANGED)); + player.broadcastSocialAction(SocialAction.LEVEL_UP); + } + break; + } } return htmltext; } @@ -837,6 +875,16 @@ public final class Raina extends AbstractNpcAI return subclasses; } + @Override + public String onFirstTalk(L2Npc npc, L2PcInstance player) + { + if (Config.ALT_GAME_DUALCLASS_WITHOUT_QUEST) + { + return "addDualClassWithoutQuest.html"; + } + return "33491.html"; + } + private NpcHtmlMessage getNpcHtmlMessage(L2PcInstance player, L2Npc npc, String fileName) { final NpcHtmlMessage html = new NpcHtmlMessage(npc.getObjectId()); diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/areas/TalkingIsland/Raina/addDualClassWithoutQuest.html b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/areas/TalkingIsland/Raina/addDualClassWithoutQuest.html new file mode 100644 index 0000000000..2fd1a42c3d --- /dev/null +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/areas/TalkingIsland/Raina/addDualClassWithoutQuest.html @@ -0,0 +1,11 @@ +Subclass/Dual Class Master Raina:
+Hello! +You have a question about subclass or dual class?
+ + + + + + + + \ No newline at end of file diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/areas/TalkingIsland/Raina/addDualClassWithoutQuestFailed.html b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/areas/TalkingIsland/Raina/addDualClassWithoutQuestFailed.html new file mode 100644 index 0000000000..5d8a06768e --- /dev/null +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/areas/TalkingIsland/Raina/addDualClassWithoutQuestFailed.html @@ -0,0 +1,5 @@ +Subclass/Dual Class Master Raina:

+You do not meet the conditions to add a dual class.
+Come back when you're ready, or ask for something else.
+(Only characters with a subclass of Lv. 80 or above may change it to a dual class once.) + \ No newline at end of file diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/Config.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/Config.java index 5c1f3bbe70..f74df8f22f 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/Config.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/Config.java @@ -175,6 +175,7 @@ public final class Config public static boolean ES_SP_BOOK_NEEDED; public static boolean DIVINE_SP_BOOK_NEEDED; public static boolean ALT_GAME_SUBCLASS_WITHOUT_QUESTS; + public static boolean ALT_GAME_DUALCLASS_WITHOUT_QUEST; public static boolean ALLOW_TRANSFORM_WITHOUT_QUEST; public static int FEE_DELETE_TRANSFER_SKILLS; public static int FEE_DELETE_SUBCLASS_SKILLS; @@ -1508,6 +1509,7 @@ public final class Config ES_SP_BOOK_NEEDED = Character.getBoolean("EnchantSkillSpBookNeeded", true); DIVINE_SP_BOOK_NEEDED = Character.getBoolean("DivineInspirationSpBookNeeded", true); ALT_GAME_SUBCLASS_WITHOUT_QUESTS = Character.getBoolean("AltSubClassWithoutQuests", false); + ALT_GAME_DUALCLASS_WITHOUT_QUEST = Character.getBoolean("AltDualClassWithoutQuest", false); RESTORE_SERVITOR_ON_RECONNECT = Character.getBoolean("RestoreServitorOnReconnect", true); RESTORE_PET_ON_RECONNECT = Character.getBoolean("RestorePetOnReconnect", true); ALLOW_TRANSFORM_WITHOUT_QUEST = Character.getBoolean("AltTransformationWithoutQuest", false); diff --git a/L2J_Mobius_3.0_Helios/dist/game/config/Character.ini b/L2J_Mobius_3.0_Helios/dist/game/config/Character.ini index 3cb4b0882b..f731e8144e 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/config/Character.ini +++ b/L2J_Mobius_3.0_Helios/dist/game/config/Character.ini @@ -163,6 +163,10 @@ DivineInspirationSpBookNeeded = True # Default: False AltSubClassWithoutQuests = False +# Allow player to upgrade sub-class to dualclass from Raina without finish Split Destiny quest. +# Default: False +AltDualClassWithoutQuest = False + # Allow player to learn transformations without quest. # Default: False AltTransformationWithoutQuest = False diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/areas/TalkingIsland/Raina/Raina.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/areas/TalkingIsland/Raina/Raina.java index 44073aba11..443c4bbfc5 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/areas/TalkingIsland/Raina/Raina.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/areas/TalkingIsland/Raina/Raina.java @@ -51,6 +51,8 @@ import com.l2jmobius.gameserver.network.SystemMessageId; import com.l2jmobius.gameserver.network.serverpackets.AcquireSkillList; import com.l2jmobius.gameserver.network.serverpackets.ExSubjobInfo; import com.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage; +import com.l2jmobius.gameserver.network.serverpackets.SocialAction; +import com.l2jmobius.gameserver.network.serverpackets.SystemMessage; import ai.AbstractNpcAI; import quests.Q10385_RedThreadOfFate.Q10385_RedThreadOfFate; @@ -419,6 +421,42 @@ public final class Raina extends AbstractNpcAI player.sendPacket(html); break; } + case "upgradeSubClassToDualClass": + { + if (player.isTransformed()) + { + htmltext = "noTransform.html"; + } + else if (player.hasSummon()) + { + htmltext = "noSummon.html"; + } + else if (player.getRace() == Race.ERTHEIA) + { + htmltext = "noErtheia.html"; + } + else if (!player.isInventoryUnder90(true) || (player.getWeightPenalty() >= 2)) + { + htmltext = "inventoryLimit.html"; + } + else if (player.hasDualClass() || !player.isSubClassActive() || (player.getLevel() < 80)) + { + htmltext = "addDualClassWithoutQuestFailed.html"; + } + else + { + player.getSubClasses().get(player.getClassIndex()).setIsDualClass(true); + + final SystemMessage msg = SystemMessage.getSystemMessage(SystemMessageId.SUBCLASS_S1_HAS_BEEN_UPGRADED_TO_DUEL_CLASS_S2_CONGRATULATIONS); + msg.addClassId(player.getClassId().getId()); + msg.addClassId(player.getClassId().getId()); + player.sendPacket(msg); + + player.sendPacket(new ExSubjobInfo(player, SubclassInfoType.CLASS_CHANGED)); + player.broadcastSocialAction(SocialAction.LEVEL_UP); + } + break; + } } return htmltext; } @@ -837,6 +875,16 @@ public final class Raina extends AbstractNpcAI return subclasses; } + @Override + public String onFirstTalk(L2Npc npc, L2PcInstance player) + { + if (Config.ALT_GAME_DUALCLASS_WITHOUT_QUEST) + { + return "addDualClassWithoutQuest.html"; + } + return "33491.html"; + } + private NpcHtmlMessage getNpcHtmlMessage(L2PcInstance player, L2Npc npc, String fileName) { final NpcHtmlMessage html = new NpcHtmlMessage(npc.getObjectId()); diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/areas/TalkingIsland/Raina/addDualClassWithoutQuest.html b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/areas/TalkingIsland/Raina/addDualClassWithoutQuest.html new file mode 100644 index 0000000000..2fd1a42c3d --- /dev/null +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/areas/TalkingIsland/Raina/addDualClassWithoutQuest.html @@ -0,0 +1,11 @@ +Subclass/Dual Class Master Raina:
+Hello! +You have a question about subclass or dual class?
+ + + + + + + + \ No newline at end of file diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/areas/TalkingIsland/Raina/addDualClassWithoutQuestFailed.html b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/areas/TalkingIsland/Raina/addDualClassWithoutQuestFailed.html new file mode 100644 index 0000000000..5d8a06768e --- /dev/null +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/areas/TalkingIsland/Raina/addDualClassWithoutQuestFailed.html @@ -0,0 +1,5 @@ +Subclass/Dual Class Master Raina:

+You do not meet the conditions to add a dual class.
+Come back when you're ready, or ask for something else.
+(Only characters with a subclass of Lv. 80 or above may change it to a dual class once.) + \ No newline at end of file diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/Config.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/Config.java index 0b049e21a5..0a047f9679 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/Config.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/Config.java @@ -175,6 +175,7 @@ public final class Config public static boolean ES_SP_BOOK_NEEDED; public static boolean DIVINE_SP_BOOK_NEEDED; public static boolean ALT_GAME_SUBCLASS_WITHOUT_QUESTS; + public static boolean ALT_GAME_DUALCLASS_WITHOUT_QUEST; public static boolean ALLOW_TRANSFORM_WITHOUT_QUEST; public static int FEE_DELETE_TRANSFER_SKILLS; public static int FEE_DELETE_SUBCLASS_SKILLS; @@ -1516,6 +1517,7 @@ public final class Config ES_SP_BOOK_NEEDED = Character.getBoolean("EnchantSkillSpBookNeeded", true); DIVINE_SP_BOOK_NEEDED = Character.getBoolean("DivineInspirationSpBookNeeded", true); ALT_GAME_SUBCLASS_WITHOUT_QUESTS = Character.getBoolean("AltSubClassWithoutQuests", false); + ALT_GAME_DUALCLASS_WITHOUT_QUEST = Character.getBoolean("AltDualClassWithoutQuest", false); RESTORE_SERVITOR_ON_RECONNECT = Character.getBoolean("RestoreServitorOnReconnect", true); RESTORE_PET_ON_RECONNECT = Character.getBoolean("RestorePetOnReconnect", true); ALLOW_TRANSFORM_WITHOUT_QUEST = Character.getBoolean("AltTransformationWithoutQuest", false); diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/config/Character.ini b/L2J_Mobius_4.0_GrandCrusade/dist/game/config/Character.ini index 972147a91f..c0f8f53914 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/config/Character.ini +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/config/Character.ini @@ -163,6 +163,10 @@ DivineInspirationSpBookNeeded = True # Default: False AltSubClassWithoutQuests = False +# Allow player to upgrade sub-class to dualclass from Raina without finish Split Destiny quest. +# Default: False +AltDualClassWithoutQuest = False + # Allow player to learn transformations without quest. # Default: False AltTransformationWithoutQuest = False diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/areas/TalkingIsland/Raina/Raina.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/areas/TalkingIsland/Raina/Raina.java index 44073aba11..443c4bbfc5 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/areas/TalkingIsland/Raina/Raina.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/areas/TalkingIsland/Raina/Raina.java @@ -51,6 +51,8 @@ import com.l2jmobius.gameserver.network.SystemMessageId; import com.l2jmobius.gameserver.network.serverpackets.AcquireSkillList; import com.l2jmobius.gameserver.network.serverpackets.ExSubjobInfo; import com.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage; +import com.l2jmobius.gameserver.network.serverpackets.SocialAction; +import com.l2jmobius.gameserver.network.serverpackets.SystemMessage; import ai.AbstractNpcAI; import quests.Q10385_RedThreadOfFate.Q10385_RedThreadOfFate; @@ -419,6 +421,42 @@ public final class Raina extends AbstractNpcAI player.sendPacket(html); break; } + case "upgradeSubClassToDualClass": + { + if (player.isTransformed()) + { + htmltext = "noTransform.html"; + } + else if (player.hasSummon()) + { + htmltext = "noSummon.html"; + } + else if (player.getRace() == Race.ERTHEIA) + { + htmltext = "noErtheia.html"; + } + else if (!player.isInventoryUnder90(true) || (player.getWeightPenalty() >= 2)) + { + htmltext = "inventoryLimit.html"; + } + else if (player.hasDualClass() || !player.isSubClassActive() || (player.getLevel() < 80)) + { + htmltext = "addDualClassWithoutQuestFailed.html"; + } + else + { + player.getSubClasses().get(player.getClassIndex()).setIsDualClass(true); + + final SystemMessage msg = SystemMessage.getSystemMessage(SystemMessageId.SUBCLASS_S1_HAS_BEEN_UPGRADED_TO_DUEL_CLASS_S2_CONGRATULATIONS); + msg.addClassId(player.getClassId().getId()); + msg.addClassId(player.getClassId().getId()); + player.sendPacket(msg); + + player.sendPacket(new ExSubjobInfo(player, SubclassInfoType.CLASS_CHANGED)); + player.broadcastSocialAction(SocialAction.LEVEL_UP); + } + break; + } } return htmltext; } @@ -837,6 +875,16 @@ public final class Raina extends AbstractNpcAI return subclasses; } + @Override + public String onFirstTalk(L2Npc npc, L2PcInstance player) + { + if (Config.ALT_GAME_DUALCLASS_WITHOUT_QUEST) + { + return "addDualClassWithoutQuest.html"; + } + return "33491.html"; + } + private NpcHtmlMessage getNpcHtmlMessage(L2PcInstance player, L2Npc npc, String fileName) { final NpcHtmlMessage html = new NpcHtmlMessage(npc.getObjectId()); diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/areas/TalkingIsland/Raina/addDualClassWithoutQuest.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/areas/TalkingIsland/Raina/addDualClassWithoutQuest.html new file mode 100644 index 0000000000..2fd1a42c3d --- /dev/null +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/areas/TalkingIsland/Raina/addDualClassWithoutQuest.html @@ -0,0 +1,11 @@ +Subclass/Dual Class Master Raina:
+Hello! +You have a question about subclass or dual class?
+ + + + + + + + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/areas/TalkingIsland/Raina/addDualClassWithoutQuestFailed.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/areas/TalkingIsland/Raina/addDualClassWithoutQuestFailed.html new file mode 100644 index 0000000000..5d8a06768e --- /dev/null +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/areas/TalkingIsland/Raina/addDualClassWithoutQuestFailed.html @@ -0,0 +1,5 @@ +Subclass/Dual Class Master Raina:

+You do not meet the conditions to add a dual class.
+Come back when you're ready, or ask for something else.
+(Only characters with a subclass of Lv. 80 or above may change it to a dual class once.) + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/Config.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/Config.java index eaf21d7efd..e7a921883b 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/Config.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/Config.java @@ -175,6 +175,7 @@ public final class Config public static boolean ES_SP_BOOK_NEEDED; public static boolean DIVINE_SP_BOOK_NEEDED; public static boolean ALT_GAME_SUBCLASS_WITHOUT_QUESTS; + public static boolean ALT_GAME_DUALCLASS_WITHOUT_QUEST; public static boolean ALLOW_TRANSFORM_WITHOUT_QUEST; public static int FEE_DELETE_TRANSFER_SKILLS; public static int FEE_DELETE_SUBCLASS_SKILLS; @@ -1515,6 +1516,7 @@ public final class Config ES_SP_BOOK_NEEDED = Character.getBoolean("EnchantSkillSpBookNeeded", true); DIVINE_SP_BOOK_NEEDED = Character.getBoolean("DivineInspirationSpBookNeeded", true); ALT_GAME_SUBCLASS_WITHOUT_QUESTS = Character.getBoolean("AltSubClassWithoutQuests", false); + ALT_GAME_DUALCLASS_WITHOUT_QUEST = Character.getBoolean("AltDualClassWithoutQuest", false); RESTORE_SERVITOR_ON_RECONNECT = Character.getBoolean("RestoreServitorOnReconnect", true); RESTORE_PET_ON_RECONNECT = Character.getBoolean("RestorePetOnReconnect", true); ALLOW_TRANSFORM_WITHOUT_QUEST = Character.getBoolean("AltTransformationWithoutQuest", false);