Aixler

Sheep

Dec 5th, 2012
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.83 KB | None | 0 0
  1. function shear()
  2.     turtle.turnRight()
  3.     if turtle.forward() then
  4.         turtle.place()
  5.         turtle.back()
  6.     else
  7.         turtle.place()
  8.     end
  9.     turtle.turnLeft()
  10. end
  11.  
  12. function sheep()
  13.     for x=1, 7 do
  14.         shear()
  15.         turtle.forward()
  16.         turtle.forward()
  17.     end
  18.     turtle.turnRight()
  19.     if turtle.forward() then
  20.         turtle.place()
  21.         turtle.back()
  22.     else
  23.         turtle.place()
  24.     end
  25.     turtle.turnRight()
  26.     for x=1, 8 do
  27.         shear()
  28.         turtle.forward()
  29.         turtle.forward()
  30.     end
  31. end
  32.  
  33. function store()
  34.     for i=1, 15 do
  35.         turtle.select(i)
  36.         turtle.drop()
  37.     end
  38.     turtle.select(16)
  39. end
  40.  
  41. function tool()
  42.     if turtle.getItemCount(16) == 0 then
  43.         turtle.select(16)
  44.         turtle.suckDown()
  45.     end
  46. end
  47.  
  48. function sheepFarm()
  49.     for x=1, 12 do
  50.         tool()
  51.         turtle.turnLeft()
  52.         turtle.turnLeft()
  53.         turtle.forward()
  54.         sheep()
  55.         store()
  56.         sleep(300)
  57.     end
  58. end
  59.  
  60. sheepFarm()
Advertisement
Add Comment
Please, Sign In to add comment