Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local pos = 1
- local count = 0
- function check()
- if turtle.getItemCount() == 0 then
- if pos ~= 15 then
- pos = pos + 1
- else
- pos = 1
- end
- turtle.select(pos)
- end
- end
- function light()
- turtle.select(16)
- turtle.placeDown()
- turtle.select(pos)
- end
- function place()
- for i = 1, 15 do
- turtle.forward()
- check()
- if count % 8 == 0 then
- light()
- else
- turtle.placeDown()
- end
- count = count + 1
- end
- end
- function right()
- turtle.turnRight()
- turtle.forward()
- turtle.turnRight()
- check()
- if count % 8 == 0 then
- light()
- else
- turtle.placeDown()
- end
- count = count + 1
- end
- function left()
- turtle.turnLeft()
- turtle.forward()
- turtle.turnLeft()
- check()
- if count % 8 == 0 then
- light()
- else
- turtle.placeDown()
- end
- count = count + 1
- end
- for i = 0, 13, 2 do
- place()
- right()
- place()
- left()
- end
- place()
- left()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement