Wondering if someone can edit this Tricks of the Trade ability down to my /focus target instead of a tank for pvp. If you have a better idea feel free to let me know. Also, still wondering if there's a way to always target whatever /focus is set too. Maybe that would be a bad idea if that person was to target something else before that player was dead though.
Code:
if UnitCanAttack("player","target") and UnitIsDead("target") == nil and UnitHealth("target") > UnitHealthMax("player") and UnitName("target") ~= "Raider's Training Dummy" and UnitInRaid("player") == nil then
local InParty = GetNumPartyMembers()
if InParty > 0 then
for i = 1, InParty, 1 do
local member = "party"..tostring(i)
if UnitGroupRolesAssigned(member) == "TANK" and UnitIsDead(member) == nil then
if UnitThreatSituation(member,"target") ~= 3 and UnitInRange(member) then CastSpellByID(57934,member) end
end
end
end
end