EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Quests::Q&A (https://www.eqemulator.org/forums/forumdisplay.php?f=599)
-   -   Client Hate List (https://www.eqemulator.org/forums/showthread.php?t=39099)

provocating 12-10-2014 04:47 PM

Client Hate List
 
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.

Code:

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

Try something like this.
Code:

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


provocating 12-10-2014 08:42 PM

Quote:

Originally Posted by Kingly_Krab (Post 236079)
Well that function does work for me, all it does is return the amount of mobs on the client's hate list.

Code:

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

Try something like this.
Code:

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.
Code:

sub EVENT_AGGRO # Triggered when a mob aggros a client.
Check here.


All times are GMT -4. The time now is 12:54 AM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.