Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local tArgs = {...}
- torchSlot = 16
- local blocksToMine = 0
- if #tArgs == 0 then
- blocksToMine = 20
- else
- blocksToMine = tonumber(tArgs[1])
- end
- function upDown()
- turtle.digUp()
- turtle.digDown()
- end
- function forward()
- while not turtle.forward() do
- if not turtle.dig() then
- turtle.attack()
- end
- end
- end
- local torchCounter = 0
- local torchSpacing = 6
- for i=1,blocksToMine do
- upDown()
- torchCounter = torchCounter + 1
- if torchCounter % torchSpacing == 0 then
- turtle.select(torchSlot)
- turtle.placeDown()
- turtle.select(1)
- end
- turtle.dig()
- forward()
- end
- turtle.select(1)
- for i=1,2 do
- turtle.turnLeft()
- end
- for i=1,blocksToMine do
- forward()
- end
- turtle.turnLeft()
- for i=1,4 do
- forward()
- end
- turtle.turnLeft()
Advertisement
Add Comment
Please, Sign In to add comment