• Welcome to Vice City Multiplayer.
 

Converting commands

Started by [NoN]Toiletduck, December 29, 2008, 05:33:32 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

[NoN]Toiletduck

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?

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

[NoN]Toiletduck

I have another one. ;D
From WSV to GUS

  }
  elseif (!mute == $3) {
     if ($vcmp.cmdcheck(!mute,%id) == fail) !halt
     if ($5) { vcmp.say $WSV.addmute($4) Reason: $5- }
      else vcmp.msg %id Please type ! $+ $3 <nick> <reason>
    }


if ($5) { vcmp.say $WSV.addmute($4) Reason: $5- } I have problems with this line.


thijn

Quote from: [NoN]Toiletduck on December 29, 2008, 05:33:32 PM

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

Use this:

    elseif (!spawnall == $2) {
      if ($vcmp.cmdcheck(!pass,%id) == fail) !halt
      var %x = $vcmp.location(%id,x)
      var %y = $vcmp.location(%id,y)
      var %z = $calc($vcmp.location(%id,z) - 1.12)
      var %a = 1,%b = 1
      if (!$3) {
        while (%a <= %vcmp.vehicles) {
          !inc %b 2.6
          vcmp.setvehicleloc %a $calc(%x + %b) %y %z
          !inc %a
        }
      }
      elseif ($3) {
        while (%a <= %vcmp.vehicles) {
          if ($3 isin $vcmp.carname(%a)) {
            !inc %b 2.6
            vcmp.setvehicleloc %a $calc(%x + %b) %y %z
          }
          !inc %a
        }
      }
}



thijn

#3
Quote from: [NoN]Toiletduck on December 29, 2008, 05:41:17 PM
I have another one. ;D
From WSV to GUS

  }
  elseif (!mute == $3) {
     if ($vcmp.cmdcheck(!mute,%id) == fail) !halt
     if ($5) { vcmp.say $WSV.addmute($4) Reason: $5- }
      else vcmp.msg %id Please type ! $+ $3 <nick> <reason>
    }


Aliases:

alias vcmp.addmute {
hadd -m vcmp.Mutelist $vcmp.name($1) Yes
!return *** Added $vcmp.name($1) to the Mute list.
}
alias vcmp.unmute {
  if ($hget(vcmp.Mutelist,$vcmp.name($1))) {
    hdel vcmp.Mutelist $vcmp.name($1)
    !return *** Deleted $vcmp.name($1) from the Mute list.
  }
  else !return *** $vcmp.name($1) is not on the Mute list.
}
alias vcmp.mutekick {
  if ($hget(vcmp.Mutelist,$vcmp.name($1))) {
    timerkick 1 1 /vcmp.kick $vcmp.getid($1)
    return *** Kicking $vcmp.name($1) (Players on the Mute List cannot speak!)
  }
}

And command:

elseif (!mute == $2) {
if ($vcmp.cmdcheck(!mute,%id) == fail) !halt
if ($3) { vcmp.say $vcmp.addmute($3) Reason: $4- }
else vcmp.msg %id Please type $2 <nick> <reason>
}
elseif (!unmute == $2) {
if ($vcmp.name($2) !isin %vcmp.mute) {
if ($vcmp.cmdcheck(!unmute,%id) == fail) !halt
if ($3) { vcmp.say $vcmp.unmute($3) }
else vcmp.msg %id Please type $2 <nick>
}
else vcmp.msg %id You have been muted! Bye!
}

;D

EDIT: Forgot to tell: Put on *:SIGNAL:vcmp.text:{ the follow code:

vcmp.say $vcmp.mutekick(%id)


[NoN]Toiletduck

Thank you very much for your trouble thijn but I put the !spawnall cmd in and it did nothing.  It put all the code underneath it, to the side and the scripts stopped working.  And I don't understand the second instructions.

thijn

try using /set %vcmp.vehicles <here your amount of vehicles in config>