saleh 13 Posted September 16, 2016 Share Posted September 16, 2016 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 hi how can i use this code in fight class or party command plug in Thanks Link to comment https://wrobot.eu/forums/topic/3852-attack-marked-target/ Share on other sites More sharing options...
Droidz 2738 Posted September 16, 2016 Share Posted September 16, 2016 Hello, put this code instead of spell name, and use option spell option 'Not spell, is lua...': local SpellName = GetSpellInfo(109259) for i = 1, 4, 1 do local UnitIdString = "party" .. i .. "target" if UnitExists(UnitIdString) then if GetRaidTargetIndex(UnitIdString) == 8 and IsSpellInRange(SpellName,UnitIdString) then CastSpellByName(SpellName, UnitIdString) return end end end (I have added IsSpellInRange) And add "lua script" condition: Lua script: needToCast=false; local SpellName = GetSpellInfo(109259) for i = 1, 4, 1 do local UnitIdString = "party" .. i .. "target" if UnitExists(UnitIdString) then if GetRaidTargetIndex(UnitIdString) == 8 and IsSpellInRange(SpellName,UnitIdString) then needToCast=true; return end end end Return value research: true Return value var: needToCast To use this code in party chat command just use "Action command type" > "Lua" with the first code of this post. of course, replace 109259 by your spell in in all codes. Link to comment https://wrobot.eu/forums/topic/3852-attack-marked-target/#findComment-17997 Share on other sites More sharing options...
saleh 13 Posted September 16, 2016 Author Share Posted September 16, 2016 i do that use it in party but i not work yet :) Test003.xml Link to comment https://wrobot.eu/forums/topic/3852-attack-marked-target/#findComment-18003 Share on other sites More sharing options...
saleh 13 Posted September 18, 2016 Author Share Posted September 18, 2016 i try it again and it is not work Link to comment https://wrobot.eu/forums/topic/3852-attack-marked-target/#findComment-18061 Share on other sites More sharing options...
Droidz 2738 Posted December 22, 2016 Share Posted December 22, 2016 Hello, check if your spell id (109259) is correct Link to comment https://wrobot.eu/forums/topic/3852-attack-marked-target/#findComment-21597 Share on other sites More sharing options...
Terror 2 Posted July 4, 2017 Share Posted July 4, 2017 Does not work for me either. Can anyone confirm this is working? I tried several spell IDs and raid target indexes. TBC Private Bot. Link to comment https://wrobot.eu/forums/topic/3852-attack-marked-target/#findComment-28851 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