The mIRC Resource Center.
provided by the operators of DALnet #mIRC.


[ Main | What's New | Technical | Scripts | Links ]


Some simple scripts for mIRC

These are some of the most requested and very simple scripts we would like to share with you.
The #mIRC channel, in general, helps with basic mirc problems, not scripting.
However, we felt these scripts would be good examples for this site.


One liners:



Channel Stats

To add this to your script, simply copy/paste the following line into your aliases (Alt+A).

chanstats { echo -atic info2 * # Stats: $nick(#,0,o) ops, $nick(#,0,v) voices, $nick(#,0,r) regular users and $nick(#,0,a) total users }

Kick and Ban with Reason

To add this to your script, simply copy/paste the following line into your aliases (Alt+A).

kb { ban -k $$chan $$1 2 $iif($2,$2-,Get lost!) }

Message Blocker

To add this to your script, simply copy/paste the following line into your remotes (Alt+R).

on ^*:OPEN:?: .msg $nick Sorry, I'm unavailable for private messages now. | halt

Autogreet

To add this to your script, simply copy/paste the following line into your remotes (Alt+R).

on *:JOIN:#channel: .notice $nick Hi $nick $+ , welcome to $chan $+ .

After you paste this into your remote section, you will need to change #channel to the name of your channel. NOTE WELL: Make sure you are allowed to use on join messages in the channel you specify. Many channels kick and ban for on join messages.

Nickchange

To add this to your script, simply copy/paste the following line into your remotes (Alt+R).

on *:NICK: .msg $newnick Hey $newnick $+ , weren't you just $nick $+ ? You can't fool us! :)

Ping Reply

To add this to your script, simply copy/paste the following line into your remotes (Alt+R).

on *:CTCPREPLY:PING*: .notice $nick Your ping reply from $server is $duration($calc($ctime - $2))

Advertisement Kick

To add this to your script, simply copy/paste the following line into your remotes (Alt+R).

on @*:TEXT:*:#: if ((www isin $1-) || (http: isin $1-) || ($chr(35) isin $1-)) { ban -k $chan $nick 2 Do NOT advertise other channels or websites here. }

Input Statements LOL/BRB/WB

To add this to your script, simply copy/paste the following line into your remotes (Alt+R).

on *:INPUT:*: if (/* !iswm $1) && (!$ctrlenter) { say $replace($1-,brb,Be Right Back,lol,Laughing Out Loud,brb,Be right back,bbiab,Be Back In A Bit,wb,Welcome back) | halt }

Simple Nick Completer

To add this to your script, simply copy/paste the following line into your remotes (Alt+R).

on *:INPUT:#: if (/* !iswm $1-) && ($1 ison $active) { msg $+($chr(3),04,$1,$chr(15) $2-) | halt }

Input Statements turn everything a color

To add this to your script, simply copy/paste the following line into your remotes (Alt+R).

on *:INPUT:*: if (/* !iswm $1) { /say $+($chr(3),04,$1-) | halt }

You can change the 4 in that line to any number 0-15 to change it to your desired color. The above line will make everything you type be in red. 6 would be purple, 7 would be orange and so on. Note Well: Many channels forbid the use of color.

Dice Roller

To add this to your script, simply copy/paste the following line into your remotes (Alt+R).

on $*:TEXT:/^!dice (10|[1-9]) (\d+[0-9]|[1-9])$/:#: var %i = 0, %limit = $iif($2 > 10, 10, $2) | while %i < %limit { inc %i | .timer 1 $calc(%i * 2) msg $chan $nick rolled $3 $+ -sided die number %i of $2 $+ : Result $rand(1,$3) }

After you paste this into your remote section, (and don't forget the ON part of the above line) other people will be able to roll your dice by typing !dice [number of dice (1-10)] [number of sides (1-whatever)] .. for example: !dice 4 6



Larger scripts

Please click on the link that follows for some larger scripts avaialable for download.

Additional Larger scripts available(click here)


[ Main | What's New | Technical | Scripts | Links ]

Copyright © #mIRC-DALnet
These pages are best viewed with Microsoft IE 4.0+ in 800 X 600 or greater.