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

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


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