@GMOcean: Arrays hold 128 values, not 256.
@darristan: You can have duplicate entries in mob_db2, which will overwrite anything in mob_db.
Another way to do this without looping through arrays is by creating NPC variables based on array name, then doing a single comparison:
- script MobExtraDrops -1,{
OnNPCKillEvent:
if (getd("."+killedrid) && rand(10000) <= getd("."+killedrid+"[1]"))
getitem getd("."+killedrid+"[0]"),1;
end;
OnInit:
setarray .@MobID[0], 1374, 1370, 1754, 1492, 1871, 1150, 1147, 1243, 1039, 1115, 1148, 1167, 1159, 1163, 1276, 1685, 1369, 1110; // Monsters ID
setarray .@DropID[0],28307,28308,28108,28304,28209,28114,28102,28319,28134,28135,28136,28137,28142,28143,28143,28221,28322,28132; // Items ID
setarray .@Chance[0], 75, 75, 250, 250, 250, 250, 250, 75, 250, 250, 100, 75, 250, 75, 75, 250, 75, 75; // Drop Rate, as in percentage (100 = 1%)
set .@j, getarraysize(.@MobID);
for(set .@i,0; .@i<.@j; set .@i,.@i+1)
setarray getd("."+.@MobID[.@i]+"[0]"),.@DropID[.@i],.@Chance[.@i];
end;
}