Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local x, y = 1,1 --Quarry de 7*8
- function creuser()
- local fuel, bd = turtle.getFuelLevel(), turtle.detect() --bd c'est le bloc devant
- local b, g = 56, 56 --b c'est la couche de base et g c'est la couche actuelle
- local v = b - g
- while fuel > 100 do
- turtle.digDown()
- turtle.down()
- g = g - 1
- if bd~=1 or bd~=2 or bd~=3 or bd~=13 then --apparamment problème à cette ligne: creuse les blocs de stone quand meme
- turtle.dig() --rajouter fonction tourner
- end
- if turtle.getItemCount(15) > 0 then
- turtle.up(v)
- if x == 1 or y == 4 then
- turtle.turnRight(2)
- turtle.forward(3)
- turtle.drop()
- for i=2,16,1 do
- if turtle.getItemCount(i) > 0 then
- turtle.select(i)
- turtle.drop(64)
- end
- end
- turtle.turnRight()
- turtle.forward()
- turtle.turnLeft()
- turtle.select(1)
- turtle.suck(64)
- turtle.refuel(64)
- turtle.turnRight()
- turtle.forward()
- turtle.turnLeft()
- turtle.forward(3)
- end
- end
- end
- end
- while x == 1 do
- turtle.forward()
- y = y + 1
- if y == 4 then --endroit où creuser
- creuser()
- end
- if y == 7 then
- turtle.turnRight()
- turtle.forward()
- turtle.turnRight()
- x = x + 1
- end
- end
- creuser()
- y = 7
- while x == 2 do
- turtle.forward()
- y = y - 1
- if y == 2 then --endroit où creuser
- creuser()
- end
- if y == 1 then
- turtle.turnLeft()
- turtle.forward()
- turtle.turnLeft()
- x = x + 1
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement