Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local p = peripheral.wrap("top")
- while (true) do
- local t = p.getNamesRemote()
- for i = 1, #t do
- if string.find(string.lower(t[i]), "reactor") then
- kern1 = peripheral.wrap(t[i])
- end
- if string.find(string.lower(t[i]), "ender") then
- ender = peripheral.wrap(t[i])
- end
- end
- kern1stack = kern1.getAllStacks()
- enderstack = ender.getAllStacks()
- kern1inv = kern1.getInventorySize()
- enderinv = ender.getInventorySize()
- for i=1, kern1inv do
- if kern1stack[i] ~= nil then
- if kern1stack[i]["rawName"] == "ic2.reactorventgold" then
- if kern1stack[i]["dmg"] <= 0 then
- local slot
- slot = 1
- while (not kern1.pushItem("up",i,1,slot)) and (slot < 10) do
- slot = slot + 1
- kern1.pushItem("up",i,1,slot)
- end
- end
- end
- end
- end
- for i=1, enderinv do
- if enderstack[i] ~= nil then
- if enderstack[i]["rawName"] == "ic2.reactorventgold" then
- if enderstack[i]["dmg"] > 1 then
- ender.pushItem("down",i,1)
- end
- end
- end
- end
- sleep(1)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement