Well, in theory you could store all sound IDs and names you can find in the .dat's in that folder, but this can take a lot of time of course. You could make it load the sounds into a global array on script start-up, which would have a structure like:
code:
var SoundsArray = new Array();
SoundsArray["Murray - Evil Laugh"] = "#4F004323E60";
SoundsArray["..."] = "#...";
And then, everytime you receive a message, you first check if the message is a sound name ("Murray - Evil Laugh") or a sound ID (#4F004323E60). In the first case, you'll have to send
"/sound "+SoundArray[NAME], in the second case you can simply send the ID straight away:
"/sound "+ID
But as I already said, the loading can take a long while when you have to do this every time the script starts. Maybe more interesting would be to have a command which loads the sounds and saves a text file or XML file with the sounds in it. Then, you can load that XML file instead at script start-up and thus you'd only need to load the sounds when you really ask for it.
I think I'll leave the rest to your inspiration and creativity.