Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local tArgs = { ... }
- torchSlot = 16
- if #tArgs == 0 then
- blocksToMine = 20
- else
- local 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()
- turtle.dig()
- forward()
- torchCounter = torchCounter + 1
- if torchCounter % torchSpacing == 0 then
- turtle.select(torchSlot)
- turtle.placeDown()
- turtle.select(0)
- end
- end
- turtle.select(0)
- for i=1,2 do
- turtle.turnLeft()
- end
- for i=1,blocksToMine do
- forward()
- end
- turtle.turnLeft()
- for i=1,4 do
- turtle.forward()
- end
- turtle.turnLeft()
Advertisement
Add Comment
Please, Sign In to add comment