• You've discovered RedGuides, an EverQuest multi-boxing and scripting community 🧙‍♀️⚙️. We want you to play several EQ characters at once, come join us and say hello! 👋

  • A TLP without truebox has thawed (Very Vanilla ready)
    Frostreaver

Question - TargetOfTarget

Joined
Jan 29, 2021
RedCents
193¢
Does TargetOfTarget only work on mq.TLO.Me? Reading the groups makes me think it should work on any group member I target, but I am not getting this to work.

I am trying to get my Enchanter Mez routine to not mez any NPC that the tank or Pets are targeting.

[CODE title="Target Skip"]local tank = mq.TLO.Spawn("TANKNAME")

-- target the tank and wait for Target.ID to equal tank.ID
targeting.targetById(tank.ID())

-- this returns 0, not sure why
local tank_target_id = mq.TLO.Target.TargetOfTarget.ID()
print(string.format('%s[%d] Target: %d', mq.TLO.Target.TargetOfTarget.Name(), tank.ID(), tank_target_id))[/CODE]
 
The TLO is on “Me” probably because it’s YOUR target of target. Nothing lets you see your Target’s Target’s Target (but you also don’t need it for what you’re doing).

If what you were trying did work, the return value would be your tank. (Your Target is the tank, the tank’s target is the mob, the mob’s target is your tank). What you want returned is your Target’s Target (Me.TargetOfTarget) because you want to know the mob (Your Target is the tank, tank’s Target is the mob).

If you want to do that without targeting the tank, you need something like dannet so you can query the tank and ask what the tank has targeted.
 
maybe want your TargetofTarget
local tank_target_id = mq.TLO.Me.TargetOfTarget.ID()

you'd have Tank targeted but be returning your Targetof target which is his target?

looks like Knightly beet me,.. =(
 
I get what you all are saying .. let me work on that ... I guess I misread the whole TargetOfTarget thing

Since I main my Paladin, I have thought about simply passing Target.ID as an argument from MQ to the Lua script (in addition to mez radius) so that Enchanter could skip mezzing tank target

[CODE title="Lua"]/bct Enchanter //Lua run enchanter_mez_area ${Me.Target.ID} 80[/CODE]

I was trying to come up with something more clever in the case where the tank is attacking target 1 and the Mage pets are attacking target 2. That is why I was trying to have my Enchanter figure out who the tank and pets were attacking

[CODE title="Lua"]/bct Enchanter //Lua run enchanter_mez_area 80[/CODE]
 
Last edited:
Question - TargetOfTarget

Users who are viewing this thread

Back
Top
Cart