Author Topic: Anyone know how to add arguments to scripted admin commands?  (Read 10090 times)

(Farmer)Azrael

  • Posts: 17
  • Turrets: +0/-6
I would like to create a command, in admin.dat, called !punish that does a host of nasty things to a given player. How might I do this?

Would the [command] block look something like this?
Code: [Select]
[command]
command = punish <argument>
exec    = !slap <argument> 999999; !mute <argument>; !denybuild <argument>; !warn <argument>
desc    = Severely punishes someone.
levels  = 3 4 5 6 7

Also, how would I make it so there would be a message to all players stating the names of the punisher and the punished?
« Last Edit: May 19, 2008, 02:57:34 am by (Farmer)Azrael »
:dretch: What'd you expect from a creature the size of a foot?

Death On Ice

  • Posts: 1287
  • Turrets: +126/-141
Re: Anyone know how to add arguments to scripted admin commands?
« Reply #1 on: May 19, 2008, 05:07:08 am »
You can't do this with custom commands, they have to be patched into the QVM. You have Leopard, as you've said in a host of threads, so you're pretty much out of it unless you hire some kid to make this abusive command for you.

Lakitu7

  • Tremulous Developers
  • *
  • Posts: 1002
  • Turrets: +120/-73
Re: Anyone know how to add arguments to scripted admin commands?
« Reply #2 on: May 20, 2008, 01:35:26 am »
I know *I* am very disappointed that this guy was not able to do this. The world is surely a worse place as a result. If only he could make godawful abusive commands more easily, Tremulous would be much much better.

Le Compilateur

  • Posts: 315
  • Turrets: +14/-19
Re: Anyone know how to add arguments to scripted admin commands?
« Reply #3 on: May 25, 2008, 10:48:44 pm »
I know *I* am very disappointed that this guy was not able to do this. The world is surely a worse place as a result. If only he could make godawful abusive commands more easily, Tremulous would be much much better.
:D but seriously, maybe that wasnt the only command he was going to make? maybe a !reward command that admins can use to give good players evos/credits? (Azrael person, take note of this idea)

you know, on second thought, good players dont have to be !reward-ed because they can get evos/credits for themselves...
I'm a developer! If you'd like to contribute to the Equilibrium QVM project or download the latest version, please visit this thread.

QVMs now compile under Leopard; get the patch here. Requires SVN r1053 or later.

David

  • Spam Killer
  • *
  • Posts: 3543
  • Turrets: +249/-273
Re: Anyone know how to add arguments to scripted admin commands?
« Reply #4 on: May 26, 2008, 06:45:41 pm »
Also !reward needs a QVM mod as theres no way to give creds.
Also, IMO thats just as abusable.
Any maps not in the MG repo?  Email me or come to irc.freenode.net/#mg.
--
My words are mine and mine alone.  I can't speak for anyone else, and there is no one who can speak for me.  If I ever make a post that gives the opinions or positions of other users or groups, then they will be clearly labeled as such.
I'm disappointed that people's past actions have forced me to state what should be obvious.
I am not a dev.  Nothing I say counts for anything.

Le Compilateur

  • Posts: 315
  • Turrets: +14/-19
Re: Anyone know how to add arguments to scripted admin commands?
« Reply #5 on: May 26, 2008, 06:49:16 pm »
IMO, your opinion is absolutely correct. Not a good idea for a command at all. :)
« Last Edit: May 26, 2008, 10:09:47 pm by Le Compilateur »
I'm a developer! If you'd like to contribute to the Equilibrium QVM project or download the latest version, please visit this thread.

QVMs now compile under Leopard; get the patch here. Requires SVN r1053 or later.

Lakitu7

  • Tremulous Developers
  • *
  • Posts: 1002
  • Turrets: +120/-73
Re: Anyone know how to add arguments to scripted admin commands?
« Reply #6 on: May 26, 2008, 08:09:58 pm »
Admins don't need to be changing the balance of the game willy nilly. That's an equally bad idea for a command.

Le Compilateur

  • Posts: 315
  • Turrets: +14/-19
Re: Anyone know how to add arguments to scripted admin commands?
« Reply #7 on: May 26, 2008, 10:08:32 pm »
Err. Well, as you can see, I took it back:
IMO, your opinion is absolutely correct. Not a good idea for a command at all. :)
« Last Edit: May 26, 2008, 10:10:10 pm by Le Compilateur »
I'm a developer! If you'd like to contribute to the Equilibrium QVM project or download the latest version, please visit this thread.

QVMs now compile under Leopard; get the patch here. Requires SVN r1053 or later.

blood2.0

  • Guest
Re: Anyone know how to add arguments to scripted admin commands?
« Reply #8 on: June 01, 2008, 12:56:03 am »
!punish should have !slap 99 !denybuild !mute !pause !drug !outlaw !poke 99999 !warn and make it gravity for him turns to 9999999

Le Compilateur

  • Posts: 315
  • Turrets: +14/-19
Re: Anyone know how to add arguments to scripted admin commands?
« Reply #9 on: June 01, 2008, 01:54:43 am »
Can't tell if that was sarcasm or not, but if God forbid he did make this command, it would probably include those commands...
I'm a developer! If you'd like to contribute to the Equilibrium QVM project or download the latest version, please visit this thread.

QVMs now compile under Leopard; get the patch here. Requires SVN r1053 or later.

tuple

  • Posts: 833
  • Turrets: +97/-80
Re: Anyone know how to add arguments to scripted admin commands?
« Reply #10 on: June 02, 2008, 11:50:15 am »
!drug? !outlaw?

Seriously, what kind of stupid qvm's are going around these days?

Aside from the fact that I wouldn't play on a server where admins use these things cause I couldn't trust them to be fair.  I CERTAINLY wouldn't use a qvm by someone who actually dreamed it up and created it.  Think about it.  If a developer created malicious commands for a game, what other kinds of malicious activities is that qvm you got from them capable of?  You know, the one thats now running on YOUR server?

Why you people use this shit is a mystery to me.  It also seems like this would help trend server operators towards children who don't know any better on cable modems versus aging gamers with money/pipes/hardware who may be less willing to run less trusted code.  (And DON'T feel like a full code review)

blood2.0

  • Guest
Re: Anyone know how to add arguments to scripted admin commands?
« Reply #11 on: June 05, 2008, 01:06:20 am »
!drug? !outlaw?

Seriously, what kind of stupid qvm's are going around these days?

Aside from the fact that I wouldn't play on a server where admins use these things cause I couldn't trust them to be fair.  I CERTAINLY wouldn't use a qvm by someone who actually dreamed it up and created it.  Think about it.  If a developer created malicious commands for a game, what other kinds of malicious activities is that qvm you got from them capable of?  You know, the one thats now running on YOUR server?

Why you people use this shit is a mystery to me.  It also seems like this would help trend server operators towards children who don't know any better on cable modems versus aging gamers with money/pipes/hardware who may be less willing to run less trusted code.  (And DON'T feel like a full code review)
Nero's crazy qvm  ;D
!outlaw gets the players own buildings to shoot at him and drug infects the player with basi gas and that will slowly kill the player

FX-Arch

  • Posts: 111
  • Turrets: +2/-6
Re: Anyone know how to add arguments to scripted admin commands?
« Reply #12 on: June 05, 2008, 12:02:28 pm »
!drug? !outlaw?

Seriously, what kind of stupid qvm's are going around these days?

Aside from the fact that I wouldn't play on a server where admins use these things cause I couldn't trust them to be fair.  I CERTAINLY wouldn't use a qvm by someone who actually dreamed it up and created it.  Think about it.  If a developer created malicious commands for a game, what other kinds of malicious activities is that qvm you got from them capable of?  You know, the one thats now running on YOUR server?

Why you people use this shit is a mystery to me.  It also seems like this would help trend server operators towards children who don't know any better on cable modems versus aging gamers with money/pipes/hardware who may be less willing to run less trusted code.  (And DON'T feel like a full code review)
Nero's crazy qvm  ;D
!outlaw gets the players own buildings to shoot at him and drug infects the player with basi gas and that will slowly kill the player
Really blood2.0 your stupidity keeps amazing me. Do you really think .qvm's who has those commands are playable? It all falls under admin abuse in my opinion and it is on the same par as using external software to get easy kills.
« Last Edit: June 05, 2008, 12:34:29 pm by FX-Arch »

Amanieu

  • Posts: 647
  • Turrets: +135/-83
    • Amanieu
Re: Anyone know how to add arguments to scripted admin commands?
« Reply #13 on: June 07, 2008, 03:44:06 pm »
Back on topic:
Here is my patch that allows admin.dat commands to accept arguments, but it requires both a qvm and tremded mod.
http://www.mercenariesguild.net/patches/index.php?do=details&task_id=100&project=1

Here is a nice wiki page that explains how to use it (excuse the bad English, it was written by French people):
http://dnc.tremforges.net/trac/wiki/ServerScriptedAdminCommands
Quote
< kevlarman> zakk is getting his patches from shady frenchmen on irc
< kevlarman> this can't be a good sign :P

blood2.0

  • Guest
Re: Anyone know how to add arguments to scripted admin commands?
« Reply #14 on: June 07, 2008, 11:23:08 pm »
!drug? !outlaw?

Seriously, what kind of stupid qvm's are going around these days?

Aside from the fact that I wouldn't play on a server where admins use these things cause I couldn't trust them to be fair.  I CERTAINLY wouldn't use a qvm by someone who actually dreamed it up and created it.  Think about it.  If a developer created malicious commands for a game, what other kinds of malicious activities is that qvm you got from them capable of?  You know, the one thats now running on YOUR server?

Why you people use this shit is a mystery to me.  It also seems like this would help trend server operators towards children who don't know any better on cable modems versus aging gamers with money/pipes/hardware who may be less willing to run less trusted code.  (And DON'T feel like a full code review)
Nero's crazy qvm  ;D
!outlaw gets the players own buildings to shoot at him and drug infects the player with basi gas and that will slowly kill the player
Really blood2.0 your stupidity keeps amazing me. Do you really think .qvm's who has those commands are playable? It all falls under admin abuse in my opinion and it is on the same par as using external software to get easy kills.
i have an average of 7 people on my server at a time

Amanieu

  • Posts: 647
  • Turrets: +135/-83
    • Amanieu
Re: Anyone know how to add arguments to scripted admin commands?
« Reply #15 on: June 07, 2008, 11:32:40 pm »
i have an average of 7 people on my server at a time
Clones of yourself do not count!
Quote
< kevlarman> zakk is getting his patches from shady frenchmen on irc
< kevlarman> this can't be a good sign :P