Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- For: ComputerCraft
- If the Nuclear Reactor overheats the Robot drops not only depleted Uran Rods into the Trash...
- If your using Applied Energistics (like me) for Supporting the Robot you will have much used Rods after some Days
- which will blow you storages...
- And here comes this Script in place:
- Extract all used Uran Rods from AE System and split them into a Chest. This Chest can than be linked to another AE or whatever..
- Setup:
- - Place an ME_Interface_Block to a Computer.
- - Connect the ME_Interface with your AE Network and to another side of the ME_Interface place a Chest.
- --]]
- -- Direction from ME_Interface to Chest. Only valid: north, south, west, east, up, down
- directionChest = "NORTH"
- -- Side of ME_Interface. Only valid sides: left, right, back, front, up, bottom
- meInterfaceSide = "back"
- -- Export all Items with a minimum or equal damage value of ...
- local minDamage = 10
- local CheckEvery = 15 -- sec.
- --[[ Internal values - DONT change! ]]
- local meInterface = peripheral.wrap(meInterfaceSide)
- local version = 0.1
- local Count = 0
- function exportDamagedItems()
- for number,item in pairs(itemList) do
- local ID = item.fingerprint.id
- local DMG = item.fingerprint.dmg
- if (DMG >= minDamage) then
- Count = Count + 1
- meInterface.exportItem(item.fingerprint, directionChest, 1, 0)
- print("("..Count..") Exported "..ID.." with dmg: "..DMG)
- end
- end
- end
- ---[[ Main Program ]]
- while true do
- itemList = meInterface.getAvailableItems()
- exportDamagedItems()
- os.sleep(CheckEvery)
- end
- --
- -- EOF
- --
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement