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