Config for max player free teleport level.
This commit is contained in:
@ -700,6 +700,10 @@ MaxPetitionsPending = 25
|
|||||||
# Default: False
|
# Default: False
|
||||||
AltFreeTeleporting = 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.
|
# Allow character deletion after days set below. To disallow character deletion, set this equal to 0.
|
||||||
# Default: 1
|
# Default: 1
|
||||||
DeleteCharAfterDays = 1
|
DeleteCharAfterDays = 1
|
||||||
|
@ -272,6 +272,7 @@ public final class Config
|
|||||||
public static int MAX_PETITIONS_PER_PLAYER;
|
public static int MAX_PETITIONS_PER_PLAYER;
|
||||||
public static int MAX_PETITIONS_PENDING;
|
public static int MAX_PETITIONS_PENDING;
|
||||||
public static boolean ALT_GAME_FREE_TELEPORT;
|
public static boolean ALT_GAME_FREE_TELEPORT;
|
||||||
|
public static int MAX_FREE_TELEPORT_LEVEL;
|
||||||
public static int DELETE_DAYS;
|
public static int DELETE_DAYS;
|
||||||
public static String PARTY_XP_CUTOFF_METHOD;
|
public static String PARTY_XP_CUTOFF_METHOD;
|
||||||
public static double PARTY_XP_CUTOFF_PERCENT;
|
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_PER_PLAYER = Character.getInt("MaxPetitionsPerPlayer", 5);
|
||||||
MAX_PETITIONS_PENDING = Character.getInt("MaxPetitionsPending", 25);
|
MAX_PETITIONS_PENDING = Character.getInt("MaxPetitionsPending", 25);
|
||||||
ALT_GAME_FREE_TELEPORT = Character.getBoolean("AltFreeTeleporting", false);
|
ALT_GAME_FREE_TELEPORT = Character.getBoolean("AltFreeTeleporting", false);
|
||||||
|
MAX_FREE_TELEPORT_LEVEL = Character.getInt("MaxFreeTeleportLevel", 0);
|
||||||
DELETE_DAYS = Character.getInt("DeleteCharAfterDays", 1);
|
DELETE_DAYS = Character.getInt("DeleteCharAfterDays", 1);
|
||||||
PARTY_XP_CUTOFF_METHOD = Character.getString("PartyXpCutoffMethod", "level").toLowerCase();
|
PARTY_XP_CUTOFF_METHOD = Character.getString("PartyXpCutoffMethod", "level").toLowerCase();
|
||||||
PARTY_XP_CUTOFF_PERCENT = Character.getDouble("PartyXpCutoffPercent", 3);
|
PARTY_XP_CUTOFF_PERCENT = Character.getDouble("PartyXpCutoffPercent", 3);
|
||||||
|
@ -228,7 +228,7 @@ public final class L2TeleporterInstance extends L2Npc
|
|||||||
{
|
{
|
||||||
if (type == TeleportType.NORMAL)
|
if (type == TeleportType.NORMAL)
|
||||||
{
|
{
|
||||||
if (!player.isSubClassActive() && (player.getLevel() < 77))
|
if (!player.isSubClassActive() && (player.getLevel() < (Config.MAX_FREE_TELEPORT_LEVEL + 1)))
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -246,7 +246,7 @@ public final class L2TeleporterInstance extends L2Npc
|
|||||||
|
|
||||||
protected boolean shouldPayFee(L2PcInstance player, TeleportType type, TeleportLocation loc)
|
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)
|
protected int parseNextInt(StringTokenizer st, int defaultVal)
|
||||||
|
@ -700,6 +700,10 @@ MaxPetitionsPending = 25
|
|||||||
# Default: False
|
# Default: False
|
||||||
AltFreeTeleporting = 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.
|
# Allow character deletion after days set below. To disallow character deletion, set this equal to 0.
|
||||||
# Default: 1
|
# Default: 1
|
||||||
DeleteCharAfterDays = 1
|
DeleteCharAfterDays = 1
|
||||||
|
@ -272,6 +272,7 @@ public final class Config
|
|||||||
public static int MAX_PETITIONS_PER_PLAYER;
|
public static int MAX_PETITIONS_PER_PLAYER;
|
||||||
public static int MAX_PETITIONS_PENDING;
|
public static int MAX_PETITIONS_PENDING;
|
||||||
public static boolean ALT_GAME_FREE_TELEPORT;
|
public static boolean ALT_GAME_FREE_TELEPORT;
|
||||||
|
public static int MAX_FREE_TELEPORT_LEVEL;
|
||||||
public static int DELETE_DAYS;
|
public static int DELETE_DAYS;
|
||||||
public static String PARTY_XP_CUTOFF_METHOD;
|
public static String PARTY_XP_CUTOFF_METHOD;
|
||||||
public static double PARTY_XP_CUTOFF_PERCENT;
|
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_PER_PLAYER = Character.getInt("MaxPetitionsPerPlayer", 5);
|
||||||
MAX_PETITIONS_PENDING = Character.getInt("MaxPetitionsPending", 25);
|
MAX_PETITIONS_PENDING = Character.getInt("MaxPetitionsPending", 25);
|
||||||
ALT_GAME_FREE_TELEPORT = Character.getBoolean("AltFreeTeleporting", false);
|
ALT_GAME_FREE_TELEPORT = Character.getBoolean("AltFreeTeleporting", false);
|
||||||
|
MAX_FREE_TELEPORT_LEVEL = Character.getInt("MaxFreeTeleportLevel", 76);
|
||||||
DELETE_DAYS = Character.getInt("DeleteCharAfterDays", 1);
|
DELETE_DAYS = Character.getInt("DeleteCharAfterDays", 1);
|
||||||
PARTY_XP_CUTOFF_METHOD = Character.getString("PartyXpCutoffMethod", "level").toLowerCase();
|
PARTY_XP_CUTOFF_METHOD = Character.getString("PartyXpCutoffMethod", "level").toLowerCase();
|
||||||
PARTY_XP_CUTOFF_PERCENT = Character.getDouble("PartyXpCutoffPercent", 3);
|
PARTY_XP_CUTOFF_PERCENT = Character.getDouble("PartyXpCutoffPercent", 3);
|
||||||
|
@ -228,7 +228,7 @@ public final class L2TeleporterInstance extends L2Npc
|
|||||||
{
|
{
|
||||||
if (type == TeleportType.NORMAL)
|
if (type == TeleportType.NORMAL)
|
||||||
{
|
{
|
||||||
if (!player.isSubClassActive() && (player.getLevel() < 77))
|
if (!player.isSubClassActive() && (player.getLevel() < (Config.MAX_FREE_TELEPORT_LEVEL + 1)))
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -246,7 +246,7 @@ public final class L2TeleporterInstance extends L2Npc
|
|||||||
|
|
||||||
protected boolean shouldPayFee(L2PcInstance player, TeleportType type, TeleportLocation loc)
|
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)
|
protected int parseNextInt(StringTokenizer st, int defaultVal)
|
||||||
|
@ -700,6 +700,10 @@ MaxPetitionsPending = 25
|
|||||||
# Default: False
|
# Default: False
|
||||||
AltFreeTeleporting = 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.
|
# Allow character deletion after days set below. To disallow character deletion, set this equal to 0.
|
||||||
# Default: 1
|
# Default: 1
|
||||||
DeleteCharAfterDays = 1
|
DeleteCharAfterDays = 1
|
||||||
|
@ -272,6 +272,7 @@ public final class Config
|
|||||||
public static int MAX_PETITIONS_PER_PLAYER;
|
public static int MAX_PETITIONS_PER_PLAYER;
|
||||||
public static int MAX_PETITIONS_PENDING;
|
public static int MAX_PETITIONS_PENDING;
|
||||||
public static boolean ALT_GAME_FREE_TELEPORT;
|
public static boolean ALT_GAME_FREE_TELEPORT;
|
||||||
|
public static int MAX_FREE_TELEPORT_LEVEL;
|
||||||
public static int DELETE_DAYS;
|
public static int DELETE_DAYS;
|
||||||
public static String PARTY_XP_CUTOFF_METHOD;
|
public static String PARTY_XP_CUTOFF_METHOD;
|
||||||
public static double PARTY_XP_CUTOFF_PERCENT;
|
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_PER_PLAYER = Character.getInt("MaxPetitionsPerPlayer", 5);
|
||||||
MAX_PETITIONS_PENDING = Character.getInt("MaxPetitionsPending", 25);
|
MAX_PETITIONS_PENDING = Character.getInt("MaxPetitionsPending", 25);
|
||||||
ALT_GAME_FREE_TELEPORT = Character.getBoolean("AltFreeTeleporting", false);
|
ALT_GAME_FREE_TELEPORT = Character.getBoolean("AltFreeTeleporting", false);
|
||||||
|
MAX_FREE_TELEPORT_LEVEL = Character.getInt("MaxFreeTeleportLevel", 76);
|
||||||
DELETE_DAYS = Character.getInt("DeleteCharAfterDays", 1);
|
DELETE_DAYS = Character.getInt("DeleteCharAfterDays", 1);
|
||||||
PARTY_XP_CUTOFF_METHOD = Character.getString("PartyXpCutoffMethod", "level").toLowerCase();
|
PARTY_XP_CUTOFF_METHOD = Character.getString("PartyXpCutoffMethod", "level").toLowerCase();
|
||||||
PARTY_XP_CUTOFF_PERCENT = Character.getDouble("PartyXpCutoffPercent", 3);
|
PARTY_XP_CUTOFF_PERCENT = Character.getDouble("PartyXpCutoffPercent", 3);
|
||||||
|
@ -228,7 +228,7 @@ public final class L2TeleporterInstance extends L2Npc
|
|||||||
{
|
{
|
||||||
if (type == TeleportType.NORMAL)
|
if (type == TeleportType.NORMAL)
|
||||||
{
|
{
|
||||||
if (!player.isSubClassActive() && (player.getLevel() < 77))
|
if (!player.isSubClassActive() && (player.getLevel() < (Config.MAX_FREE_TELEPORT_LEVEL + 1)))
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -246,7 +246,7 @@ public final class L2TeleporterInstance extends L2Npc
|
|||||||
|
|
||||||
protected boolean shouldPayFee(L2PcInstance player, TeleportType type, TeleportLocation loc)
|
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)
|
protected int parseNextInt(StringTokenizer st, int defaultVal)
|
||||||
|
Reference in New Issue
Block a user