View Single Post
  #5  
Old 05-16-2011, 11:13 PM
Astal
Hill Giant
 
Join Date: Mar 2010
Posts: 236
Default

Quote:
Originally Posted by KLS View Post
It was mostly used as an example of how to manipulate the hate lists. To give an idea of how to do what you want to do that way I still suggest Joli's idea.

Ex:

Code:
	#find npc of npc type 123456
	my $parent_npc = $entity_list->GetMobByNpcTypeID(123456);
	if($parent_npc) {
		my $random_target = $parent_npc->GetHateRandom();
		#do something
	}
oh, ok i have that so far, couldnt figure out how to sent the $random_target to the other mob though.

Code:
sub EVENT_ATTACK {
	$laibach = $entity_list->GetMobByNpcTypeID(999424);
	if($laibach) {
		$random_hate = $mob->GetHateRandom();
	}
}
Reply With Quote