mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jan 2016
Posts: 79
X
x3pos Offline OP
Babel fish
OP Offline
Babel fish
X
Joined: Jan 2016
Posts: 79
i need this and only for me (not using other viewers)

x3pos:!timer1 60 "MY Message"
BOT:timer1 created. your message will be using every 60 seconds!

x3pos:!stoptimer "timer1"
BOT:timer1 stopped.

other viewers:!timer1 60 "random"
BOT:you cant use this commands.

Joined: Jun 2015
Posts: 84
F
Babel fish
Offline
Babel fish
F
Joined: Jun 2015
Posts: 84
/help timers
/help $1-
/help $unsafe

If you're running v7.44 or later, the /help $unsafe will be there, otherwise it won't appear in the help menu.

I'd also like to mention that you posted a thread similar to this before, 2 months ago.

Joined: Jan 2016
Posts: 79
X
x3pos Offline OP
Babel fish
OP Offline
Babel fish
X
Joined: Jan 2016
Posts: 79
my english bad. sorry. so i need the code only

Joined: Jan 2016
Posts: 79
X
x3pos Offline OP
Babel fish
OP Offline
Babel fish
X
Joined: Jan 2016
Posts: 79
Code:
alias theme return 3
alias t.set {
  ;; 4 is time in seconds
  if ($1 == 1) return $+($theme,Your timer will now be run every4 15 minutes ,$theme,infinate times until you disconnect or leave.)
  elseif ($1 == 2) return $+($theme,,$nick,,$chr(44) you already have a timer running. Type !timer off to remove your timer.)
  elseif ($1 == 3) return $+($theme,[Advert][,$2,] $3-)
  elseif ($1 == 4) return 900
  elseif ($1 == 5) return $+($theme,Your timer has been removed from the rotation.)
  elseif ($1 == 6) return $+($theme,$2 $+ 's timer has been removed from the rotation.)

}
on *:NICK:{
  if ($timer($+(.,$nick.,$chan,.advert)).secs) {
    timer $+ $+(.,$nick,.,$chan,.advert) off
    var %com $left($gettok($timer($+(.,$nick.,$chan,.advert)).com,3-,44),$calc($len($gettok($timer($+(.,$nick.,$chan,.advert)).com,3-,44)) - 1))
    .timer $+ $+(.,$newnick,.,$chan,.advert) 0 $v1 msg $chan $+($,t.set,$chr(40),3,$chr(44),$newnick,$chr(44),%com,$chr(41)) 
  }
}

on *:PART:#:{
  if ($timer($+(.,$nick.,$chan,.advert)).secs) {
    .timer $+ $+(.,$nick,.,$chan,.advert) off 
  }
}
on *:QUIT:{
  if ($timer($+(.,$nick.,$chan,.advert)).secs) {
    .timer $+ $+(.,$nick,.,$chan,.advert) off 
  }
}

on *:TEXT:*:#:{
  if ($1 == !timer) {
    if ($2 == on) {
      if (!$timer($+(.,$nick.,$chan,.advert)).secs) {
        notice $nick $t.set(1)
        msg $chan $t.set(3,$nick,$3-)
        .timer $+ $+(.,$nick,.,$chan,.advert) 0 $t.set(4) msg $chan $+($,t.set,$chr(40),3,$chr(44),$nick,$chr(44),$3-,$chr(41))
      }
      else {
        msg $chan $t.set(2)
      }
    }
    elseif ($2 == off) {
      if (!$3) {
        msg $chan $t.set(5)
        .timer $+ $+(.,$nick,.,$chan,.advert) off 
      }
      elseif ($3 && $nick($chan,$nick,@&~)) {
        msg $chan $t.set(6,$3)
        .timer $+ $+(.,$3,.,$chan,.advert) off 
      }
    }
  }
}


i want use this my nick only and moderator only...

Joined: Jun 2015
Posts: 84
F
Babel fish
Offline
Babel fish
F
Joined: Jun 2015
Posts: 84
For yourself and moderators.

if ($nick == $mid(#,2) || $nick isop #) {
This line here goes after the on *:TEXT:*:#:{ line.


That'll cover your and any moderator.
Keep in mind for isop to work you need to run these

Code:
/raw CAP REQ :twitch.tv/membership
/raw CAP REQ :twitch.tv/commands

Joined: Jan 2016
Posts: 79
X
x3pos Offline OP
Babel fish
OP Offline
Babel fish
X
Joined: Jan 2016
Posts: 79
Code:
/raw CAP REQ :twitch.tv/membership
/raw CAP REQ :twitch.tv/commands


Code:
alias theme return 3
alias t.set {
  ;; 4 is time in seconds
  if ($1 == 1) return $+($theme,Your timer will now be run every4 15 minutes ,$theme,infinate times until you disconnect or leave.)
  elseif ($1 == 2) return $+($theme,,$nick,,$chr(44) you already have a timer running. Type !timer off to remove your timer.)
  elseif ($1 == 3) return $+($theme,[Advert][,$2,] $3-)
  elseif ($1 == 4) return 900
  elseif ($1 == 5) return $+($theme,Your timer has been removed from the rotation.)
  elseif ($1 == 6) return $+($theme,$2 $+ 's timer has been removed from the rotation.)

}
on *:NICK:{
  if ($timer($+(.,$nick.,$chan,.advert)).secs) {
    timer $+ $+(.,$nick,.,$chan,.advert) off
    var %com $left($gettok($timer($+(.,$nick.,$chan,.advert)).com,3-,44),$calc($len($gettok($timer($+(.,$nick.,$chan,.advert)).com,3-,44)) - 1))
    .timer $+ $+(.,$newnick,.,$chan,.advert) 0 $v1 msg $chan $+($,t.set,$chr(40),3,$chr(44),$newnick,$chr(44),%com,$chr(41)) 
  }
}

on *:PART:#:{
  if ($timer($+(.,$nick.,$chan,.advert)).secs) {
    .timer $+ $+(.,$nick,.,$chan,.advert) off 
  }
}
on *:QUIT:{
  if ($timer($+(.,$nick.,$chan,.advert)).secs) {
    .timer $+ $+(.,$nick,.,$chan,.advert) off 
  }
}

on *:TEXT:*:#:{
  if ($nick == $mid(#,2) || $nick isop #) {
    if ($1 == !timer) {
      if ($2 == on) {
        if (!$timer($+(.,$nick.,$chan,.advert)).secs) {
          notice $nick $t.set(1)
          msg $chan $t.set(3,$nick,$3-)
          .timer $+ $+(.,$nick,.,$chan,.advert) 0 $t.set(4) msg $chan $+($,t.set,$chr(40),3,$chr(44),$nick,$chr(44),$3-,$chr(41))
        }
        else {
          msg $chan $t.set(2)
        }
      }
      elseif ($2 == off) {
        if (!$3) {
          msg $chan $t.set(5)
          .timer $+ $+(.,$nick,.,$chan,.advert) off 
        }
        elseif ($3 && $nick($chan,$nick,@&~)) {
          msg $chan $t.set(6,$3)
          .timer $+ $+(.,$3,.,$chan,.advert) off 
        }
      }
    }
  }
}


am i wrong ? doesnt work.

Last edited by x3pos; 03/08/16 03:10 PM.
Joined: Sep 2016
Posts: 15
T
Pikka bird
Offline
Pikka bird
T
Joined: Sep 2016
Posts: 15

Hope that will help smile



Code:
on *:text:!timer*:#: {
  if ($nick == x3pos || $nick isop) {
    if ($2 == $null || $3 == $null || $4 == $null || $3 !isnum) { msg # insufficient parameters: !timer <timername> <repeat sec> <msg> | return }
    if ($timer($2).secs) { msg # You already have timer called $2 | return }
    .timer $+ $2 0 $3 msg # $4-
    msg # Timer $2 created and will repeat every $3 seconds! to stop use !stoptimer <timername>
  }
  else { 
    msg # You cant use this command! 
  }
}

on *:text:!stoptimer*:#: {
  if ($nick == x3pos || $nick isop) {
    if ($timer($2).secs) {
      .timer $+ $2 off
      msg # Timer $2 stopped
    }
    else { msg # There is no timer called $2 }
  }
  else { 
    msg # You cant use this command! 
  }
}


Last edited by Tulga; 02/09/16 10:57 AM.
Joined: Jan 2016
Posts: 79
X
x3pos Offline OP
Babel fish
OP Offline
Babel fish
X
Joined: Jan 2016
Posts: 79
Thank you its working.

Joined: Sep 2016
Posts: 15
T
Pikka bird
Offline
Pikka bird
T
Joined: Sep 2016
Posts: 15
You're welcome smile


Link Copied to Clipboard