Jharakn

Untitled

Jun 21st, 2013
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. local gate = peripheral.wrap("back")
  2. local gateData = gate.get()
  3. local state = 0
  4.  
  5. while true do
  6. if gateData["Inventory Empty"] then
  7. redstone.setOutput("top", true)
  8. if state ~= 1 then print("deactivating Bio-Reactor") end
  9. state = 1
  10. elseif gateData["Inventory Full"] then
  11. redstone.setOutput("top", false)
  12. if state ~= 2 then print("activating Bio-Reactor") end
  13. state = 2
  14. end
  15. sleep(5)
  16. end
Advertisement
Add Comment
Please, Sign In to add comment