Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - [NoN]Toiletduck

Pages: [1]
1
mIRC/pawn Scripting / 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_________________________________


2
mIRC/pawn Scripting / Converting commands
« on: December 29, 2008, 07:33:32 pm »
If you have got hold of any scripts and you want to ask the experts on how to convert them to be compatible with your preferred script base, put it down here.

I'll start:
 
Does anyone know how to convert these scripts from WSV to GUS?

Code: [Select]
    }
    elseif (!spawnall == $3) && ($2 < 100) {
      if ($vcmp.cmdcheck(!pass,%id) == fail) !halt
      var %x = $vcmp.location($2).x
      var %y = $vcmp.location($2).y
      var %z = $calc($vcmp.location($2).z - 1.12)
      var %a = 1,%b = 1
      if (!$4) {
        while (%a <= %vcmp.vehicles) {
          !inc %b 2.6
          vcmp.setvehicleloc %a $calc(%x + %b) %y %z
          !inc %a
        }
      }
      elseif ($4) {
        while (%a <= %vcmp.vehicles) {
          if ($4 isin $hget(vcmp.config.Cars,%a)) {
            !inc %b 2.6
            vcmp.setvehicleloc %a $calc(%x + %b) %y %z
          }
          !inc %a
        }
      }


I tried but it is no where near complete. Please can someone help me please?

3
Support / Error! please help
« on: December 26, 2008, 08:57:32 pm »
I am speaking on the behalf of another person. Can someone please tell me how to solve this?


4
mIRC/pawn Scripting / Announce for GUS 9.0
« on: December 23, 2008, 09:23:28 pm »
I have tried to change the !say and !count scripts for GUS and I have been unsuccessful.  Correct me if I am wrong: vcmp.announce %id $3- Will only show to
the player that typed it.
So my dilemma is that when I do vcmp.announce %id $2 $3 it is all bugged.
My script looks like this:

Code: [Select]
}
  elseif (!count* iswm $2) || (!pmcount* iswm $2) {
    if ($vcmp.cmdcheck(!count,%id) == fail) !halt
    else {
      .timer 1 1 vcmp.announce $2 %id Get Ready!
      .timer 1 2 vcmp.announce $2 %id 3
      .timer 1 3 vcmp.announce $2 %id 2
      .timer 1 4 vcmp.announce $2 %id 1
      .timer 1 5 vcmp.announce $2 %id Go!
    }

Code: [Select]
}
  elseif ($2 == !say) || ($2 == !pmsay) {
    if ($vcmp.cmdcheck(!say,%id) == fail) !halt
    elseif (!$3) vcmp.msg %id Error - Missing Information, $2 <text>
    else vcmp.announce %id $2 $3-
  }



Well with the scripts like that, this happens:


5
mIRC/pawn Scripting / Please help
« on: December 09, 2008, 01:48:12 pm »
Hi guys I'm trying some scripts on GUS.
I want to have an ingame command that allows you to apply to be set to the next level or whatever.
It is similar to bug report except with a different cmd name.
It isn't really working at all so can someone please tell me what is wrong with the script?



Pages: [1]