Keep in mind that using that will randomly acquire a target if one is in front of you. Suggestion: add a line just before that, so your macro looks like this:

/stopmacro [noharm]
/petattack