mIRC Homepage
Posted By: JB_uk Help with modifying script - 14/10/14 01:07 PM
I do have a working timer script however I would like it so the 4 timers I'm currently using run off one timer so there are equal times between each announcement. This doesn't happen with 4 separate timers as they all have a different time.
I tried this method but this didn't work. Anyone here got any other ideas or solutions? Or ways to fix this script.
Code:
on *:TEXT:!start:#jb_uk: {
  if ($nick isop #) {
    msg $chan /me AutoCom: ON
    set -u20 %Line On
    .timerNow 70 12 {
      if (%Line) { 
        $read(linksall.txt, 1)
        unset %Line
        set -u20 %Line1 On
      }
      if (%Line1) { 
        $read(linksall.txt, 2)
        unset %Line1
        set -u20 %Line2 On
      }
      if (%Line2) { 
        $read(linksall.txt, 3)
        unset %Line2
        set -u20 %Line3 On
      }
      if (%Line3) { 
        $read(linksall.txt, 4)
        unset %Line3
        set -u20 %Line On
      }
    }
  }
  else { msg # $nick -> You do not have permission to perform this action. }
}
on *:TEXT:!stop:#jb_uk: {
  if ($nick isop #) {
    msg $chan /me AutoCom: OFF
    .timerNow off
  }
  else { msg # $nick -> You do not have permission to perform this action. }
}
Posted By: westor Re: Help with modifying script - 14/10/14 03:49 PM
Can you please paste the linksall.txt file to see what is inside?

and if i understand correctly you want with !start to start all the timers that exist on the linksall.txt and with !stop to stop all of them?
Posted By: JB_uk Re: Help with modifying script - 14/10/14 03:58 PM
There are no timers inside of the txt, it is four separate line of text that will display after timerNow elapses.
What the txt shows is basically

Youtube can be found at <user>
Consider donating?
Please don't spam text.
Rules.

Just a bit longer that what is written there.
Posted By: Nillen Re: Help with modifying script - 14/10/14 05:24 PM
Code:
on *:TEXT:!start:#jb_uk: {
  if ($nick isop #) {
    describe # AutoCom: ON
    .timerNow 70 12 Linksall #
  }
  else np # $nick
}

alias Linksall { 
  var %chan $1
  var %lines $lines(linksall.txt)
  if (!%counter) || (%counter > %lines) set %counter 1
  var %msg $read(linksall.txt,%counter)
  msg %chan %msg
  inc %counter
}

on *:TEXT:!stop:#jb_uk: {
  if ($nick isop #) {
    describe # AutoCom: OFF
    .timerNow off
  }
  else np # $nick
}

alias np msg $1 $2 -> You do not have permission to perform this action.
Untested
Posted By: JB_uk Re: Help with modifying script - 14/10/14 05:53 PM
Nillens saves the day yet again.
Cheers buddy.
© mIRC Discussion Forums