cmd

Settable:
no
Arguments:
(1) string
(2) character, string
(3) string, string
(4) character, string, string
Return Value:
none

This function is used to make a character execute a command. If a character is specified among the arguments (as in forms 2 and 4) then that is the character that executes the command; otherwise (forms 1 and 3) the character bearing the MUDL script (%c) executes the command. Forms 1 and 3 cannot be used if the MUDL script is attached to an object.

The first string is the command to execute. The second string, which is optional, contains the arguments. Thus, if you want the mob bearing the MUDL script to drop everything it's holding, you might say

cmd('drop','all')

Note that cmd() works just like the player typing in the command, so if for example %c has been turned to stone and you tell him

cmd('flee')
he isn't going anywhere.