Advertisement
Guest User

fll

a guest
Apr 1st, 2015
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.77 KB | None | 0 0
  1. down = 0
  2. slot = 1
  3. count = 0
  4. dir = 1
  5. while true do
  6.   turtle.forward()
  7.  
  8.   if turtle.detectDown() then
  9.     count = count + 1
  10.   end
  11.    
  12.   if count > 2 then
  13.    
  14.     if dir = 1 then
  15.       turtle.turnRight()
  16.       dir = 2
  17.       elseif dir = 2 then
  18.         turtle.turnLeft()
  19.         dir = 1
  20.       end
  21.     turtle.forward()
  22.     turtle.forward()
  23.     count = 0
  24.   end
  25.    
  26.   while turtle.detectDown() == false do
  27.     count = 0
  28.     turtle.down()
  29.     down = down + 1
  30.   end
  31.    
  32.   while down > 0 do
  33.     turtle.up()
  34.    
  35.     while turtle.placeDown() == false do
  36.       slot = slot + 1
  37.         if slot > 16 then
  38.           print("Out of filler")
  39.           return
  40.         end
  41.          
  42.       turtle.select(slot)    
  43.     down = down - 1
  44.     end
  45.    
  46.   end
  47. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement