Jump to content
  • 0

DualBox Restriction By Player Main Class


Question

Posted

Hello
I would like to add in the restriction of the dualbox an exception on certain classes of players, I would like to limit the dualboxes for example to 2 but that the Healer classes are not counted in this restriction
Do you think that's possible, I'm on l2jfree but I think a code on l2j will work the same, if someone could help me please and show me a code example

 

thanks for help

 

2 answers to this question

Recommended Posts

  • 0
Posted

yes but I dont know add

 

	public final int getLimit(L2Client client)
	{
		if (client == null)
			return 0;

		int limit_box = Config.DUALBOX_CHECK_MAX_CLIENT_PER_IP;
		final Integer addrHash = Integer.valueOf(client.getHostAddress().hashCode());

		// Set limit box from whitelist
		if (Config.ENABLE_WHITELIST_CLIENT)
		{
			WhiteListTable wlt = WhiteListTable.getInstance();

			if(!wlt.getWhiteListIp().isEmpty() && wlt.isRegistered(addrHash))
				limit_box = wlt.getWhiteListIp().get(addrHash);
		}

		// Set limit box from blacklist
		if (Config.ENABLE_BLACKLIST_CLIENT)
		{
			BlackListTable blt = BlackListTable.getInstance();

			if (!blt.getBlackListIp().isEmpty() && blt.isRegisteredInRange(addrHash))
				limit_box = 0;
		}

		return limit_box;
	}

 

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.

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.



×
×
  • 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 Disabled AdBlock