Equipment Optimization Script Command?

I have a part in my game where the Player is stripped of his equipment for one battle, and fights it in his undies. Afterward, he puts his clothes back on. I was just wondering if there was a way to to do the Optimize Equipment command in an event so the Player doesn't manually have to put all the armor back on.
Try doing:


$gameActors.actor(id).optimizeEquipments()


And replace "id" with the Actor ID.
Try doing:



$gameActors.actor(id).optimizeEquipments()


And replace "id" with the Actor ID.

Yaaay! Thanks so much! 😀

Original thread: https://forums.rpgmakerweb.com/threads/equipment-optimization-script-command.67223/