Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function diggo()
- turtle.digDown()
- turtle.dig()
- if turtle.detect() then
- while turtle.detect() do
- turtle.dig()
- sleep(1)
- end
- end
- end
- print("Cuantos bloques de largo quieres diggar?")
- local dig = read()
- print("Cuantos bloques de ancho quieres diggar?")
- local dig2 = read()
- local fuel = turtle.getFuelLevel()
- local total = dig*dig2*2+dig2+dig2
- local neces = total-fuel
- local coal = neces/80
- if neces>fuel then
- while neces>fuel do
- print("Necesitas "..neces.." de combustible. Hay "..fuel.." disponible.")
- print("Introduce "..math.ceil(coal).." de carbon en el primer hueco y dale a enter.")
- read()
- turtle.select(1)
- turtle.refuel()
- fuel = turtle.getFuelLevel()
- end
- print(fuel.." combustible disponible.")
- end
- print("Diggando...")
- for u=1,dig2 do
- for i=1,dig do
- diggo()
- turtle.forward()
- end
- turtle.turnLeft()
- turtle.turnLeft()
- for u=1,dig do
- turtle.forward()
- end
- turtle.turnRight()
- turtle.forward()
- turtle.turnRight()
- end
- turtle.turnRight()
- for o=1,dig2-1 do
- turtle.forward()
- end
- turtle.turnLeft()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement