ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   Lua/XML Help (https://www.esoui.com/forums/forumdisplay.php?f=175)
-   -   Unit questions (https://www.esoui.com/forums/showthread.php?t=2397)

Maverick827 11/05/14 08:19 PM

Unit questions
 
I'm looking for a way to do the following:

1. Get the name of the unit you currently have tab targeted. I know GetUnitName('reticleover') gets the name of the unit you have your reticle/cursor/focus on, but that's unfortunately not what I need. When you target an enemy and hit tab, you get the box with the four little corners around it filled in white. If you look away, the corners are no longer filled in. I need to get the name of that unit, in this state, if possible.

2. Whether or not this unit is in a veteran dungeon/trial. Now that we have dungeon scaling, GetUnitVeteranRank and IsUnitVeteran doesn't necessarily indicate whether or not the dungeon mode itself is set to veteran. I tried IsUnitUsingVeteranDifficulty on trash mobs in a veteran dungeon, but it was false. Maybe it only works for bosses? Or maybe it just doesn't work. There's a SetVeteranDifficulty method, but not GetVeteranDifficulty, unfortunately.

Thanks!

katkat42 11/05/14 09:46 PM

Quote:

Originally Posted by Maverick827 (Post 13019)
2. Whether or not this unit is in a veteran dungeon/trial. Now that we have dungeon scaling, GetUnitVeteranRank and IsUnitVeteran doesn't necessarily indicate whether or not the dungeon mode itself is set to veteran. I tried IsUnitUsingVeteranDifficulty on trash mobs in a veteran dungeon, but it was false. Maybe it only works for bosses? Or maybe it just doesn't work. There's a SetVeteranDifficulty method, but not GetVeteranDifficulty, unfortunately.

What I think you need to do is use IsUnitUsingVeteranDifficulty on yourself, not the trash mob. So: IsUnitUsingVeteranDifficulty("player")

Maverick827 11/05/14 10:09 PM

That worked, thanks.

Garkin 11/05/14 10:23 PM

As for 1) you can try unitTag "target". This unitTag exists, but I'm not sure if it always the same as "reticleover" or if it is really highlighted target.

Maverick827 11/06/14 12:21 PM

I tried "target," but it didn't seem to work in the scenario.


All times are GMT -6. The time now is 04:54 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI