Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- inv = peripheral.wrap("left") --or what ever side the antenna is on
- --add as many things you want to keep
- Keep = {}
- Keep[1] = "Redstone"
- Keep[2] = "Yellorite Ore"
- Keep[3] = "Tin Ore"
- Keep[4] = "Copper Ore"
- Keep[5] = "Iron Ore"
- Keep[6] = "Certus Quartz Crystal"
- Keep[7] = "Diamond"
- function within(t1, t2)
- for t3,t4 in pairs(t2) do
- if (t1 == t4) then
- return true
- end
- end
- end
- function clear_inv()
- i = inv.getAllStacks(false)
- for q,w in pairs(i) do
- name = w.display_name
- if (within(name,Keep)) then
- sleep(1)
- elseif (name == "Coal") then
- turtle.refuel(q)
- else inv.destroyStack(q)
- end
- end
- inv.condenseItems()
- end
- while true do
- clear_inv()
- sleep(3)
- end
Advertisement
Add Comment
Please, Sign In to add comment