mIRC Home    About    Download    Register    News    Help

Print Thread
Twitch.tv Join message (Need Help) #244503 05/03/14 07:26 AM
Joined: Mar 2014
Posts: 5
S
SneakyAz Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
S
Joined: Mar 2014
Posts: 5
Is there any chance i can get further assistance on this? I have a welcome script and am trying to fix it up for my twitch chat. Twitch has a rule of no more than 30messages over 20seconds and i wanna make sure i dont break that rules again. I talked to xangold and he told me what i need.

xangold- "Add them to a hashtable, check the table every 1.6 seconds, and remove top message and send it or add them to a window if you must have them sequentially sent."
me- "I've been looking to change it to welcome multiple people if they join together. That only counts as one msg right?"
xangold- "Correct, that was the "merge" part (plus it looks nicer)"

Hopefully this is an appropriate place to ask for help? Im really new at scripting and am working to learn it and understand.

This is my basic "join" message-
on *:JOIN:#: { msg $chan Welcome $nick to my stream, enjoy the nuggets!! }


The goal is to have my join message multiple people at once if they join. "Welcome X,X,X and X to the stream." This sends one message in twitch chat and helps me stay under twitch.tv's limit of 30msgs in 20secs.

Re: Twitch.tv Join message (Need Help) [Re: SneakyAz] #244504 05/03/14 08:11 AM
Joined: Dec 2013
Posts: 779
N
Nillen Offline
Hoopy frood
Offline
Hoopy frood
N
Joined: Dec 2013
Posts: 779
Code:
if (%welcomespam == on) { return }
set -u3 %welcomespam on


Nillens @ irc.twitch.tv
Nillen @ irc.rizon.net
Re: Twitch.tv Join message (Need Help) [Re: Nillen] #244512 05/03/14 08:34 PM
Joined: Mar 2014
Posts: 5
S
SneakyAz Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
S
Joined: Mar 2014
Posts: 5
Would you be able to explain what this does? Just so i can better understand =)

Re: Twitch.tv Join message (Need Help) [Re: SneakyAz] #244514 06/03/14 02:12 AM
Joined: Dec 2013
Posts: 779
N
Nillen Offline
Hoopy frood
Offline
Hoopy frood
N
Joined: Dec 2013
Posts: 779
if (%welcomespam == on) { return }
;;; It checks if %welcomespam is on. If it is, then it'll do nothing. If it isn't it's going to continue on with whatever is later on in the code.
set -u3 %welcomespam on
;;; This turns %welcomespam on for 3 seconds. During those 3 seconds.


Nillens @ irc.twitch.tv
Nillen @ irc.rizon.net
Re: Twitch.tv Join message (Need Help) [Re: SneakyAz] #244571 10/03/14 08:23 AM
Joined: Aug 2013
Posts: 15
P
panda_jorstar Offline
Pikka bird
Offline
Pikka bird
P
Joined: Aug 2013
Posts: 15
hello,

i have had trouble with this aswell until a friendly user helped me with this ( sorry can't remember his username) and he gave me this code.. it causes the bot to save the names that join for x amount of seconds (you can specify that) and after the time is over it welcomes them all in 1 message


Code:
on !@*:JOIN:#:{
    if ($mid(#,2) ison $chan) {
    if ($nick == $mid(#,2)) { return }
    set -e $+(%,ajwelcome.,$cid,#) $addtok($($+(%,ajwelcome.,$cid,#),2),$nick,44)
    if (!$timer($+(.ajw.,$cid,#))) { $+(.timer.ajw.,$cid,#) 1 3 ajwelcome # }
  }
}
alias -l ajwelcome {
  if ($($+(%,ajwelcome.,$cid,$1),2)) {
    msg $1 Hi $v1 $+ , welcome to $mid($1,2) $+ 's Channel.
    unset $+(%,ajwelcome.,$cid,$1)
  }
}


you can set the time at the timer.. and the message in the alias..

the if ($nick == $mid(#,2)) { return } is so it doesn't welcome yourself. you can add || $nick == [name] to get more users that dont get welcommed



also with the code of Nillen it causes to welcome a user and then won't welcome anyone for 3 seconds and welcome a user that joins after those 3 seconds

Last edited by panda_jorstar; 10/03/14 08:32 AM.
Re: Twitch.tv Join message (Need Help) [Re: panda_jorstar] #244575 10/03/14 02:38 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
This part is what you looking for:

$+(.timer.ajw.,$cid,#) 1 3

And i recomend you to use that, if many users join at the same time you will flood out. So it's a sort of flood protection for you. 1=how many times 3=time befor trigger.


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Re: Twitch.tv Join message (Need Help) [Re: panda_jorstar] #244582 11/03/14 09:43 AM
Joined: Mar 2014
Posts: 5
S
SneakyAz Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
S
Joined: Mar 2014
Posts: 5
Im sorry, this is a lot more detailed then what ive done so far so im a little confused as to what im editing. I know i cant paste "msg $chan Welcome $nick to my stream, enjoy your nuggets!!" over " msg $1 Hi $v1 $+ , welcome to $mid($1,2) $+ 's Channel" because we are welcoming multiple users with the new script. Most of my bot is just "on text do this" So this is a tiny bit over my head.

on !@*:JOIN:#:{
if ($mid(#,2) ison $chan) {
if ($nick == $mid(#,2)) { return }
set -e $+(%,ajwelcome.,$cid,#) $addtok($($+(%,ajwelcome.,$cid,#),2),$nick,44)
if (!$timer($+(.ajw.,$cid,#))) { $+(.timer.ajw.,$cid,#) 1 3 ajwelcome # }
}
}
alias -l ajwelcome {
if ($($+(%,ajwelcome.,$cid,$1),2)) {
msg $1 Hi $v1 $+ , welcome to $mid($1,2) $+ 's Channel.
unset $+(%,ajwelcome.,$cid,$1)
}
}

Re: Twitch.tv Join message (Need Help) [Re: sparta] #244583 11/03/14 09:46 AM
Joined: Mar 2014
Posts: 5
S
SneakyAz Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
S
Joined: Mar 2014
Posts: 5
1= how many times (of what?) 3=time before trigger(Do i replace the 3 with a time? say i want it to hold the greeting for 10seconds, do i just replace 3 with 10? or do 3=10?)

Re: Twitch.tv Join message (Need Help) [Re: SneakyAz] #244586 11/03/14 05:28 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
Originally Posted By: SneakyAz
1= how many times (of what?) 3=time before trigger(Do i replace the 3 with a time? say i want it to hold the greeting for 10seconds, do i just replace 3 with 10? or do 3=10?)

1=how many times the timer trigger. 3=how long befor it trigger the command. and yes. if you change the 3 to 1 it will trigger after 1 second. If you change 3 to 10 it will take 10 seconds befor it trigger. Look at /help timers in your help filr for mirc.


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Re: Twitch.tv Join message (Need Help) [Re: SneakyAz] #244602 13/03/14 05:01 PM
Joined: Aug 2013
Posts: 15
P
panda_jorstar Offline
Pikka bird
Offline
Pikka bird
P
Joined: Aug 2013
Posts: 15
Originally Posted By: SneakyAz
Im sorry, this is a lot more detailed then what ive done so far so im a little confused as to what im editing. I know i cant paste "msg $chan Welcome $nick to my stream, enjoy your nuggets!!" over " msg $1 Hi $v1 $+ , welcome to $mid($1,2) $+ 's Channel" because we are welcoming multiple users with the new script. Most of my bot is just "on text do this" So this is a tiny bit over my head.

on !@*:JOIN:#:{
if ($mid(#,2) ison $chan) {
if ($nick == $mid(#,2)) { return }
set -e $+(%,ajwelcome.,$cid,#) $addtok($($+(%,ajwelcome.,$cid,#),2),$nick,44)
if (!$timer($+(.ajw.,$cid,#))) { $+(.timer.ajw.,$cid,#) 1 3 ajwelcome # }
}
}
alias -l ajwelcome {
if ($($+(%,ajwelcome.,$cid,$1),2)) {
msg $1 Hi $v1 $+ , welcome to $mid($1,2) $+ 's Channel.
unset $+(%,ajwelcome.,$cid,$1)
}
}




you could do it like
Code:
 on !@*:JOIN:#:{
    if ($mid(#,2) ison $chan) {
    if ($nick == $mid(#,2)) { return }
    set -e $+(%,ajwelcome.,$cid,#) $addtok($($+(%,ajwelcome.,$cid,#),2),$nick,44)
    if (!$timer($+(.ajw.,$cid,#))) { $+(.timer.ajw.,$cid,#) 1 3 ajwelcome # }
  }
}
alias -l ajwelcome {
  if ($($+(%,ajwelcome.,$cid,$1),2)) {
    msg $1 welcome $v1 $+ , to my channel enjoy your nuggets!!.
    unset $+(%,ajwelcome.,$cid,$1)
  }
}


basicly the part that handles the names is the $v1 the other things can just be changed . just keep in mind that the $1 handles the channel for the message.
i would however not recommend changing the timer to a lower ammount of seconds else you will have the trouble of the global twitch message / second again


Last edited by panda_jorstar; 13/03/14 05:03 PM.
Re: Twitch.tv Join message (Need Help) [Re: panda_jorstar] #244673 18/03/14 06:07 PM
Joined: Mar 2014
Posts: 5
S
SneakyAz Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
S
Joined: Mar 2014
Posts: 5
I put the script in copied right from your post but nothing happened. Was i supposed to change something else?