Riamus2
Ya, you nailed it there, thanks (as usual). :p
All files are in the folder \Text, so I am looking for a random line from a random text file to be read every so often. However, with...
alias RndLine {
var %total = $findfile($qt($scriptdir\Texts),*.txt,0)
return $read($qt($findfile($qt($scriptdir\Texts),*.txt,$rand(1,%total))))
}
I can't see where I can change the variable for the length of time. Or is it a matter of combining the scripts as such...
alias RndLine {
var %total = $findfile($qt($scriptdir\Texts),*.txt,0)
return $read($qt($findfile($qt($scriptdir\Texts),*.txt,$rand(1,%total))))
}
on *:connect: {
.timerRndLine 0 600 $!iif($!me ison #yourchannel,msg #yourchannel RndLine)
}
Or, would those be two different Alias'?
Just to confirm...
a) on text, random line from random file (my channel only)
b) secondly, ramdom line from ramdom file, on a timer (my channel only)
With all files being in /Text.
Further..
on *:text:!quote:#: {
set -u5 %Quote.Fld On
if (!%Quote.Fld) { msg $chan $read(quote.txt) }
}
In replacing :text: can I use mulitple words, or am I limited to a single word? Are these words separated by a comma for instance?
/hopefully, final edit :p