Jump to content

Basically Explain


Guest Johnson

Recommended Posts

Guest Lynx
:lmaojump: as a few of you know im very interested in mirc scripting .. i do look in the mIRC Help but i dont always understand it .. so i though why not ask .. what is aliases / variables / raw / sockwrite and if Possible where would i put these if i was coding something for a script .. i know im asking a lot .. but if some of the members could basically explain it to me i would be gratefull .. if its too much to explain i will understand .. please because of reading and learning difficultys .. would you make it as simple as possible :D Edited by Lynx
Link to comment
Share on other sites

i remember how it was when i first started.. The mirc help file is a huge waste of time if you do not know the basics. The way i learned was by looking at other scripts and asking when i got stuck. I admit it's harder nowadays to look at some scripts to learn from as the creators get hung up on someone ripping their work that at times their scripts can be hard to breakdown for new users. Start with the small stuff. Pick something simple until you get a basic understanding and then move on. the thing about mirc is there are so many ways to do things. Most important is to ask for help when you get stuck. It can be frustrating when you are unable to grasp something after giving it a lot of attention, so just ask when you need it and i'm sure the community will be more than happy to assist.. Or get a few scripting buddies on your im list and ask them. You should add ozzy to your im list. he luvs helping ppl.

Link to comment
Share on other sites

i started way back and quit when msn went to paid my first thing i started with was bots but if you know how to connect with a script and everything and you start using it a little you eventually get curious and i dont know you and u may or may have not done that but on with the point when you look at the code and u use the acton such as kick for example look at the code for it learn to modify before trying to write it because thats a simplier way of looking at it and then eventually the codes and things will stick in your head and you can use that to write your own and get into more detailed things

 

P.S. i havent scripted in a long time so i'm sorry if this dosent suit what you are really wanting

Edited by eXphire
Link to comment
Share on other sites

Guest Travis

aliases

 

Aliases are tools for scripting. Aliases were created to allow the user to create their own commands and identifiers. These are the two main uses for an alias. The most common would be kind of like a macro. An alias would perform a command or list of commands as specified.

 

alias talk {
msg $chan Hello everyone!
}

 

When I ask mirc to perform the command /talk it would attempt to perform the command in the talk alias. This is only one command but there really isn't a limit to what you can put in an alias.

 

The other purpose of an alias is to create custom identifiers.

 

alias c_chn { return $comchan($me,1) }

 

/echo -a The 1st channel I am on is $c_chn .

 

You see, the command I asked mirc to perform is to return $comchan($me,1).

 

This is the basic idea of the alias, look in the help file. It explains aliases very well. If you need clarification of the help file, ask questions about it. mirc.com is the best place to get help for mirc. There is a whole lot more to aliases, but these are the basic uses of them. Please ask for details.

 

 

variables

 

Variables basically store information for you to use later. Let's say a person is playing a game and I only let them play 5 times then they take a break. So what I will do is set a variable each time they play.

 

set %gamenick Travis

set %variable 1

 

So now, mirc knows that %gamenick is the Travis nick and they played once. There are different tools involved.

 

/inc %var or /dec %var - this will increase or decrease the variable by 1.

 

set -u5 %var $true - -uNThis will unset the variable after N seconds.

 

 

 

raw

 

There is a whole lot more than what you see on a chatscreen or in mIRC. Khaled, who created mIRC, made his own theme to strip out the commands and information IRC servers use in all messages. What text actually looks like is something like ....

 

 

:Nickname!Ident@Address #ChannelName :Hey guys how are you doing?

 

That's roughly what a text event looks like. mIRC removes the server info stuff and just gives you the nickname and message. All of the actual info given would be considered the raw message. $rawmsg returns this. /echo -a $rawmsg

 

All server information can be considered raw messages. And then there are numbered information (status or error) messages from the server. They usually have a message id and are considered raw numerics.

 

You also have the option of sending the server a raw message which means you would send the command in the same format the server sends it to you.

 

/raw mode $chan +v Travis

 

 

sockwrite

 

You can use mIRC to connect to webpages or just about anything online. To do this it opens a SOCKET. So for instance, say I wanted to check something on google using mIRC. I would open a socket to Google. Then I would use a SOCKWRITE command to send google information. If I use a SOCKET to connect to a chat server, I would use /sockwrite to send it any info on that socket. This HAS to be in the format the server uses.

 

/sockwrite mode $chan +v Travis

 

 

 

I hope this helps, ask questions!

Link to comment
Share on other sites

Guest Lynx

:lmaojump:THANKYOU ALL for your replies and comment .. some very interesting replies and i will look at them all and see how i go on :D

 

 

You should add ozzy to your im list. he luvs helping ppl.

 

 

err0r :lolwave: i would talk him to death :P

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...