Rudra Posted October 30, 2013 Group: Members Topic Count: 7 Topics Per Day: 0.00 Content Count: 21 Reputation: 2 Joined: 04/18/12 Last Seen: April 11, 2023 Share Posted October 30, 2013 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 )= Quote Link to comment Share on other sites More sharing options...
Patskie Posted October 30, 2013 Group: Members Topic Count: 50 Topics Per Day: 0.01 Content Count: 1702 Reputation: 241 Joined: 09/05/12 Last Seen: 9 hours ago Share Posted October 30, 2013 What you mean by group? Group of? Quote Link to comment Share on other sites More sharing options...
QQfoolsorellina Posted October 30, 2013 Group: Members Topic Count: 40 Topics Per Day: 0.01 Content Count: 587 Reputation: 105 Joined: 11/19/11 Last Seen: July 7, 2019 Share Posted October 30, 2013 (edited) 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 October 30, 2013 by QQfoolsorellina Quote Link to comment Share on other sites More sharing options...
Capuche Posted October 30, 2013 Group: Developer Topic Count: 10 Topics Per Day: 0.00 Content Count: 2407 Reputation: 616 Joined: 07/05/12 Last Seen: March 20 Share Posted October 30, 2013 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 Quote Link to comment Share on other sites More sharing options...
Rudra Posted October 31, 2013 Group: Members Topic Count: 7 Topics Per Day: 0.00 Content Count: 21 Reputation: 2 Joined: 04/18/12 Last Seen: April 11, 2023 Author Share Posted October 31, 2013 (edited) THANKS Edited October 31, 2013 by teaga Quote Link to comment Share on other sites More sharing options...
Capuche Posted October 31, 2013 Group: Developer Topic Count: 10 Topics Per Day: 0.00 Content Count: 2407 Reputation: 616 Joined: 07/05/12 Last Seen: March 20 Share Posted October 31, 2013 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 Quote Link to comment Share on other sites More sharing options...
Question
Rudra
sorry my bad english )=
Link to comment
Share on other sites
5 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.