Forums Redux

Forums Redux
HomePortalCalendarFAQSearchMemberlistUsergroupsRegisterLog in
Log in
Log in automatically: 
:: I forgot my password
Latest topics
» No one seems to use this forum anymore.
Sun Jul 14, 2013 11:46 pm by StaddScoutElite

» PROOF that youtube got hacked on july 4th 2010
Thu Nov 18, 2010 10:24 am by SmoothCriminal

» owned FALCON in ff layers t4 lawl :)
Wed Nov 17, 2010 9:52 pm by SmoothCriminal

» Our Sister Forum
Wed Nov 17, 2010 9:27 pm by SmoothCriminal

» Wassup guys
Wed Nov 17, 2010 9:26 pm by SmoothCriminal

» how I discovered elfen lied.
Fri Aug 13, 2010 1:30 pm by StaddScoutElite

» Obey the moderators
Sat Jul 31, 2010 12:46 pm by Fleshandbone

» This article was funny
Tue Jul 27, 2010 5:33 pm by Fleshandbone

» What is your favorite day of the week?
Sun Jul 25, 2010 6:30 pm by Fleshandbone

Top posters
View Forum Leaders


Share | 

 Beginners Guide to Scripting in mIRC

Go down 
Forums Redux Administrator
Forums Redux Administrator

Posts : 586
Join date : 2010-02-28
Age : 22
Location : mIRC

PostSubject: Beginners Guide to Scripting in mIRC   Sat Jul 10, 2010 1:14 pm

KiLLErMaN99's Beginners Guide to Scripting in mIRC

Welcome to my beginners guide to scripting in mIRC. You will learn the most basic formatting of scripting and you will get to make your own script! I hope you have a blast and learn a bunch when reading my guide. Thanks to all.

Ok. There are 2 types of script that all beginners must start out with. They are on TEXT and on INPUT. Each one works the same way but there are 2 distinctions that you must know.

Part 1: On TEXT

First off is a little explanation of what on TEXT is. You may be confused because you don't even know how to script. So what is on TEXT going to mean to you? Basically it is a
small identifier showing that whenever someone types something your script will perform whatever you say it will. So lets start with the basics to making it since this is really
difficult to explain well.

This is the basic setup for all on TEXT scripts. This setup is:

on *:TEXT:*:#: { }

Having "on" in the beginning is like saying when. So lets read the script in basic words to see if we can understand it.


on any window of mIRC

someone says something

With any words

In any channel

{ }
Perform these commands

Now that's a little mixed up right? So lets put it in a sentence.

When someone says something with any words in any channel on any window of mIRC perform these commands.
Does that make sense now?

So lets start out with a very simple script. This will be an on TEXT script. What we want it to do is whenever someone says "hi" you want it to automatically say hi back.
So lets start out with our basic setup that I explained earlier.

on *:TEXT:*:#: { }

Now how are we going to set it so that whenever someone says hi it'll perform the commands??? Well look at the sentence above. We do this:
on *:TEXT:hi:#: { }

Another way you can put this is:

on *:TEXT:*:#: {
if ($1 == hi) { }

$1 is the first word in the message. So that means that $2 would be the 2nd word in the message. If you want it to be every word in the message you would use $$1-

So lets go with the first setup
on *:TEXT:hi:#: { }

We want it to say hi back correct? Lets try something with a /msg command.
on *:TEXT:hi:#: { msg $chan Hello! }

$chan makes it so that you will automatically send the message to whatever channel they say hi in. If you want it to say hi to the person who said hi you can do something
like this:

on *:TEXT:hi:#: { msg $chan Hello $nick }

Your result being:
<TheOnly1Left> Hi
<KiLLErMaN99> Hello!

Or if you used the second script:

<TheOnly1Left> Hi
<KiLLErMaN99> Hello TheOnly1Left

Congratulations! If you followed that whole thing you will be able to make an on TEXT script that will reply whenever someone says something that you specify!
You are now an official mIRC scripter Smile but it takes more than knowing this to be a good mIRC scripter. But we'll learn this stuff later since you are just now learning
how to script. Now we shall move on the the second part of scripting: on INPUT

Part 2: On INPUT

If you followed the first part of the guide like you are supposed to then you should be able to learn on INPUT very easily. On INPUT incorporates and messages sent by you and
performs the given commands. Like last time, lets start out with a the basic setup of an on INPUT script.

on *:INPUT:*: { }

Now wait! Where is the :#: at?!? Well with on INPUT scripts you don't need to have :#: at all. Because wherever you type something it will be in that channel and nowhere else!

So lets go over the sentence structure of an on INPUT script.


on any window of mIRC

You say something

With any words

{ }
Perform these commands

Now it's also mixed up like last time. So lets put this in sentence format:
When you say something with any words on any window of mIRC perform these commands.

How much more similar can you get! You can make a script so easily like on TEXT with on INPUT. So why not start to make your very first one now? Lets go through it.

What we will do is make a script so that whenever you type !hi it will message the channel saying hello to the entire channel. If it doesn't make sense now lets just go over
it and make the script.

Now we start with out basic structure for an on INPUT script:

on *:INPUT:*: { }

We add it so that whenever you type !hi it will perform whatever you say.

on *:INPUT:!hi: { }

Another way you can put this is:

on *:INPUT:*: {
if (!hi == $1) { }

Lets work with the first setup as it is easier for a beginner to learn. So now that you have it all setup for the !hi command lets add the msg part of it.

on *:INPUT:!hi: { msg $chan Hello everyone in $chan }

Now wait! I just said that $chan will message the channel. So why would I have $chan at the end of the script?

Well whenever you have $chan in the script it will replace that WITH the channel that the script is being activated it. Now that was one heck of a sentence to understand. Lets
explain it with some examples.

People are talking in #Channel
You say !hi
<TheOnly1Left> So I was talking the other day...
<KiLLErMaN99> !hi
<KiLLErMaN99> Hello everyone in #Channel

Now people are talking in #TheForums
You say !hi
<TheOnly1Left> So I was posting the other day...
<KiLLErMaN99> !hi
<KiLLErMaN99> Hello everyone in #TheForums

It should make more sense now if you read it over carefully.

Congratulations! You have now learned the very basics of making on TEXT and on INPUT scripts! You should be proud of yourself now. It isn't that easy learning how to become
a scripter and it takes a lot of work too. There are many more things that you can learn but for this guide we will just stick with the basics. Thanks everyone for reading
and I hope you have a great time making those scripts!

TheOnly1Left: He wanted me to teach him some stuff which inspired me to make this guide. Thanks a lot!
FirstMate: I couldn't have done it without you teaching me a lot of what I know today. You where the one that got me started on scripting. Thanks Smile
Neo: You inspired me to learn more when you tell me to try and make it instead of you making it for me. That helped me a whole lot when I was learning thanks Very Happy
KiLLErMaN99: I couldn't have done it without myself of course. Some credit has to be given. THIS IS MADNESS!



Back to top Go down
View user profile
Graphics Crew

Posts : 84
Join date : 2010-07-06
Age : 20
Location : Why do you care o.o

PostSubject: Re: Beginners Guide to Scripting in mIRC   Sat Jul 10, 2010 1:28 pm

I love this guide. It helped me a lot. Thx Smile
Back to top Go down
View user profile
Forums Redux Moderator
Forums Redux Moderator

Posts : 63
Join date : 2010-05-04
Age : 27
Location : New Zealand

PostSubject: Re: Beginners Guide to Scripting in mIRC   Thu Jul 15, 2010 6:37 am

hmm maybe after I get around to reinstalling my laptop I might get this script and a few others to go

CPU: Intel Core 2 Duo E7500 Wolfdale 2.93GHz, Memory: 2gb DDR2 800mhz (For now), HDD: 2X500gb Sata2, GPU: Sapphire HD 4670 512MB, O/S: Quad boot: Windows XP Pro, Vista Ultimate 64 Bit, Windows 7, Ubuntu, Case: Coolermaster Centurion 590 Black
Back to top Go down
View user profile
Sponsored content

PostSubject: Re: Beginners Guide to Scripting in mIRC   

Back to top Go down
Beginners Guide to Scripting in mIRC
Back to top 
Page 1 of 1
 Similar topics
» Apocalypse's Guides
» Training guide
» A little layout guide for those who want to give making one a try
» OBS's Guide to the Underdark (Updated: 2/5/12)
» Guide: Creation Templates

Permissions in this forum:You cannot reply to topics in this forum
Forums Redux :: General :: Tech Discussion-
Jump to: