Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Epuuc
- local args = {...}
- print("What Y do you want me to mine to?")
- local ygoal = tonumber(read())
- print("What's my current Y?")
- local ypos = tonumber(read())
- local diff = ypos-ygoal
- while true do
- if diff > 0 then
- turtle.dig()
- turtle.forward()
- turtle.digUp()
- ypos = ypos - 1
- turtle.digDown()
- turtle.down()
- if not turtle.detectDown() and args[1] ~= "false" then
- turtle.placeDown()
- end
- else
- if diff == 0 then break end
- turtle.dig()
- turtle.forward()
- turtle.digUp()
- ypos = ypos + 1
- if not turtle.detectDown() then
- turtle.placeDown()
- end
- turtle.up()
- turtle.digUp()
- end
- if ypos == ygoal then break end
- end
- print("Y reached")
- --Epuuc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement