Advertisement
Guest User

harvest

a guest
Jul 11th, 2014
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.44 KB | None | 0 0
  1. local plants = 7
  2. local growth = 3
  3. local runs = 0
  4.  
  5. function harvest()
  6.   local steps = plants
  7.   while (steps > 0) do
  8.     steps = steps-1
  9.     turtle.digDown()
  10.     turtle.forward()
  11.   end
  12. end
  13.  
  14. while (true) do
  15.   harvest()
  16.   runs = runs+1
  17.   sleep(growth)
  18.   turtle.turnRight()
  19.   turtle.turnRight()
  20.   if (runs%2==0) then
  21.     turtle.select(2)
  22.     turtle.drop()
  23.     turtle.select(3)
  24.     turtle.drop()
  25.     turtle.select(2)
  26.   end
  27. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement