Loading...   


sub EVENT_TIMER{
	if($timer eq "check_prox"){
		my @n_list = $entity_list->GetNPCList();
		foreach my $n (@n_list){
			if(plugin::CheckDist($n, 50)){
				$npc->Emote("wants to attack " . $n->GetCleanName());
				$npc->Attack($n);
			}
		}
	}
}

sub EVENT_SPAWN{
	$nn = $npc->GetCleanName()
	if($nn=~/mangy rat/i){
		quest::settimer("check_prox", 5);
	}
}

Raw Paste Data