Skip to content

DualBox Restriction By Player Main Class

Featured Replies

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

 

find a code for dualbox limit and just do a check for class ids

  • Author

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.