First step would be to learn how to program in Lua. There are tutorials to help get you started. From there, you need to figure out the algorithm that will create the autorunner in the way you want it to work, and then you can write that algorithm in Lua.