Jump to content
  • 0

Block a number of group members on a map


Rudra

Question


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  21
  • Reputation:   2
  • Joined:  04/18/12
  • Last Seen:  

I'm looking for some time how to block on a given map, a number of members of a party.
 
Anyone know how to do this?
 
 
I wanted as a portal
 
I got make a restricting the amount of guild members, but really wanted to group
 
function	script	woePortal	{

	if (getmapguildusers (getarg(1), getcharid(2)) < getarg(0))
	warp getarg(1), getarg(2), getarg(3);

	else
		dispbottom "There is " + getarg(0) + " member" + (getarg(0) != 1 ? "s" : "") + " of this guild in the castle.";
	end;

}

//= Arunafeltz
aru_gld,155,274,0	script	#arug_cas01	45,2,2,{ callfunc ("woePortal", 1, "arug_cas01", 275, 93); }
aru_gld,78,47,0	script	#arug_cas02	45,2,2,{ callfunc ("woePortal", 1, "arug_cas02", 139, 31); }
aru_gld,68,150,0	script	#arug_cas03	45,2,2,{ callfunc ("woePortal", 1, "arug_cas03", 141, 45); }
aru_gld,289,347,0	script	#arug_cas04	45,2,2,{ callfunc ("woePortal", 2, "arug_cas04", 141, 45); }
aru_gld,287,107,0	script	#arug_cas05	45,2,2,{ callfunc ("woePortal", 3, "arug_cas05", 141, 45); }

//= Schwaltzvalt
sch_gld,293,90,0	script	#schg_cas01	45,2,2,{ callfunc ("woePortal", 1, "schg_cas01", 119, 8); }
sch_gld,288,258,0	script	#schg_cas02	45,2,2,{ callfunc ("woePortal", 1, "schg_cas02", 339, 78); }
sch_gld,97,183,0	script	#schg_cas03	45,2,2,{ callfunc ("woePortal", 1, "schg_cas03", 337, 330); }
sch_gld,137,98,0	script	#schg_cas04	45,2,2,{ callfunc ("woePortal", 2, "schg_cas04", 119, 8); }
sch_gld,65,315,0	script	#schg_cas05	45,2,2,{ callfunc ("woePortal", 3, "schg_cas05", 119, 8); }

 

sorry my bad english )=

 

Link to comment
Share on other sites

5 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  

What you mean by group? Group of?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  40
  • Topics Per Day:  0.01
  • Content Count:  587
  • Reputation:   104
  • Joined:  11/19/11
  • Last Seen:  

try this..

 

function    script    woePortal    {
    function getpartymapusers;
    set .@cmu,getpartymapusers(getarg(1), getcharid(1));
    if (.@cmu < getarg(0))
        warp getarg(1), getarg(2), getarg(3);

    else
        dispbottom "There is " +.@cmu+ " member" + (.@cmu > 1 ? "s" : "") + " of this party in the castle.";
    end;

    function getpartymapusers {
        set .@pid,getarg(1);
        set .@m$,getarg(0);
        getpartymember .@pid, 1;
        getpartymember .@pid, 2;
        for ( .@i = 0; .@i < $@partymembercount; .@i++ ) {
            if ( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) ) {
                attachrid($@partymemberaid[.@i]);
                if(strcharinfo(3)==.@m$)
                    .@c++;
            }
        }

        return .@c;

    }
}
Edited by QQfoolsorellina
Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

or

-	script	jnonjiojopj	-1,{
OnPCLoadMapEvent:
	.map_name$ = strcharinfo(3);
	.@party_id = getcharid(1);
	if ( !.@party_id || ( .map_name$ != "aru_gld" && .map_name$ != "sch_gld" ) ) end;

	.count = 0;
	.name$ = strcharinfo(0);

	addrid( 2,0,.@party_id );
	if ( strcharinfo(3) == .map_name$ ) .count++;
	if ( .name$ != strcharinfo(0) ) end;
	if ( .count > .max_count ) {
		dispbottom "Only "+ .max_count +" members are allowed to warp here.";
		warp "Save",0,0;
	}
	end;
}
aru_gld	mapflag	loadevent
sch_gld	mapflag	loadevent
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  21
  • Reputation:   2
  • Joined:  04/18/12
  • Last Seen:  

THANKS 

Edited by teaga
Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

I forgot to set .max_count

-	script	jnonjiojopj	-1,{
OnPCLoadMapEvent:
	.map_name$ = strcharinfo(3);
	.@party_id = getcharid(1);
	if ( !.@party_id || ( .map_name$ != "aru_gld" && .map_name$ != "sch_gld" ) ) end;

	.count = 0;
	.name$ = strcharinfo(0);

	addrid( 2,0,.@party_id );
	if ( strcharinfo(3) == .map_name$ ) .count++;
	if ( .name$ != strcharinfo(0) ) end;
	if ( .count > .max_count ) {
		dispbottom "Only "+ .max_count +" members are allowed to warp here.";
		warp "Save",0,0;
	}
	end;
OnInit:
	.max_count = 1;
}
aru_gld	mapflag	loadevent
sch_gld	mapflag	loadevent
Link to comment
Share on other sites

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.

×
×
  • Create New...