mIRC Home    About    Download    Register    News    Help

Print Thread
Usernotice sub script #260549 10/05/17 10:37 PM
Joined: Jul 2016
Posts: 10
K
KeviSkillz Offline OP
Pikka bird
OP Offline
Pikka bird
K
Joined: Jul 2016
Posts: 10
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.

Last edited by KeviSkillz; 11/05/17 12:03 AM.
Re: Usernotice sub script [Re: KeviSkillz] #260563 12/05/17 06:20 PM
Joined: Jul 2016
Posts: 28
Z
zapdos26 Offline
Ameglian cow
Offline
Ameglian cow
Z
Joined: Jul 2016
Posts: 28
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-) 
  }
 }
}

Re: Usernotice sub script [Re: zapdos26] #260564 13/05/17 01:09 AM
Joined: May 2017
Posts: 3
J
jaany Offline
Self-satisified door
Offline
Self-satisified door
J
Joined: May 2017
Posts: 3
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

Re: Usernotice sub script [Re: zapdos26] #260572 15/05/17 05:40 AM
Joined: Jul 2016
Posts: 10
K
KeviSkillz Offline OP
Pikka bird
OP Offline
Pikka bird
K
Joined: Jul 2016
Posts: 10
I tried this and it worked perfectly, thank you for helping zapdos <3

Re: Usernotice sub script [Re: KeviSkillz] #260577 16/05/17 06:03 PM
Joined: Jul 2016
Posts: 28
Z
zapdos26 Offline
Ameglian cow
Offline
Ameglian cow
Z
Joined: Jul 2016
Posts: 28
NP smile

Re: Usernotice sub script [Re: zapdos26] #260578 16/05/17 06:25 PM
Joined: May 2017
Posts: 3
R
Ryan Offline
Self-satisified door
Offline
Self-satisified door
R
Joined: May 2017
Posts: 3
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

Re: Usernotice sub script [Re: Ryan] #260580 16/05/17 09:32 PM
Joined: Jul 2016
Posts: 28
Z
zapdos26 Offline
Ameglian cow
Offline
Ameglian cow
Z
Joined: Jul 2016
Posts: 28
Could you possible post what the message should say?

Re: Usernotice sub script [Re: zapdos26] #260581 17/05/17 03:21 AM
Joined: May 2017
Posts: 3
R
Ryan Offline
Self-satisified door
Offline
Self-satisified door
R
Joined: May 2017
Posts: 3
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

Re: Usernotice sub script [Re: Ryan] #260582 17/05/17 12:14 PM
Joined: Jul 2016
Posts: 28
Z
zapdos26 Offline
Ameglian cow
Offline
Ameglian cow
Z
Joined: Jul 2016
Posts: 28
NP smile