Jump to content
  • 0

Max clan members


Amanda55

Question

Where i make max 2 clan members

 

	/**
 * @param pledgeType the Id of the pledge type.
 * @return the maximum number of members allowed for a given {@code pledgeType}.
 */
public int getMaxNrOfMembers(int pledgeType)
{
	int limit = 2;

	switch (pledgeType)
	{
		case 0:
			switch (getLevel())
			{
				case 3:
					limit = 2;
					break;
				case 2:
					limit = 2;
					break;
				case 1:
					limit = 2;
					break;
				case 0:
					limit = 2;
					break;
				default:
					limit = 2;
					break;
			}
			break;
		case -1:
			limit = 2;
			break;
		case 100:
		case 200:
			switch (getLevel())
			{
				case 11:
					limit = 2;
					break;
				default:
					limit = 2;
					break;
			}
			break;
		case 1001:
		case 1002:
		case 2001:
		case 2002:
			switch (getLevel())
			{
				case 9:
				case 10:
				case 11:
					limit = 2;
					break;
				default:
					limit = 2;
					break;
			}
			break;
		default:
			break;
	}

	return limit;
}

 

 

Don't work

 

ty for help

Link to comment
Share on other sites

15 answers to this question

Recommended Posts

  • 0

Depends on clan lvl & how much royals clan does have... but use this and give me feed back...

	public int getMaxNrOfMembers(int pledgetype)
{
	int limit = 0;

	switch (pledgetype)
	{
	case 0:
		switch (getLevel())
		{
		case 4:
			limit   = 0;
			break;
		case 3:
			limit   = 0;
			break;
		case 2:
			limit   = 0;
			break;
		case 1:
			limit   = 0;
			break;
		case 0:
			limit   = 0;
			break;
		default:
			limit   = 2;
		break;
		}
		break;
	case -1:
	case 100:
	case 200:
		limit   = 0;
		break;
	case 1001:
	case 1002:
	case 2001:
	case 2002:
		switch (getLevel())
		{
			case 9:
			case 10:
				limit	= 0;
				break;
			default:
				limit   = 0;
				break;
		}
		break;
	default:
		break;
        }

        return limit;
}

Link to comment
Share on other sites

  • 0

Create a condicion in RequestJoinPledge..

 

if (activeChar.getClan().getMembersCount() >= "NUM")

{

activeChar.sendMessage("Your clan is full!.");

return;

}

 

NUM = the number you want of max clan members in a clan.

 

Hope i help.

Link to comment
Share on other sites

  • 0

Create a condicion in RequestJoinPledge..

 

if (activeChar.getClan().getMembersCount() >= "NUM")

{

activeChar.sendMessage("Your clan is full!.");

return;

}

 

NUM = the number you want of max clan members in a clan.

 

Hope i help.

 

why, to make it more heavier? He already has what he needs.

Link to comment
Share on other sites

  • 0

Stewie  don't work :/

 

 

exity  where i put the code in:

 

 public final class RequestJoinPledge extends L2GameClientPacket
{
private static final String _C__26_REQUESTJOINPLEDGE = "[C] 26 RequestJoinPledge";

private int _target;
private int _pledgeType;

@Override
protected void readImpl()
{
	_target = readD();
	_pledgeType = readD();
}

@Override
protected void runImpl()
{
	final L2PcInstance activeChar = getClient().getActiveChar();
	if (activeChar == null)
	{
		return;
	}

	final L2Clan clan = activeChar.getClan();
	if (clan == null)
	{
		return;
	}

	final L2PcInstance target = L2World.getInstance().getPlayer(_target);
	if (target == null)
	{
		activeChar.sendPacket(SystemMessageId.YOU_HAVE_INVITED_THE_WRONG_TARGET);
		return;
	}

	if (!clan.checkClanJoinCondition(activeChar, target, _pledgeType))
	{
		return;
	}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
                             if (activeChar.getClan().getMembersCount() >= "NUM")                         ( HERE ) ?
                             {
                             activeChar.sendMessage("Your clan is full!.");
                             return;
                             }
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
	if (!activeChar.getRequest().setRequest(target, this))
	{
		return;
	}

	final String pledgeName = activeChar.getClan().getName();
	final String subPledgeName = (activeChar.getClan().getSubPledge(_pledgeType) != null ? activeChar.getClan().getSubPledge(_pledgeType).getName() : null);
	target.sendPacket(new AskJoinPledge(activeChar.getObjectId(), subPledgeName, _pledgeType, pledgeName));
}

public int getPledgeType()
{
	return _pledgeType;
}

@Override
public String getType()
{
	return _C__26_REQUESTJOINPLEDGE;
}
}

Link to comment
Share on other sites

  • 0

Small Error

 

if (activeChar.getClan().getMembersCount() >= "2")                ////  The operator >= is undefined for the argument type(s) int, string  ////

 

 

 

And Compil error :

 

:72: error: bad operand types for binary operator '>='

    [javac] if (activeChar.getClan().getMembersCount() >= "2")

    [javac]                                           ^

    [javac]  first type:  int

    [javac]  second type: String

    [javac] 1 error

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.


  • Posts

    • OUR OFFICIAL WEBSITE / FORUM - MILLENNIUM-HOOK.NET CHEAT DESCRIPTION: Our cheat for Fortnite game has proven itself in the best way among players, the cheat has good optimization, a beautiful visual appearance and has extensive functionality. And reliable protection and HWID Spoofer give our cheat even more advantages over competitors! SUPPORTED ANTI-CHEATS: (read more on official website) - Easy Anti-Cheat (EAC): Undetected & Safe - BattlEye AC: Undetected & Safe - Hyperion AC: Undetected & Safe Our Fortnite cheat has a limited number of slots to ensure greater product security! (Available slots check on official website) FEATURES: AIMBOT: - Aim bone - Silent aim - Smooth - Fov - Distance - Key ESP: - Players - Loot - Vehicles - Traps - Other MISC: - No bloom - No spread - Vehicle flight - Instarevive - Aim while Jumping - Teleport to players within 4m (10m with pickaxe) or teleport downed players to you. - Teleport key - Fov changer REQUIREMENTS: - Included HWID Spoofer: Yes - Stream Bypass: No (Engineering works. Will be available again soon). - Supported game modes: Windowed, Borderless - Supported platforms: Steam / Uplay / Epic Games - Supported CPU: Intel & AMD - Supported OS: Windows 10 (1903,1909,2004,20H2,21H1, 22H2), Windows 11 (All version). Supported OS change and are added periodically. More check on official website.   IN-GAME SCREENSHOTS:   - Check on the official website.
    • OUR OFFICIAL WEBSITE / FORUM - MILLENNIUM-HOOK.NET CHEAT DESCRIPTION: We are offering the best in market Division 2 hacks without detection. If you are wondering where to get the best cheats and hacks for The Division 2, you are at the right place! Our private TD2  hack has been completely undetected since we released it! Also, our cheat has all the most necessary functions such as aimbot, esp, etc. And the limited slots will give even more security to our product. SUPPORTED ANTI-CHEATS: (read more on official website) - Easy Anti-Cheat (EAC): Undetected & Safe - FairFight AC: Undetected & Safe Our The Division 2 cheat has a limited number of slots to ensure greater product security! (Available slots check on official website) FEATURES: AIMBOT: - Enable aim - No recoil - Silent aim - Aim distance - Aim fov - Draw aim fov - Fov change - Weakspot - Aim hitbox - Head - Neck - Chest - Random ESP: - Enable visuals - Enable radar - Skeleton - Weakspot - Pre-rendering - ESP distance - Radar distance - Auto - Enemy - Name - Blacklist - Whitelist - Custom color - Clear whitelist - Clear blacklist MISC: - Auto fire/Triggerbot - Rapid of fire rate - Shotgun of fire rate - Magic bullets - Fast reload - Unlimited ammo - Shoot in safehouse - Accelerate - Noclip REQUIREMENTS: - Included HWID Spoofer: Yes - Stream Bypass: Yes - Supported game modes: Windowed, Borderless - Supported platforms: Steam / Uplay / Epic Games - Supported CPU: Intel & AMD - Supported OS: Windows 10 (1903,1909,2004,20H2,21H1, 22H2), Windows 11 (All version). Supported OS change and are added periodically. More check on official website.   IN-GAME SCREENSHOTS:   - Check on the official website.
    • 50% discount for the next 3 copies Price 150 , will try for test server not guaranteed
    • Welcome to my store :  https://topestore.mysellix.io/fr/ 2015-2022 Aged Discord Account 2015 Discord Account : 50.99 $ 2016 Discord Account : 10$ 2017 Discord Account :3.99 $ 2018 Discord Account : 3.50$ 2019 Discord Account : 2.70 $ 2020 Discord Account :1.50$ 2021 Discord Account :0.99$ 2022 Discord Account :0.70$ Warranty :Lifetime Payment Methods : Crypto/ PayPal Contact Me On Discord Or Telegram Discord : @ultrasstore11 Welcome to my store :  https://topestore.mysellix.io/fr/ 2015-2022 Aged Discord Account 2015 Discord Account : 50.99 $ 2016 Discord Account : 10$ 2017 Discord Account :3.99 $ 2018 Discord Account : 3.50$ 2019 Discord Account : 2.70 $ 2020 Discord Account :1.50$ 2021 Discord Account :0.99$ 2022 Discord Account :0.70$ Warranty :Lifetime Payment Methods : Crypto/ PayPal Contact Me On Discord Or Telegram Discord : @ultrasstore11
    • DISCORD : utchiha_market telegram : https://t.me/utchiha_market SELLIX STORE : https://utchihamkt.mysellix.io/ Join our server for more products : https://discord.gg/hoodservices https://campsite.bio/utchihaamkt  
  • Topics

×
×
  • Create New...