odduser

tree

Jan 3rd, 2013
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.59 KB | None | 0 0
  1. -- tree
  2. -- by odduser 2013-02-08
  3. -- http://pastebin.com/SXDQdDeg
  4. -- saplings in slot 16
  5. turtle.select(1)
  6. while true do
  7.   echo("Waiting for tree to grow")
  8.   if turtle.compare() then
  9.     turtle.dig()
  10.     turtle.forward()
  11.     local up = 0
  12.     while turtle.detectUp() do
  13.       turtle.digUp()
  14.       turtle.up()
  15.       up = up + 1
  16.     end
  17.     for x = 1,up do turtle.down() end
  18.     turtle.back()
  19.     turtle.select(16)
  20.     turtle.place()
  21.   else
  22.     if turtle.getItemCount(15) ~= 0 then
  23.       turtle.select(15)
  24.       turtle.place()
  25.       turtle.select(1)
  26.     end
  27.   end
  28.   sleep(3)
  29. end
Advertisement
Add Comment
Please, Sign In to add comment