Jump to content
  • 0

[Help]Offline Trader's Online Time shouldn't be increased


Spidey*

Question

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?

 

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

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);
		}

Link to comment
Share on other sites

  • 0

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
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now


×
×
  • Create New...