Bugreporter 92 Posted March 23, 2015 Share Posted March 23, 2015 Is it possible to detect if there is a marker on the target? (like skull or cross) With the bugfixed "Hostile near" (*happy*) it will be nessasary to concentrate (no AOE) the fire, if the boss is marked and has adds. Link to comment Share on other sites More sharing options...
Droidz 2707 Posted March 23, 2015 Share Posted March 23, 2015 Hello, You have lua functions GetRaidTargetIndex and SetRaidTarget (or SetRaidTargetIcon) Samples: Launch the spell id 109259 on the first boss with skull icon:local SpellName = GetSpellInfo(109259) for i = 1, 4, 1 do local UnitIdString = "boss" .. i if UnitExists(UnitIdString) then if GetRaidTargetIndex(UnitIdString) == 8 then CastSpellByName(SpellName, UnitIdString) return end end end Launch the spell id 109259 on the first raid target with skull icon (this code check the target of raid members):local SpellName = GetSpellInfo(109259) for i = 1, 40, 1 do local UnitIdString = "raid" .. i .. "target" if UnitExists(UnitIdString) then if GetRaidTargetIndex(UnitIdString) == 8 then CastSpellByName(SpellName, UnitIdString) return end end end Launch the spell id 109259 on the first party target with skull icon (this code check the target of party members):local SpellName = GetSpellInfo(109259) for i = 1, 4, 1 do local UnitIdString = "party" .. i .. "target" if UnitExists(UnitIdString) then if GetRaidTargetIndex(UnitIdString) == 8 then CastSpellByName(SpellName, UnitIdString) return end end end ps: Replace 109259 by your spell id and add conditions to launch the spell, to launch the spell if mob health is lower than 50%:local SpellName = GetSpellInfo(109259) for i = 1, 4, 1 do local UnitIdString = "party" .. i .. "target" if UnitExists(UnitIdString) then if GetRaidTargetIndex(UnitIdString) == 8 then if UnitHealth(UnitIdString)/UnitHealthMax(UnitIdString)*100 < 50 then CastSpellByName(SpellName, UnitIdString) return end end end end ps2: Code no tested, do not hesitate to tell me if this don't works nudl, Bugreporter and saleh 3 Link to comment Share on other sites More sharing options...
Emanon 0 Posted January 30, 2018 Share Posted January 30, 2018 Can someone help me. I Have a Mage in Vanilla Wow that I would love to sheep my skull until i tell him to stop it Added in Partychat Lua local SpellName = GetSpellInfo(12824) for i = 1, 4, 1 do local UnitIdString = "party" .. i .. "target" if UnitExists(UnitIdString) then if GetRaidTargetIndex(UnitIdString) == 8 then CastSpellByName(SpellName, UnitIdString) return end end end But comes with and error in game when I ask it to sheep the target Link to comment 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