Guest User

yet

a guest
Aug 17th, 2014
311
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.64 KB | None | 0 0
  1. local times = 0
  2. term.clear()
  3. term.setCursorPos(1, 1)
  4. term.write("Times to run: ")
  5. times = read()
  6. for i = 1, times do
  7.  
  8. if turtle.detect() then
  9.     turtle.dig()
  10. end
  11.  
  12. if not turtle.detect() then
  13.     turtle.forward()
  14.     print("Moved Forward: "..i.. " Times")
  15. end
  16.  
  17. if turtle.detectUp() then
  18.     turtle.digUp()
  19. end
  20.  
  21. if turtle.detectDown() then
  22.     turtle.digDown()
  23. end
  24.  
  25. if i == 10 then
  26.     turtle.select(2)
  27.     turtle.placeUp()
  28.     turtle.select(1)
  29. end
  30. if i == 60 then
  31.     turtle.select(3)
  32.     turtle.drop(64)
  33.     turtle.select(1)
  34.    end  
  35. end
  36. local f = turtle.getFuelLevel()
  37. if f < 10 then
  38.     turtle.refuel()
  39. end
Advertisement
Add Comment
Please, Sign In to add comment