Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Config.java
- =============================================================================================
- public static int KNOWNLIST_FORGET_DELAY;
- public static int MINIMUN_UPDATE_TIME;
- public static boolean BYPASS_VALIDATION;
- -
- + public static int AFK_TIMER;
- public static boolean HIGH_RATE_SERVER_DROPS;
- public static boolean FORCE_COMPLETE_STATUS_UPDATE;
- @@ -586,7 +586,7 @@
- final InputStream is = new FileInputStream(new File(OTHER));
- otherSettings.load(is);
- is.close();
- -
- + AFK_TIMER = Integer.parseInt(otherSettings.getProperty("TimerAFK", "10"));
- DEEPBLUE_DROP_RULES = Boolean.parseBoolean(otherSettings.getProperty("UseDeepBlueDropRules", "True"));
- ALLOW_GUARDS = Boolean.valueOf(otherSettings.getProperty("AllowGuards", "False"));
- EFFECT_CANCELING = Boolean.valueOf(otherSettings.getProperty("CancelLesserEffect", "True"));
- =============================================================================================
- AdminCreateItem.java
- =============================================================================================
- @@ -357,7 +357,7 @@
- activeChar.setTarget(activeChar);
- Player = activeChar;
- }
- -
- + if (!activeChar.isAFK())
- Player.getInventory().addItem("Admin", id, num, Player, null);
- ItemList il = new ItemList(Player, true);
- Player.sendPacket(il);
- =============================================================================================
- L2PcInstance.java
- =============================================================================================
- @@ -19615,7 +19615,16 @@
- {
- return _currentPetSkill;
- }
- -
- + private long _lastAction;
- + public boolean isAFK()
- + {
- + return _lastAction < System.currentTimeMillis();
- + }
- +
- + public void updateLastAction()
- + {
- + _lastAction = System.currentTimeMillis() + TimeUnit.MINUTES.toMillis(Config.AFK_TIMER);
- + }
- /**
- * Create a new SkillDat object and set the player _currentPetSkill.<br>
- * <br>
- =============================================================================================
- MoveBackwardToLocation.java
- =============================================================================================
- @@ -77,7 +77,7 @@
- if (activeChar == null)
- return;
- -
- + activeChar.updateLastAction();
- // Move flood protection
- if (!getClient().getFloodProtectors().getMoveAction().tryPerformAction("MoveBackwardToLocation"))
- {
- =============================================================================================
- RequestRestartPoint.java
- =============================================================================================
- @@ -231,7 +231,7 @@
- if (activeChar == null)
- return;
- -
- + activeChar.updateLastAction();
- if (activeChar.isFakeDeath())
- {
- activeChar.stopFakeDeath(null);
- =============================================================================================
- RequestSocialAction.java
- =============================================================================================
- @@ -47,7 +47,7 @@
- final L2PcInstance activeChar = getClient().getActiveChar();
- if (activeChar == null)
- return;
- -
- + activeChar.updateLastAction();
- // You cannot do anything else while fishing
- if (activeChar.isFishing())
- {
- =============================================================================================
- /Say2.java
- =============================================================================================
- @@ -142,7 +142,7 @@
- LOGGER.warn("[Say2.java] Active Character is null.");
- return;
- }
- -
- + activeChar.updateLastAction();
- if (activeChar.isChatBanned() && !activeChar.isGM() && _type != CLAN && _type != ALLIANCE && _type != PARTY)
- {
- activeChar.sendMessage("You may not chat while a chat ban is in effect.");
- =============================================================================================
- TradeRequest.java
- =============================================================================================
- @@ -50,7 +50,7 @@
- final L2PcInstance player = getClient().getActiveChar();
- if (player == null)
- return;
- -
- + player.updateLastAction();
- if (!player.getAccessLevel().allowTransaction())
- {
- player.sendMessage("Transactions are disable for your Access Level");
- =============================================================================================
- UseItem.java
- =============================================================================================
- @@ -66,7 +66,7 @@
- final L2PcInstance activeChar = getClient().getActiveChar();
- if (activeChar == null)
- return;
- -
- + activeChar.updateLastAction();
- final L2ItemInstance item = activeChar.getInventory().getItemByObjectId(_objectId);
- if (item == null)
- =============================================================================================
- Index: DataPack
- # Crit announce
- GMShowCritAnnouncerName = False
- +# Each X minutes the server will count the player as AFK when he don't act.
- +TimerAFK = 10
Add Comment
Please, Sign In to add comment