Author Topic: Mirc functions...  (Read 328 times)

Vertical

  • Newbie
  • *
  • Posts: 15
  • Reputation +0/-0
    • View Profile
Mirc functions...
« on: February 11, 2011, 08:17:11 pm »
Hello, recently ive started Mirc scripting, it isnt hard but i do have a problem:
I do not know any functions so if you can provide me with a list of them, i would be thrilled!

thank you,
Vertical / Code Red.

Share on Bluesky Share on Facebook


Bloodcell

  • Global Moderator
  • Newbie
  • ****
  • Posts: 15
  • Reputation +1/-0
    • View Profile
Re: Mirc functions...
« Reply #1 on: February 11, 2011, 09:30:14 pm »
If you have mIRC just go to "Help > Help Files > mirc.chm"

You should find anything you need there.


King_Hual

  • Trial Moderator
  • Newbie
  • ***
  • Posts: 36
  • Reputation +3/-2
    • View Profile
Re: Mirc functions...
« Reply #2 on: February 11, 2011, 09:39:03 pm »
Or type /help, then go to Remote and yah start learning
« Last Edit: February 11, 2011, 10:07:24 pm by MoTheHobo »

morbid

  • Trial Moderator
  • Junior
  • ***
  • Posts: 61
  • Reputation +0/-0
  • I own you
  • Location: I'm probably standing right behind you.
    • View Profile
Re: Mirc functions...
« Reply #3 on: February 16, 2011, 02:42:14 pm »
(To script, press alt+r and click the remote tab. All code goes in there)
In mIRC, functions are called aliases.

Their setup is simple, it goes like this:

CODE
alias <aliasname> {
parameters
}
------------------------

Here is an example of an alias that displays Hello mIRC in the window you type it in.
Code: [Select]
alias helloworld {
echo -a Hello mIRC!
}
To activate that script, simply type /helloworld in any window
------------------------

So now I will show you how to create a more flexible function.
Using $1, $2, $3 and so on, you can enter your own data.

Code: [Select]
CODE
alias adder {
return $calc($1 + $2)
}
What this does is just uses the premade mIRC function, $calc, to add the first and second number typed($1 and $2)
You would use this code by typing //echo $adder(10,30)
This would echo the number 40. 10 is $1 and 30 is $2.

This should give you the basic idea on aliases.

« Last Edit: February 16, 2011, 05:20:32 pm by morbid »