Advertisement
Mr__Button

TurtleFellingProgram

Dec 9th, 2016
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.95 KB | None | 0 0
  1. local X
  2. X = 1
  3. while X == 1 do
  4.     turtle.select(2)
  5.     if turtle.compare() then
  6.         turtle.dig()
  7.         turtle.forward()
  8.             while turtle.compareUp() do
  9.                 turtle.digUp()
  10.                 turtle.up()
  11.             end
  12.             while not turtle.detectDown() do
  13.                     turtle.down()
  14.             end
  15.         turtle.back()
  16.     else
  17.         turtle.select(1)
  18.         while not turtle.compare() do
  19.             turtle.dig()
  20.             turtle.place()
  21.         end
  22.     end
  23.     local slot3 = turtle.getItemCount(3)
  24.         if slot3 > 0 then
  25.             turtle.turnLeft()
  26.             turtle.select(3)
  27.             turtle.drop()
  28.             turtle.turnRight()
  29.         else
  30.         end
  31.     local slot1 = turtle.getItemCount(1)
  32.         if slot1 <= 32 then
  33.             turtle.turnLeft()
  34.             turtle.turnLeft()
  35.             turtle.select(1)
  36.             turtle.suck(32)
  37.             turtle.turnRight()
  38.             turtle.turnRight()
  39.         else
  40.         end
  41.     local slot16 = turtle.getItemCount(16)
  42.         if slot16 == 0 then
  43.             turtle.turnRight()
  44.             turtle.select(16)
  45.             turtle.suck(50)
  46.             turtle.turnLeft()
  47.         else
  48.         end
  49.         turtle.select(16)
  50.         turtle.place()
  51.         sleep(15)
  52. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement