From 75094182b1241b8fec05127e313afa2d6622686a Mon Sep 17 00:00:00 2001 From: MobiusDev <8391001+MobiusDevelopment@users.noreply.github.com> Date: Tue, 12 Sep 2017 03:06:06 +0000 Subject: [PATCH] Separate character.ini configs for Hardin. --- .../dist/game/config/Character.ini | 33 +++++++++++++++++++ .../ai/areas/TalkingIsland/Hardin/Hardin.java | 30 ++++++++--------- .../java/com/l2jmobius/Config.java | 12 +++++++ .../dist/game/config/Character.ini | 33 +++++++++++++++++++ .../ai/areas/TalkingIsland/Hardin/Hardin.java | 30 ++++++++--------- .../java/com/l2jmobius/Config.java | 12 +++++++ .../dist/game/config/Character.ini | 33 +++++++++++++++++++ .../ai/areas/TalkingIsland/Hardin/Hardin.java | 30 ++++++++--------- .../java/com/l2jmobius/Config.java | 12 +++++++ 9 files changed, 177 insertions(+), 48 deletions(-) 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 d2a9552bfa..2f3fa88ff9 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/config/Character.ini +++ b/L2J_Mobius_1.0_Ertheia/dist/game/config/Character.ini @@ -140,6 +140,7 @@ SubclassStoreSkillCooltime = False # Default: 666 EffectTickRatio = 666 + # --------------------------------------------------------------------------- # Class, Sub-class and skill learning options # --------------------------------------------------------------------------- @@ -175,6 +176,28 @@ FeeDeleteSubClassSkills = 10000000 # Default: 20000000 FeeDeleteDualClassSkills = 20000000 + +# --------------------------------------------------------------------------- +# Hardin (Agent of Chaos) +# --------------------------------------------------------------------------- +# Enable classes from all races. +# NOTE: Will change player race accordingly. +# Default: False +HardinEnableAllRaces = False + +# Disable mage-fighter class differentiation. +# Default: False +HardinEnableAllSpecs = False + +# Enable above checks for dual classes as well. +# Default: True +HardinEnableDualClassChecks = True + +# Enable Hardin for Ertheia race characters. +# Default: False +HardinEnableErtheias = False + + # --------------------------------------------------------------------------- # Summons configuration # --------------------------------------------------------------------------- @@ -191,6 +214,7 @@ RestoreServitorOnReconnect = True # Default: True RestorePetOnReconnect = True + # --------------------------------------------------------------------------- # Vitality configuration # --------------------------------------------------------------------------- @@ -205,6 +229,7 @@ EnableVitality = True # Default: 140000 StartingVitalityPoints = 140000 + # --------------------------------------------------------------------------- # Limits # --------------------------------------------------------------------------- @@ -326,6 +351,7 @@ FreightPrice = 1000 # Set to 0 to disable it NpcTalkBlockingTime = 0 + # --------------------------------------------------------------------------- # Mentoring System # --------------------------------------------------------------------------- @@ -336,6 +362,7 @@ MentorPenaltyForMenteeComplete = 1 # Default: 2 MentorPenaltyForMenteeLeave = 2 + # --------------------------------------------------------------------------- # Enchanting # --------------------------------------------------------------------------- @@ -357,6 +384,7 @@ EnchantBlackList = 7816,7817,7818,7819,7820,7821,7822,7823,7824,7825,7826,7827,7 # Default: True DisableOverEnchanting = True + # --------------------------------------------------------------------------- # Augmenting # --------------------------------------------------------------------------- @@ -410,6 +438,7 @@ AugmentationBlackList = 6656,6657,6658,6659,6660,6661,6662,8191,10170,10314,1374 # Default: False AltAllowAugmentPvPItems = false + # --------------------------------------------------------------------------- # Karma # --------------------------------------------------------------------------- @@ -467,6 +496,7 @@ CastleZoneFameAquirePoints = 1250 # Default: True FameForDeadPlayers = True + # --------------------------------------------------------------------------- # Crafting # --------------------------------------------------------------------------- @@ -513,6 +543,7 @@ AltBlacksmithUseRecipes = True # Default: False StoreRecipeShopList = False + # --------------------------------------------------------------------------- # Clan # --------------------------------------------------------------------------- @@ -619,6 +650,7 @@ StartingLevel = 1 # Default: 0 StartingSP = 0 + # --------------------------------------------------------------------------- # Other Settings: # --------------------------------------------------------------------------- @@ -776,6 +808,7 @@ SilenceModeExclude = False # Default: True GoDVideoIntro = True + # --------------------------------------------------------------------------- # Ability Settings: # --------------------------------------------------------------------------- diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/TalkingIsland/Hardin/Hardin.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/TalkingIsland/Hardin/Hardin.java index da10951782..702d61e759 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/TalkingIsland/Hardin/Hardin.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/TalkingIsland/Hardin/Hardin.java @@ -16,6 +16,7 @@ */ package ai.areas.TalkingIsland.Hardin; +import com.l2jmobius.Config; import com.l2jmobius.gameserver.data.xml.impl.ClassListData; import com.l2jmobius.gameserver.data.xml.impl.SkillData; import com.l2jmobius.gameserver.data.xml.impl.SkillTreesData; @@ -47,11 +48,6 @@ public final class Hardin extends AbstractNpcAI private static final int CHAOS_ESSENCE_DUAL_CLASS = 37494; private static final int CHAOS_POMANDER = 37374; private static final int CHAOS_POMANDER_DUAL_CLASS = 37375; - // Enable changing to other non related classes as well. - private static final boolean ENABLE_ALL_RACES = false; // Will change player race as well! - private static final boolean ENABLE_ALL_SPECS = false; // Will disable mage/fighter check! - private static final boolean ENABLE_DUALCLASS_CHECKS = true; // Will enable above checks for dual class. - private static final boolean ENABLE_ERTHEIAS = false; // Enable Hardin for Ertheias as well. private Hardin() { @@ -59,7 +55,6 @@ public final class Hardin extends AbstractNpcAI addFirstTalkId(HARDIN); } - @SuppressWarnings("unused") @Override public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) { @@ -74,17 +69,20 @@ public final class Hardin extends AbstractNpcAI StringBuilder classes = new StringBuilder(); for (ClassId c : ClassId.values()) { - if ((((c.level() != 4) && (c.getRace() != Race.ERTHEIA)) || (ENABLE_ERTHEIAS && (c.getRace() == Race.ERTHEIA) && (c.level() != 3))) || (!ENABLE_ERTHEIAS && (c.getRace() == Race.ERTHEIA)) || (c == player.getClassId())) + if ((((c.level() != 4) && (c.getRace() != Race.ERTHEIA)) // + || (Config.HARDIN_ENABLE_ERTHEIAS && (c.getRace() == Race.ERTHEIA) && (c.level() != 3))) // + || (!Config.HARDIN_ENABLE_ERTHEIAS && (c.getRace() == Race.ERTHEIA)) // + || (c == player.getClassId())) { continue; } - if (!player.isDualClassActive() || (player.isDualClassActive() && ENABLE_DUALCLASS_CHECKS)) + if (!player.isDualClassActive() || (player.isDualClassActive() && Config.HARDIN_ENABLE_DUALCLASS_CHECKS)) { - if (!ENABLE_ALL_RACES && (c.getRace() != player.getClassId().getRace())) + if (!Config.HARDIN_ENABLE_ALL_RACES && (c.getRace() != player.getClassId().getRace())) { continue; } - if (!ENABLE_ALL_SPECS && (c.isMage() != player.isMageClass())) + if (!Config.HARDIN_ENABLE_ALL_SPECS && (c.isMage() != player.isMageClass())) { continue; } @@ -103,17 +101,17 @@ public final class Hardin extends AbstractNpcAI } else if (event.contains("try")) { - // take item + // Take item takeItems(player, player.isDualClassActive() ? CHAOS_ESSENCE_DUAL_CLASS : CHAOS_ESSENCE, 1); - // give item + // Give item giveItems(player, player.isDualClassActive() ? CHAOS_POMANDER_DUAL_CLASS : CHAOS_POMANDER, 1); - // ertheias can only be female + // Ertheias can only be female final ClassId newClass = ClassId.getClassId(Integer.parseInt(event.replace("try_", ""))); if ((newClass.getRace() == Race.ERTHEIA) && (player.getClassId().getRace() != Race.ERTHEIA) && !player.getAppearance().getSex()) { player.getAppearance().setSex(true); } - // change class + // Change class player.setClassId(newClass.getId()); if (player.isDualClassActive()) { @@ -123,7 +121,7 @@ public final class Hardin extends AbstractNpcAI { player.setBaseClass(player.getActiveClass()); } - // adjustments + // Adjustments SkillTreesData.getInstance().cleanSkillUponAwakening(player); for (L2SkillLearn skill : SkillTreesData.getInstance().getRaceSkillTree(player.getRace())) { @@ -154,7 +152,7 @@ public final class Hardin extends AbstractNpcAI { return "33870-03.html"; } - if (!ENABLE_ERTHEIAS) + if (!Config.HARDIN_ENABLE_ERTHEIAS) { return "33870-02.html"; } 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 e450b23b2f..6d7fe560ee 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/Config.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/Config.java @@ -770,6 +770,14 @@ public final class Config public static int MMO_HELPER_BUFFER_COUNT; public static boolean MMO_TCP_NODELAY; + // -------------------------------------------------- + // Hardin (Agent of Chaos) + // -------------------------------------------------- + public static boolean HARDIN_ENABLE_ALL_RACES; + public static boolean HARDIN_ENABLE_ALL_SPECS; + public static boolean HARDIN_ENABLE_DUALCLASS_CHECKS; + public static boolean HARDIN_ENABLE_ERTHEIAS; + // -------------------------------------------------- // Vitality Settings // -------------------------------------------------- @@ -1449,6 +1457,10 @@ public final class Config FEE_DELETE_SUBCLASS_SKILLS = Character.getInt("FeeDeleteSubClassSkills", 10000000); FEE_DELETE_DUALCLASS_SKILLS = Character.getInt("FeeDeleteDualClassSkills", 20000000); ENABLE_VITALITY = Character.getBoolean("EnableVitality", true); + HARDIN_ENABLE_ALL_RACES = Character.getBoolean("HardinEnableAllRaces", false); + HARDIN_ENABLE_ALL_SPECS = Character.getBoolean("HardinEnableAllSpecs", false); + HARDIN_ENABLE_DUALCLASS_CHECKS = Character.getBoolean("HardinEnableDualClassChecks", true); + HARDIN_ENABLE_ERTHEIAS = Character.getBoolean("HardinEnableErtheias", false); STARTING_VITALITY_POINTS = Character.getInt("StartingVitalityPoints", 140000); MAX_BONUS_EXP = Character.getDouble("MaxExpBonus", 0); MAX_BONUS_SP = Character.getDouble("MaxSpBonus", 0); 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 df966f1f32..1fa3fdca99 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/config/Character.ini +++ b/L2J_Mobius_2.5_Underground/dist/game/config/Character.ini @@ -140,6 +140,7 @@ SubclassStoreSkillCooltime = False # Default: 666 EffectTickRatio = 666 + # --------------------------------------------------------------------------- # Class, Sub-class and skill learning options # --------------------------------------------------------------------------- @@ -175,6 +176,28 @@ FeeDeleteSubClassSkills = 10000000 # Default: 20000000 FeeDeleteDualClassSkills = 20000000 + +# --------------------------------------------------------------------------- +# Hardin (Agent of Chaos) +# --------------------------------------------------------------------------- +# Enable classes from all races. +# NOTE: Will change player race accordingly. +# Default: False +HardinEnableAllRaces = False + +# Disable mage-fighter class differentiation. +# Default: False +HardinEnableAllSpecs = False + +# Enable above checks for dual classes as well. +# Default: True +HardinEnableDualClassChecks = True + +# Enable Hardin for Ertheia race characters. +# Default: False +HardinEnableErtheias = False + + # --------------------------------------------------------------------------- # Summons configuration # --------------------------------------------------------------------------- @@ -191,6 +214,7 @@ RestoreServitorOnReconnect = True # Default: True RestorePetOnReconnect = True + # --------------------------------------------------------------------------- # Vitality configuration # --------------------------------------------------------------------------- @@ -205,6 +229,7 @@ EnableVitality = True # Default: 140000 StartingVitalityPoints = 140000 + # --------------------------------------------------------------------------- # Limits # --------------------------------------------------------------------------- @@ -326,6 +351,7 @@ FreightPrice = 1000 # Set to 0 to disable it NpcTalkBlockingTime = 0 + # --------------------------------------------------------------------------- # Mentoring System # --------------------------------------------------------------------------- @@ -336,6 +362,7 @@ MentorPenaltyForMenteeComplete = 1 # Default: 2 MentorPenaltyForMenteeLeave = 2 + # --------------------------------------------------------------------------- # Enchanting # --------------------------------------------------------------------------- @@ -357,6 +384,7 @@ EnchantBlackList = 7816,7817,7818,7819,7820,7821,7822,7823,7824,7825,7826,7827,7 # Default: True DisableOverEnchanting = True + # --------------------------------------------------------------------------- # Augmenting # --------------------------------------------------------------------------- @@ -410,6 +438,7 @@ AugmentationBlackList = 6656,6657,6658,6659,6660,6661,6662,8191,10170,10314,1374 # Default: False AltAllowAugmentPvPItems = false + # --------------------------------------------------------------------------- # Karma # --------------------------------------------------------------------------- @@ -467,6 +496,7 @@ CastleZoneFameAquirePoints = 1250 # Default: True FameForDeadPlayers = True + # --------------------------------------------------------------------------- # Crafting # --------------------------------------------------------------------------- @@ -513,6 +543,7 @@ AltBlacksmithUseRecipes = True # Default: False StoreRecipeShopList = False + # --------------------------------------------------------------------------- # Clan # --------------------------------------------------------------------------- @@ -619,6 +650,7 @@ StartingLevel = 1 # Default: 0 StartingSP = 0 + # --------------------------------------------------------------------------- # Other Settings: # --------------------------------------------------------------------------- @@ -780,6 +812,7 @@ SilenceModeExclude = False # Default: True GoDVideoIntro = True + # --------------------------------------------------------------------------- # Ability Settings: # --------------------------------------------------------------------------- diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/areas/TalkingIsland/Hardin/Hardin.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/areas/TalkingIsland/Hardin/Hardin.java index da10951782..702d61e759 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/areas/TalkingIsland/Hardin/Hardin.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/areas/TalkingIsland/Hardin/Hardin.java @@ -16,6 +16,7 @@ */ package ai.areas.TalkingIsland.Hardin; +import com.l2jmobius.Config; import com.l2jmobius.gameserver.data.xml.impl.ClassListData; import com.l2jmobius.gameserver.data.xml.impl.SkillData; import com.l2jmobius.gameserver.data.xml.impl.SkillTreesData; @@ -47,11 +48,6 @@ public final class Hardin extends AbstractNpcAI private static final int CHAOS_ESSENCE_DUAL_CLASS = 37494; private static final int CHAOS_POMANDER = 37374; private static final int CHAOS_POMANDER_DUAL_CLASS = 37375; - // Enable changing to other non related classes as well. - private static final boolean ENABLE_ALL_RACES = false; // Will change player race as well! - private static final boolean ENABLE_ALL_SPECS = false; // Will disable mage/fighter check! - private static final boolean ENABLE_DUALCLASS_CHECKS = true; // Will enable above checks for dual class. - private static final boolean ENABLE_ERTHEIAS = false; // Enable Hardin for Ertheias as well. private Hardin() { @@ -59,7 +55,6 @@ public final class Hardin extends AbstractNpcAI addFirstTalkId(HARDIN); } - @SuppressWarnings("unused") @Override public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) { @@ -74,17 +69,20 @@ public final class Hardin extends AbstractNpcAI StringBuilder classes = new StringBuilder(); for (ClassId c : ClassId.values()) { - if ((((c.level() != 4) && (c.getRace() != Race.ERTHEIA)) || (ENABLE_ERTHEIAS && (c.getRace() == Race.ERTHEIA) && (c.level() != 3))) || (!ENABLE_ERTHEIAS && (c.getRace() == Race.ERTHEIA)) || (c == player.getClassId())) + if ((((c.level() != 4) && (c.getRace() != Race.ERTHEIA)) // + || (Config.HARDIN_ENABLE_ERTHEIAS && (c.getRace() == Race.ERTHEIA) && (c.level() != 3))) // + || (!Config.HARDIN_ENABLE_ERTHEIAS && (c.getRace() == Race.ERTHEIA)) // + || (c == player.getClassId())) { continue; } - if (!player.isDualClassActive() || (player.isDualClassActive() && ENABLE_DUALCLASS_CHECKS)) + if (!player.isDualClassActive() || (player.isDualClassActive() && Config.HARDIN_ENABLE_DUALCLASS_CHECKS)) { - if (!ENABLE_ALL_RACES && (c.getRace() != player.getClassId().getRace())) + if (!Config.HARDIN_ENABLE_ALL_RACES && (c.getRace() != player.getClassId().getRace())) { continue; } - if (!ENABLE_ALL_SPECS && (c.isMage() != player.isMageClass())) + if (!Config.HARDIN_ENABLE_ALL_SPECS && (c.isMage() != player.isMageClass())) { continue; } @@ -103,17 +101,17 @@ public final class Hardin extends AbstractNpcAI } else if (event.contains("try")) { - // take item + // Take item takeItems(player, player.isDualClassActive() ? CHAOS_ESSENCE_DUAL_CLASS : CHAOS_ESSENCE, 1); - // give item + // Give item giveItems(player, player.isDualClassActive() ? CHAOS_POMANDER_DUAL_CLASS : CHAOS_POMANDER, 1); - // ertheias can only be female + // Ertheias can only be female final ClassId newClass = ClassId.getClassId(Integer.parseInt(event.replace("try_", ""))); if ((newClass.getRace() == Race.ERTHEIA) && (player.getClassId().getRace() != Race.ERTHEIA) && !player.getAppearance().getSex()) { player.getAppearance().setSex(true); } - // change class + // Change class player.setClassId(newClass.getId()); if (player.isDualClassActive()) { @@ -123,7 +121,7 @@ public final class Hardin extends AbstractNpcAI { player.setBaseClass(player.getActiveClass()); } - // adjustments + // Adjustments SkillTreesData.getInstance().cleanSkillUponAwakening(player); for (L2SkillLearn skill : SkillTreesData.getInstance().getRaceSkillTree(player.getRace())) { @@ -154,7 +152,7 @@ public final class Hardin extends AbstractNpcAI { return "33870-03.html"; } - if (!ENABLE_ERTHEIAS) + if (!Config.HARDIN_ENABLE_ERTHEIAS) { return "33870-02.html"; } 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 3bd48421fc..5e03ea7cc7 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/Config.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/Config.java @@ -772,6 +772,14 @@ public final class Config public static int MMO_HELPER_BUFFER_COUNT; public static boolean MMO_TCP_NODELAY; + // -------------------------------------------------- + // Hardin (Agent of Chaos) + // -------------------------------------------------- + public static boolean HARDIN_ENABLE_ALL_RACES; + public static boolean HARDIN_ENABLE_ALL_SPECS; + public static boolean HARDIN_ENABLE_DUALCLASS_CHECKS; + public static boolean HARDIN_ENABLE_ERTHEIAS; + // -------------------------------------------------- // Vitality Settings // -------------------------------------------------- @@ -1451,6 +1459,10 @@ public final class Config FEE_DELETE_SUBCLASS_SKILLS = Character.getInt("FeeDeleteSubClassSkills", 10000000); FEE_DELETE_DUALCLASS_SKILLS = Character.getInt("FeeDeleteDualClassSkills", 20000000); ENABLE_VITALITY = Character.getBoolean("EnableVitality", true); + HARDIN_ENABLE_ALL_RACES = Character.getBoolean("HardinEnableAllRaces", false); + HARDIN_ENABLE_ALL_SPECS = Character.getBoolean("HardinEnableAllSpecs", false); + HARDIN_ENABLE_DUALCLASS_CHECKS = Character.getBoolean("HardinEnableDualClassChecks", true); + HARDIN_ENABLE_ERTHEIAS = Character.getBoolean("HardinEnableErtheias", false); STARTING_VITALITY_POINTS = Character.getInt("StartingVitalityPoints", 140000); MAX_BONUS_EXP = Character.getDouble("MaxExpBonus", 0); MAX_BONUS_SP = Character.getDouble("MaxSpBonus", 0); 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 df966f1f32..1fa3fdca99 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/config/Character.ini +++ b/L2J_Mobius_3.0_Helios/dist/game/config/Character.ini @@ -140,6 +140,7 @@ SubclassStoreSkillCooltime = False # Default: 666 EffectTickRatio = 666 + # --------------------------------------------------------------------------- # Class, Sub-class and skill learning options # --------------------------------------------------------------------------- @@ -175,6 +176,28 @@ FeeDeleteSubClassSkills = 10000000 # Default: 20000000 FeeDeleteDualClassSkills = 20000000 + +# --------------------------------------------------------------------------- +# Hardin (Agent of Chaos) +# --------------------------------------------------------------------------- +# Enable classes from all races. +# NOTE: Will change player race accordingly. +# Default: False +HardinEnableAllRaces = False + +# Disable mage-fighter class differentiation. +# Default: False +HardinEnableAllSpecs = False + +# Enable above checks for dual classes as well. +# Default: True +HardinEnableDualClassChecks = True + +# Enable Hardin for Ertheia race characters. +# Default: False +HardinEnableErtheias = False + + # --------------------------------------------------------------------------- # Summons configuration # --------------------------------------------------------------------------- @@ -191,6 +214,7 @@ RestoreServitorOnReconnect = True # Default: True RestorePetOnReconnect = True + # --------------------------------------------------------------------------- # Vitality configuration # --------------------------------------------------------------------------- @@ -205,6 +229,7 @@ EnableVitality = True # Default: 140000 StartingVitalityPoints = 140000 + # --------------------------------------------------------------------------- # Limits # --------------------------------------------------------------------------- @@ -326,6 +351,7 @@ FreightPrice = 1000 # Set to 0 to disable it NpcTalkBlockingTime = 0 + # --------------------------------------------------------------------------- # Mentoring System # --------------------------------------------------------------------------- @@ -336,6 +362,7 @@ MentorPenaltyForMenteeComplete = 1 # Default: 2 MentorPenaltyForMenteeLeave = 2 + # --------------------------------------------------------------------------- # Enchanting # --------------------------------------------------------------------------- @@ -357,6 +384,7 @@ EnchantBlackList = 7816,7817,7818,7819,7820,7821,7822,7823,7824,7825,7826,7827,7 # Default: True DisableOverEnchanting = True + # --------------------------------------------------------------------------- # Augmenting # --------------------------------------------------------------------------- @@ -410,6 +438,7 @@ AugmentationBlackList = 6656,6657,6658,6659,6660,6661,6662,8191,10170,10314,1374 # Default: False AltAllowAugmentPvPItems = false + # --------------------------------------------------------------------------- # Karma # --------------------------------------------------------------------------- @@ -467,6 +496,7 @@ CastleZoneFameAquirePoints = 1250 # Default: True FameForDeadPlayers = True + # --------------------------------------------------------------------------- # Crafting # --------------------------------------------------------------------------- @@ -513,6 +543,7 @@ AltBlacksmithUseRecipes = True # Default: False StoreRecipeShopList = False + # --------------------------------------------------------------------------- # Clan # --------------------------------------------------------------------------- @@ -619,6 +650,7 @@ StartingLevel = 1 # Default: 0 StartingSP = 0 + # --------------------------------------------------------------------------- # Other Settings: # --------------------------------------------------------------------------- @@ -780,6 +812,7 @@ SilenceModeExclude = False # Default: True GoDVideoIntro = True + # --------------------------------------------------------------------------- # Ability Settings: # --------------------------------------------------------------------------- diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/areas/TalkingIsland/Hardin/Hardin.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/areas/TalkingIsland/Hardin/Hardin.java index da10951782..702d61e759 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/areas/TalkingIsland/Hardin/Hardin.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/areas/TalkingIsland/Hardin/Hardin.java @@ -16,6 +16,7 @@ */ package ai.areas.TalkingIsland.Hardin; +import com.l2jmobius.Config; import com.l2jmobius.gameserver.data.xml.impl.ClassListData; import com.l2jmobius.gameserver.data.xml.impl.SkillData; import com.l2jmobius.gameserver.data.xml.impl.SkillTreesData; @@ -47,11 +48,6 @@ public final class Hardin extends AbstractNpcAI private static final int CHAOS_ESSENCE_DUAL_CLASS = 37494; private static final int CHAOS_POMANDER = 37374; private static final int CHAOS_POMANDER_DUAL_CLASS = 37375; - // Enable changing to other non related classes as well. - private static final boolean ENABLE_ALL_RACES = false; // Will change player race as well! - private static final boolean ENABLE_ALL_SPECS = false; // Will disable mage/fighter check! - private static final boolean ENABLE_DUALCLASS_CHECKS = true; // Will enable above checks for dual class. - private static final boolean ENABLE_ERTHEIAS = false; // Enable Hardin for Ertheias as well. private Hardin() { @@ -59,7 +55,6 @@ public final class Hardin extends AbstractNpcAI addFirstTalkId(HARDIN); } - @SuppressWarnings("unused") @Override public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) { @@ -74,17 +69,20 @@ public final class Hardin extends AbstractNpcAI StringBuilder classes = new StringBuilder(); for (ClassId c : ClassId.values()) { - if ((((c.level() != 4) && (c.getRace() != Race.ERTHEIA)) || (ENABLE_ERTHEIAS && (c.getRace() == Race.ERTHEIA) && (c.level() != 3))) || (!ENABLE_ERTHEIAS && (c.getRace() == Race.ERTHEIA)) || (c == player.getClassId())) + if ((((c.level() != 4) && (c.getRace() != Race.ERTHEIA)) // + || (Config.HARDIN_ENABLE_ERTHEIAS && (c.getRace() == Race.ERTHEIA) && (c.level() != 3))) // + || (!Config.HARDIN_ENABLE_ERTHEIAS && (c.getRace() == Race.ERTHEIA)) // + || (c == player.getClassId())) { continue; } - if (!player.isDualClassActive() || (player.isDualClassActive() && ENABLE_DUALCLASS_CHECKS)) + if (!player.isDualClassActive() || (player.isDualClassActive() && Config.HARDIN_ENABLE_DUALCLASS_CHECKS)) { - if (!ENABLE_ALL_RACES && (c.getRace() != player.getClassId().getRace())) + if (!Config.HARDIN_ENABLE_ALL_RACES && (c.getRace() != player.getClassId().getRace())) { continue; } - if (!ENABLE_ALL_SPECS && (c.isMage() != player.isMageClass())) + if (!Config.HARDIN_ENABLE_ALL_SPECS && (c.isMage() != player.isMageClass())) { continue; } @@ -103,17 +101,17 @@ public final class Hardin extends AbstractNpcAI } else if (event.contains("try")) { - // take item + // Take item takeItems(player, player.isDualClassActive() ? CHAOS_ESSENCE_DUAL_CLASS : CHAOS_ESSENCE, 1); - // give item + // Give item giveItems(player, player.isDualClassActive() ? CHAOS_POMANDER_DUAL_CLASS : CHAOS_POMANDER, 1); - // ertheias can only be female + // Ertheias can only be female final ClassId newClass = ClassId.getClassId(Integer.parseInt(event.replace("try_", ""))); if ((newClass.getRace() == Race.ERTHEIA) && (player.getClassId().getRace() != Race.ERTHEIA) && !player.getAppearance().getSex()) { player.getAppearance().setSex(true); } - // change class + // Change class player.setClassId(newClass.getId()); if (player.isDualClassActive()) { @@ -123,7 +121,7 @@ public final class Hardin extends AbstractNpcAI { player.setBaseClass(player.getActiveClass()); } - // adjustments + // Adjustments SkillTreesData.getInstance().cleanSkillUponAwakening(player); for (L2SkillLearn skill : SkillTreesData.getInstance().getRaceSkillTree(player.getRace())) { @@ -154,7 +152,7 @@ public final class Hardin extends AbstractNpcAI { return "33870-03.html"; } - if (!ENABLE_ERTHEIAS) + if (!Config.HARDIN_ENABLE_ERTHEIAS) { return "33870-02.html"; } 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 3bd48421fc..5e03ea7cc7 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/Config.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/Config.java @@ -772,6 +772,14 @@ public final class Config public static int MMO_HELPER_BUFFER_COUNT; public static boolean MMO_TCP_NODELAY; + // -------------------------------------------------- + // Hardin (Agent of Chaos) + // -------------------------------------------------- + public static boolean HARDIN_ENABLE_ALL_RACES; + public static boolean HARDIN_ENABLE_ALL_SPECS; + public static boolean HARDIN_ENABLE_DUALCLASS_CHECKS; + public static boolean HARDIN_ENABLE_ERTHEIAS; + // -------------------------------------------------- // Vitality Settings // -------------------------------------------------- @@ -1451,6 +1459,10 @@ public final class Config FEE_DELETE_SUBCLASS_SKILLS = Character.getInt("FeeDeleteSubClassSkills", 10000000); FEE_DELETE_DUALCLASS_SKILLS = Character.getInt("FeeDeleteDualClassSkills", 20000000); ENABLE_VITALITY = Character.getBoolean("EnableVitality", true); + HARDIN_ENABLE_ALL_RACES = Character.getBoolean("HardinEnableAllRaces", false); + HARDIN_ENABLE_ALL_SPECS = Character.getBoolean("HardinEnableAllSpecs", false); + HARDIN_ENABLE_DUALCLASS_CHECKS = Character.getBoolean("HardinEnableDualClassChecks", true); + HARDIN_ENABLE_ERTHEIAS = Character.getBoolean("HardinEnableErtheias", false); STARTING_VITALITY_POINTS = Character.getInt("StartingVitalityPoints", 140000); MAX_BONUS_EXP = Character.getDouble("MaxExpBonus", 0); MAX_BONUS_SP = Character.getDouble("MaxSpBonus", 0);