Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- while true do
- -- collect items
- for n=8,16 do
- turtle.select(n)
- turtle.suck()
- end
- -- put items in furnace
- for n=8,16 do
- turtle.select(n)
- if turtle.compareTo(1) then
- -- coal
- turtle.turnRight()
- turtle.turnRight()
- turtle.down()
- turtle.forward()
- turtle.dropUp()
- turtle.turnRight()
- turtle.turnRight()
- turtle.forward()
- turtle.up()
- elseif turtle.compareTo(2) or
- turtle.compareTo(3) or
- turtle.compareTo(4) or
- turtle.compareTo(6) or
- turtle.compareTo(7) then
- -- ore
- turtle.turnRight()
- turtle.turnRight()
- turtle.up()
- turtle.forward()
- turtle.dropDown()
- turtle.turnRight()
- turtle.turnRight()
- turtle.forward()
- turtle.down()
- turtle.drop()
- elseif turtle.compareTo(5) then
- -- gravel
- turtle.turnRight()
- turtle.drop()
- turtle.turnLeft()
- elseif turtle.getItemCount(n) > 0 then
- -- junk
- turtle.turnLeft()
- turtle.drop()
- turtle.turnRight()
- end
- end
- -- wait a bit
- sleep(10)
- -- extract ores
- while true do
- turtle.turnRight()
- turtle.turnRight()
- if turtle.suck() then
- turtle.turnRight()
- turtle.drop()
- turtle.turnRight()
- sleep(5)
- else
- turtle.turnRight()
- turtle.turnRight()
- break
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement