MZ Changing Sub Element

Aloha, I've been trying to use the VizuMZ_1_ElementalStatusCore and I've been trying to make a function where if a character equips a certain equipment piece, they'll change their sub element on the spot. Any idea on how I can do that?
Thank you for your help.

Original thread: https://forums.rpgmakerweb.com/threads/changing-sub-element.156535/