NAME
	command - execute a command in a living object

SYNOPSIS
	int command(string command, object obj)

DESCRIPTION
	With this function an object can command itself to perform
	an action that previously has been added with add_action.
	The given string `command' should be on the same format as
	if it had been given from the command line.
	The object 'obj' is optional; default is this_object().

	`command()' returns the number eval-cycles that was used to perform
	the command, or 0 if it proved impossble due to eval-cost.

	A force function can then simply be implemented in the player-
	object like this:

	nomask int /* We'd rather not have anyone shadowing this function */
	force_player(string command)
	{
	    if (ok_to_force())
	        if (command(command))
	   	    return 1;

	    return 0;
	}

	The function `ok_to_force()' can then determine if it is permitted
	for the person that tries to execute the command to force the
	player or not.

Help topics available:
_destruct _isclone _lock _next_clone _query_action
add_action all_inventory call_other call_out call_out_info
clone_object command creator deep_inventory destruct
disable_commands enable_commands environment exec file_name
find_call_out find_living find_object first_inventory function_exists
inherit inherit_list input_to interactive living
move_object next_inventory present previous_object query_verb
remove_call_out restore_object save_object set_heart_beat set_light
set_living_name shadow tell_object tell_room this_object
this_player transfer

[START|BACK ]




[ NannyMuds main page | FAQ | Contact us ]

You are guest number 125 since November 2019.
This file was last modified: June 2000.