Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local args = {...}
- local counter = 0
- local function drop()
- if turtle.getItemCount(14) >= 60 then
- turtle.select(16)
- for i = 1,2 do
- turtle.turnRight()
- turtle.place()
- end--for
- os.sleep(.3)
- for i = 1,14 do
- turtle.select(i)
- turtle.drop()
- end--for
- for i = 1,2 do
- turtle.turnRight()
- end--for
- end--if
- turtle.select(1)
- end-- func
- local function TurtleMove()
- turtle.dig()
- while not turtle.forward() do
- turtle.dig()
- end
- end
- local function TurtleDig()
- turtle.dig()
- turtle.digDown()
- turtle.digUp()
- drop()
- end
- local function TurtleLeft()
- turtle.digUp()
- turtle.digDown()
- turtle.turnLeft()
- for i = 1,3 do
- turtle.dig()
- turtle.forward()
- turtle.digDown()
- turtle.digUp()
- turtle.dig()
- end
- turtle.turnLeft()
- end
- local function TurtleRight()
- turtle.digUp()
- turtle.digDown()
- turtle.turnRight()
- for i = 1,3 do
- turtle.dig()
- turtle.forward()
- turtle.digUp()
- turtle.digDown()
- turtle.dig()
- end
- turtle.digDown()
- turtle.digUp()
- turtle.turnRight()
- end
- local function cycle()
- for i = 1,30 do
- TurtleDig()
- TurtleMove()
- counter = counter + 1
- if counter == 7 then
- turtle.select(14)
- turtle.placeDown()
- turtle.select(1)
- counter = 0
- end
- end
- TurtleLeft()
- for i = 1,30 do
- TurtleDig()
- TurtleMove()
- counter = counter + 1
- if counter == 7 then
- turtle.select(14)
- turtle.placeDown()
- turtle.select(1)
- counter = 0
- end
- end
- TurtleRight()
- end
- for i =1, tonumber(args[1]) do
- cycle()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement