Advertisement
Wassaa

jetfuel

Jan 12th, 2014
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.47 KB | None | 0 0
  1. fer = peripheral.wrap("back")
  2. local size = fer.getInventorySize()
  3. function redControl()
  4. local count = 0
  5.     for i=1, 6 do
  6.    
  7.         --local inv = fer.getStackInSlot(i)["name"]
  8.         if fer.getStackInSlot(i) == nil then
  9.             count = 0
  10.         else
  11.             count = count + 1
  12.             print (count)
  13.         end
  14.     end
  15.         if count == 6 then
  16.         rs.setOutput("bottom", true)
  17.         print ("red in")
  18.     else
  19.         rs.setOutput("bottom", false)
  20.         print ("no red")
  21.     end
  22. end
  23. while true do
  24. redControl()
  25. os.sleep(2)
  26. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement