MV How to make an NPC move randomly with Yanfly's event chase player?

I feel like this may be a dumb question but I can't seem to figure it out. Basically, using Yanfly's event chase player plugin: http://www.yanfly.moe/wiki/Event_Chase_Player_(YEP) I have enemies that when detecting the player they chase them and are a player touch event that damages the player.
That being said that all works good and fine but now I can't figure out how to get this enemy to randomly move around by default. My original idea was to use a separate event to control the movement route of the enemy that would be disabled by a switch being flipped on by the player detection common event using the plugin however I haven't the slightest idea how I would be able to communicate to said event when this enemy has stopped engaging the player and thus is free to roam randomly again.
I'm not sure if I understand correctly, but in my case I insert the script and "Move at random" command into Autonomous Movement. Type: Custom and I'll insert everything I need into the "Route..." with "Repeat movement" checked on.

Edit: Freq should be on 5x
I'm not sure if I understand correctly, but in my case I insert the script and "Move at random" command into Autonomous Movement. Type: Custom and I'll insert everything I need into the "Route..." with "Repeat movement" checked on.

Edit: Freq should be on 5x
oh wow... I was just super overthinking it. I didn't realize you could put the script and movement command together without weird errors... thanks lol

Original thread: https://forums.rpgmakerweb.com/threads/how-to-make-an-npc-move-randomly-with-yanflys-event-chase-player.172193/