You can find some of my scripts here:
http://forum.thegamecreators.com/?m=forum_view&t=199279&b=23 and here:
http://forum.thegamecreators.com/?m=forum_view&t=199579&b=24
But although I like to write this stuff, I am very careful about using them. After all "random" is the opposite of "control" and a level designer should have as much control over the gameplay as possible.
Random atmosphere sounds are ok, but random sound effects (especially "scary monster roars" and the like) can allready damage the game flow and atmosphere if overused or if the random variables allow ridiculous results.
Random encounters resulting in combat however can actually break a game if they unbalance the difficulty too much.
My friendly advice is to use randomness limited to one per level each: 1 random sound, 1 random light, 1 random enemy etc.
I have played over 20 half-life2 maps (both for fun and to learn) over the weekend and honestly I can't remember encountering a single random event. But I learnt, that clever enemy placing and allowing the player to enter a combat area from different sides can completely change an encounter.
In case you find my grammar and spelling weird ---> native German speaker ^^