Quote
local function getPeripherals(sType)
local t = {}
for _,name in ipairs(peripheral.getNames()) do
if peripheral.getType(name) == sType then
t[#t + 1] = peripheral.wrap(name)
end
end
return t
end
local t = getPeripherals("monitor")
for i = 1, #t do
t[i].setBackgroundColor(colors.red)
t[i].clear()
sleep(0.5)
t[i].setBackgroundColor(colors.black)
t[i].clear()
sleep(0.5)
t[i].setBackgroundColor(colors.red)
t[i].clear()
sleep(0.5)
t[i].setBackgroundColor(colors.black)
t[i].clear()
sleep(0.5)
t[i].setBackgroundColor(colors.red)
t[i].clear()
sleep(0.5)
t[i].setBackgroundColor(colors.black)
t[i].clear()
sleep(0.5)
end
local t = {}
for _,name in ipairs(peripheral.getNames()) do
if peripheral.getType(name) == sType then
t[#t + 1] = peripheral.wrap(name)
end
end
return t
end
local t = getPeripherals("monitor")
for i = 1, #t do
t[i].setBackgroundColor(colors.red)
t[i].clear()
sleep(0.5)
t[i].setBackgroundColor(colors.black)
t[i].clear()
sleep(0.5)
t[i].setBackgroundColor(colors.red)
t[i].clear()
sleep(0.5)
t[i].setBackgroundColor(colors.black)
t[i].clear()
sleep(0.5)
t[i].setBackgroundColor(colors.red)
t[i].clear()
sleep(0.5)
t[i].setBackgroundColor(colors.black)
t[i].clear()
sleep(0.5)
end












