Advertisement
Guest User

tunnelDi

a guest
Aug 10th, 2013
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.53 KB | None | 0 0
  1.  
  2.  
  3. F1 = turtle.getFuelLevel()
  4. if F1 < 200 then
  5. turtle.select(1)
  6. turtle.refuel(4)
  7. end
  8. function DigTunnel(Int)
  9.  
  10. while Int > 0 do
  11. torch = 0
  12. if turtle.detectUp() then
  13.     turtle.digUp()
  14. end
  15.  
  16. if turtle.detectDown() then
  17.     turtle.digDown()
  18. end
  19. while turtle.detect() do
  20.     turtle.dig()
  21.     sleep(0.7)
  22. end
  23.  
  24. if torch == 8 then
  25.     turtle.select(2)
  26.     turtle.placeDown()
  27.     torch = 0
  28. end
  29.  
  30. turtle.forward()
  31. torch = torch + 1
  32. Int = Int - 1
  33.  
  34. end
  35. end
  36.  
  37. DigTunnel(48)
  38. turtle.turnRight()
  39. DigTunnel(3)
  40. turtle.turnRight()
  41. DigTunnel(48)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement