Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local dia = 62
- local x = 0
- local z = 0
- local dirf = 0
- function SelectBlock()
- while true do
- for i = 1, 16 do
- if turtle.getItemCount(i) > 0 then
- turtle.select(i)
- return
- end
- end
- print("Out of blocks, press enter to continue")
- read()
- end
- end
- local l = 0
- local c = 0
- while l <= (dia * 2 + 2) do
- for n = 1, l do
- turtle.forward()
- if dirf % 4 == 0 then
- x = x + 1
- elseif dirf % 4 == 1 then
- z = z + 1
- elseif dirf % 4 == 2 then
- x = x - 1
- elseif dirf % 4 == 3 then
- z = z - 1
- end
- if math.sqrt((x*x)+(z*z)) <= dia then
- SelectBlock()
- turtle.placeDown()
- end
- end
- turtle.turnRight()
- dirf = dirf + 1
- c = c + 1
- if c % 4 == 0 or c % 4 == 2 then
- l = l + 1
- end
- end
Add Comment
Please, Sign In to add comment