Hello there,
When the lure script is long enough and there are some obstacles the character might get stuck. Especially at the beginning, it selects a random coordinate and tries to go there. However a rock or a cliff makes it get stuck.
I suggest, when this happens bot restarts the script from a random line. This way, eventually a closer coordinate will be processed and the char will get unstuck in a shorter period of time.
Regards