Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function checkFuel()
- if turtle.getFuelLevel() < 10 then
- turtle.select(1);
- turtle.refuel(1);
- end
- end
- function doDig()
- turtle.dig();
- turtle.forward();
- turtle.digUp();
- turtle.digDown();
- end
- local cellFuel = 1;
- local cellTorch = 2;
- function placeTorch()
- if turtle.getItemCount(cellTorch) > 0 then
- turtle.select(cellTorch);
- turtle.placeDown();
- return 1;
- else
- return 0;
- end
- end
- local tonnelLength = 10; -- Tonnel length
- function doWork()
- for i = 1, tonnelLength do
- checkFuel();
- doDig();
- placeTorch();
- end
- end
- doWork();
Advertisement
Add Comment
Please, Sign In to add comment