Pages: [1]
Author Topic: Custom commands on OA  (Read 7678 times)

Cakes 1
Posts: 41

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

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: but it has nothing in it.

How could I make custom commands?
Logged a finnish OpenArena server and clan.
grey matter

Cakes 8
Posts: 381


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

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.

This space is for rent.

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:

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).
Pages: [1]
Jump to: