prontera,0,0,0 script mvp_kill_count 444,{
copyarray(.@name$,$MVP_KILL_NM$,getarraysize($MVP_KILL_NM$));
copyarray(.@count,$MVP_KILL_COUNT,getarraysize($MVP_KILL_COUNT));
.@mx = min(.max_show,getarraysize(.@name$));
if(.@mx <= 0){
mes "No records found";
end;
}
if(getgmlevel() >= .gm_level){
switch(select("Skip:Skip:Reset:Skip")){
case 3:
deletearray($MVP_KILL_COUNT,getarraysize($MVP_KILL_COUNT));
mes "Done";
end;
}
}
while(.@max < .@mx){
.@max++;
.@t1 = max(.@count);
if(.@t1 <= 0) break;
.@n = inarray(.@count,.@t1);
if(.@n == -1) break;
mes "(" + .@t1 + ") " + .@name$[.@n];
deletearray(.@name$[.@n],1);
deletearray(.@count[.@n],1);
}
end;
OnNPCKillEvent:
.@id = killedrid;
if(inarray(.mvp_id,.@id) != -1){
if(inarray(getd(".m_" + .@id + "$"),strcharinfo(3)) != -1){
if((.@ndx = inarray($MVP_KILL_CID,getcharid(0))) == -1){
.@ndx = getarraysize($MVP_KILL_CID);
$MVP_KILL_CID[.@ndx] = getcharid(0);
$MVP_KILL_NM$[.@ndx] = strcharinfo(0);
}
$MVP_KILL_COUNT[.@ndx]++;
}
}
end;
function AddMvp {
.@s = getarraysize(.mvp_id);
.@id = getarg(0);
.mvp_id[.@s] = .@id;
setd(".m_" + .@id + "$[" + getarraysize(getd(".m_" + .@id + "$")) + "]",getarg(1));
return;
}
OnInit:
.gm_level = 99;
.max_show = 10;
//AddMvp(<Monster ID>,<"Map Name">);
//AddMvp(<Monster ID>,<"Map Name">);
//AddMvp(<Monster ID>,<"Map Name">);
end;
}