• Welcome to Vice City Multiplayer.
 

mIRC vc-mp simple scripting tutorial

Started by [NoN]Toiletduck, January 31, 2009, 02:27:18 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

[NoN]Toiletduck

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:

}
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.


  }
  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:



alias vcmp.hello { 
  vcmp.say Hello world!
}








Your command would look like this:


  }
  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_________________________________


[NoN]Toiletduck

*bump bump*
Many people have asked me some questions regarding scripting.

thijn

eeh spam??
Why did u posted that reply ???
Or what did u add?



Windlord

No offense but you're not really explaining anything in your tutorial Toiletduck.




thijn