Config to prohibit flagged players using gatekeepers.

This commit is contained in:
MobiusDev
2016-01-10 12:50:17 +00:00
parent d3423fdaea
commit df1d57add7
3 changed files with 17 additions and 1 deletions

View File

@ -501,6 +501,10 @@ AltKarmaPlayerCanBeKilledInPeaceZone = False
# Default: False
AltKarmaPlayerCanUseGK = False
# Flagged player can use GateKeeper.
# Default: True
AltFlaggedPlayerCanUseGK = True
# Karma player can use escape and recall skills.
# Default: True
AltKarmaPlayerCanTeleport = True

View File

@ -196,6 +196,7 @@ public final class Config
public static boolean ALT_GAME_KARMA_PLAYER_CAN_SHOP;
public static boolean ALT_GAME_KARMA_PLAYER_CAN_TELEPORT;
public static boolean ALT_GAME_KARMA_PLAYER_CAN_USE_GK;
public static boolean ALT_GAME_FLAGGED_PLAYER_CAN_USE_GK;
public static boolean ALT_GAME_KARMA_PLAYER_CAN_TRADE;
public static boolean ALT_GAME_KARMA_PLAYER_CAN_USE_WAREHOUSE;
public static int MAX_PERSONAL_FAME_POINTS;
@ -1618,6 +1619,7 @@ public final class Config
ALT_GAME_KARMA_PLAYER_CAN_SHOP = character.getBoolean("AltKarmaPlayerCanShop", true);
ALT_GAME_KARMA_PLAYER_CAN_TELEPORT = character.getBoolean("AltKarmaPlayerCanTeleport", true);
ALT_GAME_KARMA_PLAYER_CAN_USE_GK = character.getBoolean("AltKarmaPlayerCanUseGK", false);
ALT_GAME_FLAGGED_PLAYER_CAN_USE_GK = character.getBoolean("AltFlaggedPlayerCanUseGK", true);
ALT_GAME_KARMA_PLAYER_CAN_TRADE = character.getBoolean("AltKarmaPlayerCanTrade", true);
ALT_GAME_KARMA_PLAYER_CAN_USE_WAREHOUSE = character.getBoolean("AltKarmaPlayerCanUseWareHouse", true);
MAX_PERSONAL_FAME_POINTS = character.getInt("MaxPersonalFamePoints", 100000);

View File

@ -186,6 +186,11 @@ public final class L2TeleporterInstance extends L2Npc
{
player.sendMessage("Go away, you're not welcome here.");
}
else if (!Config.ALT_GAME_FLAGGED_PLAYER_CAN_USE_GK && (player.getPvpFlag() > 0))
{
player.sendMessage("I don't speak with angry people.");
return;
}
else if (player.isCombatFlagEquipped())
{
player.sendPacket(SystemMessageId.YOU_CANNOT_TELEPORT_WHILE_IN_POSSESSION_OF_A_WARD);
@ -522,11 +527,16 @@ public final class L2TeleporterInstance extends L2Npc
player.sendPacket(SystemMessageId.YOU_CANNOT_TELEPORT_TO_A_VILLAGE_THAT_IS_IN_A_SIEGE);
return;
}
else if (!Config.ALT_GAME_KARMA_PLAYER_CAN_USE_GK && (player.getReputation() < 0)) // karma
else if (!Config.ALT_GAME_KARMA_PLAYER_CAN_USE_GK && (player.getReputation() < 0))
{
player.sendMessage("Go away, you're not welcome here.");
return;
}
else if (!Config.ALT_GAME_FLAGGED_PLAYER_CAN_USE_GK && (player.getPvpFlag() > 0))
{
player.sendMessage("I don't speak with angry people.");
return;
}
else if (player.isCombatFlagEquipped())
{
player.sendPacket(SystemMessageId.YOU_CANNOT_TELEPORT_WHILE_IN_POSSESSION_OF_A_WARD);