Custom starting location.

This commit is contained in:
mobius 2015-01-02 08:26:23 +00:00
parent 083c98bca6
commit bb13c3a3c5
3 changed files with 39 additions and 3 deletions

View File

@ -492,6 +492,7 @@ DualboxCheckMaxL2EventParticipantsPerIP = 0
# Default: 127.0.0.1,0 (no limits from localhost) # Default: 127.0.0.1,0 (no limits from localhost)
DualboxCheckWhitelist = 127.0.0.1,0 DualboxCheckWhitelist = 127.0.0.1,0
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
# Password Change # Password Change
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
@ -506,3 +507,18 @@ AllowChangePassword = False
# amount dropped = (2 * getRandomAmount(min,max)) + 30% chance to get ad additional getRandomAmount(min,max) # amount dropped = (2 * getRandomAmount(min,max)) + 30% chance to get ad additional getRandomAmount(min,max)
# Default : False # Default : False
OldDropBehavior = False 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

View File

@ -681,6 +681,7 @@ public final class Config
public static FloodProtectorConfig FLOOD_PROTECTOR_SENDMAIL; public static FloodProtectorConfig FLOOD_PROTECTOR_SENDMAIL;
public static FloodProtectorConfig FLOOD_PROTECTOR_CHARACTER_SELECT; public static FloodProtectorConfig FLOOD_PROTECTOR_CHARACTER_SELECT;
public static FloodProtectorConfig FLOOD_PROTECTOR_ITEM_AUCTION; public static FloodProtectorConfig FLOOD_PROTECTOR_ITEM_AUCTION;
// -------------------------------------------------- // --------------------------------------------------
// Custom Settings // Custom Settings
// -------------------------------------------------- // --------------------------------------------------
@ -789,6 +790,11 @@ public final class Config
public static Map<Integer, Integer> L2JMOD_DUALBOX_CHECK_WHITELIST; public static Map<Integer, Integer> L2JMOD_DUALBOX_CHECK_WHITELIST;
public static boolean L2JMOD_ALLOW_CHANGE_PASSWORD; public static boolean L2JMOD_ALLOW_CHANGE_PASSWORD;
public static boolean L2JMOD_OLD_DROP_BEHAVIOR; 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 // NPC Settings
// -------------------------------------------------- // --------------------------------------------------
@ -2537,6 +2543,11 @@ public final class Config
} }
L2JMOD_ALLOW_CHANGE_PASSWORD = CustomSettings.getBoolean("AllowChangePassword", false); 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) // Load PvP L2Properties file (if exists)
final PropertiesParser PVPSettings = new PropertiesParser(PVP_CONFIG_FILE); final PropertiesParser PVPSettings = new PropertiesParser(PVP_CONFIG_FILE);

View File

@ -233,8 +233,17 @@ public final class CharacterCreate extends L2GameClientPacket
} }
final L2PcTemplate template = newChar.getTemplate(); 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(""); newChar.setTitle("");
if (Config.ENABLE_VITALITY) if (Config.ENABLE_VITALITY)