Ok - I had this working this morning...Then fried my brain on another project and must be missing something now.
Basically just adds random loot to chest spawns that come up after mobs are killed. Chests are spawning fine. Just no loot.
Code:
sub EVENT_SPAWN {
if($npc_id >= 705003 && $npc_id <= 705007)
{
my $itemid = ( int rand 95000 ) + 1001;
$npc->AddItem($itemid);
}
}
As always - Thanks for the help!!