Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local args={ ... }
- local row = 0
- local col = 0
- local rows = tonumber(args[1])
- local columns = tonumber(args[2])
- local selected = 14
- local start = "start"
- local direction = "right"
- while row < rows do
- if start == "start" then
- turtle.forward()
- start = "homer"
- end
- while turtle.getItemCount(selected) == 0 do
- selected=selected-1
- turtle.select(selected)
- if(selected == 1) then
- print("no floor blocks dude")
- break
- end
- end
- turtle.placeDown()
- col=col+1
- if col == columns then
- col=0
- row=row+1
- if direction == "right" then
- turtle.turnRight()
- turtle.forward()
- turtle.turnRight()
- direction = "left"
- elseif direction == "left" then
- turtle.turnLeft()
- turtle.forward()
- turtle.turnLeft()
- direction = "right"
- end
- end
- if col == 0 then
- col=0
- else
- turtle.forward()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement