View Single Post
  #8  
Old 01-13-2015, 07:29 PM
Bohbo
Hill Giant
 
Join Date: Dec 2012
Posts: 116
Default

Quote:
Originally Posted by joligario View Post
GetClientByName... Not able to look at the moment, but based off the name of that function, it should return a client object based upon the name you give it. What name did you pass it?
This is what ended up working (thanks to some help by KinglyKrab)

Code:
#Boss 
sub EVENT_ATTACK {
	my @threats = $npc->GetHateList();
	foreach $threat (@threats) {
		quest::emote("Die " . $threat->GetEnt()->GetCleanName() . "!");
	}
}
Code:
#Minion
sub EVENT_SIGNAL {
	if ($signal == 99) {
		my @threats = $entity_list->GetNPCByNPCTypeID(9900023)->GetHateList();
		foreach my $threat (@threats){
			quest::emote("Die " . $threat->GetEnt()->GetCleanName() . "!");
			if ($threat->GetEnt()->IsClient()) {
				quest::attack($threat->GetEnt()->GetCleanName());
			} elsif ($threat->GetEnt()->IsNPC()) {
				quest::attacknpc($threat->GetEnt()->GetID());
			}
		}

	}
}
Reply With Quote