mIRC Home    About    Download    Register    News    Help

Print Thread
#248577 12/10/14 08:18 AM
Joined: Oct 2014
Posts: 12
C
CEG Offline OP
Pikka bird
OP Offline
Pikka bird
C
Joined: Oct 2014
Posts: 12
I'm trying to get this to check for nicks in the channel and have the script add/active a timer to give a point(coin) every hour. now with that being said the script sets a timer for my bot instead of users. I'd be thankful if someone would help me! ps - I'm a noob frown

* Timer coins.#wikkedbot.wikkedbot 3600s delay add.pts #wikkedbot.wikkedbot (TwitchTV)
* Timer coins.#elricm.wikkedbot 3600s delay add.pts #elricm.wikkedbot (TwitchTV)
* Timer coins.#b_grafix.wikkedbot 3600s delay add.pts #b_grafix.wikkedbot (TwitchTV)
* Timer coins.#seriousinjury.wikkedbot 3600s delay add.pts #seriousinjury.wikkedbot (TwitchTV)
* Timer coins.#murphyshood.wikkedbot 3600s delay add.pts #murphyshood.wikkedbot (TwitchTV)

Code:
on *:join:#: {
  if ($nick = $me) { 
    var %l $nick(#,0)
    if (!%l) { return }
    var %i 1
    while (%i <= %l) {
      var %nick $nick(#,%i)
      $+(.timercoins.,#,.,%nick) 0 3600 add.pts $+(#,.,%nick)
      add.pts $+(#,.,%nick)
      inc %i
    }
    $+(.timercoins.,#,.,$nick) 0 3600 add.pts $+(#,.,$nick)
    add.pts $+(#,.,$nick)
  }
}

Last edited by CEG; 12/10/14 08:39 AM.
CEG #248578 12/10/14 09:04 AM
Joined: Dec 2013
Posts: 779
N
Hoopy frood
Offline
Hoopy frood
N
Joined: Dec 2013
Posts: 779
On twitch's irc it takes up to 40 seconds until the server sends you the list of users in the channel. You can't make a script that uses on your join event as the channel will always be empty aside from you in the userlist


Nillens @ irc.twitch.tv
Nillen @ irc.rizon.net
Nillen #248594 12/10/14 12:47 PM
Joined: Oct 2014
Posts: 12
C
CEG Offline OP
Pikka bird
OP Offline
Pikka bird
C
Joined: Oct 2014
Posts: 12
If you use the old IRCd the list is instant and you don't get the massive wall of joins.

CEG #248600 12/10/14 11:49 PM
Joined: Jan 2004
Posts: 1,358
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Jan 2004
Posts: 1,358
When you join a channel you will always be the only one there. Twitch or not. You should trigger at the end of /names. You'll need to catch the raw numeric for that.


Link Copied to Clipboard