Forums Redux
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Forums Redux

Forums Redux
 
HomePortalSearchLatest imagesRegisterLog in
Log in
Username:
Password:
Log in automatically: 
:: I forgot my password
Latest topics
» No one seems to use this forum anymore.
Beginners Guide to Scripting in mIRC Icon_minitimeSun Jul 14, 2013 11:46 pm by StaddScoutElite

» PROOF that youtube got hacked on july 4th 2010
Beginners Guide to Scripting in mIRC Icon_minitimeThu Nov 18, 2010 10:24 am by SmoothCriminal

» owned FALCON in ff layers t4 lawl :)
Beginners Guide to Scripting in mIRC Icon_minitimeWed Nov 17, 2010 9:52 pm by SmoothCriminal

» Our Sister Forum
Beginners Guide to Scripting in mIRC Icon_minitimeWed Nov 17, 2010 9:27 pm by SmoothCriminal

» Wassup guys
Beginners Guide to Scripting in mIRC Icon_minitimeWed Nov 17, 2010 9:26 pm by SmoothCriminal

» how I discovered elfen lied.
Beginners Guide to Scripting in mIRC Icon_minitimeFri Aug 13, 2010 1:30 pm by StaddScoutElite

» Obey the moderators
Beginners Guide to Scripting in mIRC Icon_minitimeSat Jul 31, 2010 12:46 pm by Fleshandbone

» This article was funny
Beginners Guide to Scripting in mIRC Icon_minitimeTue Jul 27, 2010 5:33 pm by Fleshandbone

» What is your favorite day of the week?
Beginners Guide to Scripting in mIRC Icon_minitimeSun Jul 25, 2010 6:30 pm by Fleshandbone

Top posters
KiLLErMaN99
Beginners Guide to Scripting in mIRC I_vote_lcapBeginners Guide to Scripting in mIRC I_voting_barBeginners Guide to Scripting in mIRC I_vote_rcap 
FootNinja
Beginners Guide to Scripting in mIRC I_vote_lcapBeginners Guide to Scripting in mIRC I_voting_barBeginners Guide to Scripting in mIRC I_vote_rcap 
Fleshandbone
Beginners Guide to Scripting in mIRC I_vote_lcapBeginners Guide to Scripting in mIRC I_voting_barBeginners Guide to Scripting in mIRC I_vote_rcap 
Gr33n
Beginners Guide to Scripting in mIRC I_vote_lcapBeginners Guide to Scripting in mIRC I_voting_barBeginners Guide to Scripting in mIRC I_vote_rcap 
TreyDawg
Beginners Guide to Scripting in mIRC I_vote_lcapBeginners Guide to Scripting in mIRC I_voting_barBeginners Guide to Scripting in mIRC I_vote_rcap 
TheOnly1Left
Beginners Guide to Scripting in mIRC I_vote_lcapBeginners Guide to Scripting in mIRC I_voting_barBeginners Guide to Scripting in mIRC I_vote_rcap 
Nedkelly
Beginners Guide to Scripting in mIRC I_vote_lcapBeginners Guide to Scripting in mIRC I_voting_barBeginners Guide to Scripting in mIRC I_vote_rcap 
johnpogi
Beginners Guide to Scripting in mIRC I_vote_lcapBeginners Guide to Scripting in mIRC I_voting_barBeginners Guide to Scripting in mIRC I_vote_rcap 
iaileanos1
Beginners Guide to Scripting in mIRC I_vote_lcapBeginners Guide to Scripting in mIRC I_voting_barBeginners Guide to Scripting in mIRC I_vote_rcap 
StaddScoutElite
Beginners Guide to Scripting in mIRC I_vote_lcapBeginners Guide to Scripting in mIRC I_voting_barBeginners Guide to Scripting in mIRC I_vote_rcap 
Staff
View Forum Leaders
Navigation

Portal
Index
Memberlist
Profile
FAQ
Search

 

 Beginners Guide to Scripting in mIRC

Go down 
3 posters
AuthorMessage
KiLLErMaN99
Forums Redux Administrator
Forums Redux Administrator
KiLLErMaN99


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

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

Beginners Guide to Scripting in mIRC Indexlogo

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.


OverView
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
When

*
on any window of mIRC

:TEXT:
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
When

*
on any window of mIRC

:INPUT:
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
<TheOnly1Left> WHOA THAT IS SO COOL!

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

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!


CREDITS
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!


~KiLLErMaN99
Back to top Go down
https://forumsredux.rpg-board.net
TheOnly1Left
Graphics Crew
TheOnly1Left


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

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

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


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

Beginners Guide to Scripting in mIRC Empty
PostSubject: Re: Beginners Guide to Scripting in mIRC   Beginners Guide to Scripting in mIRC Icon_minitimeThu 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
Back to top Go down
Sponsored content





Beginners Guide to Scripting in mIRC Empty
PostSubject: Re: Beginners Guide to Scripting in mIRC   Beginners Guide to Scripting in mIRC Icon_minitime

Back to top Go down
 
Beginners Guide to Scripting in mIRC
Back to top 
Page 1 of 1
 Similar topics
-
» mIRC Scripts
» mIRC Calculator
» mIRC Operators

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