fluffos/docs/efun/interactive/command.md

28 lines
733 B
Markdown
Raw Permalink Normal View History

2018-12-30 16:43:04 -08:00
---
title: interactive / command
---
2023-11-25 09:50:24 -08:00
# command
2018-12-30 16:43:04 -08:00
### NAME
2018-12-30 16:59:01 -08:00
command() - execute a command as if given by the object
2018-12-30 16:43:04 -08:00
### SYNOPSIS
2018-12-30 16:59:01 -08:00
int command( string str, object ob );
2018-12-30 16:43:04 -08:00
### DESCRIPTION
2018-12-30 16:59:01 -08:00
2018-12-30 16:43:04 -08:00
Execute 'str' for object 'ob', or this_object() if 'ob' is omitted.
Note that the usability of the second argument is determined by the
local administrator and will usually not be available, in which case an
error will result. In case of failure, 0 is returned, otherwise a
numeric value is returned, which is the LPC "evaluation cost" of the
command. Bigger numbers mean higher cost, but the whole scale is sub
jective and unreliable.
### SEE ALSO
2018-12-30 16:59:01 -08:00
add_action(3), enable_commands(3)