mIRC Home    About    Download    Register    News    Help

Print Thread
(Twitch) New twitch sub script? #260680 05/06/17 02:58 AM
Joined: Sep 2016
Posts: 33
P
Predatorfusion Offline OP
Ameglian cow
OP Offline
Ameglian cow
P
Joined: Sep 2016
Posts: 33
Anyone got a script that works with new subs on twitch when they put a message when they just subscribed?

Re: (Twitch) New twitch sub script? [Re: Predatorfusion] #260689 05/06/17 08:02 PM
Joined: Jul 2016
Posts: 28
Z
zapdos26 Offline
Ameglian cow
Offline
Ameglian cow
Z
Joined: Jul 2016
Posts: 28
Try this smile
Code:
raw USERNOTICE:*:{
  if ($msgtags(msg-id).key == sub) {
    if ($msgtags(msg-param-sub-plan).key isnum) {
      var %tier = $calc(($msgtags(msg-param-sub-plan).key)/1000)
    }
    else {
      var %tier = 1
    }
    var %message @nick@ has just subscribed at Tier @tier@! SUBHYPE!!!
    var %sub. [ $+ [ $1 ] ] $replace($hget($1 $+ settings,sub.message),@nick@,$msgtags(display-name).key,@tier@,%tier)
    msg $1 %message
  }
}

Re: (Twitch) New twitch sub script? [Re: zapdos26] #260709 07/06/17 10:12 PM
Joined: Sep 2016
Posts: 33
P
Predatorfusion Offline OP
Ameglian cow
OP Offline
Ameglian cow
P
Joined: Sep 2016
Posts: 33
i tried it, didnt work with either 4.99, 9.99, 24.99 and prime subs

Re: (Twitch) New twitch sub script? [Re: Predatorfusion] #260713 08/06/17 12:35 AM
Joined: Jul 2016
Posts: 28
Z
zapdos26 Offline
Ameglian cow
Offline
Ameglian cow
Z
Joined: Jul 2016
Posts: 28
Does it still message the channel at least? Because I did make an error.
Code:
raw USERNOTICE:*:{
  if ($msgtags(msg-id).key == sub) {
    if ($msgtags(msg-param-sub-plan).key isnum) {
      var %tier = $calc(($msgtags(msg-param-sub-plan).key)/1000)
    }
    else {
      var %tier = 1
    }
    var %message @nick@ has just subscribed at Tier @tier@! SUBHYPE!!!
    var %message $replace($hget($1 $+ settings,sub.message),@nick@,$msgtags(display-name).key,@tier@,%tier)
    msg $1 %message
  }
}


For this script you do need to:
Code:
on *:Connect:{
  /raw CAP REQ :twitch.tv/membership
  /raw CAP REQ :twitch.tv/commands
  /raw CAP REQ :twitch.tv/tags
}

Last edited by zapdos26; 08/06/17 12:39 AM.
Re: (Twitch) New twitch sub script? [Re: zapdos26] #260735 09/06/17 07:10 AM
Joined: May 2017
Posts: 3
R
Ryan Offline
Self-satisified door
Offline
Self-satisified door
R
Joined: May 2017
Posts: 3
can u make a tier sub code for resubs too. thx. do i need to do /me or is like describe $1 with %message.

Re: (Twitch) New twitch sub script? [Re: zapdos26] #260832 23/06/17 10:26 PM
Joined: Jun 2017
Posts: 1
I
Ikatzuki Offline
Mostly harmless
Offline
Mostly harmless
I
Joined: Jun 2017
Posts: 1
Originally Posted By: zapdos26
Does it still message the channel at least? Because I did make an error.
Code:
raw USERNOTICE:*:{
  if ($msgtags(msg-id).key == sub) {
    if ($msgtags(msg-param-sub-plan).key isnum) {
      var %tier = $calc(($msgtags(msg-param-sub-plan).key)/1000)
    }
    else {
      var %tier = 1
    }
    var %message @nick@ has just subscribed at Tier @tier@! SUBHYPE!!!
    var %message $replace($hget($1 $+ settings,sub.message),@nick@,$msgtags(display-name).key,@tier@,%tier)
    msg $1 %message
  }
}


For this script you do need to:
Code:
on *:Connect:{
  /raw CAP REQ :twitch.tv/membership
  /raw CAP REQ :twitch.tv/commands
  /raw CAP REQ :twitch.tv/tags
}


Did anyone manage to try this out yet? I'm looking to set it up but unsure about the

Quote:
For this script you do need to:
Code:
on *:Connect:{
  /raw CAP REQ :twitch.tv/membership
  /raw CAP REQ :twitch.tv/commands
  /raw CAP REQ :twitch.tv/tags
}

part and what to do with it. Help appreciated! Thanks <3