View difference between Paste ID: 9iMAyY9X and 28dp3afU
SHOW: | | - or go back to the newest paste.
1
local param = ...
2
if param~=nil then
3-
local step = param
3+
	local step = param
4-
os.loadAPI("tillapi")
4+
	os.loadAPI("tillapi")
5
6-
local offsetX = 54
6+
	local offsetX = 54
7-
local offsetY = 66
7+
	local offsetY = 66
8-
local offsetZ = 1933
8+
	local offsetZ = 1933
9
10-
function goToOffset(x3,y3,z3,facing3)
10+
	function goToOffset(x3,y3,z3,facing3)
11-
	tillapi.goTo(x3+offsetX,y3+offsetY,z3+offsetZ,facing3)
11+
		tillapi.goTo(x3+offsetX,y3+offsetY,z3+offsetZ,facing3)
12-
end
12+
	end
13
14-
for i=1,12 do
14+
	for i=1,12 do
15-
  	turtle.select(i)
15+
  		turtle.select(i)
16-
    turtle.drop()
16+
    		turtle.drop()
17-
end
17+
	end
18
19
	north = -1 * ( (10-step) * 10 + 2 )
20
	south =  (10-step) * 10 + 2 
21-
north = -1 * ( (10-step) * 10 + 2 )
21+
	east =   (10-step) * 10 + 2 
22-
south =  (10-step) * 10 + 2 
22+
	west = -1 * ( (10-step) * 10 + 2 )
23-
east =   (10-step) * 10 + 2 
23+
	alt = step*10
24-
west = -1 * ( (10-step) * 10 + 2 )
24+
25-
alt = step*10
25+
	local light= (math.floor((south-3)/6))*6+3
26
	--print(light)
27-
for m=7,11 do
27+
	
28
	local count = 0
29-
for x= west+1,east do
29+
	local zCount = 0
30-
	goToOffset( x , alt-m , north , 2 )
30+
	local positions = {}
31-
    turtle.digUp()
31+
	for z = -1*light,light,6 do
32-
    turtle.select(1)
32+
		zCount=zCount+1
33-
    tillapi.itemCheck()
33+
		if zCount -(math.floor(zCount/2))*2 > 0 then
34-
    turtle.placeUp()
34+
			for x = -1*light,light,6 do
35-
end
35+
				count = count + 1
36-
for z = north+1,south do
36+
				positions[count]={}
37-
	goToOffset( east , alt-m , z , 3 )
37+
				positions[count]["Y"]=alt-9
38-
    turtle.digUp()
38+
				positions[count]["X"]=x
39-
    turtle.select(1)
39+
				positions[count]["Z"]=z
40-
    tillapi.itemCheck()
40+
				positions[count]["facing"]=2
41-
    turtle.placeUp()
41+
			end
42-
end
42+
		else
43
			for x = light,-1*light,-6 do
44-
for x= east-1,west,-1 do
44+
				count = count + 1
45-
	goToOffset( x , alt-m, south , 4 )
45+
				positions[count]={}
46-
    turtle.digUp()
46+
				positions[count]["Y"]=alt-9
47-
    turtle.select(1)
47+
				positions[count]["X"]=x
48-
    tillapi.itemCheck()
48+
				positions[count]["Z"]=z
49-
    turtle.placeUp()
49+
				positions[count]["facing"]=4
50-
end
50+
			end
51
		end
52-
for z = south-1,north,-1 do
52+
	end
53-
	goToOffset( west , alt-m , z , 1 )
53+
--print(textutils.serialize(positions))
54-
    turtle.digUp()
54+
55-
    turtle.select(1)
55+
	for i=1,3 do
56-
    tillapi.itemCheck()
56+
		local x1=positions[i]["X"]
57-
    turtle.placeUp()
57+
		local y1=positions[i]["Y"]
58-
end
58+
		local z1=positions[i]["Z"]
59
		local facing1=positions[i]["facing"]
60-
end
60+
		goToOffset( x1 , y1 , z1 , facing1 )
61
		turtle.digDown()
62
    		turtle.select(1)
63-
print("use stepEdge [stepnumber]")
63+
    		tillapi.itemCheck()
64
    		turtle.placeDown()
65
	end
66
else
67
	print("use lights [stepnumber]")
68
end