speaker=peripheral.wrap("right") local speaking = false local red = true while true do while red or speaking do --#while we are waiting for redstone or the speaker to finish local event = os.pullEvent() --#pull an event if event == "speechComplete" then --#if the speaker stopped speaking speaking = false --#we are no longer waiting for it to finish elseif event == "redstone" then --#if a redstone change occured red = false --#we are no longer waiting for redstone end end local input = rs.getBundledInput("back") speaking = true --#we're now waiting for it to speak red = true --#and for a redstone change to occur if colors.test(input,colors.red) then speaker.synthesize("Reactor Critical! Reactor critical! Meltdown Imminent") elseif colors.test(input,colors.pink) then speaker.synthesize("Danger! Reactor heat level Critical! Evacuate all none essential Personnel!") elseif colors.test(input,colors.green) then speaker.synthesize("Danger! Reactor Heat level at 6000 Degrees!") elseif colors.test(input,colors.yellow) then speaker.synthesize("Warning! Reactor Heat Level above Acceptable limit!") elseif colors.test(input,colors.blue) then speaker.synthesize("Caution! reactor Heat level at 4000 degrees!") elseif colors.test(input,colors.magenta) then speaker.synthesize("Caution! Reactor Heat above Normal Level!") elseif colors.test(input,colors.orange) then speaker.synthesize("Attention! Reactor Heat Level at 2000 degrees") elseif colors.test(input,colors.white) then speaker.synthesize("attention, Reactor heat level increase detected") else speaking = false --#we aren't waiting if it didn't speak, this is probably not needed but I like to program for any situation. end endas many of you will recognise this is the old PA system coding that you guys helped me with and with the update the speak command is now Depricated as the modder says
can anyone help me with getting this up and running again?
Edited by V497_Vesper, 08 December 2015 - 10:46 PM.