mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Mar 2014
Posts: 215
J
Fjord artisan
OP Offline
Fjord artisan
J
Joined: Mar 2014
Posts: 215
Lately i've seen many people come to the forums about twitch.tv and making custom chat bots. There have been many re-posts about this stuff so i decided to put
together a compilation of twitch.tv basics and scripts.
Please forgive me for any mistakes i make, i am fairly new at this.
Another way to get started it to look through the help files. Go there before coming to the forums. IF you ask for something in the forums when it is in
the help files you may build up some bad reputation.
I highly suggest you watch craftingmotion's twitch mIRC bot tutorials https://www.youtube.com/playlist?list=PLwXgPZ0hHTbGQTCJ9EmagIB-iedB1V97v




The basics:
Here are some keys for this part:
1. the pound symbols(#) inndicate which channel this will be presented in. In this tut we will use just #, that means every channel (also applies to key 2)
2. putting $chan instead of # after "{ msg" will message to the channel the command was presented in. This may be better than making the command a channel only command
if you run your bot in multiple channels and all channels use this same command (with the same output)


on join:
Click to reveal..

the most simple script, anyone who joins will be welcomed
Code:
 on !*:join:#:{ msg $chan Welcome to the chat! } 

You could add $nick in there so it add their [nickname]name to the message
Code:
 on !*:join:#:{ msg $chan Welcome $nick to the chat! } 

text commands:
Click to reveal..

These are simple starter commands, these are present in 99% of twitch.tv channels and are easy to learn (i say that because /indie doesn't include those in his bot)
Code:
 on *:text:hi:#: { msg $chan welcome $nick to the livestream! } 

this code will message the channel the command was said in:
I highly recommend a !commands command so people know what to say to the bot. I recommend making a pastebin account to post your commands and be able to edit the

paste.
Code:
 on *:text:hi:#: { msg $chan Current commands for the bot are here -> http://pastebin.com/raw.php?i=kwrCgRuQ } 

There are more advanced stuff you can put in the commands, putting $nick will show their username.

Moderator commands:
Click to reveal..

There may be some commands you want only moderators to use (this will come in handy when you get to more advanced scripts) the easiest way to make it mod-only is to

use this:
Code:
 if ($nick isop) { 
Putting this under the text event will make this a op(mod) only command. Another way to make it mod-only is this:
Code:
 if 

($nick !isop #) return 
the !isop for this means is NOT moderator, and the return after it means stop executing the command, or halt.

Those are the basic commands smile here are more advanced threads you should look at:
add/removing commands directly through chat:
http://bit.ly/mircADDremoveCOMMANDS
banning people for caps locking in the chat:
http://bit.ly/mircCAPS
if a certain nickname says a command:
http://bit.ly/mircNICK
pausing a script temporarily:
http://bit.ly/mircPAUSE
Chat log script:
Code:
 on *:text:*:#: {
  write chatlog.txt $nick $time(mmm-dd) $time(hh:nn:ss) $1-
} 

points script:
http://bit.ly/mircPOINTS
link block (may be buggy):
http://bit.ly/mircLINKblock
time people out for using /me:
http://bit.ly/mircME
instant strawpoll script:
http://bit.ly/mircSTRAWPOLL
display online moderators:
http://bit.ly/mircMODS
rock paper scissors and roulette games:
http://bit.ly/mircRPSroulette


Hope this helps everyone!





#imAbeginner
i made a chat bot for mark_paintball! http://twitch.tv/mark_paintball
Joined: Mar 2014
Posts: 215
J
Fjord artisan
OP Offline
Fjord artisan
J
Joined: Mar 2014
Posts: 215
kinda hoping to get sticky :P


#imAbeginner
i made a chat bot for mark_paintball! http://twitch.tv/mark_paintball
Joined: Mar 2014
Posts: 215
J
Fjord artisan
OP Offline
Fjord artisan
J
Joined: Mar 2014
Posts: 215
This is for others starting out, sorry for any confusion thinking i need elp with the links here


#imAbeginner
i made a chat bot for mark_paintball! http://twitch.tv/mark_paintball
Joined: Dec 2015
Posts: 3
G
Self-satisified door
Offline
Self-satisified door
G
Joined: Dec 2015
Posts: 3
After watching all of the videos and quadruple checking every command the bot still does not execute any commands and I have no idea why.

Here is a command I have right now;
on *:TEXT:!CMD:#: { msg $chan Current command list is: !server , !Taco }


It should work but it does not, suggestions? The help didn't help at all either.

Joined: May 2015
Posts: 133
K
Vogon poet
Offline
Vogon poet
K
Joined: May 2015
Posts: 133
Originally Posted By: Greentails43

on *:TEXT:!CMD:#: { msg $chan Current command list is: !server , !Taco }


Works fine for me.


twitter @keyeslol
Joined: Nov 2015
Posts: 14
N
Pikka bird
Offline
Pikka bird
N
Joined: Nov 2015
Posts: 14
Don't forget if you want to try the command must be in other user account and no the bot in self.

Joined: Dec 2015
Posts: 3
G
Self-satisified door
Offline
Self-satisified door
G
Joined: Dec 2015
Posts: 3
Originally Posted By: keyeslol
Originally Posted By: Greentails43

on *:TEXT:!CMD:#: { msg $chan Current command list is: !server , !Taco }


Works fine for me.



I think it is the connection to the irc server or something maybe? I can type through it to the channel and everything but when I type the command (on a the not account or the streaming account) or when anyone does nothing happens.

It also doesn't show any other users in the channel other than its self.

Last edited by Greentails43; 31/12/15 09:34 PM.
Joined: Dec 2015
Posts: 148
Vogon poet
Offline
Vogon poet
Joined: Dec 2015
Posts: 148
Make sure it's in the "Remote" tab, try typing "//remote on | events on" and try putting it in its own file.

Joined: Dec 2015
Posts: 3
G
Self-satisified door
Offline
Self-satisified door
G
Joined: Dec 2015
Posts: 3
Originally Posted By: Dazuz
Make sure it's in the "Remote" tab, try typing "//remote on | events on" and try putting it in its own file.


All of the commands are in the remote tab as well.
Where would I put the "//remote on | events on" is that in the remote tab?

Last edited by Greentails43; 31/12/15 10:25 PM.
Joined: Jan 2004
Posts: 1,361
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Jan 2004
Posts: 1,361
No, you type that in the command line.

Joined: Feb 2015
Posts: 243
O
Fjord artisan
Offline
Fjord artisan
O
Joined: Feb 2015
Posts: 243
Very nice work, the repeative posts are kinda annoying and meaningless. I have suggested that but noone really gave attention.
I'm currently making something simular these weeks.
http://humanity.ucoz.com/mircfaq.html
It's a series of questions i've seen a lot here.. not nessecerily twitch related cause idk the weird ircd they use.
Good work man! I hope the ops make it sticky!!

Last edited by OrFeAsGr; 01/01/16 12:31 AM.

Link Copied to Clipboard