mIRC Home    About    Download    Register    News    Help

Print Thread
K
Khonor
Khonor
K
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]

B
Belhifet
Belhifet
B
Try using an on text event.

K
Khonor
Khonor
K
Hi, I not have literally no idea how to do this.

B
Belhifet
Belhifet
B
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.
K
Khonor
Khonor
K
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]

F
Fonic_Artes
Fonic_Artes
F
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.

K
Khonor
Khonor
K
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
}

F
Fonic_Artes
Fonic_Artes
F
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.

K
Khonor
Khonor
K
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 []

F
Fonic_Artes
Fonic_Artes
F
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