• You've discovered RedGuides 📕 an EverQuest multi-boxing community 🛡️🧙🗡️. We want you to play several EQ characters at once, come join us and say hello! 👋
  • IS THIS SITE UGLY? Change the look. To dismiss this notice, click the X --->

What is the best practice to get number of mobs on aggro? (1 Viewer)

Joined
Oct 31, 2019
RedCents
1,780¢
Searching the forums I found statements that CWTN plugins unload XAssist because it was causing troubles.

so:
HaterCount:
return mq.TLO.XAssist.XTFullHaterCount()
doesn't work anymore. It creates an errormessage now like: attempt to index field 'Xassist' (a nil value)

Searching further I found a snippet as part of Multihunter which I may can use as substitute for my luas.
Autohater:
local function get_xtar_count()
    local m = mq.TLO.Me
    local xtc = 0
    for n = 1,20 do
        if m.XTarget(n).ID() ~= nil and m.XTarget(n).ID() ~= 0 and m.XTarget(n).TargetType() == 'Auto Hater' then
            xtc = xtc+1
        end
    end
    --debug_xtars('Xtar count return: '..xtc)
    return xtc
end
Would that be something like best practice now to get the number of mobs on aggro?

Is there a non critical TLO available which offers "XTFullHaterCount"?
 
Last edited:

XTAggroCount[N]

N is optional and defaults to 100.

Returns the number of AUTO-HATER mobs on the extended target window where your aggro is less than the optional parameter N. N must be between 1-100 inclusive or it will be set to 100 (the default value).

If aggro is above 100 (maybe caused by a stun) xtaggrocout does not include this mob, which may result into a reply of 0 if the only mob on aggro gets stunned.
Maybe the reply will even be 0 for the tank, if his aggro is 100, as it states : "where your aggro is less"
 
@nerp do I have to iterate myself like shown in the sample-code or are you aware of a member or function of mq.TLO.Me.XTarget() which provides the number of mobs on aggro?

mq.TLO.Me.XTarget() with no other arguments returns the # of auto-hater XTargets. I don't think it was well documented in the wiki, which is why i had the function built in MultiHunter to do the same thing.
 
Me.XTAggroCount(100) <-- gives you all mobs on xtarget where you aggro is les than 100 except for the one that is yhour target, because you check that with Target.AggroPct

Me.XTarget <-- gives you all things on aggro, players, pc pets, mobs... so nerp would make it not work right.
 
Me.XTAggroCount(100) <-- gives you all mobs on xtarget where you aggro is les than 100 except for the one that is yhour target, because you check that with Target.AggroPct

Me.XTarget <-- gives you all things on aggro, players, pc pets, mobs... so nerp would make it not work right.

Depends on what you're trying to accomplish. To pull up spawn ID's and other specific spawn data on the xtarget list you have to pull data for the whole thing. That one you want might be at the end of a long list of imaginary ones. Eliminate pets, charmed pcs, and other things you want ignored after you get the whole picture.
 
mq.TLO.Me.XTarget() with no other arguments returns the # of auto-hater XTargets. I don't think it was well documented in the wiki, which is why i had the function built in MultiHunter to do the same thing.
modified my Lua and came to the conclusion that it does not work like that.

mq.TLO.Me.XTarget() with no other arguments returns the # of auto-hater XTargets.
returns the # of all objects shown on xtarget not only the auto-hater.

After I changed my Lua to use it, this event was constantly triggered even in the guildlobby. I was sure there where no mobs nor pc on auto-hater.
But my xtarget has 3 dedicated slots for "Group Assist", "Group MT", "Puller". Those 3 are part of the count of XTarget().
I had to convert it back in order to make it work as expected.


@nerp: those using your luas and want to have some self-created events, using some of the xtarget-features, running contemporary may report unexpected behavior.
Luckily the function "get_xtar_count" contains the Auto-Hater-filter and works for me as expected.
Seems that this is the "best practice" for the required functionallity.
 
@kaen01 : if you want the number of mobs on aggro, Me.XTAggroCount(100) is unreliable.
If you have 5 mobs on xtarget-auto-hater and 3 of those are on 100% aggro, as your char may be the mt and threw an aoe-aggro, Me.XTAggroCount(100) will reply "2" which is far from what I would expect. If the mt does his job well, Me.XTAggroCount(100) will most of the time reply "0", which is great for the sole case to decide, if a mt should throw an aoe-aggro, but not for other decisions.
 
@nerp: those using your luas and want to have some self-created events, using some of the xtarget-features, running contemporary may report unexpected behavior.
Luckily the function "get_xtar_count" contains the Auto-Hater-filter and works for me as expected.
Seems that this is the "best practice" for the required functionallity.

Thanks for the heads up. I don't typically assign non-default xtargets other than on recent raids for xtarget heals so haven't run across that.

Luckily I never bothered to go back and fix it up so MH is fine!
 
What is the best practice to get number of mobs on aggro?

Users who are viewing this thread

Back
Top