I was wondering who might be able to help me on this on.
I have a Mage in my party and have tried setting up a mouseover Poly script but I find it to perform inconsistently, so here is what I think would improve it.
First thing I do is this
if UnitExists("mouseover") then SetRaidTarget('mouseover', 5) end
Then what I'm looking to do after this is for JUST the Mage to target RaidTarget5 and then cast Polymorph on that target, and then target his last target.
Change to
function CCPoly()
if UnitExists("mouseover") then SetRaidTarget('mouseover', 5) end
local i
for i=1,5 do
if GetRaidTargetIndex("target")==5 and not UnitIsDead("target") then
if not buffed("Polymorph","target") then cast("Polymorph") end
end
TargetNearestEnemy()
end
TargetUnit("playertarget")
end
function CCPoly()
if UnitExists("mouseover") then SetRaidTarget('mouseover', 5) end
local i
for i=1,5 do
if GetRaidTargetIndex("target")==5 then
if not buffed("Polymorph","target") then cast("Polymorph") end
end
TargetNearestEnemy()
end
TargetUnit("playertarget")
end
This worked instead, changed to GetRaidTargetIndex.
The only issue now is that when the target is dead, the RaidTarget5 persists and you can't seem to mouseover to another target and label it RaidTarget5. Otherwise, works like a charm.
Thanks FS
I have been using your script, but editing it down and using it more like a reference sheet. I'm trying to learn lua in the process so yes even though I could just be using it out of the box, I'm more of a deconstruct it type of guy then try and put it back together type.
I highly appreciate the response. And hope you got some well needed sun exposure.
SORRY, I've been on a cruise!
Yep, I use that exact mechanism to manage crowd control in 5-Minute Multiboxing. I assume you aren't using my stuff. If you were, you could hit F1 and your mage would instantly be assigned a poly target of whoever you were targeting atm.
But what you want is considerably more challenging than what you think it is. See, there is no function in Vanilla wow to TargetUnit("raidtarget5"). Nope, that's not a real unit name. So how do you target your raidtarget5? Painfully. Make a loop, say 5 iterations, and in each iteration, you do "does this guy have raidtarget5?" No? Target next unit. Yes? Jump out of loop.
What you are talking about is writing a program, not just a macro. And this is where SuperMacro saves you!
You can simply make a function in SM_Extend.lua and put it in a macro, for example:
Macro:
/run sheepit() /cast Fireball
SM_Extend.lua
function sheepit() local i for i=1,5 do if GetRaidTargetIndex("target")==5 then if not buffed("Polymorph","target") then cast("Polymorph") end end TargetNearestEnemy() end TargetUnit("playertarget") end
Note, I'm at work, haven't tested the above, so there may be syntax errors or whatever.