MZ Lufia II Style Puzzle Reset Spell/Item

Hi! I would like a plugin to make a spell or item that resets every unsolved puzzle in the room, and teleports the player back to the entrance, as seen in the puzzle-focused JRPG Lufia II: Rise of the Sinistrals. I want to make a puzzle-focused game, and I feel this to be a necessity.
Ideally, I'd like a version of the plugin for both MV and MZ, as I'm still struggling to choose which of the two I want to use. MV seems to have a lot more plugin support, but MZ has some native features I really wanna use.
Thanks!
How would that sort of plugin work?

Usually puzzles are controlled by switches or variables, which are toggled on/off by you in event(s) according to some pattern. In that case, you could do this without plugins, e.g.
  1. Make a Skill (or Item) with a Common Event effect. In that event, turn on switch 123.

  2. Have a 1-page "Reset" map event, with:
    • Trigger: Autorun;
    • Condition: Switch 123 is ON;
    • Commands: reset the puzzle switches/variables, transfer player, then turn off switch 123.
When the Skill/Item is used, the current map's "Reset" event should run once, then turn itself off. You could add/remove the Skill/Item as appropriate when entering/leaving a puzzle map.
That's...actually a lot more simple than I thought. Cheers.

Original thread: https://forums.rpgmakerweb.com/threads/lufia-ii-style-puzzle-reset-spell-item.176495/