Hofner Posted May 2, 2013 Group: Members Topic Count: 2 Topics Per Day: 0.00 Content Count: 3 Reputation: 0 Joined: 05/02/13 Last Seen: June 30, 2013 Share Posted May 2, 2013 (edited) Hello! I'm using eA SVN. Can anyone help me for the script to not allow same job in party? Edited May 2, 2013 by Hofner Quote Link to comment Share on other sites More sharing options...
Jaburak Posted May 2, 2013 Group: Members Topic Count: 48 Topics Per Day: 0.01 Content Count: 1125 Reputation: 236 Joined: 07/30/12 Last Seen: April 13 Share Posted May 2, 2013 getpartymember(getcharid(1),2); copyarray .@partyids[0],$@partymembercid[0],$@partymembercount; set .@count, $@partymembercount; for (set .@a, 0; .@a < .@count; set .@a, .@a + 1) { attachrid .@partyids[.@a]; set .@jobs[.@a], Class; // Check Job from other current jobs for (set .@b, 0; .@b < getarraysize(.@jobs); set .@b, .@b + 1) { if (Class == .@jobs[.@b]) { set .@matches, .@matches + 1; } } // Check if this job as too many if (.@matches > 2) { // Too Many of the Same Job } // Less than 2, so reset counter for next player set .@matches, 0; } Quote Link to comment Share on other sites More sharing options...
Hofner Posted May 3, 2013 Group: Members Topic Count: 2 Topics Per Day: 0.00 Content Count: 3 Reputation: 0 Joined: 05/02/13 Last Seen: June 30, 2013 Author Share Posted May 3, 2013 (edited) getpartymember(getcharid(1),2); copyarray .@partyids[0],$@partymembercid[0],$@partymembercount; set .@count, $@partymembercount; for (set .@a, 0; .@a < .@count; set .@a, .@a + 1) { attachrid .@partyids[.@a]; set .@jobs[.@a], Class; // Check Job from other current jobs for (set .@b, 0; .@b < getarraysize(.@jobs); set .@b, .@b + 1) { if (Class == .@jobs[.@b]) { set .@matches, .@matches + 1; } } // Check if this job as too many if (.@matches > 2) { // Too Many of the Same Job } // Less than 2, so reset counter for next player set .@matches, 0; } I don't know where i will put that mes "Choose your team to register."; switch(select("Team 1 - [" + GetPartyName($@TeamID1) + "] :Team 2 - [" + GetPartyName($@TeamID2) + "]")) { case 1: mes "[ Admin ]"; if ($@TeamID1==0 || getpartyname($@TeamID1)=="null") { getpartymember(getcharid(1)),1; getpartymember(getcharid(1)),2; copyarray $@partymembercidt1[0],$@partymembercid[0],$@members; copyarray $@partymemberaid1[0],$@partymemberaid[0],$@members; for (set .@i,0; .@i<$@members; set .@i,.@i+1) { if(isloggedin($@partymemberaid1[.@i],$@partymembercidt1[.@i])) set .@count,.@count+1; } if(.@count < $@members) { mes "You need all your party members to be online to Register"; close; } set $@TeamID1, getcharid(1); initnpctimer; mes "Your Party is now subscribed, good luck!"; mapannounce "quiz_02", "Team 1 : [ " +getpartyname($@TeamID1)+ " ] party has sign up For the Team War!~",0; doevent "teamwar::OnSubscriptionTeam"; close; } else { mes "I'm sorry! Another Team has sign up before you..."; close; } case 2: mes "[ Admin Pips ]"; if ($@TeamID2==0 || getpartyname($@TeamID2)=="null") { getpartymember(getcharid(1)),1; getpartymember(getcharid(1)),2; copyarray $@partymembercidt2[0],$@partymembercid[0],$@members; copyarray $@partymemberaid2[0],$@partymemberaid[0],$@members; for (set .@i,0; .@i<$@members; set .@i,.@i+1) { if(isloggedin($@partymemberaid2[.@i],$@partymembercidt2[.@i])) set .@count,.@count+1; } if(.@count < $@members) { mes "You need all your party members to be online to Register"; close; } set $@TeamID2, getcharid(1); initnpctimer; mes "Your Party is now subscribed, good luck!"; mapannounce "quiz_02", "Team 2 : [ " +getpartyname($@TeamID2)+ " ] party has sign up For the Team War!~",0; doevent "teamwar::OnSubscriptionTeam"; close; Bump!! Edited May 2, 2013 by Hofner Quote Link to comment Share on other sites More sharing options...
Question
Hofner
Hello! I'm using eA SVN.
Can anyone help me for the script to not allow same job in party?
Edited by HofnerLink to comment
Share on other sites
2 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.