Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ids = {6,86,360,391,392,295,361,362,241,372,6.2}
- needed = {128,128,256,384,512,128,0,0,128,256,128}
- craft = {false,true,true}
- ae = peripheral.wrap("left")
- while true do
- pcall(function()
- sleep(2)
- print("Beigin check cycle...")
- local list = ae.listItems()
- for i=1,#ids do
- n = list[ids[i]] or 0
- print("found " .. n .. " of " .. ids[i] .. ".")
- if n > needed[i] then
- print("Sending "..(n-needed[i]))
- ae.retrieve(ids[i],math.min(n-needed[i],16),3)
- if craft[i] then turtle.craft() end
- turtle.dropDown()
- turtle.dropUp()
- end
- print("Done cycle.")
- end
- end)
- end
Advertisement
Add Comment
Please, Sign In to add comment