mIRC Home    About    Download    Register    News    Help

Print Thread
Page 1 of 2 1 2
Joined: Sep 2014
Posts: 46
S
Spike Offline OP
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Sep 2014
Posts: 46
So i have plans for my twitch.tv bot that will let people go to its channel and do !join can anyone help?

Joined: Jan 2015
Posts: 168
P
Vogon poet
Offline
Vogon poet
P
Joined: Jan 2015
Posts: 168
Sure I will give you a script that was developed by Majeye. Take note you must join the channel your bot is on in mIRC for this to work. To do this you type /join #usernameforyourbot in any mIRC window. Now with this in mind, let me explain to you what this does before you put it in mIRC. Basically on*text means if a text is inputted in this case it is "!join:#examplechannel" then join that channel to ".join $chr(35) $+ $nick" this is where it knows where to join. $nick means username, or nickname if you will.

So with all of this, if I go to your bot's channel and type "!join" this script says ok I need to join $nick in this case it would be powerade661 and then it forces your bot to join my channel. The "msg # whatever is typed here" is writing that message in your channel. The "#" indicates what the channel is, so it knows to post the message in your channel. You will also notice "/me" this is a command in Twitch that changes your text color to whatever color you chose for your bot to be. Hope this helps, if you have any questions, do not hesitate to ask. smile

Regards,
Powerade661

Code:
on *:text:!join:#BOTNAMEHERE: {
  msg # /me is joining $nick $+ 's chat. Don't forget to type /mod BOTNAMEHERE in your own channel to ensure all commands work properly, if you do not mod the bot, it will leave your channel.
  .join $chr(35) $+ $nick
}

Last edited by powerade661; 28/05/15 02:26 AM.
Joined: Sep 2014
Posts: 46
S
Spike Offline OP
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Sep 2014
Posts: 46
Originally Posted By: powerade661
Sure I will give you a script that was developed by Majeye. Take note you must join the channel your bot is on in mIRC for this to work. To do this you type /join #usernameforyourbot in any mIRC window. Now with this in mind, let me explain to you what this does before you put it in mIRC. Basically on*text means if a text is inputted in this case it is "!join:#examplechannel" then join that channel to ".join $chr(35) $+ $nick" this is where it knows where to join. $nick means username, or nickname if you will.

So with all of this, if I go to your bot's channel and type "!join" this script says ok I need to join $nick in this case it would be powerade661 and then it forces your bot to join my channel. The "msg # whatever is typed here" is writing that message in your channel. The "#" indicates what the channel is, so it knows to post the message in your channel. You will also notice "/me" this is a command in Twitch that changes your text color to whatever color you chose for your bot to be. Hope this helps, if you have any questions, do not hesitate to ask. smile

Regards,
Powerade661

Code:
on *:text:!join:#BOTNAMEHERE: {
  msg # /me is joining $nick $+ 's chat. Don't forget to type /mod BOTNAMEHERE in your own channel to ensure all commands work properly, if you do not mod the bot, it will leave your channel.
  .join $chr(35) $+ $nick
}

It wasn't working at first but it was just a typo of the bot's name sorry about that.

Joined: Sep 2014
Posts: 46
S
Spike Offline OP
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Sep 2014
Posts: 46
Originally Posted By: powerade661
Sure I will give you a script that was developed by Majeye. Take note you must join the channel your bot is on in mIRC for this to work. To do this you type /join #usernameforyourbot in any mIRC window. Now with this in mind, let me explain to you what this does before you put it in mIRC. Basically on*text means if a text is inputted in this case it is "!join:#examplechannel" then join that channel to ".join $chr(35) $+ $nick" this is where it knows where to join. $nick means username, or nickname if you will.

So with all of this, if I go to your bot's channel and type "!join" this script says ok I need to join $nick in this case it would be powerade661 and then it forces your bot to join my channel. The "msg # whatever is typed here" is writing that message in your channel. The "#" indicates what the channel is, so it knows to post the message in your channel. You will also notice "/me" this is a command in Twitch that changes your text color to whatever color you chose for your bot to be. Hope this helps, if you have any questions, do not hesitate to ask. smile

Regards,
Powerade661

Code:
on *:text:!join:#BOTNAMEHERE: {
  msg # /me is joining $nick $+ 's chat. Don't forget to type /mod BOTNAMEHERE in your own channel to ensure all commands work properly, if you do not mod the bot, it will leave your channel.
  .join $chr(35) $+ $nick
}

But is there any way to make it so mIRC adds it to its favs list so if the bot goes down or i have to restart it, It would re join right away?

Joined: Jan 2015
Posts: 168
P
Vogon poet
Offline
Vogon poet
P
Joined: Jan 2015
Posts: 168
I have a better solution for you since I am sure you are going to use this for multiple people or possibly only yourself. This is a script that I developed. I will explain this as well.
So the "on*:connect" basically tells mIRC when you connect to a server, to join these channels on that server. Take note you can put as many as you want below. I suggest you put this in your remote file. The "/join" is telling mIRC to join those specified channels, in this case it is channel1, channel2 and channel3.

This script will automatically start when you start mIRC if for whatever reason the bot goes down. smile

Code:
ON *:CONNECT: { 
  /join #channel1
  /join #channel2
  /join #channel3
}


Last edited by powerade661; 28/05/15 02:58 AM.
Joined: Sep 2014
Posts: 46
S
Spike Offline OP
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Sep 2014
Posts: 46
Originally Posted By: powerade661
I have a better solution for you since I am sure you are going to use this for multiple people or possibly only yourself. This is a script that I developed. I will explain this as well.
So the "on*:connect" basically tells mIRC when you connect to a server, to join these channels on that server. Take note you can put as many as you want below. I suggest you put this in your remote file. The "/join" is telling mIRC to join those specified channels, in this case it is channel1, channel2 and channel3.

This script will automatically start when you start mIRC if for whatever reason it goes down. smile

Code:
ON *:CONNECT: { 
  /join #channel1
  /join #channel2
  /join #channel3
}


Well as your script you gave me for the basic !join it says something in the bots channel but is there a way to make it say something in the channel that did !join to tell the streamer that the bot has joined?

Joined: Jan 2015
Posts: 168
P
Vogon poet
Offline
Vogon poet
P
Joined: Jan 2015
Posts: 168
Yes there is, in this case you will need a timer. The 1 in .timer.joining is how many times it will display the message before it stops the timer. If you did 0 it wouldn't stop the timer until you told it to do so. The 7 in the .timer.joining is the interval at which the timer is using. So for instance .timer.joining 2 7 will display the message twice every 7 seconds and then stop after it has displayed the two messages.

Code:
on *:text:!join:#BOTSNAMEHERE: {
  msg # /me is joining $nick $+ 's chat. Don't forget to type /mod BOTNAMEHERE in your own channel to ensure all commands work properly, if you do not mod the bot, it will leave your channel.
  .timer.joining 1 7 msg $chr(35) $+ $nick Bot has entered your channel.
}

Last edited by powerade661; 28/05/15 03:14 AM.
Joined: Sep 2014
Posts: 46
S
Spike Offline OP
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Sep 2014
Posts: 46
Originally Posted By: powerade661
Yes there is, in this case you will need a timer. The 1 in .timer.joining is how many times it will display the message before it stops the timer. If you did 0 it wouldn't stop the timer until you told it to do so. The 7 in the .timer.joining is the interval at which the timer is using. So for instance .timer.joining 2 7 will display the message twice every 7 seconds and then stop after it has displayed the two messages.

Code:
on *:text:!join:#BOTSNAMEHERE: {
  msg # /me is joining $nick $+ 's chat. Don't forget to type /mod BOTNAMEHERE in your own channel to ensure all commands work properly, if you do not mod the bot, it will leave your channel.
  .timer.joining 1 7 msg $chr(35) $+ $nick Bot has entered your channel.
}

Thank you very much. Now i just gotta find a way to make the bot always join the channels i need a way for so when they do !join it would like add them to a list and would join them all but we'll see.

Joined: Jan 2015
Posts: 168
P
Vogon poet
Offline
Vogon poet
P
Joined: Jan 2015
Posts: 168
This script will give you that, you would just update it if someone new joins.

Code:
ON *:CONNECT: { 
  /join #channel1
  /join #channel2
  /join #channel3
}

Joined: Sep 2014
Posts: 46
S
Spike Offline OP
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Sep 2014
Posts: 46
Originally Posted By: powerade661
This script will give you that, you would just update it if someone new joins.

Code:
ON *:CONNECT: { 
  /join #channel1
  /join #channel2
  /join #channel3
}

Well you gotta look ahead. If a lot of people started using that. I would have to do a lot of adding for every channel, It would work at this current stage but would take a lot work if people kept making it join..

Joined: Jan 2015
Posts: 168
P
Vogon poet
Offline
Vogon poet
P
Joined: Jan 2015
Posts: 168
To be honest, I am not sure how you would do this. You could do
writeini join.ini
writeini -n join.ini /join #channel
but the problem is, you would have to be able to line them up correctly for it to work. Like I have presented above.

Last edited by powerade661; 28/05/15 04:04 AM.
Joined: Sep 2014
Posts: 46
S
Spike Offline OP
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Sep 2014
Posts: 46
Originally Posted By: powerade661
To be honest, I am not sure how you would do this. You could do
writeini join.ini
writeini -n /join #channel
but the problem is, you would have to be able to line them up correctly for it to work. Like I have presented above.


I'll start to worry about it when i really "have" to, Atm i do not.

Joined: Jan 2015
Posts: 168
P
Vogon poet
Offline
Vogon poet
P
Joined: Jan 2015
Posts: 168
Very well, I wish you the best of luck! smile

Joined: Jan 2015
Posts: 168
P
Vogon poet
Offline
Vogon poet
P
Joined: Jan 2015
Posts: 168
Give me a minute, I think I may have an idea as to how to do this, if you are still interested. I will report back to you.

Joined: Sep 2014
Posts: 46
S
Spike Offline OP
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Sep 2014
Posts: 46
Originally Posted By: powerade661
Give me a minute, I think I may have an idea as to how to do this, if you are still interested. I will report back to you.

Anything helps

Joined: Jan 2015
Posts: 168
P
Vogon poet
Offline
Vogon poet
P
Joined: Jan 2015
Posts: 168
I can't seem to be able to figure it out. I apologize for getting your hopes up. I do know it has something to do with the /writeini command though.

Joined: Sep 2014
Posts: 259
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Sep 2014
Posts: 259
Seems like this is what you're looking for

Code:
on *:text:!join:#BOTNAMEHERE: {
var %chan = $chr(35) $+ $nick
join %chan 
set %botchans %botchans %chan
msg # I will join your channel!
}


alias autojoin {
var %i 1
while ($gettok($1-,%i,32)) {
.timer 1 $calc(%i * 5) join $gettok($1-,%i,32)
inc %i
}
}


ON *:CONNECT: if ($me == BOT_NAME) { autojoin %botchans }

Last edited by Sakana; 28/05/15 05:56 AM.
Joined: Jan 2015
Posts: 168
P
Vogon poet
Offline
Vogon poet
P
Joined: Jan 2015
Posts: 168
Ah I see. This is making the usernames into a variable if I am reading this correctly, and then joins those usernames, when it is connected to the server. Am I wrong? Let me ask you something, I currently have the script that you see above(not yours) for joining channels, is it possible to write to that ini file or how would I add the current usernames that are in that script(yours) into the variables?

Last edited by powerade661; 28/05/15 06:12 AM.
Joined: Sep 2014
Posts: 259
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Sep 2014
Posts: 259
Yeah, that's right, and it joins with 5 sec delay between joins to avoid getting banned

You can use any storing method you like, it doesn't really matter which. Saving to a .ini just seems a bit weird to me since with ini files you have a key=value structure, but here we only really have values (channel names)

but you could do something like

/writeini -n botchans.ini botchans $lines(botchans.ini) %chan

which should assign a number to the channel name

Last edited by Sakana; 28/05/15 06:35 AM.
Joined: Jan 2015
Posts: 168
P
Vogon poet
Offline
Vogon poet
P
Joined: Jan 2015
Posts: 168
No I am saying is the usernames added in the variables tab? Would I just add what I currently have to that?

Page 1 of 2 1 2

Link Copied to Clipboard