Advertisement
Guest User

treeFarm

a guest
Mar 18th, 2015
231
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.54 KB | None | 0 0
  1. function checkTree()
  2.   if turtle.compare(1)==true then
  3.     redstone.setOutput("left",true)
  4.     sleep(3.5)
  5.     redstone.setOutput("left",false)
  6.     plantTree()
  7.   end
  8. end
  9.  
  10. function plantTree()
  11.   turtle.turnRight()
  12.   turtle.suck(4)
  13.   turtle.turnLeft()
  14.   turtle.forward()
  15.   turtle.forward()
  16.   turtle.turnleft()
  17.   turtle.select(2)
  18.   turtle.place()
  19.   turtle.turnRight()
  20.   turtle.back()
  21.   turtle.place()
  22.   turtle.turnLeft()
  23.   turtle.place()
  24.   turtle.turnRight()
  25.   turtle.back()
  26.   turtle.place()
  27. end
  28.  
  29. while true do
  30.   checkTree()
  31. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement