This is really more a question of approach, but I\'m presenting it in php.
Suppose we had a list of four percentages that a give event will occur on iteration.
I'd do something like:
$arr = array (
'walk the dog' => array('min' => 0, 'max' => 25),
'read the paper' => array('min' => 25, 'max' => 50),
'drink coffee' => array('min' => 0, 'max' => 0),
'listen to music' => array('min' => 50, 'max' => 100),
);
$rnd = rand(1,100);
foreach($arr as $k =>$v) {
if ($rnd > $v['min'] && $rnd <= $v['max']) {
echo $k,"\n";
}
}