mIRC Home    About    Download    Register    News    Help

Print Thread
#45932 31/08/03 11:52 PM
S
shy_and_quiet
shy_and_quiet
S
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!!

#45933 01/09/03 12:04 AM
I
Iori
Iori
I
on *:text:!verse:#:{ msg # $read(verses.txt) }

#45934 01/09/03 12:53 AM
G
gabrielevans10
gabrielevans10
G
This script will work.
You need to put the name of the channel
That you want the script to work in.
So if you type # for the channel
the script will work in every channel.

on *:text:!verse:#:{
$read c:\program files\mirc\verse.txt
}

#45935 01/09/03 01:31 AM
I
Infernal_Demon
Infernal_Demon
I
no it won´t use the previous example by Iori

#45936 01/09/03 02:41 AM
S
shy_and_quiet
shy_and_quiet
S
I used the first example, and it works great!! thank you!!! I've been playing with it for about 2 hours now, hehehehe!!

I really appreciate you help!

#45937 01/09/03 09:07 AM
Z
Zonk
Zonk
Z
whats up with you people, obviously not knowing the exact way of how to script it, but nevertheless replying without stating any doubt, if yours might be not quite correct?

You are seriouly confusing people with that....


Link Copied to Clipboard