This is an advanced tutorial on mIRC scripting. This is not for beginners. I will not be telling you what an alias, remote or pop-up is. If you don't have a basic knowledge of mIRC scripting then this tutorial is not for you. In this tutorial
I will teach you about Variables which will help you with more complex ideas in your script writing.
Variables:
Variables are temporary storage areas to which you can assign values that you can use later in your scripts. All variables have a % in front of their name. This identifies it as a variable.
Example:
This example of using a variable is for an Age Sex and Location script in the pop-up menu under either Channel, Query or Menu. You can change between these in the script editor by using View.
Pop-up:
-- ASL -- ( this creates a sub-menu )
.-- Set --:/set %asl $$?="Set EG. 19,Male,USA:"
The .-- Set -- creates another sub menu under the -- ASL -- sub menu. The /set %asl will set the variable to the users input of their Age, Sex and Location. The $$?= is used for user input, whatever is inside the "" is what comes up in the pop-up for the user to read giving them instructions. The user's input will set what the variable will be - for example %asl 19,male,USA. In summary this command will set the Age, Sex and Location.
The next line of for the ASL script still in the pop will be entered under the last line.
.-- Remove --:/set -r %asl | echo *** ASL has been removed
Again the .-- Remove --: sets a sub-menu under the original sub-menu. This time the /set command has a -r in front of
the %asl variable. This command will remove what is set to the variable. Meaning in the variables tab instead of it saying
%asl 19.Male,USA it will just read %variable allowing you to reset the value of %asl. The | between the /set and echo lets mIRC know that a new command is being run. All the echo will do is send a message to you saying that the ASL has been removed.
.-- Say --:/asl
This part of the pop-up will say the ASL, /asl is an alias command that we will break down next. When you press this pop-up you will say <me< 19,Male,USA . Next we will discuss the alias command /asl
Alias:
/asl /say ( ASL: %asl )
The /asl is what is going to trigger what is after it. /say is the command to write text to a channel or query window. ( ASL: %asl ) is what will be said. Example if the %asl is set to 19,Male,USA <me< ( ASL: 19,Male,USA )
I hope this tutorial has been helpful to all who have read it. I appreciate feed back on it. You can find me at
irc.cyberarmy.com in #hack,#cyberarmy or on irc.cyberarmy.net in #freebsd or #cyberarmy. If this tutorial was liked and useful,
I will write a more complex one where we will create a "Shit List" script that will add the user and when they join the channel you are on it will kick/ban the person with a message if you are an operator in that channel.
Written by k0rn (12 December 2005)
k0rn is a member of Knowledge-Bank Writing and Collecting.
Edited by agentmike and Asdf
This article was originally published by CyberArmy.net in the CyberArmy Library.
|
|