Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- tArgs={...}
- if tArgs[1] == nil then return end
- function processone()
- local success = true
- local downcnt = 0
- while success do
- for x=1,4 do
- turtle.dig()
- turtle.turnRight()
- end
- turtle.digDown()
- success = turtle.down()
- if success then downcnt = downcnt + 1 end
- end
- for x=1,downcnt do
- turtle.up()
- end
- end
- function processmany(cnt)
- for m=1,tonumber(cnt) do
- print(m)
- processone()
- turtle.forward()
- end
- end
- processmany(tArgs[1])
Add Comment
Please, Sign In to add comment