MZ State: attack anyone (but not self)

Can't believe i have to ask this for a single state, but is there a script that can make an "attack anyone" tag on a state not target self?
im using mz, and i dont want to exclude it on other states. it looks like this will have one or the other, i need both on two different states
Since there aren't two options in the drop-down in the editor, you'll have to write a plugin that checks the state for a notetag. Executes the original code most of the time, the modified code from the thread above if there's the notetag.

Original thread: https://forums.rpgmakerweb.com/threads/state-attack-anyone-but-not-self.147275/