Author Topic: A beginners guide to mIRC  (Read 10084 times)

Nomadic

  • Administrator
  • Giant Space Hamster
  • *****
  • Posts: 693
    • View Profile
A beginners guide to mIRC
« on: July 14, 2008, 12:45:51 AM »
The mIRC chat has been going well and it's good to hear that everyone is enjoying it. Though I have noticed some confusion with how to use things. So I have written this guide here, hoping that you all can use it to get into the channel and take part in the festivities.

Getting Started
Note: shortcut
At the time of writing this (July 13th 2008) mIRC is at version 6.32. If you are feeling lazy you can click here to get it directly but take note that the download link may stop working after awhile (or the version might update) so there are no guarantees it's still there at the time you are reading this.

First thing's first, we need to download the program. So head on over to here and hit the download mIRC button. That should take you to a mirror site which you can download it from. Once there hit the Download Now button.

Just hit save file and download it. After its done you should have a .exe file on the desktop (or wherever you saved it) so click that and let it open. Just click next then I agree and then next again. Let it install and then you are good to go.

Setting Up
Next thing we need to do is get setup so open up mIRC (if you didn't tell it to give you a desktop shortcut you should be able to find it in C:\program files\mIRC). If a little about mIRC box pops up talking about registering it just hit continue. Despite what it looks like you don't have to register mIRC (it will keep working past the 30 day trial date it will just nag you a little each time you open it).
Note: misc
Other things that you can setup include:

- Connect > Options > Reconnect on Disconnect: automatically reconnects to the server if your connection times out.
- Connect > Options > Check for timed out connection: automatically checks periodically to see if you are connected.
- Connect > Options > Connect on Startup: will connect to the server each time mIRC is accessed.

There are more advanced things you can do like changing your timestamp or logging chats but we won't worry about that right now.

Once it is up you should have a little server window pop up (if not hit the hammer and file icon, open up the connect tab and hit servers). Anyhow you want to click on add. In the description just put something like otherworlders or CBG to remind you which server it is. In irc server we put in irc.otherworlders.org. Just keep port as 6667 and leave the rest blank and you are good to go. Next up we are going to want to go ahead and setup our info so go over and click on the connect tab itself. Put something into full name it can be anything that is 50 characters or less (it just shows up after your hostmask in a whois query; more on that later). Next put something in for email, I opt for a fake email for securities sake (mine is just nomad at nomad dot com). Finally put in something for nickname and alternative (nick is of course your username in the channel while alt is what your username will change to if someone else is on your primary name).

Note: using /ns
As a side note remember that using /ns instead of /msg nickserv doesn't work in all chat clients. It does however work in mIRC.

Connecting
Now for the moment of truth. Close out of the options menu and hit the little lightning bolt icon in the upper left of the main window. It should run through its little thing and connect you. You will know you are connected when a whole bunch of text starts rolling down the screen. Now before we go any farther we want to register our nickname. This protects it so that nobody else can impersonate you or otherwise steal it. First make sure your name is what you want (it will show up on the very top; should look something like Status: <your nickname> etc etc...) then what you want to do is type in the following:

IC: registering
/ns register <password> <email>


I don't think this server requires you to confirm with an email but just in case it does you will want to be sure to put in a real email that you can check (if it does just follow the instructions it gives you). Once you are registered you will need to log in when you connect to mIRC. This is done like so:

IC: logging in
/ns id <password>


So don't forget that password. Once you are in you will want to access the cbg channel. To do this simply type in /join #thecbg. If you want to auto-join on each connect you can do so via the mIRC favorites menu. Hit the icon up top that looks like a folder with a #+ on it. Click on add and put #thecbg into the channel box. Select the join on connect check box, hit ok, and you are ready to go.

Getting around
So now that you are in you can feel free to chat with friends (which is as simple as typing and hitting enter). There are a few commands though that you may find useful.

IC: general commands
    */me <action> = you do an action (for example /me says hi would say "yourname says hi" in the channel.
    */whois <nick> = gives you information about the username.
    */notice <nick or #channel> = sends a notice to the user or channel.
    */msg <nick or #channel> = sends a message to the user or channel.
    */query <nick> = sends a private message to the user and opens up a chat window with them.
    */ns ghost <nick> <password> = kicks your name off the server if you reconnect to discover that the server doesn't yet realize you disconnected.
    */quit <message> = message is optional; makes you disconnect and if a message was specified sends it to the channel.
    */server -m <server> = connects you to the specified server (note that -m is optional, it simply tells mIRC to keep open the current server window and not close it when you open up the new server connection).

« Last Edit: July 31, 2009, 08:44:19 PM by Light Dragon »

Nomadic

  • Administrator
  • Giant Space Hamster
  • *****
  • Posts: 693
    • View Profile
A beginners guide to mIRC
« Reply #1 on: July 14, 2008, 12:46:22 AM »
Scripting in mIRC
I am not going to get too in depth here. Suffice it to say that I will give you enough to get on your feet. From there you can use mIRC's help files (type /help in mIRC) and online help sites (www.hawkee.com is a good one).

Why?
mIRC has a powerful scripting language built into it known as mSl (mIRC scripting language). It is based off the even more powerful PHP scripting language and offers myriad things to do with it. The reason I have this section here is so that even if you don't get into it you will have a handle on it which will make your life a whole lot easier.

Getting Started
Once you have mIRC open you will need to open up the mSl remote editor. This is done by holding down alt + r. This should open up a menu area with several tabs and the first time you do this you will likely default to the aliases tab. Since this is a good foundation we will start here.

Coding
So now we will get down to business. Before we begin though, there are a few basic commands we should go over.

IC
on TEXT:
the on TEXT event triggers anytime someone says something in a chat window or a private chat window that you are in. It is laid out like so:

if (ishmayl == turtle) { offer cabbage }

It seems fine at first, but what happens if vreeg isn't drunk? Now technically if that was true mIRC would just halt the script and nothing would happen. But doing that can leave a script looking unfinished and faulty so we use Mr Else.

if (vreeg == drunk) { hide wine }
Else { bring out the wine! }

So let's look at what we have so far:

if (vreeg == drunk) {
hide wine
}
elseif (vreeg == drinking) { join in }
else { bring out the wine! }
}
Using || and &&:[/u]
What if you need the script to check and see if multiple things are true? Well this is where these guys come in. They work like this:

if (vreeg == drunk) && (snargash moonclaw == wall of text) {
hide wine
}
elseif (vreeg == drinking) || (ishmayl == cabbage dunking) { join in
}
else { bring out the wine!
}
}

IC
Making things do stuff:[/u]

So we now have the basis of our script and we need to tell it what to do when it meets those conditions. For this there is a list of commands that can come in handy.

$1/$2/$3/..... :
These grab words typed for later use. They grab them off the original line typed. So then if your activating word was !hello * and someone typed "!hello to everyone in the cbg" then it would capture them as the following variables:

$1 = !hello
$2 = to
$3 = everyone
$4 = in
$5 = the
$6 = cbg

so in layman's terms they represent the words and their position on the line. You can also do words after a point using a - after the number. So the $3- for the above would be "everyone in the cbg" the $5- would be "the cbg" and so on.

$nick/$chan:
Similar to the above except they have semi-fixed amounts.

$nick is the username of the person that typed it. So if you had:

<Wicked_Troll> I like leather

$nick would be Wicked_Troll

$chan is the channel that it took place in. So if Wicked_troll said "I like leather" in #thecbg, then $chan would equal #thecbg.

msg/notice/describe:
These commands are used to actually do/say things. Each one does a different thing.

msg = the equivalent of typing /msg. It lets you tell a script to make you say something. So msg $chan delicious wine would message the chan that the script was activated in with a scrumptious "delicious wine".
notice = the same as /notice. It sends a mini-private message to someone that will pop up on all their windows telling them something. So "notice $nick I saw that" would send a notice that would pop up in all their chat windows saying "I saw that" when they activated the script.
describe = the same as the me command. It tells people an action. So using describe $chan laughs at you all would display in the channel as "<your name> laughs at you all".

Looking at the if statements there are also a few that will come in handy.

ison/isop/isvoice/etc:
There is a huge list of these and if you want to see them all you just have to type /help if then else in mirc and scroll down in the help window. We will just deal with the main ones.

ison = this is written out as "if (<person> ison <channel>)" and checks to see if the person is on the channel before running the script. So "if ($2 ison $chan) would check to see if $2 (the second word typed in a command) is a user that is on the channel that the command was typed in.
isop/ishop/isvoice = this checks to see if the person is an op/hop/voiced member on the channel. It is written out as "if (<person> isop <channel>). So then you could have "if (ishmayl isop #thecbg)" and it would check if ishmayl was an op (admin type user with a @ at the front of their name) on the channel.

The above can be used with the lovely || and && commands. As an example this could be typed out as: "if (<person> isop <channel> || <person> ishop <channel>)". This would check to see if the person was an op or half op on the channel in question. Furthermore we can use either != or ! if we want it to check if something isn't true. As an example:

"if ($nick != ishmayl)" would check to see if the person activating the command wasn't ishmayl. If we are using an is(something) command we prefix it with a ! to do this. So "if ($2 !ison #thecbg) would check to see if the second word said in the command was not a user currently on #thecbg.

Note: null
Just as an FYI that $null that you see stands for null/nothing/zilch. It means that the value supplied is equal to nothing at all. So if someone typed !hello with nothing after it then the script would recognize that as !hello $null and activate the proper command. We use it there because technically " " qualifies as nick that could be on the channel even though in actuality it couldn't. Using it like that avoids an error.

IC
Aliases[/b]

Aliases let you activate your scripts yourself and function much like macros in other programs. There are two forms of aliases:

Simple Aliases:
These are simple aliases generally one to a few lines long. To create them you will go to your aliases section. So open up the script editor with alt+r and click the tab up top that says aliases. There should already be a few there so you can right off see a general idea of format.

To create one of these we will put in /<activating text> <command it performs>. So if you wanted to be able to say "Hello everyone" just by typing a single command you could put in /hi /msg $chan Hello everyone. Then activating it would be as simple as typing /hi and hitting enter.

Scripted Aliases:
These are the more advanced ones that are full blown scripts in their own rights. You put these in the same place as a normal script, under the remotes tab. So let's open that up and get started.

The commands for beginning an alias is alot simpler then an on TEXT style script. All it is, is Alias <aliasname> { <code goes here> }. So alias hello { code } would run the code when you typed /hello. Other then that things work similar to an on TEXT with a few changes (these changes hold true in both types of aliases).

Alias Commands:

$1 not $2:
When mIRC sees something beginning with a / it marks it as a command. This means it doesn't count it as an actual word. So if you type /hello there ishy unlike in an on TEXT event $1 is equal to there and $2 is equal to ishy (not $2 for there and $3 for ishy). mIRC doesn't include the alias as one of the words.

$?*!="message":
This one will display a prompt box. This is useful if you want to enter data without typing out a big long alias. If you just use $? it will give you a basic text box that asks you to Enter a reply. To modify that message we use the ="text" part. So $?="Put some text here" would pop up a text box with the text "Put some text here" on it. The * is a censor so that anything typed into the text box is starred out. Useful for password related functions. That is done as $?*="text". The last function is the ! which gives a yes no dialog. So $?!="Continue?" would pop up a yes/no box labeled with a "Continue?" on it. If you hit yes it will return the value of $true while no shows up as false. This can be used with our old friend the "if (this == that)" statement in conjunction with some basic variables.

$!:
This is a variable that represents the text just entered into the text box. So if you had a text box that asked if you liked pie and you typed in yes and hit enter. Then $! would equal yes and could be retrieved with the $! command.

Other then these commands aliases work pretty much like the on TEXT (except the person running them can actually activate them unlike on a remote script).
« Last Edit: September 10, 2011, 05:33:56 PM by Nomadic »

SDragon

  • Owlbear
  • *
  • Posts: 475
    • View Profile
A beginners guide to mIRC
« Reply #2 on: July 14, 2008, 09:54:21 AM »
Did you mention that you can simultaneously connect to multiple servers?
Sorry but you are not allowed to view spoiler contents.
Sorry but you are not allowed to view spoiler contents.
Sorry but you are not allowed to view spoiler contents.
Sorry but you are not allowed to view spoiler contents.
Sorry but you are not allowed to view spoiler contents.


Before you accept advice from this post, remember that the poster has 0 ranks in knowledge (the hell I'm talking about)

Ishmayl-Retired

  • Gelatinous Cube
  • *
  • Posts: 2415
    • View Profile
A beginners guide to mIRC
« Reply #3 on: July 14, 2008, 11:46:59 AM »
This is very good, nomad.  A couple pointers:

Possibly mention how to set up #theCBG (and any other channels you would like) as favorites that you automatically log into.

Show how to script in under Remote Scripts an automatic password writer, so when you log in with a registered name, it will automatically send your password (in case you forget).

I assume in the aliases section, you will show us how to write up a few ourselves?  Because I would like to personally know how to do one particular thing that I haven't been able to figure out yet.
!turtle Ishmayl, Overlord of the CBG

- Proud Recipient of the Kishar Badge
- Proud Wearer of the \"Help Eldo Set up a Glossary\" Badge
- Proud Bearer of the Badge of the Jade Stage
- Part of the WikiCrew, striving to make the CBG Wiki the best wiki in the WORLD

For finite types, like human beings, getting the mind around the concept of infinity is tough going.  Apparently, the same is true for cows.

Hibou

  • Administrator
  • Modron
  • *****
  • Posts: 1197
    • View Profile
A beginners guide to mIRC
« Reply #4 on: July 14, 2008, 06:34:25 PM »
Also good to note, is that for those who don't want the extra program, www.mibbit.com is a browser-based alternative, that also features auto-translators for several languages (both your text to other languages and other text to your language of choice). You can just use the Otherworlders server on there and decide which channels you want to use.
Sorry but you are not allowed to view spoiler contents.

Ishmayl-Retired

  • Gelatinous Cube
  • *
  • Posts: 2415
    • View Profile
A beginners guide to mIRC
« Reply #5 on: July 14, 2008, 09:19:17 PM »
Another note - some programs (if you're not using mirc) don't accept the "/ns identify " message, you have to type "/msg nickserv identify " instead.
!turtle Ishmayl, Overlord of the CBG

- Proud Recipient of the Kishar Badge
- Proud Wearer of the \"Help Eldo Set up a Glossary\" Badge
- Proud Bearer of the Badge of the Jade Stage
- Part of the WikiCrew, striving to make the CBG Wiki the best wiki in the WORLD

For finite types, like human beings, getting the mind around the concept of infinity is tough going.  Apparently, the same is true for cows.

Nomadic

  • Administrator
  • Giant Space Hamster
  • *****
  • Posts: 693
    • View Profile
A beginners guide to mIRC
« Reply #6 on: July 14, 2008, 11:25:26 PM »
Quote

Did you mention that you can simultaneously connect to multiple servers?

This is very good, nomad. A couple pointers:

Possibly mention how to set up #theCBG (and any other channels you would like) as favorites that you automatically log into.

Show how to script in under Remote Scripts an automatic password writer, so when you log in with a registered name, it will automatically send your password (in case you forget).

I assume in the aliases section, you will show us how to write up a few ourselves? Because I would like to personally know how to do one particular thing that I haven't been able to figure out yet.
[/quote]
Another note - some programs (if you're not using mirc) don't accept the "/ns identify " message, you have to type "/msg nickserv identify " instead.
[/quote]

True but this was written for mIRC. However I will add that in as a side note.

Nomadic

  • Administrator
  • Giant Space Hamster
  • *****
  • Posts: 693
    • View Profile
A beginners guide to mIRC
« Reply #7 on: July 15, 2008, 12:38:09 AM »
Update: added the guide.

Technically I cheated as I used one of my old guides but it should work just fine. Please tell me if there is anything else you want to learn about and I will get you going.

Nomadic

  • Administrator
  • Giant Space Hamster
  • *****
  • Posts: 693
    • View Profile
A beginners guide to mIRC
« Reply #8 on: July 15, 2008, 04:34:30 PM »
A little treat for you all...

Commands:
/tavern - echoes to your mIRC the latest tavern post and who it was by (now with proper showing of emotes).

To install just hit alt+r in mirc then copy/paste it into the remotes tab and save it in your default mIRC directory (making sure it saves as a .ini file). Be sure to replace all (dot)'s with .'s I had to do that because of the forums tendency to auto change url's to a url link.

Sorry but you are not allowed to view spoiler contents.

sparkletwist

  • Administrator
  • Flail Snail
  • *****
  • Posts: 1744
    • View Profile
A beginners guide to mIRC
« Reply #9 on: July 15, 2008, 08:10:44 PM »
You could always use $chr(46) to create the dots instead.
(Or whatever mirc's funny syntax is)

Higgs Boson

  • Giant Space Hamster
  • *
  • Posts: 714
    • View Profile
A beginners guide to mIRC
« Reply #10 on: July 15, 2008, 08:12:05 PM »
Is it possible to have a script that activates when someone joins the CBG channel?
Sorry but you are not allowed to view spoiler contents.


My Site

Sorry but you are not allowed to view spoiler contents.

Sorry but you are not allowed to view spoiler contents.

Sorry but you are not allowed to view spoiler contents.

From the Office:
Interviewer: "Describe yourself in three words."
Dwight: "Fearless, Alphamale, Jackhammer...... MERCILESS!"
 

Nomadic

  • Administrator
  • Giant Space Hamster
  • *****
  • Posts: 693
    • View Profile
A beginners guide to mIRC
« Reply #11 on: July 15, 2008, 09:56:14 PM »
@sparkletwist - no I was talking about how the forums automatically change things like www(dot)thecbg(dot)org into things like this -> www.thecbg.org

@higgs - you sure can, you just have to use the on join command

Quote

on *:JOIN:#thecbg: {
msg $chan Well hello there $nick $+ .
}


The above will message anyone joining the channel with "Well hello there <their name>."

sparkletwist

  • Administrator
  • Flail Snail
  • *****
  • Posts: 1744
    • View Profile
A beginners guide to mIRC
« Reply #12 on: July 15, 2008, 10:52:16 PM »
Yes, I know. My point was that if your code used $chr(46) instead of just writing (dot), it'd work in mIRC without modifications and not require users to change anything by hand.

Poseptune

  • Giant Space Hamster
  • *
  • Posts: 691
    • View Profile
A beginners guide to mIRC
« Reply #13 on: July 15, 2008, 11:04:52 PM »
Hey can we put a ban or limitations on the use of scripts?

Atlantis has a script right now that triggers on the letter I. An I anywhere in the a sentence triggers it. It is getting very annoying. The worst part is that he's away from keyboard right now, those trying to chat have to suffer with the annoying script.

It wouldn't be so, bad if I could ignore atlantis, but for some reason everything I use the ignore command it comes back with unknown command.
Sorry but you are not allowed to view spoiler contents.


 Markas Dalton

Nomadic

  • Administrator
  • Giant Space Hamster
  • *****
  • Posts: 693
    • View Profile
A beginners guide to mIRC
« Reply #14 on: July 16, 2008, 12:11:21 AM »
If otherworlders has a botserv network you could designate a bot and turn on its spam filter. Other than that I can create an ignore script or a kick script (if ishy wants to moderate that stuff).