Spidey* Posted January 29, 2011 Posted January 29, 2011 As the title says, I wan't to disable Onlinetime points from Detached characters. Maybe something like this: if (_onlineBeginTime > 0 && !getClient().isDetached()) totalOnlineTime += (System.currentTimeMillis()-_onlineBeginTime)/1000; Any idea? Quote
0 DnR Posted January 29, 2011 Posted January 29, 2011 As the title says, I wan't to disable Onlinetime points from Detached characters. Maybe something like this: if (_onlineBeginTime > 0 && !getClient().isDetached()) totalOnlineTime += (System.currentTimeMillis()-_onlineBeginTime)/1000; Any idea? I'm not sure if this works,but try to give character offline status. try { isDetached(true); L2PcInstance player = L2GameClient.this.getActiveChar(); if (player != null) { if (!player.isInOlympiadMode() && !player.isFestivalParticipant() && !TvTEvent.isPlayerParticipant(player.getObjectId()) && !player.isInJail()) { if ((player.isInStoreMode() && Config.OFFLINE_TRADE_ENABLE) || (player.isInCraftMode() && Config.OFFLINE_CRAFT_ENABLE)) { player.leaveParty(); + player.setOnlineStatus(false); if (Config.OFFLINE_SET_NAME_COLOR) { player.getAppearance().setNameColor(Config.OFFLINE_NAME_COLOR); player.broadcastUserInfo(); } return; } } if (player.isInCombat() || player.isLocked()) { fast = false; } } cleanMe(fast); } Quote
0 Spidey* Posted January 29, 2011 Author Posted January 29, 2011 I'm not sure if this works,but try to give character offline status. try { isDetached(true); L2PcInstance player = L2GameClient.this.getActiveChar(); if (player != null) { if (!player.isInOlympiadMode() && !player.isFestivalParticipant() && !TvTEvent.isPlayerParticipant(player.getObjectId()) && !player.isInJail()) { if ((player.isInStoreMode() && Config.OFFLINE_TRADE_ENABLE) || (player.isInCraftMode() && Config.OFFLINE_CRAFT_ENABLE)) { player.leaveParty(); + player.setOnlineStatus(false); if (Config.OFFLINE_SET_NAME_COLOR) { player.getAppearance().setNameColor(Config.OFFLINE_NAME_COLOR); player.broadcastUserInfo(); } return; } } if (player.isInCombat() || player.isLocked()) { fast = false; } } cleanMe(fast); } Hmm, y may it could work Quote
Question
Spidey*
As the title says, I wan't to disable Onlinetime points from Detached characters.
Maybe something like this:
Any idea?
3 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.