Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function forward()
- while not turtle.forward() do
- print("Stuck, retrying")
- sleep(1)
- end
- end
- function moveUp()
- while not turtle.up()
- print("Stuck, retrying")
- sleep(1)
- end
- end
- function clearDirt()
- turtle.select(16)
- turtle.digDown()
- end
- function digSlot(x)
- turtle.digDown()
- turtle.select(x)
- turtle.suckDown()
- turtle.select(16)
- turtle.placeDown()
- end
- function deploy()
- for i = 2,4 do
- forward()
- turtle.select(1)
- digSlot(i)
- end
- end
- function moveToPlace()
- turtle.turnLeft()
- turtle.turnLeft()
- turtle.select(16)
- turtle.digUp()
- for i = 1,2 do
- moveUp()
- turtle.placeDown()
- end
- end
- function goHome()
- turtle.turnLeft()
- turtle.turnLeft()
- for i = 1,3 do
- moveForward()
- end
- turtle.select(16)
- for i = 1,2 do
- turtle.digDown()
- turtle.down()
- end
- turtle.placeUp()
- end
- moveToPlace()
- deploy()
- goHome()
Advertisement
Add Comment
Please, Sign In to add comment