View Single Post
  #10  
Old 04-03-2015, 02:59 AM
Figback65
Discordant
 
Join Date: Aug 2009
Location: 2131231231
Posts: 255
Default

Finalized Template to get npc to npc distance checks and add agro, to script agro linking for whatever reason you may want. I will be usen it for many reasons including bypassing faction linking on a wiped custom server.
GetHateRandom can be changed to whatever you like, GetHateTop works as well, depending what you want to happen.

Code:
sub EVENT_TIMER{
	if($timer == 1) {
	my @nlist = $entity_list->GetNPCList(); 
		foreach my $n (@nlist){
			if (plugin::CheckDistBetween2Ents($npc, $n, 20)) {
			$n->AddToHateList($npc->GetHateRandom());
			}
		}
	}
}
__________________
Reply With Quote