Advertisement
k_goos

NukeControl

Sep 29th, 2013
72
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. n1 = peripheral.wrap("nuclear_reactor_1")
  2. n2 = peripheral.wrap("nuclear_reactor_2")
  3. n3 = peripheral.wrap("nuclear_reactor_3")
  4.  
  5. local slots = {}
  6.  
  7. slots[1] = 1
  8. slots[2] = 2
  9. slots[3] = 10
  10. slots[4] = 11
  11. slots[5] = 19
  12. slots[6] = 20
  13. slots[7] = 28
  14.  
  15. function fuelRod()
  16.     for i,j in pairs(slots) do
  17.         print("Checking...")
  18.         if not n1.getStackInSlot(j) then
  19.             n1.pullItemIntoSlot("down", 1, 1, j)
  20.             print("Refill: "..tostring(j))
  21.         end
  22.         if not n2.getStackInSlot(j) then
  23.             n2.pullItemIntoSlot("down", 1, 1, j)
  24.             print("Refill: "..tostring(j))
  25.         end
  26.         if not n3.getStackInSlot(j) then
  27.             n3.pullItemIntoSlot("down", 1, 1, j)
  28.             print("Refill: "..tostring(j))
  29.         end
  30.     end
  31. end
  32. while true do
  33.     fuelRod()
  34.     sleep(600)
  35. end
Advertisement
RAW Paste Data Copied
Advertisement