Is there a way that I can run a macro AFTER a spell was cast? PQR offers the macro before but how can I do something after, like say ability was used and then /use potion . Thanks.
Forget about this, I tried to approach something the wrong way.
Last edited by kclux; 09-08-2012 at 09:12 AM.
Can someone write. Where can I get a new client version Offsets 16048???
Anyone know what's wrong with this?
thanks for your help LazyLazyCode:local hasSeal = false local Spells = { 31801, 20154, 20164, 20165 } for _,v in ipairs(Spells) do hasSeal = true end local CS = GetSpellInfo(35395) if hasSeal then if UnitExists("focus") then if UnitPower("player", 9) < 5 or IsSpellInRange(CS, "focus") == 0 then CastSpellByName(GetSpellInfo(20271), "focus") elseif hasSeal then if UnitExists("target") then if UnitPower("player", 9) < 5 or IsSpellInRange(CS, "target") == 0 then CastSpellByName(GetSpellInfo(20271), "target") end end end end end
Can you show me an example of the code in use?
Class == "PALADIN"?
I don't understand how to return the second value, do I just need to print it out in WoW? and if so how?
Spec = GetSpecializationInfo(GetSpecialization())
It's the second return value
My Svn - https://subversion.assembla.com/svn/averykeys-svn/
Your hasSeal is always returning true regardless of if you have the spells or not..
Should be for _,v in ipairs(Spells) do if UnitBuffID("player",v) then hasSeal = true end end
It's like you defined the v variable as whatever the spells are and you didn't use it at all lol..
I didn't really look at the rest of your coding but let me know if this fixes it
Edit: idk if spells is a buff or debuffs that you're checking for. I didnt bother to look up the spellids but this should point you in the right direction
Editedit: you can clean up some of your loops if you use "and" in your if loops.
Like so:
if hasSeal
and UnitExists("focus")
and (UnitPower("player", 9) < 5 or IsSpellInRange(CS, "focus") == 0)
then
CastSpellByName(GetSpellInfo(20271), "focus")
end
if hasSeal
and UnitExists("target")
and (UnitPower("player", 9) < 5 or IsSpellInRange(CS, "target") == 0)
then
CastSpellByName(GetSpellInfo(20271), "target")
end
Last edited by Bgreen12; 09-08-2012 at 12:19 PM.
if UnitClass("player") == "PALADIN" then
-- do something
end
As for the GetSpecializationInfo(GetSpecialization()), you can do
if (select(2, GetSpecializationInfo(GetSpecialization()))) == "Frost" then
-- Do something
end
"Frost" for a Frost DK, if you want to know what to put in == "Frost" just do this in game
/dump (select(2, GetSpecializationInfo(GetSpecialization())))
[QUOTE=averykey;2488341]Anyone know what's wrong with this?
As Paladin's Seals are you moved to the Stancebar, they are accesible with GetShapeshiftForm and CastShapeshiftForm, so with that in mind, your code could be simplified toCode:local hasSeal = false local Spells = { 31801, 20154, 20164, 20165 } for _,v in ipairs(Spells) do hasSeal = true end local CS = GetSpellInfo(35395) if hasSeal then if UnitExists("focus") then if UnitPower("player", 9) < 5 or IsSpellInRange(CS, "focus") == 0 then CastSpellByName(GetSpellInfo(20271), "focus") elseif hasSeal then if UnitExists("target") then if UnitPower("player", 9) < 5 or IsSpellInRange(CS, "target") == 0 then CastSpellByName(GetSpellInfo(20271), "target") end end end end end
-- DELETE THE 3 LINES BELOW ---
local hasSeal = false
local Spells = { 31801, 20154, 20164, 20165 }
for _,v in ipairs(Spells) do hasSeal = true end
-- DELETE THE 3 LINES ABOVE ---
local CS = GetSpellInfo(35395)
if GetShapeshiftForm("player") ~= 0 and UnitPower("player", 9) < 5 then
if UnitExists("focus") or IsSpellInRange(CS, "focus") == 0 then
CastSpellByName(GetSpellInfo(20271), "focus")
elseif UnitExists("target") or IsSpellInRange(CS, "target") == 0 then
CastSpellByName(GetSpellInfo(20271), "target")
end
end
I don't understand why you do this tho
if UnitExists("focus") or IsSpellInRange(CS, "focus") == 0 then
CastSpellByName(GetSpellInfo(20271), "focus")
You're saying: If i have a focus or i'm to far away to cast Crusader Strike on focus, then cast Crusader Strike on focus
Don't you want to cast on target if you focus exists and is to far away?
All of this seems to look right. What I don't get though Avery is why you do your "end" that way. With it going that way, your leaving loops open until it hits that last end, in turn using up memory. The bigger the rotation you get with the end's this way, the more memory the rotation will use. For me, I would do it this way:
This way, it closes all those loose ends. Again, as green stated, don't know if its a Buff or Debuff, so change to your content up there (just added in what bgreen already stated. But on that subject, for the life of me, I don't get why people still use ipairs. It's also a big waste of memory.). I changed it to the way I would do it. No reason in having a elseif for hasSeal when both of the if's were checking to see if it was true anyways.Code:local hasSeal = false local Spells = { 31801, 20154, 20164, 20165 } for i=1,#Spells do if UnitBuffID("Player",Spells[i]) then hasSeal = true end end local CS = GetSpellInfo(35395) if hasSeal then if UnitExists("focus") then if UnitPower("player", 9) < 5 or IsSpellInRange(CS, "focus") == 0 then CastSpellByName(GetSpellInfo(20271), "focus") end elseif UnitExists("target") then if UnitPower("player", 9) < 5 or IsSpellInRange(CS, "target") == 0 then CastSpellByName(GetSpellInfo(20271), "target") end end end
It's the PLAYER'S Focus. If the player has a enemy set to his Focus, it will cast Judgement on that target instead, to keep the CS debuff up on that target for added DPS. This has been done for a while and in multi-target situation's, it's shown about 500-1k DPS increase depending on circumstances.
Last edited by firepong; 09-08-2012 at 02:49 PM.
firepong
forums write that into the rotation can be "thrashing" plug and DPS goes up