Advertisement
TechManDylan

Cyl

Mar 27th, 2013
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if turtle.getFuelLevel() < 1000 then
  2. turtle.select(16)
  3. turtle.refuel(64)
  4. end
  5. local getItem = tonumber(turtle.getItemCount(1))
  6. function AntiObstruct()
  7. if turtle.detectDown() then
  8.   turtle.digDown()
  9. end
  10. end
  11. function PlaceBlock()
  12. turtle.placeDown()
  13. turtle.forward()
  14. end
  15. function roundCorner()
  16. turtle.forward()
  17. turtle.turnRight()
  18. turtle.forward()
  19. turtle.turnLeft()
  20. end
  21. function BuildCylinder()
  22. BuildLength = 0
  23. if (getItem < 1) then
  24. print("Place materials in slot 1 to start building.")
  25. else
  26. turtle.select(1)
  27. end
  28.  
  29. if (BuildLength < 10) then
  30. PlaceBlock()
  31. BuildLength + 1
  32. else
  33. roundCorner()
  34. BuildLength - 10
  35. end
  36.  
  37. if (BuildLength < 2) then
  38. PlaceBlock()
  39. BuildLength + 1
  40. else
  41. roundCorner()
  42. BuildLength - 2
  43. end
  44.  
  45. if (BuildLength < 1) then
  46. PlaceBlock()
  47. BuildLength + 1
  48. else
  49. roundCorner()
  50. BuildLength - 1
  51. end
  52.  
  53. if (BuildLength < 2) then
  54. PlaceBlock()
  55. BuildLength + 1
  56. else
  57. roundCorner()
  58. BuildLength - 2
  59. end
  60.  
  61. if (BuildLength < 10) then
  62. PlaceBlock()
  63. BuildLength + 1
  64. else
  65. roundCorner()
  66. BuildLength - 10
  67. end
  68.  
  69. term.clear()
  70. BuildCylinder()
  71. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement