Not sure if you already have this, however could you add something that gives the bot a home tile(where the person starts the scripts), and then add something that doesn't allow the bot go out more than e.g. 5 tiles, 10 tiles from the hometile.
This could be in areas that are big or for example in stronghold slayer dungeon.
You should be able to set home tile(nothing to be forced to do, only if the option is ticked)
Then add in numbers how many tile the bot can move around
It should be in a circle mode
Also highlight the tiles on the minimap while the botter is setting the script up. (The turned off when the script is started).