Advertisement
Tacnuke

autostart

Oct 3rd, 2013
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.32 KB | None | 0 0
  1. p = peripheral.wrap("left")
  2.  
  3. function cell()
  4. ene = p.getEnergyStored()
  5. c = math.abs(ene)
  6. print(c)
  7.  
  8. if c <= 0 then
  9.  rs.setBundledOutput("right", colors.white)
  10.  print("Charging for 5 minutes")
  11.  sleep(300)
  12.  rs.setBundledOutput("right", 0)
  13.  
  14.  else
  15.   sleep(10)
  16.  
  17.  end
  18. end
  19.  
  20. while true do
  21. cell()
  22. sleep(1)
  23. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement