You need to check an ini file with $ini for a number with quotes that are under the section $nick and then add a random a number from 1 to max of those, using $rand. Then you gotta use $ini again to get the value from said randomed number and use that to message whatever it is you wish to message, I assume channel.
The help files will come in handy now that you know what you're looking for.