Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local component = require("component")
- lamplist = component.list("lamp")
- colortable = {}
- colortable[1]=1024
- colortable[2]=2048
- colortable[3]=3072
- colortable[4]=4096
- colortable[5]=5120
- colortable[6]=6144
- colortable[7]=7168
- colortable[8]=8192
- colortable[9]=9216
- colortable[10]=10240
- colortable[11]=11264
- colortable[12]=12288
- colortable[13]=13312
- colortable[14]=14336
- colortable[15]=15360
- colortable[16]=16384
- colortable[17]=17408
- colortable[18]=18432
- colortable[19]=19456
- colortable[20]=20480
- colortable[21]=21504
- colortable[22]=22528
- colortable[23]=23552
- colortable[24]=24576
- colortable[25]=25600
- colortable[26]=26624
- colortable[27]=27648
- colortable[28]=28672
- colortable[29]=29696
- colortable[30]=30720
- colortable[31]=31744
- countdown = 1000
- while countdown > 0 do
- for color=1,31
- do
- for address in lamplist
- do
- setcolor = component.proxy(address) setcolor.setLampColor(colortable[color])
- end
- end
- os.sleep(2)
- color = 31
- while color > 0
- do
- for address in lamplist
- do
- setcolor = component.proxy(address) setcolor.setLampColor(colortable[color])
- end
- color = color - 1
- end
- countdown = countdown - 1
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement