Try this:
on *:nick: {
if ($newnick == $me && *-away iswm $newnick) {
.timer 1 $rand(5,30) msg #somechannel $read(away.txt)
}
}
Then, create a file called away.txt and insert any messages you want. They will be randomly displayed. You can use this command to easily add the messages-
/write away.txt Some message here.
(Repeat for every message you want)
Things you'll need to change-
* Change #somechannel to the channel you want the message to be sent to. If you want it sent to all active channels, the script would need to be adjusted to loop through $chan().
* Change $rand(5,30) to the time range you want to randomly use. As-is, this will display the message somewhere between 5 and 30 seconds.
One last thing-
This doesn't check whether or not you're still in the channel. So if you change your nick to *-away and then leave the channel before the timer triggers, you'll send the message while no longer in the channel (if the channel allows external messages). Depending on the channel, that may be inappropriate. Or, if you change your nick and then disconnect before the timer triggers, you will get an error message that you are not connected. Either of these things can be included in the script, but it's probably not necessary. In most cases, you're not going to change your nick to *-away and then part the channel or disconnect. But, if you need that functionality, just ask.