Originally Posted by Avair
if focus target exists, earth shock focus else earth shock current target
|
Assuming you're managing your focus target in another manner (like an arena mod), a literal translation of your pseudocode would be something along the lines of
/cast [target=focus,exists] [] Earth Shock
though you might want to consider further inspecting the state of the focus target (harm, nodead, etc) rather than simply exists. On the other hand, the macro posted above does a pretty nice job of helping you manage the focus target in addition to shocking.