mIRC Homepage

(Twitch) New twitch sub script?

Posted By: Predatorfusion

(Twitch) New twitch sub script? - 05/06/17 02:58 AM

Anyone got a script that works with new subs on twitch when they put a message when they just subscribed?
Posted By: zapdos26

Re: (Twitch) New twitch sub script? - 05/06/17 08:02 PM

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
  }
}
Posted By: Predatorfusion

Re: (Twitch) New twitch sub script? - 07/06/17 10:12 PM

i tried it, didnt work with either 4.99, 9.99, 24.99 and prime subs
Posted By: zapdos26

Re: (Twitch) New twitch sub script? - 08/06/17 12:35 AM

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
}
Posted By: Ryan

Re: (Twitch) New twitch sub script? - 09/06/17 07:10 AM

can u make a tier sub code for resubs too. thx. do i need to do /me or is like describe $1 with %message.
Posted By: Ikatzuki

Re: (Twitch) New twitch sub script? - 23/06/17 10:26 PM

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
© 2020 mIRC Discussion Forums