Whiper target macro issue

The following will work some times on who I target. I can target myself and it works. I picked different people in my raid groups and it will work on some but not others.

/run local t=“target” if (UnitName(t)~=nil) then SendChatMessage("you are now set as my focus for " … GetSpellLink(“Tricks of the Trade”),“WHISPER”,nil,UnitName(t)) end
/focus

You’ve got a bunch of smart quotes in there but that might be because you didn’t wrap it in code tags. `x3

Could just use Macro-Talk and /tu target <words>.
https://www.curseforge.com/wow/addons/macro-talk

Thanks but it does not look like Macro-Talk will work in GetSpellLink(“Tricks of the Trade”).

Not everyone knows what Ticks of the trade does. I was hoping to include a link that can be clicked as part of the whisper.

/focus
/run local t=UnitName("focus") if (t) then SendChatMessage("you are now set as my focus for " .. GetSpellLink("Tricks of the Trade"),"WHISPER",nil,t) end
1 Like

Thanks. I’ll have to wait till this weekend for my next raid and test on the person my old macro would not work on.

oK, it did not work on some people in my raid. After testing it on different people, I noticed that it does not work on anyone from a different server. It works perfectly on people on my server.

Any tricks to get this to work for people from any servers?

After a quick search, I was able to modify your code. this one will work on other people from any server.

/focus
/run local t=GetUnitName(“target”,true) if (t) then SendChatMessage("you are now set as my focus for " … GetSpellLink(“Tricks of the Trade”),“WHISPER”,nil,t) end

Thanks again for giving me the framework for the new macro

1 Like