Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function digPlane(x,y)
- for i=0,y-1 do
- for i=0,x-1 do
- invCheck()
- turtle.dig()
- turtle.forward()
- end
- if i==y then
- if y%2==0 then
- turtle.turnLeft()
- else
- for j=0,x do
- turtle.back()
- end
- turtle.turnRight()
- end
- for j=0,y do
- turtle.forward()
- end
- turtle.turnLeft()
- elseif i%2==0 then
- turtle.turnLeft()
- turtle.dig()
- turtle.forward()
- turtle.turnLeft()
- else
- turtle.turnRight()
- turtle.dig()
- turtle.forward()
- turtle.turnRight()
- end
- end
- end
- function digVolume(x,y,z)
- for i=0,z-1 do
- if fuelCheck(x+y+z) and turtle.digDown() then
- turtle.down()
- digPlane(x,y)
- else
- break
- end
- end
- end
- function fuelCheck(threshold)
- fuel = turtle.getFuelLevel()
- print("Current fuel: ",fuel)
- if fuel <= threshold then
- print("Fuel low!")
- return turtle.refuel()
- end
- return true
- end
- function invCheck()
- if turtle.getItemDetail(14) ~= nil then
- turtle.up()
- turtle.select(16)
- turtle.placeUp()
- for i=2,15 do
- turtle.select(i)
- turtle.dropUp()
- end
- turtle.select(1)
- turtle.down()
- end
- end
Add Comment
Please, Sign In to add comment