Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function detectOreDown()
- turle.select(2);
- local d = turtle.compareDown();
- turtle.turnLeft();
- local l = turtle.compare();
- turtle.turnRight();
- turtle.turnRight();
- local r = turtle.compare();
- turtle.turnLeft();
- if (d or l or r) then
- turtle.select(3);
- turtle.turnLeft();
- turtle.turnLeft();
- turtle.place();
- turtle.turnRight();
- turtle.turnRight();
- end
- end
- local function detectOreUp()
- turle.select(2);
- local u = turtle.compareUp();
- turtle.turnLeft();
- local l = turtle.compare();
- turtle.turnRight();
- turtle.turnRight();
- local r = turtle.compare();
- turtle.turnLeft();
- if (u or l or r) then
- turtle.select(3);
- turtle.turnLeft();
- turtle.turnLeft();
- turtle.place();
- turtle.turnRight();
- turtle.turnRight();
- end
- end
- turtle.select(1);
- turtle.refuel(1);
- for i=0,4 do
- turtle.dig();
- while turtle.detect() do
- sleep(0.8);
- turtle.dig();
- end
- turtle.forward();
- detectOreDown();
- turtle.digUp();
- while turtle.detectUp() do
- sleep(0.8);
- turtle.digUp();
- end
- turtle.up();
- detectOreUp();
- if i % 4 == 0 then
- turtle.select(16);
- turtle.placeUp();
- end
- turtle.dig();
- while turtle.detect() do
- sleep(0.8);
- turtle.dig();
- end
- turtle.forward();
- detectOreUp();
- turtle.digDown();
- turtle.down();
- detectOreDown();
- if turtle.getFuelLevel() < 20 then
- turtle.select(1);
- turtle.refuel(1);
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement