View Single Post
  #1  
Old 12-25-2010, 01:27 AM
Akkadius's Avatar
Akkadius
Administrator
 
Join Date: Feb 2009
Location: MN
Posts: 2,072
Default

Quote:
Originally Posted by Astal View Post
I mean all my npcs have the same npcid. I would need to move em via theyre spawnID no?

Cant find any quest code to do that
Here, this should help you out a bit.

This could probably most appropriately be used on a controller NPC or a boss hp event to control the other NPC's.

Code:
my @NPCLIST = $entity_list->GetNPCList();
			my $NPCToRespond = 555; #NPCID to respond
			my $NPCToBeAttacked = 556; #NPCID to be attacked
			foreach $entity (@NPCLIST){
				if($entity->GetNPCTypeID() == $NPCToRespond) {
				$entity->AddToHateList($NPCToBeAttacked, 1);
				}
			}
Reply With Quote