Author Topic: How To !cmd to /c <cmd> ?  (Read 2650 times)

0 Members and 1 Guest are viewing this topic.

Offline Dudu

  • Street Thug
  • *
  • Posts: 30
    • View Profile
How To !cmd to /c <cmd> ?
« on: February 07, 2009, 01:06:05 am »
Pls help me!
Gus 9.0
Announce!
I use the command now: !say
How to !cmd to /c cmd

code:
Quote
  elseif ($2 == !say) {
    if ($vcmp.cmdcheck(!say,%id) == fail) !halt
    elseif (!$3) vcmp.msg %id Error - Missing Information, $2 <text>
    else {
      var %a = 0
      while (%a <=  50) {
        if ($vcmp.name(%a) != Unknown) {
          vcmp.announce  %a  $3-
        }
        !inc %a
      }
    }
  }

Offline Dudu

  • Street Thug
  • *
  • Posts: 30
    • View Profile
Re: How To !cmd to /c <cmd> ?
« Reply #1 on: February 07, 2009, 10:18:55 am »
Pls Help!

Offline Vayan

  • Street Thug
  • *
  • Posts: 1
    • View Profile
Re: How To !cmd to /c <cmd> ?
« Reply #2 on: February 07, 2009, 10:52:25 am »
The simpliest way for one command - is just put to it in checking of vcmp.command2 signals. Just add before the string
Code: [Select]
else vcmp.msg %id Error - Invalid System Command $+ , Type "!commands" for a list of commands!The code for checking say command:
Code: [Select]
  elseif ($2 == say) {
    if ($vcmp.cmdcheck(!say,%id) == fail) !halt
    elseif (!$3) vcmp.msg %id Error - Missing Information, $2 <text>
    else {
      var %a = 0
      while (%a <=  50) {
        if ($vcmp.name(%a) != Unknown) {
          vcmp.announce  %a  $3-
        }
        !inc %a
      }
    }
  }
Good luck!
« Last Edit: February 07, 2009, 10:55:47 am by Vayan »

Offline Dudu

  • Street Thug
  • *
  • Posts: 30
    • View Profile
Re: How To !cmd to /c <cmd> ?
« Reply #3 on: February 07, 2009, 09:12:27 pm »
Thank you very much!