Built-in Commands
Built-In Commands
Commander comes with a few commands and "psudo-commands". Here is a list of them:
Commander Plugin Commands
The Commander Scripting Engine has a few commands that can be called via the "commander" console command. If you attempt to invoke these from in-game, you will be told you cannot and nothing will happen.
Debugging
To enable Commander's script debugging, you use "commander debug" from the console. This will turn on extensive logging to the console so you can make sure your scripts are being correctly executed. Calling this command again will disable this output.
Mod Commands (sudo)
Any command, in a script or in a replacement, may be prefaced with the word "sudo". This will make commander execute the command as if the console were executing it. Be careful when using this functionality, as Commander does not check permissions when doing this. Using sudo in front of a normal command called from the game or the console will not trigger this behavior.
(The term "sudo" comes from the same command from unix systems. The word stands for "super user do".)
Reload
When running Commander as a plugin (as opposed to using it as a library via another plugin), you may use "commander reload" from the console. This will re-read all replacement and script files. If Commander is not running as a plugin, this will do nothing; you must reload via the other plugin.
Other Commands
Command optionally provides some commands which can be useful to scripting. These commands are on by default and can be turned off via the config file.
Echo
Commander supplies the command "echo", which will echo back to the player (and the player alone) the argument to the command.
A script can decided to turn off normal messages to the player during script execution through the use of the echo directive. There is also an option in the config file which will turn this off by default. The echo command by-passes this suppression, so one can run complex commands without putting a lot of text to the screen, and then, at the end, echo one line back saying that all completed successfully.
Echo suppression does not suppress broadcasts to the server, such as those messages broadcast from the default /time and /gamemode commands.
Comments