Armors applying states

I'm pretty sure this was a feature in another version of RPGmaker, but basically what I'm trying to do is have a special armor that applies a state (a positive one of course) to the actor wearing it immediately at the start of a battle. I've found something similar to what I was looking for here: http://www.rpgmakercentral.com/topic/4713-auto-states/

I just need a version that isn't permanent. Would appreciate any help. 🙂
I commented out 2 lines in that script so states won't be permanent. I didn't test it. But it should work! 😀
Script link: Pastebin
I commented out 2 lines in that script so states won't be permanent. I didn't test it. But it should work! 😀
Script link: Pastebin

I just tested it in a fresh project and it gives me an error at line 101 when starting a battle. Undefined method '[]' for nil:NilClass

If one removes the commenting, it returns the same exact error.

Ninjamida wrote the syntax incorrectly; it must require "YEA-BattleEngine" to do anything.

Edit: After testing this, it seems that my conclusion is accurate. This only works with Yanfly's Battle Engine in place.

Original thread: https://forums.rpgmakerweb.com/threads/armors-applying-states.76837/