ravneravn

til duke

Apr 28th, 2014
126
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. input = {...}
  2. turtle.select(1)
  3. selected = 1
  4.  
  5. function checkStack()
  6. if turtle.getItemCount(selected) <=5 then
  7. selected = selected +1
  8. end
  9. turtle.select(selected)
  10. end
  11.  
  12. function row()
  13. checkStack()
  14. turtle.placeDown()
  15. for i = 1, 4 do
  16. for i = 1, 2 do
  17. turtle.forward()
  18. end
  19. turtle.placeDown()
  20. checkStack()
  21. end
  22. end
  23.  
  24. function rowForward()
  25. row()
  26. turtle.turnRight()
  27. turtle.forward()
  28. turtle.forward()
  29. turtle.turnRight()
  30. end
  31.  
  32. function rowBack()
  33. row()
  34. turtle.turnLeft()
  35. turtle.forward()
  36. turtle.forward()
  37. turtle.turnLeft()
  38. end
  39.  
  40.  
  41. function newLayer()
  42. --turtle.turnLeft()
  43. --for i = 1,10 do
  44. -- turtle.forward()
  45. --end
  46.  
  47. turtle.turnLeft()
  48. for i = 1,8 do
  49. turtle.forward()
  50. end
  51. turtle.turnRight()
  52. --turtle.turnRight()
  53. turtle.up()
  54. turtle.up()
  55. turtle.up()
  56. end
  57.  
  58.  
  59.  
  60. -- LOOP --
  61. for i = 1, input do
  62. rowForward()
  63. rowBack()
  64. rowForward()
  65. rowBack()
  66. --rowForward()
  67. newLayer()
  68. end
RAW Paste Data