Advertisement
Xmat2000

Untitled

Aug 9th, 2022 (edited)
664
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.74 KB | None | 0 0
  1. local bridge = peripheral.wrap("rsBridge_3")
  2. if not bridge then error("rsBridge_3 not found") end
  3. local exportMatch = false
  4. local importMatch = true
  5. local tagFilter = {"forge:ores", "forge:raw_materials"}
  6. while true do
  7.     for number, item in pairs(bridge.listItems()) do
  8.         if item.tags then
  9.             for _, tag in pairs(item.tags) do
  10.                 for _, tagfi in pairs(tagFilter) do
  11.                     if string.find(tag, tagfi) then
  12.                         exportMatch = true
  13.                         break
  14.                     end
  15.                 end
  16.             end
  17.         end
  18.         if exportMatch then
  19.             bridge.exportItem(item, "UP")
  20.             exportMatch = false
  21.         end
  22.     end
  23.     os.sleep(1)
  24. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement