Trouble with an mIRC timer

I wrote a command that would read from one file to get a random like (each line is a different way of asking the viewers to tweet out the show) and it would also read another file where I would store the appropriate link. This worked flawlessly

I decided I would make it into a timer, but the problem is the timer sends the same message over and over. I’ve deduced that this is due to the fact that when it gets to the “set %cttmsg $read(pathtofile\cttmsg.txt, n)” line it doesn’t rerun it when the timer itself actually runs. I’ve tried just adding the “set %cttmsg $read(pathtofile\cttmsg.txt, n)” line to the timer part, but it never works.

If someone could lend a hand, I would be most appreciative.

on *:TEXT:!startctt*:#: {
  if ($chan == #channelname) {
    if ($nick isop #) {
      set %cttmsg $read(pathtofile\cttmsg.txt, n)
      set %cttlink $read(pathtofile\cttlink.txt, n)
      msg $chan /me $(%cttmsg) $(%cttlink) $+
      .timerCtt 0 900 msg $chan /me $(%cttmsg) $(%cttlink) $+
  else {  }
on *:text:!startctt:#channelhere:{
  if ($nick isop $chan) {
    .timerctt 0 900 cttread $chan

alias cttread {
  set %randomread $r(1,$lines(pathtofile\cttmsg.txt))
  describe $1 $read(pathtofile\cttmsg.txt,%randomread) $read(pathtofile\cttlink.txt,%randomread)

There you go :slight_smile:

Thank you! Really thank you, I’ve been trying to figure this one out for a while.

Thank you, very much.