Jump to content

Question

Posted

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

15 answers to this question

Recommended Posts

  • 0
Posted

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

  • 0
Posted

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.

  • 0
Posted

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.

  • 0
Posted

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

  • 0
Posted

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

Guest
This topic is now closed to further replies.


  • Posts

    • Hi, for l2jfrozen...   I want Bless Enchat to have a limit.   Example: 7+ to +15 with Bless Enchat.   That for +16, it doesn't allow use.
    • @FixerRay the problem is that my dev will not be available for a while so if you could help that will be great 
    • Tired of watching your Instagram account grow at a snail’s pace? Feeling frustrated when your quality content doesn’t reach the audience it deserves? Let me share a secret that changed the game for me and many others: using a reliable SMM panel Instagram service like GoUpSocial. Whether you're building a brand, promoting a product, or growing a personal page, GoUpSocial offers the best and cheapest SMM panel for Instagram followers, likes, and views — with real results, fast delivery, and budget-friendly pricing. ✅ What Is an SMM Panel Instagram and Why Should You Care? An Instagram SMM panel is a specialized marketing tool that helps you grow your account faster by automating likes, followers, views, and even verification services. But not all SMM panels are created equal. GoUpSocial stands out because it offers: Safe and real SMM followers Instagram services High-retention SMM panel for Instagram views Instant Instagram likes SMM panel to boost engagement Smart Instagram comment like SMM panel to highlight key messages Trusted SMM panel Instagram blue tick strategies to increase verification chances All of this is delivered through an intuitive, user-friendly platform with 24/7 customer support. 📈 Instagram Followers Increase SMM Panel – Grow with Confidence If you’re looking for meaningful growth, the Instagram followers increase SMM panel is your go-to solution. GoUpSocial provides real followers, delivered gradually to keep your profile looking natural and compliant with Instagram’s algorithm. Whether you’re launching a business page or trying to build a fan base as a creator, more followers = more trust and more visibility. ❤️ Drive More Engagement with the Instagram Likes SMM Panel Instagram rewards popular posts with more visibility. That means more likes lead to more exposure. With the Instagram likes SMM panel, you can boost your post’s visibility instantly, increasing your chance of hitting the Explore page or going viral. If you're managing brand mentions or public feedback, the Instagram comment like SMM panel is perfect for pushing important comments to the top — ideal for testimonials, FAQs, or influencer interactions. 🎥 Don’t Miss Out on Views – Try the SMM Panel for Instagram Views Instagram is prioritizing video content more than ever. Whether it’s Reels, Stories, or feed videos, performance matters — and GoUpSocial’s SMM panel for Instagram views ensures you get noticed. Combined with the Instagram likes SMM panel, this powerful duo can significantly increase your profile’s reach and influence. Don’t just post content — get it seen. 🔵 Boost Verification Potential with SMM Panel Instagram Blue Tick Getting verified on Instagram isn’t easy — but it’s also not impossible. Instagram looks at follower count, engagement, and public presence. That’s where GoUpSocial’s SMM panel Instagram blue tick service can give you the edge. By growing your followers and interaction rates authentically, you increase your chances of being verified. It’s a smart, strategic move for influencers, entrepreneurs, and anyone seeking social credibility. ⚙️ Easy SMM Panel Instagram – Simplicity Meets Power Forget clunky dashboards or complicated processes. GoUpSocial provides an easy SMM panel Instagram interface that lets you: Place orders quickly Monitor real-time progress Manage multiple services effortlessly Choose from flexible packages Pay securely and safely Even if you're new to digital marketing, you’ll feel confident using this system. 💸 Cheapest SMM Panel for Instagram Followers, Likes, and Views Let’s talk about pricing — GoUpSocial is hands-down the cheapest SMM panel for Instagram followers, likes, and views that doesn’t compromise on quality. They offer: Low-cost follower packages Budget-friendly like boosts Affordable video views with high retention Targeted solutions to maximize ROI Ideal for students, startups, creators, and agencies alike. 🤝 Manage Clients Efficiently with the Instagram Reseller Panel If you’re a digital agency or freelancer, GoUpSocial’s Instagram reseller panel is a goldmine. You get access to all the same high-quality services at reseller prices — with API access, white-label delivery, and bulk order management. You can resell these services under your own brand and watch your revenue grow alongside your client base. 🎯 A Complete Growth System – Why GoUpSocial Wins There are many panels out there. But here’s why GoUpSocial consistently ranks as the best and cheap SMM panel for Instagram server: 🔒 Safe and compliant with Instagram’s systems ⚡ Fast and automatic delivery 💬 Real engagement from real users 🛠️ Easy-to-use platform for all experience levels 🧩 All-in-one panel for followers, likes, views, comments, and verification 💼 Reseller-ready for agencies and freelancers If you want a system that works, and works well — this is it. 👉 Ready to accelerate your Instagram growth? Sign up now at https://goupsocial.com and experience the easiest, most reliable, and cheapest SMM panel Instagram solution available today. Whether you're after likes, views, followers, or even a verified badge, GoUpSocial delivers everything you need — fast, safe, and with real impact. 🔥 Don’t wait — your Instagram success story starts here! 🔥
  • Topics

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