mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jun 2014
Posts: 77
K
Khonor Offline OP
Babel fish
OP Offline
Babel fish
K
Joined: Jun 2014
Posts: 77
I am wanting to do a code for subscription notifications something.

Example: Welcome back "user"! For the "month"th months in a row - [New subs today: 6] and [Resubs: 10] [Total: 16]

Joined: Jun 2014
Posts: 248
B
Fjord artisan
Offline
Fjord artisan
B
Joined: Jun 2014
Posts: 248
Try using an on text event.

Joined: Jun 2014
Posts: 77
K
Khonor Offline OP
Babel fish
OP Offline
Babel fish
K
Joined: Jun 2014
Posts: 77
Hi, I not have literally no idea how to do this.

Joined: Jun 2014
Posts: 248
B
Fjord artisan
Offline
Fjord artisan
B
Joined: Jun 2014
Posts: 248
Originally Posted By: Khonor
Hi, I not have literally no idea how to do this.

Ya..I see that.


<twitchnotify> Name just subscribed!
<twitchnotify> Name subscribed for X months in a row!

on *:text:*:#: {
if ($nick == twitchnotify) { code }
}

Last edited by Belhifet; 10/07/15 12:55 AM.
Joined: Jun 2014
Posts: 77
K
Khonor Offline OP
Babel fish
OP Offline
Babel fish
K
Joined: Jun 2014
Posts: 77
Yeah, but I am looking to do something like this:

Example: Welcome back "user"! For the "X month"th months in a row - [New subs today: 6] and [Resubs: 10] [Total: 16]

Joined: Jun 2015
Posts: 84
F
Babel fish
Offline
Babel fish
F
Joined: Jun 2015
Posts: 84
Consider this then.

Make a nested if statement taking in consideration the phrasing of new subs and resubs.

By using that consideration use that to make the response to the sub/re-sub.

Then try using variables for counting. Try /help variables and read through that help file.

Once you do that, use the code offered by Belhifet and modify it to your specification.

If you need extra help with variables you can always use http://en.wikichip.org/wiki/mirc/variables which contains the same information as the help file, but offers examples as well.

Joined: Jun 2014
Posts: 77
K
Khonor Offline OP
Babel fish
OP Offline
Babel fish
K
Joined: Jun 2014
Posts: 77
I have this code done for you, but does not work in multiple channels separately, builds all subscribers in general.




on *:text:*:#: {
if ($nick == twitchnotify) {

.timer_sub_reset 23:59 1 0 /set %sub 0
.timer_sub_reset 23:59 1 0 /set %resub 0


if (($3 == to) || ($4 == to)) { return }


if ($5 == months) {
inc %resub

msg # /me - $1 thank you for the $4 months of support. - [New Subs Today: %sub $+ ] and [Resubs: %resub $+ ] [Total: $sub_total(%sub,%resub) $+ ]
}
if ($2 == just) {
inc %sub

msg # /me - $1 thank you for subscribing, please enjoy your emotes to use all across Twitch. - [New Subs Today: %sub $+ ] and [Resubs: %resub $+ ] [Total: $sub_total(%sub,%resub) $+ ]
}
}
}

alias sub_total {

var %sub_total = $calc(%sub + %resub)
return %sub_total
}

Joined: Jun 2015
Posts: 84
F
Babel fish
Offline
Babel fish
F
Joined: Jun 2015
Posts: 84
That code will work, I tested it and everything myself before putting it on pastebin.

But yes, it won't work in multiple channels since I couldn't get dynamic variables working properly.

Joined: Jun 2014
Posts: 77
K
Khonor Offline OP
Babel fish
OP Offline
Babel fish
K
Joined: Jun 2014
Posts: 77
Of course, I am also looking for ways to work on multiple channels, but could not.

Joined: Jul 2014
Posts: 34
S
Ameglian cow
Offline
Ameglian cow
S
Joined: Jul 2014
Posts: 34
Here are some examples of dynamic variables:

//var %ab = test1 | echo -s %a [ $+ b ]
//var %cd = test2 | tokenize 32 d e f g | echo -s %c [ $+ [ $1 ] ]

For more help on this use mIRC.chm help file:

/help /unset
/help []

Joined: Jun 2015
Posts: 84
F
Babel fish
Offline
Babel fish
F
Joined: Jun 2015
Posts: 84
Yeah, I read up on dynamic variables, but I wasn't able to get them working was all. I'll take this information you've given me and give it a try later on when I'm off work.


Link Copied to Clipboard