Author Topic: mIRC vc-mp simple scripting tutorial  (Read 6209 times)

0 Members and 1 Guest are viewing this topic.

Offline [NoN]Toiletduck

  • Wiseguy
  • **
  • Posts: 65
    • View Profile
mIRC vc-mp simple scripting tutorial
« on: January 31, 2009, 05:27:18 pm »
Many people want to know how to write scripts for vc-mp so I wrote a very simple tutorial explaining how to write some commands.
Notice:  There are probably some mistakes, I do not take this seriously, I just thought it could be helpful.
This tutorial is based on GUS scripts written by VRocker and Tommis.




Open your mIRC script editor. (Alt+R)

Okay we will start with a simple command.  A pm will be received that says: "Scripting is easy!" when this command is typed.
Okay so if you study the list of parameters beneath this, you will see that $2 represents: command.

So we start with:

Code: [Select]
}
elseif ($2 == !scripting) {
vcmp.msg %id Scripting is easy!

The parameter %id represents who the message is sent to, in this case it is sent to the player that typed the command.

______________________END OF SECTION_________________________________



Next:


You will need to put a !halt on your cmd in order to stop certain levels from using it.
This next cmd has a !halt and I will give explanations.


Code: [Select]
  }
  elseif (!say == $2) {
    if ($vcmp.cmdcheck(!say,%id) == fail) !halt  --------------  this means that it runs through a cmd check and if you are not a certain level, the command will not execute.
    else {
      vcmp.say $3-
    }


______________________END OF SECTION_________________________________



Syntax/Parameters





VCMP Parameters:

$1 User ID
$2 Command
$3 Word that follows Command
$4 Word that follows the Word after the command
$5 Word that follows the word after the word after the command

also - Continues it, so if i have vcmp.say $3- it means that it will project everything writen after the command instead of only the word after the command.
Like here is an example:



!say would activate a response like this...


      vcmp.say $3-
    }




  Now if it were:



      vcmp.say $3
    }


Then it would only project the word after the cmd.


Like this:   !say toiletduck is a bastard.

With the first option, it would show all the text, with the second, it would say:  Toiletduck


______________________END OF SECTION_________________________________



Okay basic aliases.
By rule of thumb, if anything is used on a regular basis, an alias should be created.

So if you want to learn how to make a simple alias try this:


Code: [Select]
alias vcmp.hello { 
  vcmp.say Hello world!
}







Your command would look like this:

Code: [Select]
  }
  elseif ($2 == !hello) {
  vcmp.hello



That script will connect to the alias and it will activate vcmp.say Hello world!

Most aliases can be placed at the alias title:
;-----------------------------
;------------ADMIN------------
;-----------------------------

I cannot show you which line because it changes every time you add an alias.




______________________END OF SECTION_________________________________

« Last Edit: January 31, 2009, 05:39:16 pm by [NoN]Toiletduck »

Offline [NoN]Toiletduck

  • Wiseguy
  • **
  • Posts: 65
    • View Profile
Re: mIRC vc-mp simple scripting tutorial
« Reply #1 on: March 12, 2009, 09:24:42 pm »
*bump bump*
Many people have asked me some questions regarding scripting.

Offline thijn

  • LU testers
  • VC:MP Veteran
  • *
  • Posts: 667
  • Im proud to be pro.
    • View Profile
    • Vice Underdogs
Re: mIRC vc-mp simple scripting tutorial
« Reply #2 on: March 13, 2009, 12:24:13 am »
eeh spam??
Why did u posted that reply ???
Or what did u add?

Offline [NoN]Toiletduck

  • Wiseguy
  • **
  • Posts: 65
    • View Profile
Re: mIRC vc-mp simple scripting tutorial
« Reply #3 on: March 13, 2009, 07:51:31 am »
Read.

Windlord

  • Guest
Re: mIRC vc-mp simple scripting tutorial
« Reply #4 on: March 13, 2009, 04:52:10 pm »
No offense but you're not really explaining anything in your tutorial Toiletduck.

Offline thijn

  • LU testers
  • VC:MP Veteran
  • *
  • Posts: 667
  • Im proud to be pro.
    • View Profile
    • Vice Underdogs
Re: mIRC vc-mp simple scripting tutorial
« Reply #5 on: March 13, 2009, 06:50:48 pm »
Read.
Read what?? Ur spam messages? Or what?