I've tried getunits then atachrid but getting confused on how to get it to show the players who have the set variable(#mvpon <= 1) to recieve the dispbottom and if they have #mvpon <= 0 they don't get the dispbottom.
- script #mvp_kill -1,{
OnInit:
setarray .p_rwd, 607,1; // Party reward <item>,<amount>
setarray .s_rwd, 607,1; // Solo reward <item>,<amount>
.chance = 50; // Drop rate chances %
// .gm = 10; // Prevents gm level and above to trigger the event
// MVP Map list
setarray .t_maps$[0],"moc_pryd06","lhz_dun03","gld2_prt","abbey02","ayo_dun02","lhz_dun04","ra_fild02","xmas_fild01","dic_dun02","beach_dun","iz_dun05","tur_dun04","lhz_dun02","jupe_core","moc_fild22","anthell02","odin_tem03","gon_dun03","gef_fild02","thana_boss","gef_fild10","ein_dun02","gef_fild14","moc_pryd04","dew_dun01","in_sphinx5","niflheim","moc_fild17","xmas_dun02","ice_dun03","kh_dun02","treasure02","moc_prydn2","pay_dun04","ra_san05","mosk_dun03","ama_dun03","thor_v03","gef_dun01","mjolnir_04","abyss_03","dic_dun03","prt_sewb4","pay_fild11","gef_dun02","gl_chyard","ra_fild03","ra_fild04","ve_fild01","ve_fild02","lou_dun03","prt_maze03","bra_dun02";
end;
OnNPCKillEvent:
//if (getgmlevel() >= .gm ) end; // If gm = event wont happen
if ( getmonsterinfo( killedrid, MOB_MVPEXP )) {
for (.@a = 0; .@a < getarraysize(.t_maps$); .@a++) {
if ( strcharinfo(3) == instance_mapname("06guild_01") ) end;
if ( strcharinfo(3) == instance_mapname("force_1-1") ) end;
if ( strcharinfo(3) == .t_maps$[.@a]) {
if ( getcharid(1) ) {
getpartymember getcharid(1), 1;
getpartymember getcharid(1), 2;
for ( .@i = 0; .@i < $@partymembercount; .@i++ ) {
if ( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) ) {
.@partymemberaid[.@c] = $@partymemberaid[.@i];
.@c++;
}
}
if (rand(100) < .chance) getitem .p_rwd[0], .p_rwd[1], .@partymemberaid[ rand( .@c ) ];
dispbottom "[ System ] : Player ["+ strcharinfo(0) +"] of party ["+ strcharinfo(1) +"] has killed "+ getmonsterinfo( killedrid, MOB_NAME ) +" at "+ strcharinfo(3);
}
else {
if (rand(100) < .chance) getitem .s_rwd[0], .s_rwd[1];
dispbottom "[ System ] : Player ["+ strcharinfo(0) +"] has killed "+ getmonsterinfo( killedrid, MOB_NAME ) +" alone at "+ strcharinfo(3);
}
MVPKills = MVPKills+1;
dispbottom "---------------------------------------------------";
dispbottom "You killed a total of "+MVPKills+" MVP"+((MVPKills == 1)?"":"s")+".";
dispbottom "---------------------------------------------------";
end;
}
}
if ( getcharid(1) ) {
dispbottom "[ System ] : Player ["+ strcharinfo(0) +"] of party ["+ strcharinfo(1) +"] has killed "+ getmonsterinfo( killedrid, MOB_NAME ) +" at "+ strcharinfo(3);
}
else {
dispbottom "[ System ] : Player ["+ strcharinfo(0) +"] has killed "+ getmonsterinfo( killedrid, MOB_NAME ) +" alone at "+ strcharinfo(3);
}
end;
}
}
Question
DR4LUC0N
I've tried getunits then atachrid but getting confused on how to get it to show the players who have the set variable(#mvpon <= 1) to recieve the dispbottom and if they have #mvpon <= 0 they don't get the dispbottom.
Link to comment
Share on other sites
10 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.