you can do something like this:

/assist [target=charA, exists, nodead] charA
/stopmacro [target=charA, exists, nodead]
/assist [target=charB, exists, nodead] charB
/stopmacro [target=charB, exists, nodead]
...