Efuns, the most vital part of any lpmud
Efuns are the basic of the lpc language, they are the functions that are
defined within the program that runs the mud. Efuns are called directly
from programs and does _always_ return a value, but you may not want to
use this value and you can then just discard it by just not using it.
Refer to the syntax chapter for more info on how to call efuns.
- These are the available efuns:
-
- add_action - add an action to an object
- add_verb - add a verb to an action
- all_inventory - return the contents of an object
- all_inventory - return the contents of an object
- allocate - create an array of n elements
- call_other - call a function in another object
- call_out - delayed execution of a function
- call_out_info - get info on all pending call outs
- capitalize - make the first letter of a string uppercase
- cat - print part of a file on the screen
- catch - catch errors
- cindent - indent and format an LPC program source file
- clear_bit - clear a bit in a string bitfield
- clone_object - clone an object
- command - execute a command in a living object
- crypt - encrypt a string
- ctime - convert time stamp to string
- debug_info - Print some internal information
- deep_inventory - recursive inventory of an object
- destruct - destruct an object
- disable_commands - set an object `non-living'
- ed - edit a file
- enable_commands - set an to be object `living'
- environment - find the environment of an object
- exec - connect a socket to a new object
- explode - explode a string into subparts
- export_euid - Export this objects euid to another objects uid
- extract - extract a subpart of a string
- file_name - find the filename of an object
- file_size - return the size of a file
- filter_array - filter an array through a seive
- filter_mapping - filter a mapping over a function
- find_call_out - find the remaining call_out time of a function
- find_living - find a named living object
- find_object - find a named object
- find_player - find a named player
- first_inventory - get the first object in an inventory
- function_exists - find out if a named function is defined in an
- get_dir - return an array of filenames in a directory
- get_euid - Get the euid from an object
- get_uid - Get the uid from an object.
- implode - concatenate an array of strings
- inherit_list - return a list of all inherited objects of an object
- input_to - redirect keyboard input to a function
- interactive - determine if an object is interactive or not
- intp - determine if a variable is of type int
- living - determine if an object is living
- log_file - log a message at the end of a file
- lower_case - decapitalize a string
- m_delete - delete an index from a mapping
- m_indices - return the indices from a mapping
- m_sizeof - return the size of a mapping
- m_values - return the values from a mapping
- map_array - map an array over a function
- map_mapping - map a mapping over a function
- mappingp - check if a value is a mapping
- member_array - find the position of an element in an array
- mkdir - make a directory
- mkmapping - make a mapping of two arrays
- move_object - move an object somewhere
- next_inventory - get the next object in an inventory
- notify_fail - give a message to be printed if all commands failed
- objectp - true if the value of a variable is an object
- parse_command - try to match a string with a given pattern
- pointerp - determine if the value of a variable is an array
- present - find a present object through its id() function
- previous_object - give object that called current object
- process_string - give a string with replaced calldescriptions
- query_host_name - give the hostname that the gamedriver is running on
- query_idle - give time since last command from a player
- query_ip_name - give the hostname from which a player is connected
- query_ip_number - give the ip number for a player
- query_load_average - give a load average status message
- query_snoop - check what object is snooping a given object
- query_verb - give the currently active verb
- random - give a random value
- read_bytes - read text from a given position in a file
- read_file - read lines from a file, there is a maximum limit
- regexp - match a regular expression
- remove_call_out - remove a named, pending call_out for current object
- restore_object - load global variables in current object from file
- rm - remove a file
- rmdir - remove an empty directory
- save_object - save global variables in current object to a file
- say - proclaim a message to a room.
- set_bit - set a specific bit in a bitfield
- set_euid - Set the euid of this object.
- set_heart_beat - turn the heart beat calling on/off in current object
- set_light - make an object shine like a torch
- set_living_name - set the searchable name for a living object
- shadow - let the current object shadow another object or find a shadow
- shout - exclaim a message to all players
- shutdown - shut down the gamedriver
- sizeof - give the size of an array
- slice_array - cut out a piece from an array
- snoop - let one player snoop another
- sort_array - sort an array through a specific sort function
- sscanf - Parse a string with a given format
- stringp - true if a given variables value is currently a string
- strlen - give the length of a string
- tail - print the last lines of a file
- tell_object - send message to a specific living object
- tell_room - give a message to all objects in a room
- test_bit - test a given bit in a bitfield
- this_object - give the object pointer to the executing object
- this_player - give the current player
- throw - cause an execution to terminate with an error
- time - give the current time
- trace - let a player get trace information
- traceprefix - set the prefix for objects printed during a trace
- unique_array - Sort an array into arrays of unique groups
- users - give an array of the current players
- version - give the version of the gamedriver
- wizlist - print some statistics on wizards
- write - write data (normally text) to the current player
- write_bytes - write chars in a given position in a file
- write_file - append text to a file