You're still being vague as to what you want it to do 'randomly'. If your random response is to pick a random line from a text file and message that to channel, you can use the $read function in a way that returns a random line from a text file:

msg $chan $nick $+ : $read(filename.txt,nt)

Since you did not use a number or other switches, this reads a random line, which the /msg command is "saying" to the channel as if you typed it.

It's going to be frustrating for you to get what you want, when you're being vague about what you want, as well as not understanding the magic scripting language that does things you don't understand.