Advertisement
Guest User

quarry.lua

a guest
May 27th, 2018
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.54 KB | None | 0 0
  1. local x = 1
  2. turtle.select(1)
  3. turtle.forward() -- Move into hole
  4. while(true)
  5. do
  6.    while (turtle.detectDown() == false)
  7.    do
  8.          if(turtle.getItemCount(x)==0)
  9.          then
  10.             x=x+1
  11.             if(x==10) then
  12.                   x = 1
  13.             end
  14.             turtle.select(x)
  15.          end
  16.          turtle.placeDown()
  17.          turtle.forward()
  18.          if(turtle.detectDown() == true)
  19.          then
  20.            turtle.back()
  21.            turtle.turnLeft()
  22.            turtle.forward()      
  23.          end
  24.    end
  25. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement