Advertisement
9551

Untitled

Jun 6th, 2021
36
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. local x = peripheral.getNames()
  2. lapi = require("CLamp")
  3. ci = 0
  4. cii = 0
  5. ciii = 0
  6. local function changeAl(input)
  7. for i = 1, #x do
  8. if peripheral.getType(x[i]) == "colorful_lamp" then
  9. peripheral.call(x[i], "setLampColor", input)
  10. end
  11. end
  12. end
  13. local function update()
  14. changeAl(lapi.rgb(ci, cii, ciii))
  15. end
  16. while true do
  17. repeat
  18. ci = ci + 1
  19. update()
  20. until ci > 31
  21. repeat
  22. cii = cii + 1
  23. update()
  24. until cii > 31
  25. repeat
  26. ciii = ciii + 1
  27. update()
  28. until ciii > 31
  29. repeat
  30. ci = ci - 1
  31. update()
  32. until ci < 1
  33. repeat
  34. cii = cii - 1
  35. update()
  36. until cii < 1
  37. repeat
  38. ciii = ciii - 1
  39. update()
  40. until ciii < 1
  41. end
  42.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement