/run if not behindCheck then behindCheck = CreateFrame("Frame")end
/run local frame = behindCheck frame:RegisterEvent("UI_ERROR_MESSAGE") frame:SetScript("OnEvent", function(self, event, ...)if (select(1,...):find("behind") ~= nil) then RunMacro("sub") end end)
/run CastSpellByName("Backstab");
/script UIErrorsFrame:Hide();
so with this when im not behind my character, "sub" will be casted instead which is another macro
now the problem is that first it tries to cast backstab then when it detects the "you need to be behind target" it cast the other macro, but if i find a better way for the script to detect that im not behind my target then it will be a little bit faster and dps will be better
the question is what other ways to detect if im behind the target are there?
also i need someone to rewrite this script with the other methods, i think this is too complicated for my knowledge, thank you