Page 1 of 5

Checking Target's target

Posted: Fri Feb 11, 2005 2:14 pm
by Jon100
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.

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

Code: Select all

${Me.TargetOfTarget.ID}

Posted: Fri Feb 11, 2005 6:18 pm
by Terramantian
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.

Posted: Fri Feb 11, 2005 6:56 pm
by Jon100
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

Posted: Fri Feb 11, 2005 7:06 pm
by ieatacid
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.

Posted: Fri Feb 11, 2005 7:08 pm
by ieatacid
Actually, it was just at the bottom of this page.

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

Posted: Fri Feb 11, 2005 7:29 pm
by Lax
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 ;)

Posted: Fri Feb 11, 2005 7:32 pm
by ieatacid
You probably know exactly what you meant
Yes.
I'm not flaming you
Image

Posted: Wed Mar 30, 2005 5:34 am
by Jon100
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

Posted: Wed Mar 30, 2005 11:00 am
by 3ball
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?

Posted: Wed Mar 30, 2005 11:26 am
by Jon100
>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

Posted: Fri Apr 01, 2005 5:56 pm
by Jon100
ok, I figured it out and posted a snippet here:

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

Jon100

Re: Checking Target's target

Posted: Wed Apr 09, 2025 7:32 pm
by xyilla

Re: Checking Target's target

Posted: Wed Apr 09, 2025 7:33 pm
by xyilla

Re: Checking Target's target

Posted: Wed Apr 09, 2025 7:34 pm
by xyilla