on *:TEXT:*lol*:#: $read(lol.txt)

and lol.txt is in the mIRC main folder and contains something like this:

describe $chan lol right back at ya
msg $chan haha
notice $nick just to tell you I'm laughing too
msg $nick here's a private lol for you!

This will run one random line of that file everytime someone says lol in the channel. If you want it to work for queries too, change $chan to $target. You see that the entire command line is included.

Another way:
on *:TEXT:*lol*:#: describe $chan $read(lol.txt)
Then lol.txt should look like this, and all random lines are sent as text in a action. You see the describe (or msg) is in the script, while only the text of the message is in the file. This makes for a nicer file, but you cannot have messages and actions combined, it's either one or the other...

slaps $nick around with a large rotfl
laughs too!
doesn't like that joke.


For both of those files, make sure there are no empty lines as those will give a * describe insufficient parameters error sometimes.