mIRC Homepage
Posted By: Bestpeff (Twitch) Sub alert with mulitple messages - 06/06/16 07:53 PM
How can I turn this sub alert script...

on 1:connect: { raw CAP REQ :twitch.tv/membership }

on 1:text:*subscribed*:#bigfoltz:{
if ( $nick == twitchnotify ) && ($istok($1-,subscribed to,32)) halt
elseif ($nick == twitchnotify) && ( $4 == $null ) { describe $chan foltzLove $1 has just subscribed foltzHype }
elseif ($nick == twitchnotify) && ( $4 isnum ) { describe $chan foltzLove $1 has subscribed for $4 months in a row! foltzHype }
}


So that It'll display more than one message for a new subs, and returning subs??
I've noticed you've been asking for a lot of help and that's fine and dandy. However, this is extremely basic and you should know how to do this.

Code:
elseif { do action1 | do action2 }


or

Code:
elseif {
  do action1
  do action2
}
Posted By: NoKz Re: (Twitch) Sub alert with mulitple messages - 10/06/16 05:34 PM
Here's a sample of what I've been using.

Code:
on *:text:*subscribed*:#:{
  if ( $nick == twitchnotify ) && ($istok($1-,subscribed to,32)) halt
  elseif ($nick == twitchnotify) && ( $4 == while ) halt
  ; Custom New Sub Message
  elseif ($nick == twitchnotify) && ( $4 == $null ) { msg $chan MESSAGE  }
  ; Custom Message Per User
  elseif ($nick == twitchnotify) && ( $4 isnum ) && ( $1 = nokz ) { msg $chan MESSAGE }
  ; Custom Message For Months Subbed
  elseif ($nick == twitchnotify) && ( $4 > 5 ) && ( $4 < 12 ) { msg $chan MESSAGE } 
  elseif ($nick == twitchnotify) && ( $4 == 12 ) { msg $chan MESSAGE} 
  elseif ($nick == twitchnotify) && ( $4 > 12 ) && ( $4 < 18 ) { msg $chan MESSAGE }
  elseif ($nick == twitchnotify) && ( $4 > 17 ) && ( $4 < 20 ) { msg $chan MESSAGE }
  elseif ($nick == twitchnotify) && ( $4 > 19 ) && ( $4 < 24 ) { msg $chan MESSAGE }
}
© mIRC Discussion Forums