Jump to content
  • 0

Castle Guild Member Limit


Question

Posted

Does anyone know how to limit guild members entering a castle during woe? For example my guild cap is 76 but i only want 25 or 30 members can enter a castle during woe. I did try this https://upaste.me/raw/691b80 script, but its kicking all of the members on Ecall. Please help me find any other way to refine this script to make them stay for alteast 25 members and not allowing to enter the castle for excess members.

4 answers to this question

Recommended Posts

  • 0
Posted
-	script	Guild Limiter	-1,{
// This part ejects players when they are in the map 
	OnPCLoadMapEvent:
	if( getcharid(2) == $App_Guilds[.@i] ){
	.count = 0;
	.@origin = getcharid(3);
	addrid 3, 0, getcharid(2);
	if ( strcharinfo(3) == .checkmap$ )
		.count++;
	if ( !.@origin ) end;
		if ( .count > 12 ) { // 12 means only 12 players per guild allowed in a map.
			message strcharinfo(0), "Your guild members are over the limit";
			sleep2 2000;
			warp "SavePoint", 0,0;
		}
	}
	end;
OnInit:
	setarray .@checkmap$, "arug_cas01", "arug_cas02", "arug_cas03", "arug_cas04", "arug_cas05", "schg_cas01", "schg_cas02", "schg_cas03", "schg_cas04", "schg_cas05";
	.@len = getarraysize( .@checkmap$ );
	for ( .@i = 0; .@i < .@size; .@i++ ) {
		setmapflag .@checkmap$[.@i], mf_loadevent;
		setd "."+ .@checkmap$[.@i], 1;
	}
	end;
}

 

  • 0
Posted
On 9/12/2020 at 2:31 AM, Wazaby said:

-	script	Guild Limiter	-1,{
// This part ejects players when they are in the map 
	OnPCLoadMapEvent:
	if( getcharid(2) == $App_Guilds[.@i] ){
	.count = 0;
	.@origin = getcharid(3);
	addrid 3, 0, getcharid(2);
	if ( strcharinfo(3) == .checkmap$ )
		.count++;
	if ( !.@origin ) end;
		if ( .count > 12 ) { // 12 means only 12 players per guild allowed in a map.
			message strcharinfo(0), "Your guild members are over the limit";
			sleep2 2000;
			warp "SavePoint", 0,0;
		}
	}
	end;
OnInit:
	setarray .@checkmap$, "arug_cas01", "arug_cas02", "arug_cas03", "arug_cas04", "arug_cas05", "schg_cas01", "schg_cas02", "schg_cas03", "schg_cas04", "schg_cas05";
	.@len = getarraysize( .@checkmap$ );
	for ( .@i = 0; .@i < .@size; .@i++ ) {
		setmapflag .@checkmap$[.@i], mf_loadevent;
		setd "."+ .@checkmap$[.@i], 1;
	}
	end;
}

 

Hello, thank you so much for helping me. But the problem still persist, everyone is been kicked out when the Guild Leader try to Ecall. When all of the members enter the map 1 by 1, it doesn't kick anyone but when on ecall, it kicks everyone.

  • 0
Posted
15 hours ago, xJhay said:

Hello, thank you so much for helping me. But the problem still persist, everyone is been kicked out when the Guild Leader try to Ecall. When all of the members enter the map 1 by 1, it doesn't kick anyone but when on ecall, it kicks everyone.

Okay let me change a script a bit.

  • 0
Posted
6 hours ago, Wazaby said:

Okay let me change a script a bit.

Thank you so much sir Wazaby, I already intend to modify it but I don't know much about how not to exclude ecall on the script.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...