Script code help.

yanfly's buff/state core + auto passive states
State Note Tag
<Custom Battle Effect>
code
code
</Custom Battle Effect>

need code for
check if actor is class x; true add state y

in this example X = White Mage Y = Auto-Regen
and this note tag is in <Passive State: Z>
all other classes use <Equip State: y> to gain Auto-Regen
$game_actors[X].class.id
i found this. if this is in the auto <Passive State: Z>
how do i make it do a.addState(Y)

i dont know a lick about how to setup $game data things

Original thread: https://forums.rpgmakerweb.com/threads/script-code-help.88310/