Dr_Turtle

Untitled

Jun 8th, 2021
821
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function checkInv()
  2.     if turtle.getItemCount(10)>0 then
  3.         turtle.turnRight()
  4.         turtle.dig()
  5.         while turtle.detect()==true do
  6.             turtle.dig()
  7.             sleep(0.5)
  8.         end
  9.         turtle.select(12)
  10.         turtle.place()
  11.         for i = 1,10 do
  12.             turtle.select(i)
  13.             turtle.drop()
  14.         end
  15.         turtle.select(12)
  16.         turtle.dig()
  17.         turtle.turnLeft()
  18.         turtle.select(1)
  19.     end
  20. end
  21.  
  22. function checkFuel()
  23.     if turtle.getFuelLevel()<50 then
  24.     turtle.select(13)
  25.     turtle.refuel(20000)
  26.     turtle.select(14)
  27.     turtle.refuel(20000)
  28. end
  29. function mine(blocks)
  30.     for i = 1,blocks do
  31.         while turtle.detect() do
  32.             turtle.dig()
  33.             sleep(0.25)
  34.         end
  35.         turtle.forward()
  36.         turtle.digUp()
  37.         checkInv()
  38.         checkFuel()
  39.     end
  40. end
  41.  
  42. function placeTorch()
  43.     turtle.select(15)
  44.     if turtle.getItemCount()==0 then
  45.         turtle.select(16)
  46.     end
  47.     if turtle.getItemCount()>0 then
  48.         turtle.turnRight()
  49.         turtle.placeUp()
  50.         turtle.turnLeft()
  51.     end
  52.     turtle.select(1)
  53. end
  54.  
  55. function mineTorch(sets)
  56.     for i = 1,sets do
  57.         turtle.select(1)
  58.         mine(10)
  59.         placeTorch()
  60.     end
  61. end
  62.  
  63. function moveForward(blocks)
  64.     for i = 1,blocks do
  65.         turtle.forward()
  66.         while not turtle.forward()
  67.             turtle.dig()
  68.             sleep(0.5)
  69.             turtle.forward()
  70.         end
  71.     end
  72. end
  73.  
  74. function strip(sets)
  75.     for i = 1,sets do
  76.         turtle.select(1)
  77.         mine(4)
  78.         placeTorch()
  79.         mine(1)
  80.         turtle.turnRight()
  81.         mineTorch(3)
  82.         turtle.turnLeft()
  83.         turtle.turnLeft()
  84.         moveForward(30)
  85.         mineTorch(3)
  86.         turtle.turnLeft()
  87.         turtle.turnLeft()
  88.         moveForward(30)
  89.         turtle.turnLeft()
  90.     end
  91. end
  92.  
  93. strip(12)
RAW Paste Data