Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Variables
- tArgs = { ... }
- local width = tonumber(tArgs[1])
- --Functions
- function nextRow()
- turtle.turnRight()
- turtle.forward()
- turtle.turnLeft()
- end
- function replant()
- turtle.select(16)
- turtle.place()
- turtle.back()
- turtle.place()
- end
- --Main
- for w = 1,width do
- turtle.dig()
- turtle.forward()
- while turtle.detectUp() do
- sleep(0.25)
- turtle.dig()
- turtle.digUp()
- turtle.up()
- end
- while not turtle.detectDown() do
- sleep(0.1)
- turtle.down()
- end
- replant()
- nextRow()
- end
Advertisement
Add Comment
Please, Sign In to add comment