Guest User

mine

a guest
Apr 8th, 2020
136
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. rednet.open("right")
  2. rednet.broadcast("ON")
  3. rednet.close()
  4.  
  5. args = {...}
  6.  
  7. turtle.refuel()
  8.  
  9. if #args == 0 then
  10.     mid_fuel = math.ceil(turtle.getFuelLevel() / 2) - 10
  11. end
  12. if #args == 1 then
  13.     mid_fuel = math.ceil(tonumber(args[1]))
  14. end
  15. if (mid_fuel * 2) > turtle.getFuelLevel() then
  16.     print("Not enough fuel: "..turtle.getFuelLevel().." left and "..(mid_fuel * 2).." required.")
  17.     return
  18. end
  19.  
  20. counter = 0
  21. while true do
  22.     if counter == mid_fuel then
  23.         turtle.turnRight()
  24.         turtle.turnRight()
  25.     end
  26.     print(counter.." / "..(mid_fuel * 2).." ("..turtle.getFuelLevel().." fuel left)")
  27.     if counter == (mid_fuel * 2) then
  28.     turtle.turnRight()
  29.     turtle.turnRight()
  30.         return
  31.     end
  32.     if turtle.detect() then
  33.         turtle.dig()
  34.         turtle.refuel()
  35.     else
  36.         turtle.forward()
  37.     end
  38.     counter = counter + 1
  39. end
RAW Paste Data