Advertisement
Guest User

Untitled

a guest
Jul 26th, 2017
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.08 KB | None | 0 0
  1. local tArgs = {...}
  2. local height = tonumber(tArgs[1])
  3. local length = tonumber(tArgs[2])
  4. local up = true
  5. local slot = 1
  6.  
  7. turtle.select(slot)
  8.  
  9. for j = 1, length, 1 do
  10. for i = 1,height,1 do
  11.  
  12. if turtle.getItemCount(slot) == 0 then
  13. slot = slot + 1
  14. turtle.select(slot)
  15. data = turtle.inspect()
  16. if not data.name ~= "Stone" or not data.name ~= "Glass" then
  17. turtle.dig()
  18. turtle.place()
  19. end
  20. else
  21. data = turtle.inspect()
  22. if data.name ~= "Stone" or data.name ~= "Glass" then
  23. turtle.dig()
  24. turtle.place()
  25. end
  26. end
  27.  
  28. if i < height then
  29. if up == true then
  30. turtle.up()
  31. else
  32. turtle.down()
  33. end
  34.  
  35. else
  36.  
  37. if j < length then
  38. turtle.turnRight()
  39. turtle.forward()
  40. turtle.turnLeft()
  41. if up == false then
  42. up = true
  43. else
  44. up = false
  45. end
  46. else
  47. if up == true then
  48. for i = 1, height - 1, 1 do
  49. turtle.down()
  50. end
  51. end
  52. end
  53.  
  54. end
  55.  
  56. end
  57. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement