diff --git a/trunk/dist/game/config/Custom.properties b/trunk/dist/game/config/Custom.properties index de56e6e343..60d841f809 100644 --- a/trunk/dist/game/config/Custom.properties +++ b/trunk/dist/game/config/Custom.properties @@ -492,6 +492,7 @@ DualboxCheckMaxL2EventParticipantsPerIP = 0 # Default: 127.0.0.1,0 (no limits from localhost) DualboxCheckWhitelist = 127.0.0.1,0 + # --------------------------------------------------------------------------- # Password Change # --------------------------------------------------------------------------- @@ -505,4 +506,19 @@ AllowChangePassword = False # For example, if chance is 230% when rate are applied, it will do : # amount dropped = (2 * getRandomAmount(min,max)) + 30% chance to get ad additional getRandomAmount(min,max) # Default : False -OldDropBehavior = False \ No newline at end of file +OldDropBehavior = False + + +# --------------------------------------------------------------------------- +# Custom Starting Location +# --------------------------------------------------------------------------- + +# Enable custom starting location +# Default: False +CustomStartingLocation = False + +# Coordinates for custom starting location +# Default: 50821, 186527, -3625 (Giran Harbor) +CustomStartingLocX = 50821 +CustomStartingLocY = 186527 +CustomStartingLocZ = -3625 diff --git a/trunk/java/com/l2jserver/Config.java b/trunk/java/com/l2jserver/Config.java index 427578aa15..802045ba71 100644 --- a/trunk/java/com/l2jserver/Config.java +++ b/trunk/java/com/l2jserver/Config.java @@ -681,6 +681,7 @@ public final class Config public static FloodProtectorConfig FLOOD_PROTECTOR_SENDMAIL; public static FloodProtectorConfig FLOOD_PROTECTOR_CHARACTER_SELECT; public static FloodProtectorConfig FLOOD_PROTECTOR_ITEM_AUCTION; + // -------------------------------------------------- // Custom Settings // -------------------------------------------------- @@ -789,6 +790,11 @@ public final class Config public static Map L2JMOD_DUALBOX_CHECK_WHITELIST; public static boolean L2JMOD_ALLOW_CHANGE_PASSWORD; public static boolean L2JMOD_OLD_DROP_BEHAVIOR; + public static boolean CUSTOM_STARTING_LOC; + public static int CUSTOM_STARTING_LOC_X; + public static int CUSTOM_STARTING_LOC_Y; + public static int CUSTOM_STARTING_LOC_Z; + // -------------------------------------------------- // NPC Settings // -------------------------------------------------- @@ -2537,6 +2543,11 @@ public final class Config } L2JMOD_ALLOW_CHANGE_PASSWORD = CustomSettings.getBoolean("AllowChangePassword", false); + CUSTOM_STARTING_LOC = CustomSettings.getBoolean("CustomStartingLocation", false); + CUSTOM_STARTING_LOC_X = CustomSettings.getInt("CustomStartingLocX", 50821); + CUSTOM_STARTING_LOC_Y = CustomSettings.getInt("CustomStartingLocY", 186527); + CUSTOM_STARTING_LOC_Z = CustomSettings.getInt("CustomStartingLocZ", -3625); + // Load PvP L2Properties file (if exists) final PropertiesParser PVPSettings = new PropertiesParser(PVP_CONFIG_FILE); diff --git a/trunk/java/com/l2jserver/gameserver/network/clientpackets/CharacterCreate.java b/trunk/java/com/l2jserver/gameserver/network/clientpackets/CharacterCreate.java index bff946c34f..ca5bf93456 100644 --- a/trunk/java/com/l2jserver/gameserver/network/clientpackets/CharacterCreate.java +++ b/trunk/java/com/l2jserver/gameserver/network/clientpackets/CharacterCreate.java @@ -233,8 +233,17 @@ public final class CharacterCreate extends L2GameClientPacket } final L2PcTemplate template = newChar.getTemplate(); - Location createLoc = template.getCreationPoint(); - newChar.setXYZInvisible(createLoc.getX(), createLoc.getY(), createLoc.getZ()); + + if (Config.CUSTOM_STARTING_LOC) + { + Location createLoc = new Location(Config.CUSTOM_STARTING_LOC_X, Config.CUSTOM_STARTING_LOC_Y, Config.CUSTOM_STARTING_LOC_Z); + newChar.setXYZInvisible(createLoc.getX(), createLoc.getY(), createLoc.getZ()); + } + else + { + Location createLoc = template.getCreationPoint(); + newChar.setXYZInvisible(createLoc.getX(), createLoc.getY(), createLoc.getZ()); + } newChar.setTitle(""); if (Config.ENABLE_VITALITY)