There is a slight mistake in the script, it has a chance of 1:99 instead of 1:100.
if( .@rnd < .item_arrays[.@i+2] ) {
Makes it range from 1 to 99 since the last check is: 1 - 100 < 100.
//Created Date: 04/07/2022
- script AEOUS_MVP_DROP FAKE_NPC,{
OnNPCKillEvent:
.@rnd = rand(1,100);
if( getmonsterinfo( killedrid,MOB_MVPEXP ) <= 0) end;
for( .@i = 0; .@i < getarraysize(.item_arrays); .@i += 3 ) {
if( .@rnd <= .item_arrays[.@i+2] ) {
getitem .item_arrays[.@i], .item_arrays[.@i+1];
announce "Congratulations! Player "+ strcharinfo(0) +" has obtained "+ getitemname( .item_arrays[.@i] ) +" ["+ .item_arrays[.@i+1] +"] from "+ getmonsterinfo(killedrid, 0) +" (chance: "+.item_arrays[.@i+2]+"%) MVP Drop(s).",bc_all,0x00FF00;
}
}
end;
}
OnInit:
// (<structure,<item_id>,<chances>)
setarray .item_arrays[0],
675, 1, 10,
677, 1, 30,
7539, 1, 100;
end;
}