You need a else between the first if and the second if.
Right now, you check if the killed monster gives MVP EXP ( only true for MVPs ), then afterwards you separately check whether the mob has the boss flag ( true for both proper MVPs and mini bosses ).
For MVP drop item 1, mini boss drop item 2, use:
- script mvpkill -1,{
OnNPCKillEvent:
if ( getmonsterinfo( killedrid, MOB_MVPEXP ) && rand(100) < 20 ) {
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 8400, 2, .@partymemberaid[ rand( .@c ) ];
announce "Player ["+ strcharinfo(0) +"] of ["+ strcharinfo(1) +"] party has killed "+ getmonsterinfo( killedrid, MOB_NAME ) +" at "+ strcharinfo(3), 0;
}
else {
getitem 8400, 2;
announce "Player ["+ strcharinfo(0) +"] has killed "+ getmonsterinfo( killedrid, MOB_NAME ) +" at "+ strcharinfo(3), 0;
}
} else if( getmonsterinfo(killedrid, 21) & 0x0020 && rand(100) < 20 ) {
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 8404, 1, .@partymemberaid[ rand( .@c ) ];
announce "You have received an item by killing "+ getmonsterinfo( killedrid, MOB_NAME ) +" .", bc_self;
}
else {
getitem 8404, 1;
announce "You have received an item by killing "+ getmonsterinfo( killedrid, MOB_NAME ) +" .", bc_self;
}
}
end;
}
If you want ONLY mini bosses:
- script mvpkill -1,{
OnNPCKillEvent:
if ( !getmonsterinfo( killedrid, MOB_MVPEXP ) && getmonsterinfo(killedrid, 21) & 0x0020 && rand(100) < 20 ) {
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 8400, 2, .@partymemberaid[ rand( .@c ) ];
announce "Player ["+ strcharinfo(0) +"] of ["+ strcharinfo(1) +"] party has killed "+ getmonsterinfo( killedrid, MOB_NAME ) +" at "+ strcharinfo(3), 0;
}
else {
getitem 8400, 2;
announce "Player ["+ strcharinfo(0) +"] has killed "+ getmonsterinfo( killedrid, MOB_NAME ) +" at "+ strcharinfo(3), 0;
}
}
end;
}