Jump to content
  • 0

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


Spidey*
 Share

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share



×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disbaled AdBlock