Advertisement
streqicity

turtle ender quarry thing

May 20th, 2014
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.18 KB | None | 0 0
  1. i=0 --for the first for loop
  2. x=0 --for the main loop
  3. y=1 --for item slot checker
  4. turtle.select(1)
  5. print("How long do you want the sides to be?")--put any text here to ask how long the side will be
  6. length=read("9")--this retrieves to reply
  7. --this function will make the walls
  8. function Side()
  9. for i=0,(length-2) do
  10. CheckFences()
  11. if turtle.placeDown() == false then
  12.  
  13. turtle.digDown()
  14. turtle.placeDown()
  15.  
  16. end
  17. if turtle.forward() == false then
  18.  
  19. turtle.dig()
  20.  
  21. end
  22.  
  23. end
  24. end
  25. function SideBreak()
  26. for i=0,(length-2) do
  27. CheckFences()
  28. turtle.digDown()
  29. turtle.forward()
  30.  
  31.  
  32. end
  33. end
  34. function SideBreakfirstandlast()
  35. for i=0,(length-3) do
  36. CheckFences()
  37. turtle.digDown()
  38. turtle.forward()
  39.  
  40.  
  41. end
  42. end
  43. function CheckFences()
  44. while turtle.getItemCount(y)<1 do
  45. y=y+1
  46. turtle.select(y)
  47. end
  48. end
  49. --main loop
  50. while x<4 do
  51. CheckFences()
  52. Side()
  53. turtle.turnLeft()
  54. x=x+1
  55. end
  56. turtle.forward()
  57. print("Are you ready SMASH SOME FENCES!!!!!?")
  58. if read("yes") then
  59. x=0
  60. SideBreakfirstandlast()
  61. turtle.turnLeft()
  62. while x<2 do
  63. SideBreak()
  64. turtle.turnLeft()
  65. x=x+1
  66. end
  67. SideBreakfirstandlast()
  68. turtle.digDown()
  69. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement