Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function refuel()
- if turtle.getFuelLevel() < 150 then
- turtle.select(1)
- while turtle.getFuelLevel() < 150 do
- turtle.refuel(1)
- end
- end
- end
- while true do
- refuel()
- if turtle.select(13) and turtle.compareDown() then
- turtle.forward()
- refuel()
- elseif turtle.select(14) and turtle.compareDown() then
- if turtle.turnRight() and turtle.select(2) and turtle.compare() then
- while turtle.compare() do
- turtle.dig()
- turtle.digUp()
- turtle.up()
- end
- turtle.select(14)
- while not turtle.compareDown() do
- turtle.down()
- end
- refuel()
- turtle.select(4)
- turtle.place()
- else
- turtle.turnLeft()
- end
- elseif turtle.select(15) and turtle.compareDown() then
- turtle.turnLeft()
- turtle.forward()
- refuel()
- elseif turtle.select(16) and turtle.compareDown() then
- if turtle.turnRight() and turtle.select(4) and turtle.getItemCount() < 32 then
- while turtle.getItemCount() < 64 do
- turtle.suck(1)
- end
- end
- turtle.turnLeft()
- if turtle.select(1) and turtle.getItemCount() < 64 then
- while turtle.getItemCount() < 64 and turtle.suck(1) do
- print("Récupération charbon...")
- end
- end
- if turtle.select(2) and turtle.getItemCount() > 1 then
- turtle.up()
- turtle.drop(64)
- turtle.select(3)
- turtle.drop(64)
- turtle.select(2)
- turtle.suck(1)
- turtle.down()
- end
- turtle.turnLeft()
- refuel()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement