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 | function AntiObstruct() | |
6 | if turtle.detectDown() then | |
7 | turtle.digDown() | |
8 | end | |
9 | end | |
10 | function PlaceBlock() | |
11 | turtle.placeDown() | |
12 | turtle.forward() | |
13 | end | |
14 | function roundCorner() | |
15 | turtle.forward() | |
16 | turtle.turnRight() | |
17 | turtle.forward() | |
18 | turtle.turnLeft() | |
19 | end | |
20 | function BuildCylinder() | |
21 | local BuildLength = 0 | |
22 | local getItem = tonumber(turtle.getItemCount(1)) | |
23 | if (getItem < 1) then | |
24 | print("Place materials in slot 1 to start building.") | |
25 | else | |
26 | turtle.select(1) | |
27 | end | |
28 | ||
29 | if (BuildLength < 10) then | |
30 | AntiObstruct() | |
31 | PlaceBlock() | |
32 | BuildLength = BuildLength + 1 | |
33 | else | |
34 | roundCorner() | |
35 | BuildLength = BuildLength - 10 | |
36 | end | |
37 | ||
38 | if (BuildLength < 2) then | |
39 | AntiObstruct() | |
40 | PlaceBlock() | |
41 | BuildLength = BuildLength + 1 | |
42 | else | |
43 | roundCorner() | |
44 | BuildLength = BuildLength - 2 | |
45 | end | |
46 | ||
47 | if (BuildLength < 1) then | |
48 | AntiObstruct() | |
49 | PlaceBlock() | |
50 | BuildLength = BuildLength + 1 | |
51 | else | |
52 | roundCorner() | |
53 | BuildLength = BuildLength - 1 | |
54 | end | |
55 | ||
56 | if (BuildLength < 2) then | |
57 | AntiObstruct() | |
58 | PlaceBlock() | |
59 | BuildLength = BuildLength + 1 | |
60 | else | |
61 | roundCorner() | |
62 | BuildLength = BuildLength - 2 | |
63 | end | |
64 | ||
65 | if (BuildLength < 10) then | |
66 | AntiObstruct() | |
67 | PlaceBlock() | |
68 | BuildLength = BuildLength + 1 | |
69 | else | |
70 | roundCorner() | |
71 | BuildLength = BuildLength - 10 | |
72 | end | |
73 | end | |
74 | term.clear() | |
75 | BuildCylinder() | |
76 | end | |
77 | end |