zero96x

NetherWartFarmer

Oct 28th, 2020 (edited)
991
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. tickcount = 0
  2.  
  3.  
  4.  
  5. --FUELCHECKER
  6. function fuelchecker()
  7.     fuel = turtle.getFuelLevel()
  8.     while fuel < 25 do
  9.         term.clear()
  10.         term.setCursorPos(1,1)
  11.         print("Need Fuel Put Fuel in Slot 16")
  12.         turtle.select(16)
  13.         turtle.refuel(1)
  14.         fuel = turtle.getFuelLevel()
  15.         sleep(.2)
  16.     end
  17.     term.clear()
  18.     term.setCursorPos(1,1)
  19.     print("Turtle is fueled and ready to start!")
  20.     sleep(2)
  21. end
  22. --END FUELCHECKER
  23. --HARVEST
  24. function harvest()
  25.     while tickcount < 3 do
  26.         if rs.getInput("front") then
  27.             tickcount = tickcount + 1
  28.             term.clear()
  29.             term.setCursorPos(1,1)
  30.             print(tickcount)
  31.             sleep(2)
  32.         else
  33.             term.clear()
  34.             term.setCursorPos(1,1)
  35.             print("Warts still growing!")
  36.             term.setCursorPos(1,2)
  37.             print("Be patient!")
  38.             term.setCursorPos(1,3)
  39.             print(tickcount)
  40.         end
  41.     end
  42.     turtle.up()
  43.     turtle.forward()
  44.     turtle.forward()
  45.  
  46.     for j = 1,4 do
  47.         for i=1,5 do
  48.             if i < 5 then
  49.                 turtle.select(1)
  50.                 turtle.digDown()
  51.                 turtle.placeDown()
  52.                 turtle.forward()
  53.             else
  54.                 turtle.select(1)
  55.                 turtle.digDown()
  56.                 turtle.placeDown()
  57.             end
  58.             for k = 1,4 do
  59.                 turtle.back()
  60.             end
  61.         end
  62.         if j < 4 then
  63.             turtle.turnRight()
  64.             turtle.forward()
  65.             turtle.turnLeft()
  66.         else
  67.         end
  68.     end
  69.     turtle.turnLeft()
  70.     turtle.forward()
  71.     turtle.forward()
  72.     turtle.forward()
  73.     turtle.turnRight()
  74.     turtle.back()
  75.     for h = 1,11 do
  76.         turtle.select(h)
  77.         turtle.dropUp()
  78.     end
  79.     turtle.back()
  80.     turtle.down()
  81. end
  82. --END HARVEST
  83.  
  84. --ACTUAL PROGRAM
  85. fuelchecker()
  86. harvest()
  87. --END ACTUAL PROGRAM
RAW Paste Data