danc68 8 Posted March 18, 2015 Share Posted March 18, 2015 Since Droidz did such a fabulous job in helping me put together a healing profile that would heal my bodyguard (/focus), I was wondering if anyone knew a way to select from a list of "possible" targets and set the one it found to the focus? Here is what I am striving for: if exists (Aeda Brightdawn, Defender Illona, Delvar Ironfist, Leorajh, Talonpriest Ishaal, Tormmok, Vivianne) Set Focus then /targetlasttarget As I do not know programming, I thought I would post my thought here and see if anyone knows a way to do this? Thanks! Link to comment https://wrobot.eu/forums/topic/2088-select-from-a-list-of-targets/ Share on other sites More sharing options...
Bugreporter 93 Posted March 18, 2015 Share Posted March 18, 2015 Better is, to use the npcid instead of name, because not all use an english client Link to comment https://wrobot.eu/forums/topic/2088-select-from-a-list-of-targets/#findComment-9818 Share on other sites More sharing options...
Droidz 2738 Posted March 19, 2015 Share Posted March 19, 2015 Hello, When Bugreporter have say, you cannot share your fightclass because you use unit and spell name (this don't works on wow french client by sample). local npcFollowers={"Aeda Brightdawn", "Defender Illona", "Delvar Ironfist", "Leorajh", "Talonpriest Ishaal", "Tormmok", "Vivianne"} for key,value in pairs(npcFollowers) do RunMacroText("/target " .. value) local targetName = UnitName("target") if targetName == value then CastSpellByName("Flash of Light" , "TARGET") TargetLastTarget() return end end You can also try this code (but not safe): local targetName = UnitName("target") TargetNearestFriend() local targetNameSecond = UnitName("target") if not (targetName == targetNameSecond) then CastSpellByName("Flash of Light" , "TARGET") TargetLastTarget() end Link to comment https://wrobot.eu/forums/topic/2088-select-from-a-list-of-targets/#findComment-9828 Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now