Pages: [1]
  Print  
Author Topic: Custom commands on OA  (Read 8403 times)
MilanFIN
Nub


Cakes 1
Posts: 41


WWW
« on: December 27, 2011, 08:52:36 AM »

Hi
I'd like to add few commands that would be like following:
-!info or something, it will return a text line to only the player who typed it.
-!something else would print a text line to all players.

There is a wiki page for this: http://code.google.com/p/oax/wiki/Admin_Cust_Cmds but it has nothing in it.

How could I make custom commands?
Logged

http://arenafinland.tk a finnish OpenArena server and clan.
grey matter
Member


Cakes 8
Posts: 381

>9k


« Reply #1 on: February 10, 2012, 08:42:16 AM »

Code:
[command]
command = something
desc = Print a text line to all players
levels = 4 5
exec = say "You all ^6suck!"

From what I see there's no possibility to add (custom) parameters (and as a result no way to just print to the player who typed the command either). I think 'GrosBedo' already suggested this elsewhere in this forum.
Logged

This space is for rent.
GrosBedo
Member


Cakes 20
Posts: 710


« Reply #2 on: February 12, 2012, 02:33:43 PM »

What I suggested in another thread to add variables substitutions for callvote:

http://openarena.ws/board/index.php?topic=4442.0

Which indeed would also probably implement variable substitution for the whole engine.

Anyway, it seems that you are only wanting to return some infos without a variable (your command would only be something like !info, not !info $name for example). The main problem here is: what do you really want to return with these commands? If it's a fixed constant string, then you can do probably do it with the OA admin system, but if it must be dynamical, I don't know at all if the OA admin system already supports it, and frankly I don't think it supports (yet?) complex scripting and functions that you would require to return dynamic strings.

If this is really what you want to do, your best bet is to use an external admin companion software, such as Big Brother Bot, which is easily extendable with plugins (and probably that you won't even need to code anything, various plugins already offers ways to add your own custom commands and dynamic strings by describing them in a simple xml file, such as the Chat pluggin).
Logged
Pages: [1]
  Print  
 
Jump to: