Advertisement
LostMiner

Untitled

Nov 1st, 2016
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //1st slot should be a bucket, 2nd slot should be a tank, 3rd slot should be an ender chest
  2.  
  3. t = turtle
  4.  
  5. function f()
  6.     if t.detect() then
  7.         t.dig()
  8.         t.forward()
  9.     else
  10.         t.forward()
  11.     end
  12. end
  13. function d()
  14.     if t.detectDown() then
  15.         t.digDown()
  16.         t.down()
  17.     else
  18.         t.down()
  19.     end
  20. end
  21.  
  22. function refuel()
  23.     if t.getFuelLevel() == 0 then
  24.         while t.getFuelLevel < t.getFuelLimit() do
  25.             pleaseRefill()
  26.         end
  27.     end
  28. end
  29. function store()
  30.     if t.getItemCount(16) > 0 then
  31.         pleaseStore()
  32.     end
  33. end
  34.  
  35. function pleaseRefuel()
  36.     t.select(1)
  37.     t.placeUp()
  38.     t.suckUp()
  39.     t.refuel()
  40.     t.digUp()
  41. end
  42. function pleaseStore()
  43.     t.select(2)
  44.     t.digUp()
  45.     t.placeUp()
  46.     num = 3
  47.     while num < 17 do
  48.         t.select(num)
  49.         t.dropUp()
  50.     end
  51.     t.digUp()
  52. end
  53. function checkers()
  54.     pleaseStore()
  55.     pleaseRefuel()
  56. end
  57.  
  58. function quarry()
  59.     x = 16
  60.     z = 16
  61.     while x > 1 do
  62.         while z > 1 do
  63.             checkers()
  64.             f()
  65.         end
  66.         t.turnRight()
  67.         f()
  68.         t.turnRight()
  69.     end
  70.     d()
  71. end
  72.  
  73. quarry()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement