Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local build = false;
- local placed = 0;
- local finishedLine = false;
- local wallsBuild = 0;
- local slot = 1;
- local blocks = 64;
- local rowsBuild = 0;
- local startRoof = false;
- local roofPlaced = 0;
- local buildRight = true;
- local buildLeft = false;
- local roofRow = 0;
- local Finished = false;
- function turtle.buildLine()
- turtle.placeDown();
- turtle.forward();
- blocks = blocks - 1;
- placed = placed + 1;
- end
- function turtle.buildRoof()
- if roofRow==9 then
- Finished = true;
- end
- if startRoof==false then
- turtle.down();
- turtle.forward();
- turtle.turnLeft();
- startRoof = true;
- end
- if startRoof==true then
- if buildRight==true then
- if roofPlaced<9 then
- turtle.placeDown();
- blocks = blocks - 1;
- turtle.forward();
- roofPlaced = roofPlaced + 1;
- end
- if roofPlaced==9 then
- roofRow = roofRow + 1;
- turtle.placeDown();
- blocks = blocks - 1;
- turtle.turnRight();
- turtle.forward();
- turtle.turnRight();
- roofPlaced = 0;
- buildLeft = true;
- buildRight = false;
- end
- end
- if buildLeft==true then
- if roofPlaced<9 then
- turtle.placeDown();
- blocks = blocks - 1;
- turtle.forward();
- roofPlaced = roofPlaced + 1;
- end
- if roofPlaced==9 then
- roofRow = roofRow + 1;
- turtle.turnLeft();
- turtle.forward();
- turtle.turnLeft();
- roofPlaced = 0;
- buildLeft = false;
- buildRight = true;
- end
- end
- end
- end
- while true do
- if Finished==false then
- if blocks==0 then
- blocks = 64;
- slot = slot + 1;
- turtle.select(slot);
- end
- if rowsBuild<5 then
- if wallsBuild<4 then
- if build==false then
- turtle.forward();
- turtle.up();
- build = true;
- end
- if build==true and placed<10 then
- turtle.buildLine();
- end
- if placed==10 then
- finishedLine = true;
- wallsBuild = wallsBuild + 1;
- end
- if finishedLine==true then
- turtle.turnLeft();
- finishedLine = false;
- placed = 0;
- end
- end
- if wallsBuild==4 then
- turtle.up();
- wallsBuild = 0;
- rowsBuild = rowsBuild + 1;
- end
- end
- if rowsBuild==5 then
- turtle.buildRoof();
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement