Skip to main content
Topic: Simple turtle sorting script (Read 2280 times) previous topic - next topic

Simple turtle sorting script

Code: [Select]
    turtle.select(1)
    while true do
      while not redstone.getInput("back") do
        if turtle.suckUp() then
          for i=2,16 do
            if turtle.compareTo(i) then
              turtle.drop()
              break
            end
          end
          turtle.dropDown()
        end
        sleep(.1)
      end
      sleep(1)
    end

Turtle compares everything it pulls from the chest above it to items in slots 2-16, matches get dropped into the inventory in front (e.g. a router), everything else gets dropped to the inventory below it (e.g. another chest).

pastebin get fFSH73U2 sorter
or
pastebin get fFSH73U2 startup

To run at startup