- script mvprewarders -1,{
OnNPCKillEvent:
if ( getmonsterinfo( killedrid, MOB_MVPEXP ) && rand(100) < 100 ) {
if ( getcharid(1) ) {
getpartymember getcharid(1), 1;
getpartymember getcharid(1), 2;
for ( .@i = 0; .@i < $@partymembercount; .@i++ ) {
if ( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) ) { // what happens if someone in the party member is offline =/
.@partymemberaid[.@c] = $@partymemberaid[.@i];
.@c++;
}
}
getitem 30022, 1, .@partymemberaid[ rand( .@c ) ];
announce "Party ["+ strcharinfo(1) +"] has killed "+ getmonsterinfo( killedrid, MOB_NAME ) +" and a Random Party Member Got 1 MVP TOKEN at "+ strcharinfo(3),0,0x00FF00;
}
else {
getitem 30022, 1;
announce "Player ["+ strcharinfo(0) +"] has killed "+ getmonsterinfo( killedrid, MOB_NAME ) +" and Got 1 MVP TOKEN at "+ strcharinfo(3),0,0x00FF00;
}
}
end;
}
The problem is how can i make all party member to get the reward instead of random party member? Also only party member in the area will be valid to get the reward.
Question
Nero
This is the code
- script mvprewarders -1,{ OnNPCKillEvent: if ( getmonsterinfo( killedrid, MOB_MVPEXP ) && rand(100) < 100 ) { if ( getcharid(1) ) { getpartymember getcharid(1), 1; getpartymember getcharid(1), 2; for ( .@i = 0; .@i < $@partymembercount; .@i++ ) { if ( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) ) { // what happens if someone in the party member is offline =/ .@partymemberaid[.@c] = $@partymemberaid[.@i]; .@c++; } } getitem 30022, 1, .@partymemberaid[ rand( .@c ) ]; announce "Party ["+ strcharinfo(1) +"] has killed "+ getmonsterinfo( killedrid, MOB_NAME ) +" and a Random Party Member Got 1 MVP TOKEN at "+ strcharinfo(3),0,0x00FF00; } else { getitem 30022, 1; announce "Player ["+ strcharinfo(0) +"] has killed "+ getmonsterinfo( killedrid, MOB_NAME ) +" and Got 1 MVP TOKEN at "+ strcharinfo(3),0,0x00FF00; } } end; }
The problem is how can i make all party member to get the reward instead of random party member? Also only party member in the area will be valid to get the reward.
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.