Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local x = peripheral.getNames()
- lapi = require("CLamp")
- ci = 0
- cii = 0
- ciii = 0
- local function changeAl(input)
- for i = 1, #x do
- if peripheral.getType(x[i]) == "colorful_lamp" then
- peripheral.call(x[i], "setLampColor", input)
- end
- end
- end
- local function update()
- changeAl(lapi.rgb(ci, cii, ciii))
- end
- while true do
- repeat
- ci = ci + 1
- update()
- until ci > 31
- repeat
- cii = cii + 1
- update()
- until cii > 31
- repeat
- ciii = ciii + 1
- update()
- until ciii > 31
- repeat
- ci = ci - 1
- update()
- until ci < 1
- repeat
- cii = cii - 1
- update()
- until cii < 1
- repeat
- ciii = ciii - 1
- update()
- until ciii < 1
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement