os.loadAPI("dev/tools.lua") rednet.open("right") shell.run("clear") print("CHRIS Nether Wart farm started.") print("Use CTRL+T to stop.\n") while true do turtle.select(1) tools.refuelFromInventory() -- Init turtle.turnRight() turtle.forward() turtle.turnLeft() -- Farm tools.farmLine(14) turtle.forward() turtle.turnRight() turtle.forward() turtle.turnRight() tools.farmLine(14) turtle.forward() turtle.turnLeft() turtle.forward() turtle.turnLeft() tools.farmLine(14) print("Farming done. Harvested "..tools.getItemQuantity().." items.") -- Go to center turtle.up() tools.uTurn() tools.forward(6) turtle.turnLeft() tools.forward(3) tools.dropAll() -- Try to refuel max if (tools.needFuel()) then turtle.forward() while turtle.suckUp() do end turtle.back() tools.refuelFromInventory() tools.dropAll() end -- Back to garage tools.uTurn() tools.forward(3) turtle.down() turtle.turnLeft() tools.forward(7) turtle.turnRight() tools.forward(3) turtle.turnRight() turtle.back() print("Sleeping for 10 minutes.") parallel.waitForAny( function () tools.sleepAndInformMom(600) end, function () while true do local botId, message = tools.receiveFromBot() if botId ~= MOM_ID and message == "run" then return end end end) tools.sendToBot(tools.MOM_ID, "s0") end