mIRC Home    About    Download    Register    News    Help

Print Thread
twitch subscriber script help #265584 03/06/19 06:50 AM
Joined: Dec 2016
Posts: 16
H
Hazman Offline OP
Pikka bird
OP Offline
Pikka bird
H
Joined: Dec 2016
Posts: 16
Hello I'm just getting back into mirc and am wondering if someone could help me with this, trying to get it so the sub gift script would post 1 message with "%nick has gifted x amount of subs" with the number of subs gifted rather than it being a constant spam of the user who gifted the subs to the other users if multiple, if only one it would be the %nick who gifted the sub to the username.

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

raw USERNOTICE::{
if (($msgtags(msg-id).key == subgift) && ($1 == #channel)) {
var %nick_from $iif($msgtags(display-name).key, $v1, $msgtags(login).key) , %nick_to $iif($msgtags(msg-param-recipient-display-name).key, $v1, $msgtags(msg-param-recipient-user-name).key)
describe $1 Thank you %nick_from for gifting a sub to %nick_to
raw USERNOTICE::{
if (($msgtags(msg-id).key == sub) && ($1 == #channel)) {
var %nick $iif($msgtags(display-name).key, $v1, $msgtags(login).key)
msg $1 NEW SUB!! %nick welcome
}
elseif (($msgtags(msg-id).key == resub) && ($1 == #channel)) {
var %nick $iif($msgtags(display-name).key, $v1, $msgtags(login).key)
if ($0 == 1) {
msg $1 RESUB!! %nick welcome back for $msgtags(msg-param-months).key months in a row!
}
else {
msg $1 RESUB!! %nick welcome back for $msgtags(msg-param-months).key months in a row!
}
}
}

Re: twitch subscriber script help [Re: Hazman] #265591 04/06/19 08:47 PM
Joined: Oct 2015
Posts: 111
B
Blas Offline
Vogon poet
Offline
Vogon poet
B
Joined: Oct 2015
Posts: 111
Hi. There seems to be new topic on Twitch Sub alerts scripts very often, so I'm trying answer everything in one thread. You can take a look at my example script there as it does the function that you are requesting. If you have any questions, please ask there. Thanks. smile