mIRC Home    About    Download    Register    News    Help

Print Thread
#45932 31/08/03 11:52 PM
Joined: Aug 2003
Posts: 27
S
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Aug 2003
Posts: 27
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!
#45933 01/09/03 12:04 AM
Joined: Aug 2003
Posts: 1,831
I
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
on *:text:!verse:#:{ msg # $read(verses.txt) }

#45934 01/09/03 12:53 AM
Joined: Sep 2003
Posts: 13
Pikka bird
Offline
Pikka bird
Joined: Sep 2003
Posts: 13
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
Joined: Dec 2002
Posts: 56
Babel fish
Offline
Babel fish
Joined: Dec 2002
Posts: 56
no it won´t use the previous example by Iori

#45936 01/09/03 02:41 AM
Joined: Aug 2003
Posts: 27
S
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Aug 2003
Posts: 27
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!


~~~

I'm a Scripting Newbie, please forgive my questions, and have patience with me. Thanks!
#45937 01/09/03 09:07 AM
Joined: Jan 2003
Posts: 53
Z
Babel fish
Offline
Babel fish
Z
Joined: Jan 2003
Posts: 53
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