SHOW:
|
|
- or go back to the newest paste.
1 | if turtle.getFuelLevel() < 1000 then | |
2 | turtle.select(16) | |
3 | turtle.refuel(64) | |
4 | end | |
5 | local getItem = tonumber(turtle.getItemCount(1)) | |
6 | function AntiObstruct() | |
7 | if turtle.detectDown() then | |
8 | turtle.digDown() | |
9 | end | |
10 | end | |
11 | function PlaceBlock() | |
12 | turtle.placeDown() | |
13 | turtle.forward() | |
14 | end | |
15 | function roundCorner() | |
16 | turtle.forward() | |
17 | turtle.turnRight() | |
18 | turtle.forward() | |
19 | turtle.turnLeft() | |
20 | end | |
21 | function BuildCylinder() | |
22 | local BuildLength = 0 | |
23 | if (getItem < 1) then print("Place materials in slot 1 to start building.") else | |
24 | turtle.select(1) | |
25 | end | |
26 | if (BuildLength < 10) then PlaceBlock() else | |
27 | roundCorner() | |
28 | - | (BuildLength - 10) |
28 | + | BuildLength - 10 |
29 | end | |
30 | if (BuildLength < 2) then PlaceBlock() else | |
31 | roundCorner() | |
32 | - | (BuildLength - 2) |
32 | + | BuildLength - 2 |
33 | end | |
34 | if (BuildLength < 1) then PlaceBlock() else | |
35 | roundCorner() | |
36 | - | (BuildLength - 1) |
36 | + | BuildLength - 1 |
37 | end | |
38 | if (BuildLength < 2) then PlaceBlock() else | |
39 | roundCorner() | |
40 | - | (BuildLength - 2) |
40 | + | BuildLength - 2 |
41 | end | |
42 | if (BuildLength < 10) then PlaceBlock() else | |
43 | roundCorner() | |
44 | - | (BuildLength - 10) |
44 | + | BuildLength - 10 |
45 | end | |
46 | term.clear() | |
47 | BuildCylinder() | |
48 | end |