Ok. Yeah, I thought it may get confusing with giving you all of that information at once. smile

First off, you said your files are in a folder called "Text" instead of "Texts". If that's the case, you want to change both "Texts" to "Text" in the alias I gave you.

The alias does not include a timer. It just does the work for you. You can manually call it by just typing //echo -a $RndLine in your edit box, or you can put it into a timer like I showed (and like your second example has) **EXCEPT** with one small change that I missed in my first post.

Code:
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)
}


Sorry for the mistake. I forgot to put the $ in there.

And, no, they wouldn't be 2 aliases. You have it right. Don't forget to change the channel names.

If you use the on TEXT (the last example in my previous post) that I showed you that has a timer instead of the on CONNECT, it will make the random lines only appear when everyone is idle. If you use the on CONNECT instead of the on TEXT version, then it will display a random line every XX seconds no matter what (in your channel only).

The first example I gave you will display the random line from the specified file whenever someone types the trigger rather than using a timer. You can have your script do both things if you want.

For:
Code:
on *:text:!quote:#: {
  set -u5 %Quote.Fld On
  if (!%Quote.Fld) { msg $chan $read(quote.txt) }
}


You replace !quote, not text. You can have a single word or phrase. For example, !quote could be changed to Help me. You can also use wildcards (*) if you want it to work with phrases that include what you said, but may have more words than what you put there...

hello* will trigger on "hello" or "hello, how are you?" or whatever that starts with "hello"

*hello* will trigger on "hello" or "Riamus: Hello" or "Hello, Riamus" or whatever that has "hello" somewhere in it.

If you want a single on TEXT event instead of one for each word/phrase, then you can do something like:

Code:
on *:text:*:#: {
  if (hello isin $1-) { do this }
  elseif (goodbye isin $1-) { do this }
  elseif (help isin $1-) { do this }
}


Again, you can use wildcards, but if you do use wildcards, then you need to change isin to iswm .


Invision Support
#Invision on irc.irchighway.net