Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local tArgs = { ... }
- count = tArgs[1]
- function betterDig()
- while turtle.detect() do
- turtle.dig()
- sleep(.5)
- end
- end
- function betterDigUp()
- while turtle.detectUp() do
- turtle.digUp()
- sleep(.5)
- end
- end
- function digLeftRight()
- turtle.turnLeft()
- betterDig()
- turtle.turnRight()
- turtle.turnRight()
- betterDig()
- turtle.turnLeft()
- end
- function digForward()
- betterDig()
- turtle.forward()
- end
- function digUp()
- betterDigUp()
- turtle.up()
- end
- function returnHome()
- turtle.turnLeft()
- turtle.turnLeft()
- for i = 1,count do
- turtle.forward()
- end
- end
- function placeTorch()
- turtle.turnRight()
- turtle.select(16)
- turtle.place()
- turtle.select(1)
- turtle.turnLeft()
- end
- for i = 1,count do
- digForward()
- digUp()
- digUp()
- digLeftRight()
- turtle.down()
- digLeftRight()
- turtle.down()
- digLeftRight()
- if i%6 == 0 then
- placeTorch()
- end
- end
- returnHome()
Advertisement
Add Comment
Please, Sign In to add comment