Advanced Warlock Macro (Pls help!)

You want the variant below as your starting point.

#showtooltip
/cast [mod:alt,@player] Devour Magic(Rank 6); [mod:shift,@focus,harm,nodead] [@mouseover,harm,nodead] Spell Lock(Rank 2); [mod:shift,@focus,help,nodead] [@mouseover,help,nodead] [help] Devour Magic(Rank 6); Spell Lock(Rank 2)

Left the [mod:alt,@player] condition set in so you can quickly self cast.

@Ehiz, harmful mouseover and focus will never take priority over helpful target with your version.