News  -  Press Releases  -  Chat Now  -  Forums  -  IRC Network  -  IRC Help  -  About ETG  -  Contact Us
   Currently On ETG  

General News  
ETG News - Recent
ETG News - Archives
Press Releases
About EnterTheGame  
Company Info
EnterTheGame Realms  
Doom III
Quake IV
Full Directory
IRC Network Information  
News Archive
How To Join / Chat
ETG Rules & Policies
ETG`s Purpose / Mission
ETG`s Server List
Network Staff
Network Helpers
How To Join The Staff
How To Link a Server
IRC Help and Guides  
New User Guide
IRC Etiquette
FAQs & Resources
ChanServ Help
Hostmask Help
mIRC Setup Info
Chat With Admin
Basic Scripting in mIRC
Before we start, there is a lot of information to find about mirc on the mirc homepage( and there is a LOT in the mirc helpfile .. We will handle some of the frequent questions in this, but for more questions or advanced information you may wish to check those resources or ask in #HelpDesk on ETG.

[ Basic Commands ] - Just to get you started.
[ Scripts Generalized ] - Slightly more advanced scripting.
[ Remotes ] - What they are and what they do with regards to scripts.
[ Aliases ] - How they work and interact with Remotes.
[ Operators ] - Advanced scripting. For if/else statements.

Last Updated: May 12th, 2005 - By: whiz
Basic Commands

There are a few basic commands which will help to use mirc a little bit better then when you don`t know em : )

/j or /join #channel - This will make you part the channel you`re on

/list This will list ALL the channels on the network which aren`t mode +s or +p . Takes really long to complete on slower connections

/msg <nick> <text> This will send a private message to a certain nick

/notice <nick> <text> This will send a notice to a certain nick (this will show up in his active window instead of a separate window by default, but some people find notice irritating so don`t overuse!)

/query <nick> This will open a dedicated message window to the specified nick in which you can chat privately.

/server <server> with this command you can switch servers
(example: /server, this will connect you to the tx server)

/quit <message> D-oh ? : )

/exit This will disconnect you from the server and exit your client as well

--------------------Ops only Commands--------------------


/mode #channel <modes> <nick> This will set specified modes to a channel, or when specified a nick.

/kick #channel <nick> <reason> 3 guesses what this does : )

/topic #channel <newtopic> D-oh : )

Return to the Top

Last Updated: May 12th, 2005 - By: whiz
Scripts in General

Most scripts are for protection and fun only, as well as making things easier for you on irc with popups etc. But on the other hand, scripts can cause some problems if used or configured incorrectly .. Like when person1 deops person2 who`s is in person3`s friend list, person1 will probably get kicked by person3 or even banned, and person3 will reop person 2 who will kick person3 for kicking/deopping person1 etc. These things can go on for ages : ) and can be quite annoying when the owners of the client aren`t there.

{ } Brackets
These brackets make it possible to use multiple lines in an alias or remote but are the most likely cause for scripts not working. When you make an alias, you can put a { after the alias name and start making multiple lines of script in 1 alias, but be sure to close it with a } or things can go really weird really fast! Especially when using lots of ifs you need to be careful of where you place the }`s and that all of em are there! Its better to place 1 too many at first then 1 to less.

These are an essential part in scripts usually, which can do something over and over again, or something after x seconds .. They don`t work with { } so you`ll have to make an alias for it or something. You can create a timer like this: /timer <numberoftimes> <seconds> /command, if you make numberoftimes 0, the timer will go on an on forever or till you disconnect or just stop the timer.

Starting/stopping timers
You can start timers with the /timer command and it will automatically give the timer the first available timer number. It will give a message like * Timer 1 activated You can turn it off again by typing /timer1 off or any other number depending on which one you want stopped, it will give the message * Timer 1 halted. You have to attach the number/name of the timer to the timer command and thus making it 1 word.

Named timers
You can give a timer a name or a specific number, you can start it by typing /timertest 1 10 /echo $active timer test ended. This will start timer `test` and will echo timer test ended in the currently active window. You can also specify a number instead of a name, that way you can turn the timer off with more ease in other aliases when its not needed anymore.

Requesting currently active timers
You can request a list of active timers by typing /timers. This will give a list of all timers which are running at that time.


When you do not want to see what your script is sending in text or confirmations that a timer has been started etc, then use a . in front of the command. Like when starting a timer from an alias start it like .timer and then it wont give a message if it was started or stopped. The same goes for any other command, if you do .notice or .msg, you will not see what it sends to the channel or to someone(but other people will!)

Return to the Top

Last Updated: May 12th, 2005 - By: whiz

Remotes are basically what the word means, a script triggered by a remote event, like when someone says something like etg, you can make a script which will say ETG rulez to that specific channel (or all channels your on for that matter : ). They basically work like this: On 1:TEXT:*etg*:#:{ /msg $chan ETG rulez $nick $+ !! } In this example whenever a level 1 user(everybody by default) says etg anywhere in a sentence, you will automatically do what is between { }and thus msg the channel ETG rulez!

Common Identifiers
There are some identifiers which you will come across very often when playing with remote scripts, there are also some specific ones for certain event types, but they are all explained in the help file

Lets say you are using that On 1:TEXT:*etg*:#{ /msg $chan Etg rulez $nick $+ !! }in you remotes, and superman in #conzownstheworld will say "etg".

  • $chan This is the identifier for the channel in which an event is triggered, thus will get the value of #conzownstheworld in this example, this can be used further down in bigger remotes over and over, but when you start an alias with $chan as parameter, $chan will NOT work as valid identifier in the alias itself! But I`ll get back to this later
  • $nick This is the identifier for the nick who triggered the event, so in this case $nick would become superman, again this identifier cannot be used in aliases.
  • $1 $2 etc These are identifiers which hold the $<thisnumber> word in the sentence in which the event was triggered, $2- (with the extra -) is the entire sentence after and including the 2nd word, thus when someone says !etg is cool, $1 would be `!etg`, $2 would be `is` and $2- would be `is cool`
Other identifiers
  • $address This will convert a nick into a hostname and gives a host in return which can hold wildcards, depending on the type you want. It works like $address(nick,type) these types can be found under $mask in the mirc helpfile.
  • $nick(#,N) This can return the Nth nick in #channel or when N = 0 it will return the total number of persons on the channel. $nick(#etg,0) would return the number of people on #etg .. $nick(#etg,1) would return the 1st nick on #etg. $nick(#etg,0).o would return the total number of opped people in #etg .. this has many options and can best be viewed in the helpfile ..
  • $? And $1 The first one will display a small window in which you can enter text(example: /kick $chan $1 $?"Enter Reason:" will display a small window with Enter reason as title) you can use $! Later on to use the same var again, though its better to set a % with $?. (example which can be put after the previous one: /set %i_used_this_message $!)

These identifiers CAN be used together, like $address($nick($chan,1),3) in a remote would return a type 3 host off the 1st person on the channel in which an event is triggered.

Useful Events

  • TEXT This will be one of the most used events you will use probably, it responds to a word which is said either in private chat of in a channel or both depending on what you want it to do. It works like On <level>:TEXT:<trigger>:# ? *: command. The # ? * are # for channel, ? for private and * for both.
  • BAN/UNBAN This will trigger something when a ban is placed in a channel and has some special identifiers of its own like $banmask which is the host being banned, $bnick which should be the nick of the person being banned but doesn`t work always!
  • OP/DEOP This will trigger when a user gets opped or deopped on a channel and has $opnick(the person who gets opped) as special identifier, $nick will contain the person opping/deopping in this event.
  • KICK This will trigger when a user gets kicked from a channel, $knick will get the nick of the person being kicked and $nick has the person who kicked.
These are the most used events in scripts.

User levels and how to use them
Userlevels are used to limit the people which will trigger a certain event. An event will only trigger when a user has the same or a higher userlevel then the number specified in the remote. Like say person1 has a userlevel of 50 in your script, and person2 has a level 100, your remote states On 51:TEXT:bla*:#:/msg $chan bla $nick, in this case it will only say bla person2, and ignore person1. If you would change the 51 into 50, the script will say bla person1 and bla person2. You can also specify a @ in front of the userlevel (like On @1:TEXT: ) which will limit the event being triggered when you have ops in that channel only. You can also compare levels between users with the $level identifier (if ($level(nick) < $level(nick2) { etc }) 

Return to the Top

Last Updated: May 12th, 2005 - By: whiz

Aliases are primarily for the simplification of the remote section, things can get really hard to oversee when you make remotes which have more then 5 lines. Then you`re better off making an alias and starting that up in the remote with the right parameters it needs which can also be tricky. You can also use aliases just to lighten the typing load, like when you have to type something over and over, you just make an alias for it and type /youralias from that point on. Also don`t start making aliases which look like /x /x1 /abc or whatever non meaningless thing, this will make it really hard to remember what it should do and where you left it, its better to make longer alias names and do some more typing then getting lost in all the aliases later on when you got a 20kb script : )

Aliases called from remotes
When you call upon an alias from the remote section then it requires minor thinking : ). All parameters you gave to an alias will turn into $1 $2 $3 etc, so when you call upon an alias from a remote and start it like On 1:ban:#:/alias $chan $nick $banmask then $1 will be the channel, $2 the $nick and $3 te banmask

Handy things
/ot {
/say Local time is $time and I`ve been online for $duration($online)
/say System has been running for $duration($calc($ticks / 1000)))}
;/servercheck adds the server which you are currently on to the mirc server list
;you can add /servercheck to On *:connect:{ } somewhere in your script
/servercheck {
if (%scheckfirstrun == $null) {
set %lastline $read -l $+ $lines($mircdirservers.ini)
$ mircdirservers.ini
set %numberofservers $deltok($deltok(%lastline,2,61),2,110) + 1
set %scheckfirstrun 1
/write -c $null
set %imonthisserver * $+ $server $+ *
/filter -ff $mircdirservers.ini $null %imonthisserver
if ($filtered < 1) { /write $mircdirservers.ini n $+ %numberofservers $+ = $+ $network $+ , $server $+ SERVER: $+ $server $+ : $+ $port | /inc %numberofservers }
;guess what these do : )
on 1:TEXT:*ripper*:#:/describe $chan psst ripper is gay pass it on
on 1:TEXT:*gay*:#:/describe $chan looking for ripper?

If-then-else statements
This is straigt from the helpfile.. (saved me a lot of time :P)
The If-then-else statement allows you to compare values and execute different parts of a script based on that comparison.

Basic format
if (v1 operator v2) { commands }
elseif (v1 operator v2) { commands }
else { commands }

The ( ) brackets enclose comparisons, whereas the { } brackets enclose the commands you want to be performed if a comparison is true. You must make sure that the number of ( ) and { } brackets match to make sure that the correct comparisons are made, and that the correct commands are executed.

Using brackets speeds up processing. If an alias uses too few brackets then the statement might be ambiguous and the alias will take longer to parse, might be parsed incorrectly, or might not be parsed at all.You can nest as many if-then-else statements as you want inside each other.

Return to the Top

Last Updated: May 12th, 2005 - By: whiz

== equal to
=== equal to (case-sensitive)
!= not equal to
< less than
> larger than
>= larger than or equal to
<= smaller than or equal to
// is a multiple of
\\ is not a multiple of
& is a bitwise comparison
isin string v1 is in string v2
isincs string v1 is in string v2 (case sensitive)
iswm wildcard string v1 matches string v2
isnum number v1 is a number in the range v2 which is in the form (v2 optional)
isletter letter v1 is a letter in the list of letters in v2 (v2 optional)
isalnum text contains only letters and numbers
ison nickname v1 is on channel v2
isop nickname v1 is an op on channel v2
isvo nickname v1 has a voice on channel v2
ishelp nickname v1 is a helper on channel v2
isreg nickname v1 is a normal nick on channel v2
ischan if v1 is a channel which you are on.
isauto if v1 is a user in your auto-op list for channel v2 (v2 optional)
isignore if v1 is a user in your ignore list with the ignore switch v2 (v2 optional)
isprotect if v1 is a user in your protect list for channel v2 (v2 optional)
isnotify if v1 is a user in your notify list.

To negate an operator you can prefix it with an ! exclamation mark.

number {
if (($1 > 0) && ($1 < 10)) {
if ($1 < 5) echo Number is less than five
else echo Number is greater than five
else echo Number is out of bounds

This alias checks if the number you specify, when you type /number , lies within the required range.

Return to the Top

Last Updated: May 12th, 2005 - By: whiz
Other Site News
New IP Address
Hurricane Sandy & Channel Se...
ETG Celebrates 13 Years!
DNS Outage
Maint on PA Server
IRC is getting an UPGRADE!
MD Server Maint
New Feature for Approved Egg...
Eggdrop Issues
ETG Celebrates 10 Years!!!
Reserved Nicknames
New Security System Enabled
Happy 9th Birthday ETG!
Major Network Maint TODAY!
UT3 Developer Chat TODAY!!!
In The Forums
Site design and contents copyright (c) EnterTheGame & Excelsior Media Studios, Inc. 1999-2018
No portion of this site or any content on it can be copied or otherwise used/reproduced elsewhere without explicit permission by Excelsior Media Studios, Inc.
Site Coded/Constructed/Designed by Dave Sherman @ Excelsior Media Studios, inc.
Original Site Concept & Design by Callidus @ Digital Impurity -