Want:

attack current target.
if no current target assist focus
if focus has no target assist pet
if pet has no target do nothing

Is such a thing possible if so how?