Advertisement
xbsktball10x

plant

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