Log in

View Full Version : Client Hate List


provocating
12-10-2014, 04:47 PM
To get a count of mobs that a player has aggro on, is there a function currently? I could cycle through mobs in the zone but that seems CPU intensive. There is this

$client->GetAggroCount()

But is is not working for me so far.

Kingly_Krab
12-10-2014, 07:00 PM
Well that function does work for me, all it does is return the amount of mobs on the client's hate list.

int Client::GetAggroCount() {
return AggroCount;
}

Try something like this.
sub EVENT_SAY {
if ($text=~/Hail/i) {
plugin::Whisper("There are " . $client->GetAggroCount() . " NPCs on your hatelist.");
}
}

provocating
12-10-2014, 08:42 PM
Well that function does work for me, all it does is return the amount of mobs on the client's hate list.

int Client::GetAggroCount() {
return AggroCount;
}

Try something like this.
sub EVENT_SAY {
if ($text=~/Hail/i) {
plugin::Whisper("There are " . $client->GetAggroCount() . " NPCs on your hatelist.");
}
}


I saw that in the documentation. I wonder if the function is only available in that event though? I tried to access the function in the event EVENT_AGGRO

Kingly_Krab
12-10-2014, 09:44 PM
That's because EVENT_AGGRO isn't for clients.
sub EVENT_AGGRO # Triggered when a mob aggros a client.
Check here (http://wiki.eqemulator.org/p?Ultimate_Perl_Reference&frm=Main).