Jump to content
  • 0

Request skill sleep for offline trader


haskovo
 Share

Question

4 answers to this question

Recommended Posts

  • 0

Which project?

Sunrise/Jserver/Jserver Based

-add this in L2PcInstance.java inside the setPrivateStoreType method

if (privateStoreType == PrivateStoreType.NONE) {
    stopAbnormalEffect(AbnormalEffect.SLEEP);
}else{
    startAbnormalEffect(AbnormalEffect.SLEEP);
}

 

Acis 398 (Probably works for previous and recenter ones too)
Look for the setOperateType method in the Player.java class
and change for this one:
 

public void setOperateType(OperateType type)
{
       if(type == OperateType.NONE){
           stopAbnormalEffect(AbnormalEffect.SLEEP);
       } else {
           startAbnormalEffect(AbnormalEffect.SLEEP);           
       }
       _operateType = type;
}


For L2Scripts/FanDC based packs
look for setPrivateStoreType method in Player.java
and put this inside:
 

      if(type == 0) { // none
          stopAbnormalEffect(AbnormalEffect.SLEEP);
      }else{
          startAbnormalEffect(AbnormalEffect.SLEEP);
      }

 

 

I have not tested them, but this sound as simple as it is. U want to visualize the sleep effect when entering the private store mode and u want to remove it when not in the store mode anymore.

Link to comment
Share on other sites

  • 0

i have found this 

if (Config.OFFLINE_DISCONNECT_FINISHED && (type == PrivateStoreType.NONE) && ((getClient() == null) || getClient().isDetached()))
			deleteMe();

 

and i have make it like this 

public void setPrivateStoreType(PrivateStoreType type)
	{
		_privateStoreType = type;
		if (type == PrivateStoreType.NONE) {
		    stopAbnormalEffect(AbnormalEffect.SLEEP);
		}else{
		    startAbnormalEffect(AbnormalEffect.SLEEP);
		}
		if (Config.OFFLINE_DISCONNECT_FINISHED && (type == PrivateStoreType.NONE) && ((getClient() == null) || getClient().isDetached()))
			deleteMe();
	}

 

but im getting this error https://prnt.sc/17eynfh

Link to comment
Share on other sites

  • 0

 

5 hours ago, haskovo said:

i have found this 

if (Config.OFFLINE_DISCONNECT_FINISHED && (type == PrivateStoreType.NONE) && ((getClient() == null) || getClient().isDetached()))
			deleteMe();

 

and i have make it like this 

public void setPrivateStoreType(PrivateStoreType type)
	{
		_privateStoreType = type;
		if (type == PrivateStoreType.NONE) {
		    stopAbnormalEffect(AbnormalEffect.SLEEP);
		}else{
		    startAbnormalEffect(AbnormalEffect.SLEEP);
		}
		if (Config.OFFLINE_DISCONNECT_FINISHED && (type == PrivateStoreType.NONE) && ((getClient() == null) || getClient().isDetached()))
			deleteMe();
	}

 

but im getting this error https://prnt.sc/17eynfh

Since u are on eclipse, press F3 on startAbnormalEffect or stopAbnormalEffect and see what class it requires as parameter and puit it there or import the needed class.

  • Like 1
  • Upvote 1
Link to comment
Share on other sites

  • 0

i made it but when the player opens the menu for selling or buying it gets directly the effect i want when they exit the game then

 

public void setPrivateStoreType(PrivateStoreType type)
	{
		if (type == PrivateStoreType.NONE) {
		    stopAbnormalEffect(AbnormalEffect.SLEEP);
		}
		else {
			startAbnormalEffect(AbnormalEffect.SLEEP);
		}
		_privateStoreType = type;
		if (Config.OFFLINE_DISCONNECT_FINISHED && (type == PrivateStoreType.NONE) && ((getClient() == null) || getClient().isDetached()))
			deleteMe();
	}

 

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