Hello guys,
please can someone help me?
I will check the spezialization of the units and when the unit is a healer, then give him the Earth Shield.
My script makes on each unit where I click the earth shield… Not my vision!
Code:
function Ake.SpecID(unit)
local specID = GetSpecializationInfo(GetSpecialization())
if not UnitExists(unit) then
return false
end
if specID == 65 or specID == 105 or specID == 256 or specID == 257 or specID == 264 or specID == 270 then
return true
end
return false
end
Code:
ProbablyEngine.condition.register("healer", function(target)
if not UnitExists(target) then
return false
end
if Ake.SpecID(target) then
return true
else
return false
end
end)
Code:
{ "Earth Shield", { "!target.buff(Earth Shield)", "target.healer" }, "target" },
What am I doing wrong?
Best Regards
dechad