Or, you can always use plugin::RandomSay() to make it really easy. Here is the plugin if you don't already have it. I keep it in a file named messages.pl, but not sure what it is on the plugin SVN offhand.
Code:
###Usage: plugin::RandomSay(chance(1-100), "message1","message2", etc..);
# Example: plugin::RandomSay(50, "I'll get you!", "Get over here!", "That's it!");
sub RandomSay {
my $chance = $_[0];
# First roll to see if a message will be sent or not depending on chance
my $RandomNum = plugin::RandomRange(1, 100);
# Choose the random message to send and send it
if ($RandomNum <= $chance)
{
$MessageCount = @_;
my $RandMessage = plugin::RandomRange(1, $MessageCount - 1);
quest::say($_[$RandMessage]);
}
}