Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local x = 7
- local y = 7
- local function checkFuel()
- local fuel = turtle.getFuelLevel()
- if (fuel < 200) then
- turtle.select(16)
- turtle.refuel(2)
- turtle.select(1)
- end
- end
- local function mineX()
- for i = 1, x do
- turtle.digDown()
- turtle.select(1)
- turtle.placeDown()
- turtle.forward()
- end
- end
- local function changeRight()
- turtle.turnRight()
- turtle.forward()
- turtle.turnRight()
- end
- local function changeLeft()
- turtle.turnLeft()
- turtle.forward()
- turtle.turnLeft()
- end
- local function fullMine()
- mineX()
- changeRight()
- mineX()
- changeLeft()
- mineX()
- changeRight()
- mineX()
- changeLeft()
- mineX()
- changeRight()
- mineX()
- changeLeft()
- mineX()
- turtle.turnLeft()
- end
- local function goHomeY()
- for i = 1, y - 1 do
- turtle.forward()
- end
- turtle.turnLeft()
- end
- local function goHomeX()
- for i = 1, x do
- turtle.forward()
- end
- turtle.turnLeft()
- turtle.turnLeft()
- end
- local function itemsOut()
- for i = 2, 15 do
- turtle.select(i)
- turtle.dropDown()
- end
- turtle.select(1)
- end
- local function startMine()
- checkFuel()
- turtle.forward()
- fullMine()
- goHomeY()
- goHomeX()
- itemsOut()
- end
- while true do
- startMine()
- sleep(300)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement