In raids it is even more important, especially if you are pulling for the tank or playing with an under-equipped or inexperienced tank who might not hold aggro well.
Here is the macro:
#showtooltipThe first line simply means that the button you assign the macro to will show the Misdirection icon instead of the "?" icon you should choose when making this macro. The remaining line (from "/cast" on) is actually one line with three parts.
/cast [target=focus,help] Misdirection; [help] Misdirection;
The three parts are simply conditions that are checked before casting the Misdirection spell. The first section looks to see if you have a target called "focus", and then casts the Misdirection for that focus (more on setting the focus below). The second looks to see if your current target is a friendly one (party member, for instance), and casts the Misdirection on that character instead. Finally, if the other conditions are not true, it checks to see if your pet exists, and then casts it on the pet.
What Misdirection does is switch the threat that comes from your next three shots from you to the target of your Misdirection. So if I cast Misdirection with my main tank as the focus, my next three shots will appear to the mob I am shooting as though they came from the tank instead of me. This helps the tank gain and maintain aggro, but the spell only lasts for a few seconds, and you should only cast it just before you start shooting.
In order to get this to happen, you need to either target your tank and cast the macro, or better yet, set the focus to your tank with the following macro:
By targeting your tank (or other party member) and casting this, you will set that player as "focus", and the Misdirection will always be cast on them instead of whoever you are targeting, or even your pet.