Checking Target's target

Need help with a macro you are writing? Ask here!

Moderator: MacroQuest Developers

User avatar
Jon100
a hill giant
a hill giant
Posts: 161
Joined: Mon Sep 22, 2003 6:15 am
Location: UK

Checking Target's target

Post by Jon100 » Fri Feb 11, 2005 2:14 pm

Is there a way to find the spawn ID of either your target's target, or of the target of spawn_00?

if you are at fairly close range you can use /assist, of course, but this does not work if you are far away.

Alternately, is there a way to test whether randommob_01 has aggroed on someone? Preferably something you can check from any distance.

Thank you in advance for for any assistance.

Some Guy
a ghoul
a ghoul
Posts: 119
Joined: Thu Apr 29, 2004 5:32 pm

Post by Some Guy » Fri Feb 11, 2005 5:29 pm

Code: Select all

${Me.TargetOfTarget.ID}

Terramantian
a ghoul
a ghoul
Posts: 120
Joined: Thu May 13, 2004 6:20 pm

Post by Terramantian » Fri Feb 11, 2005 6:18 pm

TargetOfTarget is only available if you're in a group/raid that has HoTT active... I believe that is the only time that info is sent to the client as well.

As for detecting aggro, the best way is to either assist, or check it's heading and speed against the location of the person in question... don't think there's any other way, but could be wrong.

User avatar
Jon100
a hill giant
a hill giant
Posts: 161
Joined: Mon Sep 22, 2003 6:15 am
Location: UK

Post by Jon100 » Fri Feb 11, 2005 6:56 pm

I like the second suggestion:

Checking all spawns within 200 radius of the puller, calculating the reverse bearing of each mob, and seeing if the mob's HeadingTo.Degrees is the same.

However, I'm going to be lazy and just earn HoTT. :p

User avatar
ieatacid
Developer
Developer
Posts: 2727
Joined: Wed Sep 03, 2003 7:44 pm

Post by ieatacid » Fri Feb 11, 2005 7:06 pm

You could check Animation. It's a member of the spawn TLO. If I remember correctly, a mob's animation when agro is different than when not. There's a post about it somewhere on here and I'm sure if you search you can find it.

User avatar
ieatacid
Developer
Developer
Posts: 2727
Joined: Wed Sep 03, 2003 7:44 pm

Post by ieatacid » Fri Feb 11, 2005 7:08 pm

Actually, it was just at the bottom of this page.

http://macroquest2.com/phpBB2/viewtopic.php?t=8034

Lax
We're not worthy!
We're not worthy!
Posts: 3524
Joined: Thu Oct 17, 2002 1:01 pm
Location: ISBoxer
Contact:

Post by Lax » Fri Feb 11, 2005 7:29 pm

It's a member of the spawn TLO
I hate you, I really do ;) People, there is a really big difference between a datatype and a Top-Level Object (TLO). TLOs do not have members, but datatypes do. You could get literally any datatype from using a Top-Level Object. For example, I could add a TLO that with no index, gives a string type... but if given an index, gives an int type. Lets call the TLO "IDontEatAcid" ;) string has a member called Equal, but int does not. So then your words "Equal is a member of the IDontEatAcid TLO" is proven false because it is not always true. If I use an index with IDontEatAcid, and try to use Equal, the parser would say "there is no int member 'Equal'" or smoething to that effect. However, with no index it would work perfectly fine. To the same effect, int has a member called Hex, but string does not. The same statement "Hex is a member of the IDontEatAcid TLO" is also proven false, because it is also not always true.

You probably know exactly what you meant, but unless everyone can use the correct terminology describing TLOs and datatypes, people will still be confused thinking that every TLO has different members, when really the members are tied only to datatypes. I'm not flaming you, but this needs to be straightened out for everyone ;)
Lax Lacks
Master of MQ2 Disaster
Purveyor of premium, EULA-safe MMORPG Multiboxing Software
* Multiboxing with ISBoxer: Quick Start Video
* EQPlayNice, WinEQ 2.0

User avatar
ieatacid
Developer
Developer
Posts: 2727
Joined: Wed Sep 03, 2003 7:44 pm

Post by ieatacid » Fri Feb 11, 2005 7:32 pm

You probably know exactly what you meant
Yes.
I'm not flaming you
Image

User avatar
Jon100
a hill giant
a hill giant
Posts: 161
Joined: Mon Sep 22, 2003 6:15 am
Location: UK

Post by Jon100 » Wed Mar 30, 2005 5:34 am

Ok, back to this one again... but need some help with some trigonometry :(


Given mob M is at Xm,Ym and player P is at Xp,Yp, how do I calculate the bearing from Xm,Ym to Xp,Yp?

Or can anyone point me to some code that already does this please?

Jon100

3ball
a lesser mummy
a lesser mummy
Posts: 65
Joined: Fri Dec 17, 2004 10:43 am
Location: Florida
Contact:

Post by 3ball » Wed Mar 30, 2005 11:00 am

Given mob M is at Xm,Ym and player P is at Xp,Yp, how do I calculate the bearing from Xm,Ym to Xp,Yp....

So you want the bearing (as in degrees 0-359) with 0 pointing North? I could write the algorithm to return the degree heading. But remember, mobs almost NEVER run directly at someone... unless you're in a wide open field (think Karanas), don't expect the current bearing of the mob to match the target being pursued.

Have you considered the facing of the mob, in relation to player, to determine aggro? I think this would be much more accurate, and would work with a stationary mob (engaged in melee or rooted even).

I think the main questions are: At what points do you want to see aggro? Any aggro at all? aggro on current melee target? who is mob pursuing? Which answer(s) are you trying to find?

User avatar
Jon100
a hill giant
a hill giant
Posts: 161
Joined: Mon Sep 22, 2003 6:15 am
Location: UK

Post by Jon100 » Wed Mar 30, 2005 11:26 am

>I think the main questions are: At what points do you want to see
>aggro? Any aggro at all? aggro on current melee target? who is mob
>pursuing? Which answer(s) are you trying to find?

I'm trying to find the target of a mob that is in the middle of a mass melee (6 players, 2-10 mobs etc), but without changing my current target.
I already know that the mob is fighting (because I have checked the animation) but I do not know if it is attacking one of the tanks, or the group's enchanter/cleric.

>So you want the bearing (as in degrees 0-359) with 0 pointing North?

Yes

>But remember, mobs almost NEVER run directly at someone...
>unless you're in a wide open field (think Karanas), don't expect the
>current bearing of the mob to match the target being pursued.

Yup. However by checking the facing of the mob and the bearing from the mob to each player in the group I can make a pretty good guess who it is attacking.

>Have you considered the facing of the mob, in relation to player, to
>determine aggro? I think this would be much more accurate, and would
>work with a stationary mob (engaged in melee or rooted even).

Unless I misunderstand you, this *is* what im looking for. :)

Jon100

User avatar
Jon100
a hill giant
a hill giant
Posts: 161
Joined: Mon Sep 22, 2003 6:15 am
Location: UK

Post by Jon100 » Fri Apr 01, 2005 5:56 pm

ok, I figured it out and posted a snippet here:

http://macroquest2.com/phpBB2/viewtopic ... 4846#84846

Jon100

xyilla
naggy
naggy
Posts: 29514
Joined: Sun Feb 23, 2025 5:36 am

Re: Checking Target's target

Post by xyilla » Wed Apr 09, 2025 7:32 pm


xyilla
naggy
naggy
Posts: 29514
Joined: Sun Feb 23, 2025 5:36 am

Re: Checking Target's target

Post by xyilla » Wed Apr 09, 2025 7:33 pm


xyilla
naggy
naggy
Posts: 29514
Joined: Sun Feb 23, 2025 5:36 am

Re: Checking Target's target

Post by xyilla » Wed Apr 09, 2025 7:34 pm