Advertisement
xbsktball10x

till

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