Advertisement
Guest User

Untitled

a guest
Feb 5th, 2016
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. xSize = 5
  2. ySize = 5
  3. height = 3
  4. leftRight = false
  5.  
  6.  
  7. function digX()
  8. for i=1, xSize-1 do
  9. while turtle.detect() do turtle.dig() end
  10. turtle.forward()
  11. end
  12. end
  13.  
  14. function turn()
  15. if leftRight then turtle.turnLeft() else turtle.turnRight() end
  16. end
  17.  
  18.  
  19.  
  20. while turtle.detect() do turtle.dig() end
  21. turtle.forward()
  22.  
  23.  
  24. for i=1, height do
  25. for j=1, ySize-1 do
  26. digX()
  27. turn()
  28. while turtle.detect() do turtle.dig() end
  29. turtle.forward()
  30. turn()
  31. leftRight = not leftRight
  32. end
  33. leftRight = not leftRight
  34. turn()
  35. turn()
  36. turtle.digUp()
  37. turtle.up()
  38. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement