Advertisement
xbsktball10x

till

Feb 3rd, 2014
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function farm()
  2. even = false
  3. x=2
  4. for k = 1,52 do
  5. for i = 1,60 do
  6. if turtle.getItemCount(x) == 0 then
  7. turtle.select(x+1)
  8. x = x + 1
  9. end
  10. turtle.dig()
  11. turtle.place()
  12. turtle.back()
  13. end
  14. refill()
  15. if even== false then
  16. turtle.turnRight()
  17. turtle.back()
  18. turtle.turnRight()
  19. even = true
  20.  
  21. else if even == true then
  22. turtle.turnLeft()
  23. turtle.back()
  24. turtle.turnLeft()
  25. even = false
  26. end
  27. end
  28. end
  29. end
  30. function goHome()
  31. turtle.turnLeft()
  32. for i= 1,51 do
  33. turtle.back()
  34. if i ==49 then
  35. turtle.up()
  36. turtle.turnRight()
  37. turtle.back()
  38. turtle.turnLeft()
  39. end
  40. if i == 51 then
  41. turtle.down()
  42. turtle.turnLeft()
  43. turtle.back()
  44. turtle.turnRight()
  45. end
  46. end
  47. turtle.turnRight()
  48. turtle.back()
  49. turtle.turnRight()
  50. end
  51.  
  52. function refill()
  53. turtle.select(1)
  54. if turtle.compareUp() == true then
  55. for z = 1,16 do
  56. turtle.select(y)
  57. turtle.suckUp()
  58. end
  59. end
  60. end
  61.  
  62. write("Should I till the land? ")
  63. msg = read()
  64.  
  65. if msg == "yes" then
  66. for y =2,16 do
  67. turtle.select(y)
  68. turtle.suckUp()
  69. end
  70. turtle.select(1)
  71. turtle.turnRight()
  72. turtle.back()
  73. turtle.turnRight()
  74. turtle.back()
  75. turtle.turnLeft()
  76. farm()
  77. goHome()
  78. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement