Noticias:

Debes de estar registrado para poder ver el contenido indicado. Registrate o Conectate

Menú Principal

Anty GK in mode Flag

Iniciado por Swarlog, Ago 19, 2022, 01:32 AM

Tema anterior - Siguiente tema

Swarlog

Index: /java/config/Character.properties
===================================================================
--- /java/config/Character.properties (revision 2771)
+++ /java/config/Character.properties (working copy)
@@ -375,6 +375,8 @@
# Retail: true
AltKarmaPlayerCanUseWareHouse = True

+AltFlagedPlayerCanUseGK = True
+
#============================================================#
#                          Craft                            #
#============================================================#
Index: /java/net/sf/l2j/Config.java
===================================================================
--- /java/net/sf/l2j/Config.java (revision 2771)
+++ /java/net/sf/l2j/Config.java (working copy)
@@ -154,6 +154,7 @@
    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_FLAGED_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 boolean IS_CRAFTING_ENABLED;
@@ -1330,6 +1331,7 @@
                ALT_GAME_KARMA_PLAYER_CAN_SHOP = Boolean.parseBoolean(Character.getProperty("AltKarmaPlayerCanShop", "true"));
                ALT_GAME_KARMA_PLAYER_CAN_TELEPORT = Boolean.parseBoolean(Character.getProperty("AltKarmaPlayerCanTeleport", "true"));
                ALT_GAME_KARMA_PLAYER_CAN_USE_GK = Boolean.parseBoolean(Character.getProperty("AltKarmaPlayerCanUseGK", "false"));
+                 ALT_GAME_FLAGED_PLAYER_CAN_USE_GK = Boolean.parseBoolean(Character.getProperty("AltFlagedPlayerCanUseGK", "false"));
                ALT_GAME_KARMA_PLAYER_CAN_TRADE = Boolean.parseBoolean(Character.getProperty("AltKarmaPlayerCanTrade", "true"));
                ALT_GAME_KARMA_PLAYER_CAN_USE_WAREHOUSE = Boolean.parseBoolean(Character.getProperty("AltKarmaPlayerCanUseWareHouse", "true"));
                IS_CRAFTING_ENABLED = Boolean.parseBoolean(Character.getProperty("CraftingEnabled", "true"));
@@ -2269,6 +2271,7 @@
        else if (pName.equalsIgnoreCase("AltKarmaPlayerCanShop")) ALT_GAME_KARMA_PLAYER_CAN_SHOP = Boolean.parseBoolean(pValue);
        else if (pName.equalsIgnoreCase("AltKarmaPlayerCanUseGK")) ALT_GAME_KARMA_PLAYER_CAN_USE_GK = Boolean.parseBoolean(pValue);
        else if (pName.equalsIgnoreCase("AltKarmaPlayerCanTeleport")) ALT_GAME_KARMA_PLAYER_CAN_TELEPORT = Boolean.parseBoolean(pValue);
+        else if (pName.equalsIgnoreCase("AltFlagedPlayerCanUseGK")) ALT_GAME_FLAGED_PLAYER_CAN_USE_GK = Boolean.parseBoolean(pValue);
        else if (pName.equalsIgnoreCase("AltKarmaPlayerCanTrade")) ALT_GAME_KARMA_PLAYER_CAN_TRADE = Boolean.parseBoolean(pValue);
        else if (pName.equalsIgnoreCase("AltKarmaPlayerCanUseWareHouse")) ALT_GAME_KARMA_PLAYER_CAN_USE_WAREHOUSE = Boolean.parseBoolean(pValue);
        else if (pName.equalsIgnoreCase("AltCastleForDawn")) ALT_GAME_CASTLE_DAWN = Boolean.parseBoolean(pValue);
Index: /java/net/sf/l2j/gameserver/model/actor/instance/L2TeleporterInstance.java
===================================================================
--- /java/net/sf/l2j/gameserver/model/actor/instance/L2TeleporterInstance.java (revision 2771)
+++ /java/net/sf/l2j/gameserver/model/actor/instance/L2TeleporterInstance.java (working copy)
@@ -227,6 +227,13 @@
player.sendPacket(new SystemMessage(SystemMessageId.NO_PORT_THAT_IS_IN_SIGE));
return;
}
+
+ else if (!Config.ALT_GAME_FLAGED_PLAYER_CAN_USE_GK && player.getPvpFlag() > 0)
+ {
+ player.sendMessage("Don't run from PvP!");
+ return;
+ }