Quote:
Originally Posted by joligario
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());
}
}
}
}