LostMiner

Const Que

Nov 1st, 2016
43
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(2)
  37.     t.placeUp()
  38.     t.select(1)
  39.     t.placeUp()
  40.     t.refuel(1)
  41.     t.digUp()
  42. end
  43. function pleaseStore()
  44.     t.select(3)
  45.     t.digUp()
  46.     t.placeUp()
  47.     num = 4
  48.     while num < 17 do
  49.         t.select(num)
  50.         t.dropUp()
  51.     end
  52.     t.digUp()
  53. end
  54. function checkers()
  55.     pleaseStore()
  56.     pleaseRefuel()
  57. end
  58.  
  59. function quarry()
  60.     x = 16
  61.     z = 16
  62.     while x > 1 do
  63.         while z > 1 do
  64.             checkers()
  65.             f()
  66.         end
  67.         t.turnRight()
  68.         f()
  69.         t.turnRight()
  70.     end
  71.     d()
  72. end
  73.  
  74. quarry()
Add Comment
Please, Sign In to add comment