Advertisement
eliminat

ComputerCraft Redstone Test

Jul 6th, 2013
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1.  
  2. redstone.setBundledOutput("top", colors.blue)
  3.  
  4. function rsEvent()
  5. if(rs.testBundledInput("top",colors.white)) then
  6. redstone.setBundledOutput("top",0)
  7. sleep(3)
  8. redstone.setBundledOutput("top", colors.blue)
  9. end
  10. end
  11.  
  12. function tick()
  13. timer1 = os.startTimer(5)
  14. end
  15.  
  16. repeat
  17. local event,p1 = os.pullEvent()
  18. if event == "redstone" then
  19. rsEvent()
  20. elseif event == "timer" then
  21. if p1 == timer1 then
  22. tick()
  23. end
  24. end
  25. until event == "char" and p1 == "x"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement