Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function findItemsToPlace()
- for i = 1, 16,1
- do
- turtle.select(i)
- if(turtle.getItemCount()>2)
- then
- break
- end
- end
- end
- args = {...}
- gridSize = args[1]
- gridWidth = (gridSize/3)
- turtle.forward()
- turtle.down()
- turtle.turnLeft()
- turtle.turnLeft()
- for j = 1,gridWidth,1
- do
- for i = 1,gridSize-1,1
- do
- findItemsToPlace()
- turtle.turnLeft()
- turtle.place()
- turtle.turnLeft()
- turtle.turnLeft()
- turtle.place()
- turtle.turnLeft()
- turtle.back()
- turtle.place()
- end
- findItemsToPlace()
- turtle.turnLeft()
- turtle.place()
- turtle.turnLeft()
- turtle.turnLeft()
- turtle.place()
- turtle.turnLeft()
- turtle.up()
- turtle.placeDown()
- if(j%2==1)
- then
- turtle.turnLeft()
- turtle.forward()
- turtle.forward()
- turtle.forward()
- turtle.turnLeft()
- turtle.down()
- else
- turtle.turnRight()
- turtle.forward()
- turtle.forward()
- turtle.forward()
- turtle.turnRight()
- turtle.down()
- end
- end
- turtle.back()
- if(gridWidth%2==1)
- then
- turtle.turnLeft()
- else
- turtle.turnRight()
- end
- turtle.up()
- turtle.forward()
- turtle.forward()
- turtle.forward()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement