Events move in predefined regions

Hi everybody!

Well, I liked this script when my project was in RPG Maker VXAce. Then I tried write it, but don't know enough T-T
I saw the Yanfly's plugins Regions Events and Regions Restrictions, but they work differently than I need.

The script/plugin allow a event move only in tiles with a region ID choosed to it. For example: if I put the notetag <regionMove=5>, this event will move only in tiles marked with region ID = 5.

Here the RPG Maker VXAce script. Perhaps help a little bit. Thank you very much to who can make this or help me do ^^
Are you sure Yanfly's plugins don't do this already?
Ya, from that I understand, it allow make a region that events can't cross. But I would like the events walk over the regions marked, don't be limited for them as a line.
You could use that to do an outline AROUND the area you want your events to go. Is that an option?
This was my idea at first, but the "region line" affect all events, and some, I want be free to walk for all over the map, for example.

Original thread: https://forums.rpgmakerweb.com/threads/events-move-in-predefined-regions.53933/