Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Fill the whole turtle with 64 stacks of fences. Refuel.
- -- Place it anywhere (high above lands is prefered, but anything is possible besides bedrock)
- local stackProgress = 1
- local site = 1
- local currentStack = 1
- local stackSize = 1
- -- outer while loop. 4 times (1 for each side of the square)
- while (site < 5) do
- stackProgress = 1
- -- side while loop. 4 times (1 for each stack of fences for this side)
- while (stackProgress < 5) do
- stackSize = 1
- -- stack while loop. 64 times (1 for each fence of the stack)
- while (stackSize < 65) do
- -- gravel/sand detection
- while turtle.detect() do
- turtle.dig()
- sleep(0.25)
- end
- turtle.forward()
- turtle.select(currentStack)
- turtle.digDown()
- turtle.placeDown()
- stackSize= stackSize + 1
- end
- stackProgress = stackProgress + 1
- currentStack = currentStack + 1
- end
- turtle.turnLeft()
- site = site + 1
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement