Sample that I use, works fine for me

/enemysign attack1 <t>
/wait 0.5
/nexttarget
/marking attack2 <t>
/target <attack1>
/party Attack <attack1>

its can be enhanced, but it gets complicated if you have more code than mobs.