mIRC Home    About    Download    Register    News    Help

Print Thread
use !command to read Random line from .txt file #251121 10/02/15 06:00 AM
Joined: Feb 2015
Posts: 16
L
logan_671 Offline OP
Pikka bird
OP Offline
Pikka bird
L
Joined: Feb 2015
Posts: 16
I've been working on this for a while, checking forums etc etc but I just can't get it to work, here is what I have, I'm not certain if it is right, I've only been working with mIRC a few days now, new at the whole script/code writing ^_^

on *:TEXT:!askwheatly:#: {
if ((%floodaskwheatly) || ($($+(%,floodaskwheatly.,$nick),2))) { return }
set -u10 %floodaskwheatly On
set -u30 %floodaskwheatly. $+ $nick On
msg $chan $!read(TEXT.txt,n)
}

can anyone tell me what i'm doing wrong or how I can make this better/work so fare it does nothing.

I really appreciate the help!

Re: use !command to read Random line from .txt file [Re: logan_671] #251123 10/02/15 08:11 AM
Joined: Jul 2006
Posts: 3,573
W
Wims Offline
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,573
Everything is good except $!read(TEXT.txt,n)

$!<identifier> is a form which once evaluated (and by default a line is evaluated once), produces the plain text, litteral, "$identifier", you probably found that in a script which used /timer to delay the sending of a message, that form is usually required in timer in order to evaluate the content when the command associated with the timer fires, rather than when the /timer itself evaluate its parameters.

In short, just use $read(text.txt,n) smile


Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: use !command to read Random line from .txt file [Re: Wims] #251142 10/02/15 10:34 PM
Joined: Feb 2015
Posts: 16
L
logan_671 Offline OP
Pikka bird
OP Offline
Pikka bird
L
Joined: Feb 2015
Posts: 16
You my friend are a genius, I've been pulling my hair out over this for a while now!!!

You legend!!! thank you so much!!!