mIRC Homepage
Posted By: dah extended script when someone subscribes? - 02/04/20 12:18 AM
Okay, I've got a subscript that I use for twitch for the chatbot that I use. I saw someone continue their sub with an extended sub and my message didn't trigger to thank the user for subscribing.
Could someone out there in the coding world help me out, please? Here is the current script I use

Quote
raw USERNOTICE:#umadbrahlive:{
if (($msgtags(msg-id).key == sub) && ($msgtags(room-id).key == 147554495)) {
var %nick $iif($msgtags(display-name).key, $v1, $msgtags(login).key)
var %sub-plan $replace($msgtags(msg-param-sub-plan).key, 1000, $chr(36) $+ 4.99, 2000, $chr(36) $+ 9.99, 3000, $chr(36) $+ 24.99, Prime, Prime)
msg $1 /me bingOMG bingHey █ NEW SUB █ bingHeart bingHype Thank you %nick for subscribing with a %sub-plan Sub! bingPat
}
if (($msgtags(msg-id).key == resub) && ($msgtags(room-id).key == 147554495)) {
var %nick $iif($msgtags(display-name).key, $v1, $msgtags(login).key)
VAR %sub-plan $replace($msgtags(msg-param-sub-plan).key, 1000, $chr(36) $+ 4.99, 2000, $chr(36) $+ 9.99, 3000, $chr(36) $+ 24.99, Prime, Prime)
msg $1 /me bingOMG bingHey █ RESUB SUB █ bingHeart bingHype %nick has just resubscribed for $msgtags(msg-param-cumulative-months).key months in a row with a %sub-plan Sub! bingPat
}
if (($msgtags(msg-id).key == subgift) && ($msgtags(room-id).key == 147554495)) {
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)
VAR %sub-plan $replace($msgtags(msg-param-sub-plan).key, 1000, $chr(36) $+ 4.99, 2000, $chr(36) $+ 9.99, 3000, $chr(36) $+ 24.99)
msg $1 /me bingOMG bingGift █ GIFT SUB █ bingHeart bingGift Thank you %nick_from for gifting a %sub-plan sub to %nick_to $+ ! bingPat
}
on *:TEXT:*subscribed*:#umadbrahlive:{
ELSEIF (%msg-id == sub) {
ELSEIF (%msg-param-sub-plan == Prime) MSG $1 tatPrime %name just subscribed with Twitch Prime! tatPrime
}
}
}
© mIRC Discussion Forums