Tooraa_a

melon

Jun 11th, 2021
639
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local dumptime = 0
  2. local FuelChest = 16;
  3. local DumpChest = 15;
  4.  
  5. function DumpMelon()
  6.     for i = 1, 14, 1 do
  7.         turtle.select(i);
  8.         turtle.dropDown();
  9.     end
  10. end
  11.  
  12.  
  13. function HandleFuel()
  14.     local FuelLevel = turtle.getFuelLevel();
  15.     if FuelLevel < 500 then
  16.         -- GetFuel By enderChest
  17.         turtle.digUp();
  18.         turtle.select(FuelChest);
  19.         turtle.placeUp();
  20.         turtle.suckUp(64);
  21.         turtle.refuel();
  22.         turtle.digUp();
  23.     end
  24. end
  25.  
  26. while true do
  27.     HandleFuel()
  28.   for i = 0,15 , 1 do
  29.       if i == 0 then
  30.         if dumptime == 0 then
  31.             DumpMelon();
  32.             dumptime = 1
  33.         elseif dumptime == 1 then
  34.             dumptime = 0
  35.         end
  36.           turtle.turnLeft()
  37.           turtle.turnLeft()
  38.       else
  39.         if turtle.detectDown() then
  40.             turtle.digDown()
  41.         end
  42.       end
  43.       turtle.forward(1)
  44.   end
  45. end
RAW Paste Data