Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local param = ...
- if param~=nil then
- local step = param
- os.loadAPI("tillapi")
- local offsetX = 54
- local offsetY = 66
- local offsetZ = 1933
- function goToOffset(x3,y3,z3,facing3)
- tillapi.goTo(x3+offsetX,y3+offsetY,z3+offsetZ,facing3)
- end
- for i=1,12 do
- turtle.select(i)
- turtle.drop()
- end
- north = -1 * ( (10-step) * 10 + 2 )
- south = (10-step) * 10 + 2
- east = (10-step) * 10 + 2
- west = -1 * ( (10-step) * 10 + 2 )
- alt = step*10
- local light= (math.floor((south-3)/6))*6+3
- --print(light)
- local count = 0
- local zCount = 0
- local positions = {}
- for z = -1*light,light,6 do
- zCount=zCount+1
- if zCount -(math.floor(zCount/2))*2 > 0 then
- for x = -1*light,light,6 do
- count = count + 1
- positions[count]={}
- positions[count]["Y"]=alt-9
- positions[count]["X"]=x
- positions[count]["Z"]=z
- positions[count]["facing"]=2
- end
- else
- for x = light,-1*light,-6 do
- count = count + 1
- positions[count]={}
- positions[count]["Y"]=alt-9
- positions[count]["X"]=x
- positions[count]["Z"]=z
- positions[count]["facing"]=4
- end
- end
- end
- --print(textutils.serialize(positions))
- for i=1,3 do
- local x1=positions[i]["X"]
- local y1=positions[i]["Y"]
- local z1=positions[i]["Z"]
- local facing1=positions[i]["facing"]
- goToOffset( x1 , y1 , z1 , facing1 )
- turtle.digDown()
- turtle.select(1)
- tillapi.itemCheck()
- turtle.placeDown()
- end
- else
- print("use lights [stepnumber]")
- end
Advertisement
Add Comment
Please, Sign In to add comment