I made a script where can check duplicate class in a party.
Disable Class
Priest - High Priest
Monk - Champion
Enable Class
Priest - Monk
High Priest - Champion
Here is the code.
gonryun,26,112,4 script Test 1_M_PUBMASTER,{ // get the charID and accountID of character's party membersgetpartymember getcharid(1), 1;getpartymember getcharid(1), 2;if ( $@partymembercount != .register_num ) { mes "Please form a party of "+ .register_num +" to continue"; close;}// loop through both and use 'isloggedin' to count online party membersfor ( set .@i, 0; .@i < $@partymembercount; set .@i, .@i +1 ){ if ( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) ) attachrid ($@partymemberaid[.@i]); for ( set .@p, 0; .@p < getarraysize(.jobs); set .@p, .@p +1 ) if(BaseJob == .jobs[.@p]) // Problem 1 cant set a new value for each variables in .class$. set getd("+.class$[.@p]+"),getd("+.class$[.@p]+") + 1; // this part is to check if the variable value changed. mes ""+.@priest+" "; close; } //for ( set .@l, 0; .@l < getarraysize(.class$); set .@l, .@l +1 ){// if(getd(.class$[.@l]) == 2){// dispbottom "Your party has a duplicate job class of "+jobname(.jobs$[.@l])+".";// } //} OnInit:set .register_num, 2; // How many party members are required?setarray .jobs,"8";setarray .class$,".@priest";end;}
I made a script where can check duplicate class in a party.
Disable Class
Priest - High Priest
Monk - Champion
Enable Class
Priest - Monk
High Priest - Champion
Here is the code.
All red text is the problem. Please help me,
Share this post
Link to post
Share on other sites