Skip to main content

command

Discworld efun help

command

int command(string str)

Execute str as a command given directly by the player. Any effects of the command will apply to the current object. There was a second argument, which is not supported any longer.

Return value is 1 or 0, for success or failure. Return value is 0 for failure. Otherwise, a numeric value is returned, which tells the evaluation cost. Bigger number means higher cost. The evaluation cost is approximately the number of of machine code instructions executed.

See also

enable_commands.