mIRC Homepage
Posted By: KeviSkillz Usernotice sub script - 10/05/17 10:37 PM
Hey i was wondering if anyone could help, twitch is swapping over the usernotice system, replacing twitch notify for new subs. Im not sure how i would modify my code so that it works on this system.

This is what i use right now:

on *:LOGON:*:{
raw CAP REQ :twitch.tv/membership
raw CAP REQ :twitch.tv/tags
raw CAP REQ :twitch.tv/commands
/debug @raw
}

on 1:TEXT:*subscribed*:#couragejd:{
if ( $nick == twitchnotify ) && ($istok($1-,subscribed to,32)) halt
elseif ($nick == twitchnotify) && ( $4 == $null ) { describe $chan NEW SUB!! bingOMG $1 welcome to the Courageous!! bingHeart $+ }
}


raw USERNOTICE:*:{
if (($msgtags(msg-id).key == resub) && ($1 == #couragejd)) {
var %nick $iif($msgtags(display-name).key, $v1, $msgtags(login).key)
if ($0 == 1) {
describe $1 bingOMG RESUB!! %nick with the $msgtags(msg-param-months).key months in a row! bingHeart
}
else {
describe $1 bingOMG RESUB!! %nick with the $msgtags(msg-param-months).key months in a row! bingHeart Left a note: $qt($2-)
}
}

}


If anyone could help that would be great.
Posted By: zapdos26 Re: Usernotice sub script - 12/05/17 06:20 PM
Code:
raw USERNOTICE:*:{
 if (($msgtags(msg-id).key == sub) && ($1 == #couragejd)) {
  var %nick $iif($msgtags(display-name).key, $v1, $msgtags(login).key)
  describe $1 NEW SUB!! bingOMG %nick welcome to the Courageous!! bingHeart 
 }
 elseif (($msgtags(msg-id).key == resub) && ($1 == #couragejd)) {
  var %nick $iif($msgtags(display-name).key, $v1, $msgtags(login).key)
  if ($0 == 1) {
   describe $1 bingOMG RESUB!! %nick with the $msgtags(msg-param-months).key months in a row! bingHeart
  }
  else {
   describe $1 bingOMG RESUB!! %nick with the $msgtags(msg-param-months).key months in a row! bingHeart Left a note: $qt($2-) 
  }
 }
}
Posted By: jaany Re: Usernotice sub script - 13/05/17 01:09 AM
Originally Posted By: zapdos26
Code:
raw USERNOTICE:*:{
 if (($msgtags(msg-id).key == sub) && ($1 == #couragejd)) {
  var %nick $iif($msgtags(display-name).key, $v1, $msgtags(login).key)
  describe $1 NEW SUB!! bingOMG %nick welcome to the Courageous!! bingHeart 
 }
 elseif (($msgtags(msg-id).key == resub) && ($1 == #couragejd)) {
  var %nick $iif($msgtags(display-name).key, $v1, $msgtags(login).key)
  if ($0 == 1) {
   describe $1 bingOMG RESUB!! %nick with the $msgtags(msg-param-months).key months in a row! bingHeart
  }
  else {
   describe $1 bingOMG RESUB!! %nick with the $msgtags(msg-param-months).key months in a row! bingHeart Left a note: $qt($2-) 
  }
 }
}


Sorry for hijacking this thread.

I'm trying to set up an automsg for subs & resubs, and tried this without success.

I have used multiple scripts, and they either don't work, or only work for new subs, sometimes for prime, and never for resubs or if they include a message in their sub.

I'm not trying to use the twitchnotify check, as Twitch are getting rid of this and require you to use the room id, as new subs will not send USERNOTICE any more.

If anyone has a working script for this, please let me know! Thanks
Posted By: KeviSkillz Re: Usernotice sub script - 15/05/17 05:40 AM
I tried this and it worked perfectly, thank you for helping zapdos <3
Posted By: zapdos26 Re: Usernotice sub script - 16/05/17 06:03 PM
NP smile
Posted By: Ryan Re: Usernotice sub script - 16/05/17 06:25 PM
not sure whats going wrong could u help me out and tell me what i need to fix heres my code( i used your code just changed it for the channel im doing it for) https://pastebin.com/UhLCPW5Q
Posted By: zapdos26 Re: Usernotice sub script - 16/05/17 09:32 PM
Could you possible post what the message should say?
Posted By: Ryan Re: Usernotice sub script - 17/05/17 03:21 AM
i worked it out and it seems to work. the way i fixed it was that i would only put that code in a separate code file. TIP* put the code in a new file and keep it to its self. btw zapos thx for the code
Posted By: zapdos26 Re: Usernotice sub script - 17/05/17 12:14 PM
NP smile
© mIRC Discussion Forums