Advertisement
Guest User

Roof

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