Movement Restrictions to Events

Hello everyone,

- I would like some events (NPCs) to walk randomly around the map, but have certain restricted movements, such as they could not walk up or down or on diagonals while moving. Making an analogy, it would be something similar to the rules of a chessboard ... some NPCs could only walk diagonally, others only in two directions, etc. -

Can anyone help me find a solution? Can I do this via Script or would I need a plugin?
The available plugin on restrict movement only works for the player movement.

Thank you in advance,
there should be a region restrict from yanfly where you have different region IDs to specify if the region was bloacked for player, event or both. But I don't know if it is still free or one of the plugin that now need payments.

Original thread: https://forums.rpgmakerweb.com/threads/movement-restrictions-to-events.120913/