Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local args = { ... }
- numArgs = table.getn(args)
- function fuel ()
- if turtle.getFuelLevel() == 0 then
- turtle.select(1)
- turtle.refuel(1)
- end
- end
- function goodDigUp ()
- while turtle.detectUp() do
- fuel()
- turtle.digUp()
- sleep(0.5)
- end
- fuel()
- end
- if numArgs > 0.0 then
- height = tonumber(args[1])
- while height > 0 do
- fuel()
- goodDigUp()
- turtle.up()
- height = height-1
- end
- end
- if numArgs == 2.0 then
- height = tonumber(args[1])
- while height > 0 do
- fuel()
- turtle.down()
- height = height-1
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment