TESTED WARRIOR ABILITIES (PVP BASED, USABLE IN PVE WITH SIMPLE SPELL ID ADDITIONS)
Name: Spell Reflect
Delay: 100
Target: Player
SpellID: 0
NO ACTIONS
LUA Code:
Code:
local ReflectID = {
5782, -- Fear
33786, -- Cyclone
28272, -- Pig Poly
118, -- Sheep Poly
61305, -- Cat Poly
61721, -- Rabbit Poly
61780, -- Turkey Poly
28271, -- Turtle Poly
51514, -- Hex
51505, -- Lava Burst
339, -- Entangling Roots
30451, -- Acrane Blast
605 -- Mind Control
}
local CastingTarget = nil
for _, reflectID in ipairs(ReflectID) do
for i=1, 5 do
local aTarget = "arena"..tostring(i)
local ainRange = IsSpellInRange(GetSpellInfo(57755), aTarget)
if UnitExists(aTarget) and ainRange == 1 then
if UnitCastingInfo(aTarget) == GetSpellInfo(reflectID) then
if GetSpellCooldown(23920) == 0 or UnitBuffID("player", 23920) then
local stance = GetShapeshiftForm()
if UnitPower("player") > 15 then
if stance == 1 or stance == 2 then
spellReflect = 1
CastingTarget = aTarget
else
CastSpellByID(2457, "player")
spellReflect = 1
CastingTarget = aTarget
end
end
end
end
end
end
local finRange = IsSpellInRange(GetSpellInfo(57755), "focus")
if UnitExists("focus") and finRange == 1 then
if UnitCastingInfo("focus") == GetSpellInfo(reflectID) then
if GetSpellCooldown(23920) == 0 or UnitBuffID("player", 23920) then
local stance = GetShapeshiftForm()
if UnitPower("player") > 15 then
if stance == 1 or stance == 2 then
spellReflect = 1
CastingTarget = "focus"
else
CastSpellByID(2457, "player")
spellReflect = 1
CastingTarget = "focus"
end
end
end
end
end
local tinRange = IsSpellInRange(GetSpellInfo(57755), "target")
if UnitExists("target") and tinRange then
if UnitCastingInfo("target") == GetSpellInfo(reflectID) then
if GetSpellCooldown(23920) == 0 or UnitBuffID("player", 23920) then
local stance = GetShapeshiftForm()
if UnitPower("player") > 15 then
if stance == 1 or stance == 2 then
print("Got here atleast")
spellReflect = 1
CastingTarget = "target"
else
CastSpellByID(2457, "player")
spellReflect = 1
CastingTarget = "target"
end
end
end
end
end
end
if spellReflect == 1 and CastingTarget then
if IsEquippedItemType("Shields") then
if UnitBuffID("player", 23920) and UnitCastingInfo(CastingTarget) then
return true
elseif not UnitCastingInfo(CastingTarget) then
spellReflect = nil
RunMacroText("/equip 2 HANDED WEAPON HERE")
return true
elseif UnitCastingInfo(CastingTarget) then
CastSpellByID(23920, "player")
return true
end
elseif not IsEquippedItemType("Shields") then
if UnitCastingInfo(CastingTarget) then
RunMacroText("/equip 1 HANDED WEAPON HERE")
RunMacroText("/equip SHIELD HERE")
return true
elseif not UnitCastingInfo(CastingTarget) then
spellReflect = nil
end
end
elseif IsEquippedItemType("Shields") then
spellReflect = nil
RunMacroText("/equip 2 HANDED WEAPON HERE")
return true
end
Name: Disarm
Target: Player
Delay: 0
SpellID: 71
NO ACTIONS
LUA Code:
Code:
local DisarmDebuffs = {31884, 59016, 18499, 2825, 32182, 2825, 32182, 51713, 51271, 33702, 20572, 33697, 99740, 1719, 46924, 12472 }
local DisarmCD = GetSpellCooldown(676)
local stance = GetShapeshiftForm()
if DisarmCD == 0 and UnitPower("player") > 15 then
for _, v in ipairs(DisarmDebuffs) do
for i = 1, 5 do
local aTarget = "arena"..tostring(i)
local ainRange = IsSpellInRange(GetSpellInfo(676), aTarget)
if UnitExists(aTarget) and ainRange == 1 then
if UnitBuffID(aTarget, v) then
if stance == 2 then
CastSpellByID(676, aTarget)
return false
else
return true
end
end
end
end
local tinRange = IsSpellInRange(GetSpellInfo(676), "target")
if UnitExists("target") and tinRange == 1 then
if UnitBuffID("target", v) then
if stance == 2 then
CastSpellByID(676, "target")
return false
else
return true
end
end
end
local finRange = IsSpellInRange(GetSpellInfo(676), "focus")
if UnitExists("focus") and finRange == 1 then
if UnitBuffID("focus", v) then
if stance == 2 then
CastSpellByID(676, "focus")
return false
else
return true
end
end
end
end
elseif stance == 2 then
if GetPrimaryTalentTree() ~= 3 then
CastSpellByName(tostring(GetSpellInfo(2457)), "player")
return false
end
end
Name: Arena: Pummel
SpellID: 6552
Delay: 0
Target: Custom
NO ACTIONS
LUA Code:
Code:
local InterruptSpells = { 635, 47540, 19750, 82326, 51505, 62809, 331, 77472, 48500, 8936, 5782 }
if select(2, GetSpellCooldown(6552)) == 0 and UnitPower("player") > 5 then
for y=1, 5 do
local aTarget = "arena"..tostring(y)
if UnitExists(aTarget) and IsSpellInRange(GetSpellInfo(6552), aTarget) == 1 then
local spellName, _, _, _, _, endCast, _, _, canInterrupt = UnitCastingInfo(aTarget)
for _, v in ipairs(InterruptSpells) do
if GetSpellInfo(v) == spellName and canInterrupt == false then
if ((endCast/1000) - GetTime()) < 1 then
PQR_CustomTarget = aTarget
return true
end
end
end
end
end
local fTarget = "focus"
if UnitExists(fTarget) and IsSpellInRange(GetSpellInfo(6552), fTarget) == 1 then
local spellName, _, _, _, _, endCast, _, _, canInterrupt = UnitCastingInfo(fTarget)
for _, v in ipairs(InterruptSpells) do
if GetSpellInfo(v) == spellName and canInterrupt == false then
if ((endCast/1000) - GetTime()) < 1 then
PQR_CustomTarget = fTarget
return true
end
end
end
end
local tTarget = "target"
if UnitExists(tTarget) and IsSpellInRange(GetSpellInfo(6552), tTarget) == 1 then
local spellName, _, _, _, _, endCast, _, _, canInterrupt = UnitCastingInfo(tTarget)
for _, v in ipairs(InterruptSpells) do
if GetSpellInfo(v) == spellName and canInterrupt == false then
if ((endCast/1000) - GetTime()) < 1 then
PQR_CustomTarget = tTarget
return true
end
end
end
end
end
I've tested both against myself in duels and after some changes to the code had tested and confirmed that these both work somewhat as intended so far

(Haven't tested the arena sections of either, but Target and Focus are tested)
Disarm can be a lil spammy of changing stances if the target is in range, but not in front of you (FYI)
Planning on adding a timer to Spell Reflect, so you can try and not get fooled by fake casts, but im happy with where it is right now, it's only one ability, and already stronger than the original
*edit*
fixed two things real quick in Disarm, so if you just copy and pasted, i recommend doing Disarm over. Just noticed a bug that may have you stance swapping unneeded lol (didn't break it, but was annoying anyways)
**edit**
happydado..... FINALLY got around to debugging your CS issue..... the issue was outdated API websites....