Results 1 to 4 of 4
Thread: Basic mIRC Scripting
-
04-26-2011 #1
Basic mIRC Scripting
Hello, I will teach you some simple scripts and other things with mIRC
What is mIRC?
mIRC is a client that is used to make "bots". They are used for Justin.tv and other things that allow IRC. The "bot" will be able to say and perform certain things on certain commands.
Everything in this tutorial is added to the, Remote Tab in mIRC
Basic Scripts
Your basic script will start like this:This command will have your "bot" do an action on a certain text.Code:on *:TEXT:
So let's have our "bot" say "Hello I'm MetsBot" when the user types, "MetsBot"
Here is the code we would use: onNow, every script where to "bot" says something when a user says a certain thing you MUST start it like this:Code:*:TEXT:MetsBot:#: { $msg $chan Hello I'm Metsbot }The $msg starts the message and the $chan is for the IRC channel.Code:{ $msg $chan
Now, let's make a script that greets EVERY user when they join the IRC channel.
The code will look like this:as you can see we started the code withCode:on *:JOIN:#:{ $msg $chan $nick Has Joined }Now, $nick will automatically place the users, "nickname" wherever $nick is.Code:{ $msg $chan
How to Make a Script with Variables
This one is pretty basic, use this code:You have to start it like this:Code:on *:TEXT:!kiss*:#: { msg $chan $nick Pukers Up and Kisses $2- }Here the $2- is whatever you put in place of the * So for example if you put, "!kiss Mets08123" the bot would say, "(your nickname) Puckers Up and Kissed Mets08123"Code:on *:TEXT:!kiss*:#: { $msg $chan
This is your basics of easy scripts.
More Advanced Scripts
Sometimes having the Join script gets the chat a little flooded, so we will create a script in which you will be able to disable it by saying, "!joinoff"
Here is the code to turn it off:Here is the code to turn it on:Code:on *:TEXT:!joinoff:#: { /disable #group1 } { $msg $chan Join Notices Turned OFF }Now we have to set up the "Group" as you can see in this code the group is named #group1, here is how you would set it up:Code:on *:TEXT:!joinon:#: { /enable #group1 } { $msg $chan Join Notices Turned ON }
#group1 on
on *:JOIN:#:{ $msg $chan $nick Has Joined }
#group1 end
In between #group1 on and #group1 end you will put the script you would want to disable/enable.
Your can change the #group1 to #group2, #group3 and so on for other things you want to disable/enable.
MAKE SURE THIS GOES AFTER THE DISABLE/ENABLE SCRIPTS!
How to Make it So ONLY moderators of the channel can do the command
You would use this code:You would have to start the script like so:Code:on *:TEXT:clear:#: { if ($nick isop $chan) { msg $chan /clear } else { $msg $chan $nick You Can Not Clear the Chat! } }The { if ($nick isop $chan) will check to see if the user is a moderator in the channel.Code:{ if ($nick isop $chan) { $msg $chan
For the, else { $msg $chan , you will put what your "bot" will say if the user is NOT a moderator.
I hope this will teach you a thing or two about basic mIRC scripting! If you have ANY questions just reply to the thread and I will try and help you out the best I can!Last edited by Mets08123; 04-26-2011 at 07:35 PM.
I <3 Taylor Swift and Drew <3


I <3 ASOT 500!
-
The Following 6 Users Say Thank You to Mets08123 For This Useful Post:
Brandon (04-26-2011), imnotanoob (04-26-2011), NoVa Gamester (04-26-2011), Panther (04-26-2011),
XBeast(04-27-2011)
-
04-26-2011 #2
Re: Basic mIRC Scripting
Good post!
-
04-26-2011 #3
Re: Basic mIRC Scripting
Good post, but why is this stickied?
All questions and comments should be posted in the forums! 
-
04-27-2011 #4I <3 Taylor Swift and Drew <3


I <3 ASOT 500!
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)



LinkBack URL
About LinkBacks

Reply With Quote





Bookmarks