Advertisement
Benn200022

Untitled

Apr 13th, 2019
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. turtle.select(1)
  2. turtle.refuel()
  3.  
  4. turtle.select(2)
  5.  
  6. function buildTable2D(building)
  7. local dir = false
  8. for i=#building, 1, -1 do
  9. dir = not dir
  10.  
  11. turtle.up()
  12. local line = building[i]
  13.  
  14. if dir then
  15. for i2=1, #line do
  16. if line[i2] == 1 then
  17. turtle.placeDown()
  18. end
  19. turtle.forward()
  20. end
  21. else
  22. for i2=#line, 1, -1 do
  23. if line[i2] == 1 then
  24. turtle.placeDown()
  25. end
  26. turtle.forward()
  27. end
  28. end
  29.  
  30. turtle.forward()
  31. turtle.turnRight()
  32. turtle.turnRight()
  33. end
  34. end
  35.  
  36.  
  37. buildTable2D(
  38. {
  39. {1,0,0,1,1,1,1},
  40. {1,0,0,1,0,0,0},
  41. {1,0,0,1,0,0,0},
  42. {1,1,1,1,1,1,1},
  43. {0,0,0,1,0,0,1},
  44. {0,0,0,1,0,0,1},
  45. {1,1,1,1,0,0,1},
  46. }
  47. )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement