Advertisement
Guest User

branchMine01.lua

a guest
Feb 16th, 2020
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.51 KB | None | 0 0
  1. local run = 0
  2. local runcount = 0
  3. local fuelUpdate = "Fuel Left: " .. turtle.getFuelLevel()
  4.    
  5. print(fuelUpdate)
  6. print("Branch Length: ")
  7. run = tonumber(read())
  8. runcount = run
  9.    
  10.    
  11. while turtle.detect() and runcount < 0 do
  12.     turtle.dig()
  13.     turtle.forward()
  14.     turtle.digUp()
  15.     os.sleep(1.0)
  16.     while turtle.detect() do
  17.         turtle.dig()
  18.     end
  19.     runcount = runcount - 1
  20. end
  21.    
  22. turtle.turnLeft()
  23. turtle.turnLeft()
  24.    
  25. while run > 0 do
  26.     turtle.forward()
  27.     run = run - 1
  28. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement