View difference between Paste ID: Xy4jbYaL and 2JQk1Xx5
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 BuildLength = 0
6
local getItem = tonumber(turtle.getItemCount(1))
7
function AntiObstruct()
8
if turtle.detectDown() then
9
  turtle.digDown()
10
end
11
end
12
function PlaceBlock()
13
turtle.placeDown()
14
turtle.forward
15
end
16
function roundCorner()
17
turtle.forward()
18
turtle.turnRight()
19
turtle.forward()
20
turtle.turnLeft()
21-
if(BuildLength < 10) then PlaceBlock() else
21+
22
function BuildCylinder()
23-
if(BuildLength < 2) then PlaceBlock() else
23+
if (getItem < 1) then print("Place materials in slot 1 to start building.") else
24
turtle.select(1)
25-
if(BuildLength < 1) then PlaceBlock() else
25+
26
if (BuildLength < 10) then PlaceBlock() else
27-
if(BuildLength < 2) then PlaceBlock() else
27+
28
BuildLength - 10
29-
if(BuildLength < 10) then PlaceBlock() else
29+
30
if (BuildLength < 2) then PlaceBlock() else
31-
turtle.select(1) -- building cylinder
31+
32
BuildLength 2
33
end
34
if (BuildLength < 1) then PlaceBlock() else
35
roundCorner()
36
BuildLength - 1
37
end
38
if (BuildLength < 2) then PlaceBlock() else
39
roundCorner()
40
BuildLength - 2
41
end
42
if (BuildLength < 10) then PlaceBlock() else
43
roundCorner()
44
BuildLength - 10
45
end
46
term.clear()
47
BuildCylinder()
48
end