Yanfly Lunatic mode: Memory Sword & Memory Sheild redux help.

So I watched the video of what the code is supposed to do when properly implemented and I see that you can copy/paste the code and set the parameters yourself. Where exactly am I supposed to put this code? in the troops tab event setting under script? Or is there somewhere else I'm supposed to place the code? I would also like help to set the parameters to the way shown in the video.

I've moved this thread to Plugin Support. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/yanfly-lunatic-mode-memory-sword-memory-sheild-redux-help.136292/