diff --git a/L2J_Mobius_Classic/dist/game/config/Character.ini b/L2J_Mobius_Classic/dist/game/config/Character.ini index 1ee0424185..6a53d2b2c6 100644 --- a/L2J_Mobius_Classic/dist/game/config/Character.ini +++ b/L2J_Mobius_Classic/dist/game/config/Character.ini @@ -700,6 +700,10 @@ MaxPetitionsPending = 25 # Default: False AltFreeTeleporting = False +# Max player level for free teleporting around the world. +# Default: 0 (Disabled) +MaxFreeTeleportLevel = 0 + # Allow character deletion after days set below. To disallow character deletion, set this equal to 0. # Default: 1 DeleteCharAfterDays = 1 diff --git a/L2J_Mobius_Classic/java/com/l2jmobius/Config.java b/L2J_Mobius_Classic/java/com/l2jmobius/Config.java index c43696d1e1..ae83233831 100644 --- a/L2J_Mobius_Classic/java/com/l2jmobius/Config.java +++ b/L2J_Mobius_Classic/java/com/l2jmobius/Config.java @@ -272,6 +272,7 @@ public final class Config public static int MAX_PETITIONS_PER_PLAYER; public static int MAX_PETITIONS_PENDING; public static boolean ALT_GAME_FREE_TELEPORT; + public static int MAX_FREE_TELEPORT_LEVEL; public static int DELETE_DAYS; public static String PARTY_XP_CUTOFF_METHOD; public static double PARTY_XP_CUTOFF_PERCENT; @@ -1623,6 +1624,7 @@ public final class Config MAX_PETITIONS_PER_PLAYER = Character.getInt("MaxPetitionsPerPlayer", 5); MAX_PETITIONS_PENDING = Character.getInt("MaxPetitionsPending", 25); ALT_GAME_FREE_TELEPORT = Character.getBoolean("AltFreeTeleporting", false); + MAX_FREE_TELEPORT_LEVEL = Character.getInt("MaxFreeTeleportLevel", 0); DELETE_DAYS = Character.getInt("DeleteCharAfterDays", 1); PARTY_XP_CUTOFF_METHOD = Character.getString("PartyXpCutoffMethod", "level").toLowerCase(); PARTY_XP_CUTOFF_PERCENT = Character.getDouble("PartyXpCutoffPercent", 3); diff --git a/L2J_Mobius_Classic/java/com/l2jmobius/gameserver/model/actor/instance/L2TeleporterInstance.java b/L2J_Mobius_Classic/java/com/l2jmobius/gameserver/model/actor/instance/L2TeleporterInstance.java index e2554c802e..e196b08b64 100644 --- a/L2J_Mobius_Classic/java/com/l2jmobius/gameserver/model/actor/instance/L2TeleporterInstance.java +++ b/L2J_Mobius_Classic/java/com/l2jmobius/gameserver/model/actor/instance/L2TeleporterInstance.java @@ -228,7 +228,7 @@ public final class L2TeleporterInstance extends L2Npc { if (type == TeleportType.NORMAL) { - if (!player.isSubClassActive() && (player.getLevel() < 77)) + if (!player.isSubClassActive() && (player.getLevel() < (Config.MAX_FREE_TELEPORT_LEVEL + 1))) { return 0; } @@ -246,7 +246,7 @@ public final class L2TeleporterInstance extends L2Npc protected boolean shouldPayFee(L2PcInstance player, TeleportType type, TeleportLocation loc) { - return (!Config.ALT_GAME_FREE_TELEPORT && ((player.getLevel() > 76) || player.isSubClassActive()) && ((loc.getFeeId() != 0) && (loc.getFeeCount() > 0))); + return (!Config.ALT_GAME_FREE_TELEPORT && ((player.getLevel() > Config.MAX_FREE_TELEPORT_LEVEL) || player.isSubClassActive()) && ((loc.getFeeId() != 0) && (loc.getFeeCount() > 0))); } protected int parseNextInt(StringTokenizer st, int defaultVal) diff --git a/L2J_Mobius_Helios/dist/game/config/Character.ini b/L2J_Mobius_Helios/dist/game/config/Character.ini index 35bb294910..a717d4a259 100644 --- a/L2J_Mobius_Helios/dist/game/config/Character.ini +++ b/L2J_Mobius_Helios/dist/game/config/Character.ini @@ -700,6 +700,10 @@ MaxPetitionsPending = 25 # Default: False AltFreeTeleporting = False +# Max player level for free teleporting around the world. +# Default: 76 +MaxFreeTeleportLevel = 76 + # Allow character deletion after days set below. To disallow character deletion, set this equal to 0. # Default: 1 DeleteCharAfterDays = 1 diff --git a/L2J_Mobius_Helios/java/com/l2jmobius/Config.java b/L2J_Mobius_Helios/java/com/l2jmobius/Config.java index ed4999ff39..cbe9c11797 100644 --- a/L2J_Mobius_Helios/java/com/l2jmobius/Config.java +++ b/L2J_Mobius_Helios/java/com/l2jmobius/Config.java @@ -272,6 +272,7 @@ public final class Config public static int MAX_PETITIONS_PER_PLAYER; public static int MAX_PETITIONS_PENDING; public static boolean ALT_GAME_FREE_TELEPORT; + public static int MAX_FREE_TELEPORT_LEVEL; public static int DELETE_DAYS; public static String PARTY_XP_CUTOFF_METHOD; public static double PARTY_XP_CUTOFF_PERCENT; @@ -1623,6 +1624,7 @@ public final class Config MAX_PETITIONS_PER_PLAYER = Character.getInt("MaxPetitionsPerPlayer", 5); MAX_PETITIONS_PENDING = Character.getInt("MaxPetitionsPending", 25); ALT_GAME_FREE_TELEPORT = Character.getBoolean("AltFreeTeleporting", false); + MAX_FREE_TELEPORT_LEVEL = Character.getInt("MaxFreeTeleportLevel", 76); DELETE_DAYS = Character.getInt("DeleteCharAfterDays", 1); PARTY_XP_CUTOFF_METHOD = Character.getString("PartyXpCutoffMethod", "level").toLowerCase(); PARTY_XP_CUTOFF_PERCENT = Character.getDouble("PartyXpCutoffPercent", 3); diff --git a/L2J_Mobius_Helios/java/com/l2jmobius/gameserver/model/actor/instance/L2TeleporterInstance.java b/L2J_Mobius_Helios/java/com/l2jmobius/gameserver/model/actor/instance/L2TeleporterInstance.java index e2554c802e..e196b08b64 100644 --- a/L2J_Mobius_Helios/java/com/l2jmobius/gameserver/model/actor/instance/L2TeleporterInstance.java +++ b/L2J_Mobius_Helios/java/com/l2jmobius/gameserver/model/actor/instance/L2TeleporterInstance.java @@ -228,7 +228,7 @@ public final class L2TeleporterInstance extends L2Npc { if (type == TeleportType.NORMAL) { - if (!player.isSubClassActive() && (player.getLevel() < 77)) + if (!player.isSubClassActive() && (player.getLevel() < (Config.MAX_FREE_TELEPORT_LEVEL + 1))) { return 0; } @@ -246,7 +246,7 @@ public final class L2TeleporterInstance extends L2Npc protected boolean shouldPayFee(L2PcInstance player, TeleportType type, TeleportLocation loc) { - return (!Config.ALT_GAME_FREE_TELEPORT && ((player.getLevel() > 76) || player.isSubClassActive()) && ((loc.getFeeId() != 0) && (loc.getFeeCount() > 0))); + return (!Config.ALT_GAME_FREE_TELEPORT && ((player.getLevel() > Config.MAX_FREE_TELEPORT_LEVEL) || player.isSubClassActive()) && ((loc.getFeeId() != 0) && (loc.getFeeCount() > 0))); } protected int parseNextInt(StringTokenizer st, int defaultVal) diff --git a/L2J_Mobius_Underground/dist/game/config/Character.ini b/L2J_Mobius_Underground/dist/game/config/Character.ini index 35bb294910..a717d4a259 100644 --- a/L2J_Mobius_Underground/dist/game/config/Character.ini +++ b/L2J_Mobius_Underground/dist/game/config/Character.ini @@ -700,6 +700,10 @@ MaxPetitionsPending = 25 # Default: False AltFreeTeleporting = False +# Max player level for free teleporting around the world. +# Default: 76 +MaxFreeTeleportLevel = 76 + # Allow character deletion after days set below. To disallow character deletion, set this equal to 0. # Default: 1 DeleteCharAfterDays = 1 diff --git a/L2J_Mobius_Underground/java/com/l2jmobius/Config.java b/L2J_Mobius_Underground/java/com/l2jmobius/Config.java index ed4999ff39..cbe9c11797 100644 --- a/L2J_Mobius_Underground/java/com/l2jmobius/Config.java +++ b/L2J_Mobius_Underground/java/com/l2jmobius/Config.java @@ -272,6 +272,7 @@ public final class Config public static int MAX_PETITIONS_PER_PLAYER; public static int MAX_PETITIONS_PENDING; public static boolean ALT_GAME_FREE_TELEPORT; + public static int MAX_FREE_TELEPORT_LEVEL; public static int DELETE_DAYS; public static String PARTY_XP_CUTOFF_METHOD; public static double PARTY_XP_CUTOFF_PERCENT; @@ -1623,6 +1624,7 @@ public final class Config MAX_PETITIONS_PER_PLAYER = Character.getInt("MaxPetitionsPerPlayer", 5); MAX_PETITIONS_PENDING = Character.getInt("MaxPetitionsPending", 25); ALT_GAME_FREE_TELEPORT = Character.getBoolean("AltFreeTeleporting", false); + MAX_FREE_TELEPORT_LEVEL = Character.getInt("MaxFreeTeleportLevel", 76); DELETE_DAYS = Character.getInt("DeleteCharAfterDays", 1); PARTY_XP_CUTOFF_METHOD = Character.getString("PartyXpCutoffMethod", "level").toLowerCase(); PARTY_XP_CUTOFF_PERCENT = Character.getDouble("PartyXpCutoffPercent", 3); diff --git a/L2J_Mobius_Underground/java/com/l2jmobius/gameserver/model/actor/instance/L2TeleporterInstance.java b/L2J_Mobius_Underground/java/com/l2jmobius/gameserver/model/actor/instance/L2TeleporterInstance.java index e2554c802e..e196b08b64 100644 --- a/L2J_Mobius_Underground/java/com/l2jmobius/gameserver/model/actor/instance/L2TeleporterInstance.java +++ b/L2J_Mobius_Underground/java/com/l2jmobius/gameserver/model/actor/instance/L2TeleporterInstance.java @@ -228,7 +228,7 @@ public final class L2TeleporterInstance extends L2Npc { if (type == TeleportType.NORMAL) { - if (!player.isSubClassActive() && (player.getLevel() < 77)) + if (!player.isSubClassActive() && (player.getLevel() < (Config.MAX_FREE_TELEPORT_LEVEL + 1))) { return 0; } @@ -246,7 +246,7 @@ public final class L2TeleporterInstance extends L2Npc protected boolean shouldPayFee(L2PcInstance player, TeleportType type, TeleportLocation loc) { - return (!Config.ALT_GAME_FREE_TELEPORT && ((player.getLevel() > 76) || player.isSubClassActive()) && ((loc.getFeeId() != 0) && (loc.getFeeCount() > 0))); + return (!Config.ALT_GAME_FREE_TELEPORT && ((player.getLevel() > Config.MAX_FREE_TELEPORT_LEVEL) || player.isSubClassActive()) && ((loc.getFeeId() != 0) && (loc.getFeeCount() > 0))); } protected int parseNextInt(StringTokenizer st, int defaultVal)