mIRC Scripting Introduction
By Zanith
Ok, this is Basic if you have done any mIRC scripting before you should just really scan this quickly.
1. Where to start
Download mIRC from http://www.mirc.com if you want to connect to the CodingUniverse IRC network by typing in /server CodingUniverse.com -j #CodingUniverse. When you have downloaded it get used to the layout get connected to your prefered server, and just get a feel of the software, if you want a history of IRC go to http://www.irc.org/history_docs/jarkko.html. To enter your own scripts click on Tools > Script Editor or if you hold ALT and press R (extremely usefull if you need to test scripts and go in and out of the script editor.
2. Introduction to Scripting
When you have brought up the script editor you will be confronted with a text box and five tabs automatically will load the five designated ini files. The tab that should be selected, and which you would be using very often, will be the remote tab. The variables tab will obviously store variables, and we won't be touching alias and popups or users. Make sure the Remote tab is selected. And we will start......
3. Starting scripting
Ok to start of we need a trigger to trigger the scipt, so we need to tell that to the the script type in:
 |
CODE 1 |
 |
This will get the script ready and the astrix is a wildcard which we will have no need to go into details. Then type:
 |
CODE 2 |
 |
this will tell is that when some text is entered check the following part. Then enter the next bit of code:
 |
CODE 3 |
 |
replace sometext to whatever you want the trigger to be, it could be anything as long as it doesn't conflict with another script or an alias. Then enter the rest:
 |
CODE 4 |
 |
We will not concern ourself with what this means. Overall it should look like this:
 |
CODE 5 |
 |
4. Inside the script
Ok this give us the oppertunity to play around with some things. Remeber to ask about the channel rules before using your scripts on a channel. Ok to send a message, there a few ways to do so:
Sends an actual message: //msg
Sends a private message: //notice
These will do nothing these only tell you how the message is sent accross. What you need next after that is who/where to send it to this is done by:
This will send it to the channel the user who triggered it was on: $chan
This will send it to the user who triggered it: $nick
You can also enter actual data such as a nick or a channel.
The next part is the text, but the text can have some colour formatting, although on the swiftswitch IRC client colour only shows on notices. Press Ctrl + K to bring up a selection of colours, copy and paste these into the required place, remember text can be multicolour so knock youself out. Also another not to remember that not all channels allow other text formatting such as reverse and bold.
And finally to end the code you enter another bracket:
 |
CODE 6 |
 |
5. Other Triggers
Ok, you know how to create a script when some text is entered, how about somthing else how about when somone joins a channel:
 |
CODE 7 |
 |
Then you can send your message.
6. Related Material
Here are some links which contain snippts and full code.
http://www.hawkee.com
http://www.mirc.net
|