Mabuhay Posted November 12, 2013 Group: Members Topic Count: 105 Topics Per Day: 0.02 Content Count: 446 Reputation: 232 Joined: 03/20/12 Last Seen: October 22, 2020 Share Posted November 12, 2013 (edited) - 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; } } 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; } i made this script. upon killing a mini boss, player must get the item. but the problem is that even the MVP will drop the same item. help! Edited November 12, 2013 by MrVandalBus Quote Link to comment Share on other sites More sharing options...
Talis Posted November 12, 2013 Group: Members Topic Count: 1 Topics Per Day: 0.00 Content Count: 7 Reputation: 2 Joined: 11/06/13 Last Seen: November 25, 2013 Share Posted November 12, 2013 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; } Quote Link to comment Share on other sites More sharing options...
Question
Mabuhay
i made this script. upon killing a mini boss, player must get the item. but the problem is that even the MVP will drop the same item. help!
Edited by MrVandalBusLink to comment
Share on other sites
1 answer 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.