mIRC Home    About    Download    Register    News    Help

Print Thread
#248630 14/10/14 01:07 PM
Joined: Oct 2014
Posts: 49
JB_uk Offline OP
Ameglian cow
OP Offline
Ameglian cow
Joined: Oct 2014
Posts: 49
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. }
}

Joined: Dec 2008
Posts: 1,515
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,515
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?


Need Online mIRC help or an mIRC Scripting Freelancer? -> https://irc.chathub.org <-
Joined: Oct 2014
Posts: 49
JB_uk Offline OP
Ameglian cow
OP Offline
Ameglian cow
Joined: Oct 2014
Posts: 49
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.

Joined: Dec 2013
Posts: 779
N
Hoopy frood
Offline
Hoopy frood
N
Joined: Dec 2013
Posts: 779
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


Nillens @ irc.twitch.tv
Nillen @ irc.rizon.net
Joined: Oct 2014
Posts: 49
JB_uk Offline OP
Ameglian cow
OP Offline
Ameglian cow
Joined: Oct 2014
Posts: 49
Nillens saves the day yet again.
Cheers buddy.


Link Copied to Clipboard