Advertisement
Guest User

Untitled

a guest
Jul 16th, 2018
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1.  
  2. function mydig()
  3. if turtle.detect() then
  4. turtle.dig()
  5. end
  6. end
  7.  
  8. function mydigdown()
  9. if turtle.detectDown() then
  10. turtle.digDown()
  11. end
  12. end
  13.  
  14. function fuelcheck()
  15. if turtle.getFuelLevel() < 1 then
  16. turtle.refuel()
  17. end
  18. end
  19.  
  20. for z=0,4 do
  21. dirx=0
  22. for x=0,4 do
  23.  
  24. fuelcheck()
  25.  
  26. for y=0,4 do
  27. mydig()
  28. turtle.forward()
  29. end
  30. if (x < 4) then
  31. if (dirx == 0) then
  32. turtle.turnRight()
  33. mydig()
  34. turtle.forward()
  35. turtle.turnRight()
  36. dirx=1
  37. else
  38. turtle.turnLeft()
  39. mydig()
  40. turtle.forward()
  41. turtle.turnLeft()
  42. dirx=0
  43. end
  44. end
  45. end
  46. turtle.turnRight()
  47. turtle.turnRight()
  48.  
  49. mydigdown()
  50. turtle.down()
  51. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement