Function Reference

Jump to: navigation, search

Lulz, super under construction..[ ]

When you're trying to do something tricky it helps to know what tools are available to you.

This page is intended to be a coding reference portal page to provide fast access to major object and module function lists / descriptions, efuns and simulated efuns.

Efuns & Simulated Efuns[ ]

These are functions that you should be able to call from any piece of code. Generally efuns are used to simplify the use of data types like strings, arrays, maps, etc and they can be really quite powerful.

Efuns are implemented directly in the driver and so should be pretty fast, while simulated efuns are part of the mudlib and are run as any other code.

Fast or not, as a general rule be particularly wary of nesting loops with calls to functions that operate on variable length data types like arrays, maps or whatever. It should be fine if you really know what you're doing, but if your code ends up shooting off to some exponential order of complexity and the MUD grinds to a halt.. well.. don't say you weren't warned.

Efuns (External Functions)[ ]

string[ ]

Case Manipulation Comparison To/From Array Encryption Search/Replace
Capitalize Strcmp Explode Crypt Replace string
Lower case Implode Strsrch
Upper case
Length stdio-alike Regular Expressions Bit Strings Duplication
Strlen Sprintf Reg assoc Clear bit Repeat string
Sscanf Regexp Set bit
Test bit

array[ ]

Creation Searching Culling To Map
allocate member_array filter_array map_array
  • map_array - modify an array of elements via application of a function
  • member_array - returns index of an occurrence of a given item in an array or string
  • sort_array - sort an array
  • unique_array - partitions an array of objects into groups

mapping[ ]

object[ ]

filesystem[ ]

float[ ]

buffer[ ]

  • allocate_buffer - Allocate a buffer of 'size' elements.
  • bufferp - determine whether or not a given variable is a buffer
  • crc32 - compute the cycle redundancy code for a buffer or string
  • free_buffer - Destroys the buffer
  • read_buffer - read from a file and return a buffer
  • write_buffer - write a buffer to a file

calls[ ]

compile[ ]

db[ ]

functions[ ]

  • bind - change the owner of a function pointer
  • evaluate - evaluate a function pointer
  • function_owner - return the owner of a given function.

general[ ]

interactive[ ]

internals[ ]

  • cache_stats - report various driver and mudlib statistics
  • debug_info - display debuf info
  • debugmalloc - dumps information on malloc'd memory to a file
  • dump_file_descriptors - dump the MudOS process file descriptor table
  • dump_prog - dump/disassemble an LPC object
  • dump_socket_status - display the status of each LPC socket
  • dumpallobj - report various statistics on all objects that have been loaded
  • get_config - query various driver config settings
  • malloc_status - report various statistics related to memory usage.
  • memory_info - obtain info on object/overall memory usage
  • mud_status - report various driver and mudlib statistics
  • opcprof - reports statistics on calling frequencies of various efuns
  • query_load_average - returns user commands/sec, lines compiled/sec
  • refs - return the number of references to a data structure
  • rusage - reports information gathered by the getrusage() system call
  • set_debug_level -sets the debug level used by the driver's debug() macro
  • set_malloc_mask-sets the mask controlling display of malloc debug info
  • swap - swap out a file explicitly
  • time_expression - return the amount of real time that an expression took
  • trace - sets trace flags and returns the old ones
  • traceprefix - sets the prefix determining which objects to trace

mixed[ ]

mudlib[ ]

numbers[ ]

parsing[ ]

sockets[ ]

system[ ]

Simul_Efuns[ ]

Simul_Efuns are "simulated external functions". Basically this means that they can be called from any code run on the mud driver, but they are written in LPC rather than in C. They are contained in included files in /secure/simul_efun.c Some of these are typical to the Lima Mudlib, some have been imported from the Nightmare IV mudlib, and some of them are custom only to Desolation MUD. When adding a simul_efun you must reboot the mud for functions to be recognized.

censor[ ]

format_rpg_damage[ ]

identify[ ]

misc[ ]

objcalls[ ]

overrides[ ]

path[ ]

security[ ]

string[ ]

tell[ ]

userfuncs[ ]