LPC is an object building language created by the author of the original LPMud
server, standing for Lars Pensjö C. Structurally, it is much like the more popular programming language C
. Designed with LPMud object building specifically in mind, it puts the power of game building in the hand of the general user
LPMuds allow you to change old objects and add new ones while the game is running.
List of LPC keywords -
for, if, while, switch, case, foreach, int, float, string, void, class, mapping, object, mixed, varargs, nomask, static, private, public, inherit.
Pre-compiler directives are -
#define, #undefine, #include, #ifdef, #ifndef, #if, #elseif, #else, #endif, #pragma.
Finally, a Hello World program in LPC, showing how similar it is to C-
set_long("This is an object. You can push it.\n");
write("The object says: Hello world!\n");
This may vary from MUD
depending on the Mudlib
in use, but this is pretty generic
for all LPMUD