View Single Post
  #54  
Old 08-22-2015, 10:00 PM
Akkadius's Avatar
Akkadius
Administrator
 
Join Date: Feb 2009
Location: MN
Posts: 2,071
Default

Quote:
Originally Posted by chasem View Post
Anyone know if it's possible to not have pets spawn with random items? Tried a few different things without much success. Players can't give them weapons when they spawn with items.
You can add a check to skip NPC's that have an owner ID.

Code:
sub EVENT_SPAWN{
	#::: START: Akka's Diablo Loot Handler :::#
	$NTYPE = 0; #::: TRASH
	if(substr($npc->GetName(), 0, 1) eq "#" && substr($npc->GetName(), 1, 2) ne "#"){  $NTYPE = 1; } #::: NAMED
	if(substr($npc->GetName(), 0, 2) eq "##" && substr($npc->GetName(), 2, 3) ne "#"){ $NTYPE = 2; } #::: RAID
	$LID = (200000 + ($NTYPE * 1000) + $npc->GetLevel());
	if($npc->GetLoottableID() != $LID){
		if($npc->GetOwnerID() > 0){
			return;
		}
		$npc->ModifyNPCStat("loottable_id", (210000 + ($NTYPE * 1000) + $npc->GetLevel())); $npc->AddLootTable();
		$npc->ModifyNPCStat("loottable_id", (200000 + ($NTYPE * 1000) + $npc->GetLevel())); $npc->AddLootTable(); 
	}
	#::: END: Akka's Diablo Loot Handler :::#
}
Reply With Quote