I am trying to write a script that will play a random line from a text file, but I'm not certain how to do it. I found a little help and tried what they suggested, but I think I didn't do it right, because the script isn't working.

When someone types "!verse" in the channel, I want the script to reply with a random verse from a text file called verses.txt.

The text file is located on my computer at: C:\Program Files\mIRC2\verses.txt

The script I have tried to use, which doesn't work looks like this:

on *:text:!verse:#: {
$read $mirc2dir\verses.txt
}


If anyone could help me out on how to make this work, I would really appreciate it. Thank you!!


~~~

I'm a Scripting Newbie, please forgive my questions, and have patience with me. Thanks!