Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local height = 67
- local width = 16
- function checkEC()
- local dump = false
- for i=3,16,1 do
- turtle.select(i)
- local stackSize = turtle.getItemCount()+turtle.getItemSpace()
- local p = math.floor((turtle.getItemCount()/stackSize)*100)
- if p >= 50 then
- dump = true
- end
- if i == 16 and turtle.getItemCount() > 0 then
- dump = true
- end
- end
- if dump == true then
- turtle.select(1)
- turtle.digUp()
- turtle.placeUp()
- for i=3,16,1 do
- turtle.select(i)
- turtle.dropUp()
- end
- turtle.select(1)
- turtle.digUp()
- end
- if turtle.getFuelLevel() < 1000 then
- turtle.digUp()
- turtle.select(2)
- turtle.placeUp()
- turtle.suckUp()
- turtle.refuel()
- turtle.digUp()
- end
- turtle.select(3)
- end
- function mine()
- while turtle.detect() do
- turtle.dig()
- end
- end
- function move()
- checkEC()
- while turtle.detect() do
- mine()
- end
- turtle.forward()
- end
- function main()
- for y=1,height-5,1 do
- turtle.digDown()
- turtle.down()
- for x=1,width,1 do
- for z=1,(width-1),1 do
- move()
- end
- if x % 2 == 1 then
- if x >= width then break end
- turtle.turnLeft()
- move()
- turtle.turnLeft()
- else
- if x >= width then break end
- turtle.turnRight()
- move()
- turtle.turnRight()
- end
- end
- turtle.turnLeft()
- for i=1,16,1 do
- while not turtle.forward() do end
- end
- turtle.turnLeft()
- end
- end
- main()
Advertisement
Add Comment
Please, Sign In to add comment