Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --table of frequencies that have had items
- local hotlist = { }
- --return a color based on a number 0 - 15
- local function returnCol(key)
- return 2 ^ (key - 1)
- end
- for _,name in pairs(peripheral.getNames()) do
- if peripheral.getType(name) == "ender_chest" then
- chest = peripheral.wrap(name)
- for i = 1, #hotlist do
- chest.setFrequency(hotlist[i][1], hotlist[i][2], hotlist[i][3])
- if #chest.getAllStacks() < 0 then
- local hit = {first, middle, last}
- table.insert(hotlist, hit)
- for i = 1, 16 do
- chest.pushItem("up", i, 64)
- end
- end
- end
- for first = 0, 16 do
- for middle = 0, 16 do
- for last = 0, 16 do
- chest.setFrequency(returnCol(first), returnCol(middle), returnCol(last))
- if #chest.getAllStacks() < 0 then
- local hit = {first, middle, last}
- table.insert(hotlist, hit)
- for i = 1, 16 do
- chest.pushItem("up", i, 64)
- end
- end
- end
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment