legg0028

staircase

May 27th, 2018
503
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.78 KB | None | 0 0
  1. dCount = 0
  2. bedrock = false
  3. slot = 1
  4.  
  5. local function checkInventory()
  6.     if turtle.getItemCount() < 1 then
  7.         slot = slot + 1
  8.         turtle.select(slot)
  9.     end
  10. end
  11.  
  12. turtle.select(slot)
  13. for x = 1,4 do
  14.     turtle.up()
  15.     dCount = dCount - 1
  16. end
  17.  
  18. repeat
  19.     for x = 1,4 do
  20.         checkInventory()
  21.         turtle.digUp()
  22.         turtle.dig()
  23.         turtle.digDown()
  24.         if turtle.down() then
  25.             dCount = dCount + 1
  26.             success, bedrock = turtle.inspectDown()
  27.         end
  28.     end
  29.     turtle.dig()
  30.     repeat
  31.         turtle.dig()
  32.     until turtle.forward()
  33.  
  34.     turtle.turnLeft()
  35.     turtle.turnLeft()
  36.     checkInventory()
  37.     turtle.place()
  38.     turtle.turnLeft()
  39.     turtle.turnLeft()
  40.  
  41.     for x = 1,3 do
  42.         turtle.up()
  43.         dCount = dCount - 1
  44.     end
  45. until bedrock.name == "minecraft:bedrock"
  46.  
  47. for x = 1,dCount do
  48.     turtle.back()
  49.     turtle.up()
  50. end
Add Comment
Please, Sign In to add comment