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 -- SLOT 13: FORWARD
- turtle.forward()
- refuel()
- elseif turtle.select(14) and turtle.compareDown() then -- SLOT 14: TREE
- turtle.turnRight()
- if 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()
- end
- turtle.turnLeft()
- turtle.forward()
- elseif turtle.select(15) and turtle.compareDown() then -- SLOT 15: TURN RIGHT
- turtle.turnRight()
- turtle.forward()
- refuel()
- elseif turtle.select(16) and turtle.compareDown() then -- SLOT 16: RECHARGE (See bottom for pattern)
- turtle.turnLeft()
- if turtle.select(2) and turtle.getItemCount() > 1 then
- turtle.drop(64)
- turtle.select(3)
- turtle.drop(64)
- turtle.select(2)
- turtle.suck(1)
- turtle.turnRight()
- end
- turtle.forward()
- turtle.forward()
- turtle.turnLeft()
- if turtle.select(4) and turtle.getItemCount() < 32 then
- while turtle.getItemCount() < 64 and turtle.suck(1) do
- print("+1")
- end
- end
- turtle.turnRight()
- turtle.forward()
- turtle.forward()
- 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
- turtle.turnRight()
- turtle.forward()
- turtle.forward()
- refuel()
- end
- end
- -- COAL ^
- -- |
- -- SAPLINGS |
- --
- -- LOGS T
Add Comment
Please, Sign In to add comment