mIRC Homepage
Posted By: TroyL Twitch bot to announce gifted subs - 04/12/18 01:21 AM
Hi! So can anyone help me out with a gifted sub script? Also I need help on adding a cool down timer on commands for my bot. Last thing is how do I add a one man spam filter to my bot?
Posted By: maroon Re: Twitch bot to announce gifted subs - 04/12/18 06:22 AM
sounds like "gifted sub" means something related to twitch, so I don't know about that.

As for the cooldown, searching this forum for that keyword turns up this thread:
https://forums.mirc.com/ubbthreads.php/topics/262944/Re:_Delay_script#Post262944
Posted By: TroyL Re: Twitch bot to announce gifted subs - 04/12/18 11:39 PM
So this is what I have so far, will this work? Also will this announce Prime with this work for prime --> Prime, $chr(36), $+ Twitch Prime



Code:
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) && ($msgtags(room-id).key == 30084163)) {  
    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 rooSellout !!NEW SUB!! rooSellout Thank You %nick_from For Gifting A %sub-plan Sub To %nick_to $+ ! rooGfit agonySUB
  }
  if (($msgtags(msg-id).key == sub) && ($msgtags(room-id).key == 30084163)) {
    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, $chr(36) $+ Twitch Prime)
    msg $1 agonySUB !!SUB HYPE!! agonySUB Thank You %nick For Subscribing With A %sub-plan Sub! Welcome To The Legends!! agonyHYPERS agonyHYPERS
  }
if (($msgtags(msg-id).key == resub) && ($msgtags(room-id).key == 30084163)) {
    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, $chr(36) $+ Twitch Prime)
    msg $1 %nick agonyHYPERS !!RESUB!! agonyHYPERS Welcome Back To The Legends For $msgtags(msg-param-months).key Months In A Row With A %sub-plan Sub! rooHappy agonyLOVE
  }

© mIRC Discussion Forums