View Single Post
  #1  
Old 05-08-2017, 05:58 PM
Aquaojo
Sarnak
 
Join Date: Feb 2012
Location: GA
Posts: 34
Default Adding random loot to specific NPCs

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!!
Reply With Quote