^#^
save^#^
SUBTOPIC-player^#^
-=[ Help ]=-
command: save
Usage: save
Description: Generally, the mud saves your character every
15 minutes, each time you raise stats, get
killed, or quit. However, typing save will
save your character as well.
Related topics: quit, Quit.
^#^
say^#^
SUBTOPIC-player^#^
-=[ Help ]=-
command: say
Usage: say <message>
'<message>
Description: This echoes a message to everyone in the room
(including non-player-characters). The
default language is 'common'. But you can
speak in many languages. Each race has its
own racial language, and there are
opportunities to learn new ones as well. You
can choose a language to speak in using the
'speak' command'.
Related topics: speak, tell, whisper, shout.
^#^
score^#^
SUBTOPIC-player^#^
-=[ Help ]=-
command: score
Usage: score
Description: score gives your an estimation of how well you
are playing. This give you general
information on your character's current
status.
Related topics: none.
^#^
shout^#^
SUBTOPIC-player^#^
-=[ Help ]=-
command: shout
Usage: shout <message>
Description: Shout echos a message to everyone using the
game. Except creators who have their
'earmuff' toggle on. In which case they will
only hear shouts from creators with a higher
security level.
Related topics: speak, tell, whisper, say.
^#^
skills^#^
SUBTOPIC-player^#^
-=[ Help ]=-
command: skills
Usage: skills <class>
Description: As a player you can gather skills in various
fields. There are 4 basic classes: fighter,
thief, mage, cleric. Each class has their
advantages and disadvantages. skills gives
you your current skill levels in a class. All
newbie characters start in the class of
fighter.
Note also that skills for different classes can be
accessed using the following method:
mage@fire ball
Related topics: classes.
^#^
speak^#^
SUBTOPIC-player^#^
-=[ Help ]=-
command: speak
Usage: speak
speak <language>
Description: Speak allows you to change the language you
use, using the 'say' or 'shout' command. You
can only speak language that you know, or have
learnt. If you do not specify a language, you
default to the 'common' language.
Related topics: speak, tell, whisper, shout.
^#^
square^#^
SUBTOPIC-player^#^
-=[ Help ]=-
command: square
Usage: square
church
Description: As a newbie it is easy to get lost. All 1st
level characters get a free lift back to the
square.
Related topics: none.
^#^
ss^#^
SUBTOPIC-player^#^
-=[ Help ]=-
command: ss
Usage: ss
Description: ss is your short score.
Related topics: none.
^#^
suicide^#^
SUBTOPIC-player^#^
-=[ Help ]=-
command: suicide
Usage: suicide
Description: Sometimes, a character gets disgruntle, bored,
and depressed. They wish to irrevocably
destroy their character. However, they don't
want a new person to use their old character
name. A suicide command will banish a
character. Note that a password is needed for
this command.
Related topics: none.
^#^
shutdown^#^
SUBTOPIC-creator^#^
-=[ Help ]=-
command: shutdown
Usage: shutdown <reason>
Description: Shutdown closes the game down. You may need to do this
after the game has been running for a while. If
security level SEC7 (70) or higher calls the shutdown it
closes immediately. Otherwise, shutdown will occur in 5
minutes.
Related topics: none.
^#^
skstat^#^
SUBTOPIC-creator^#^
-=[ Help ]=-
command: skstat
Usage: skstat <player|monster>
skstat <player|monster> <class>
Description: This command allows you to find the classes of a player
or non-player character. If you specify a class, it
will show you their current statistics in that class.
Related topics: stat.
^#^
snoop^#^
SUBTOPIC-creator^#^
-=[ Help ]=-
command: snoop
Usage: snoop <who>
Description: Snoop allows you to see what other people are typing
directly into the game. It is bad manners to snoop. It
should be used for debug purposes only. A minimum
security level SEC5 (50) is required.
Related topics: snoop.
^#^
start^#^
SUBTOPIC-creator^#^
-=[ Help ]=-
command: start
Usage: start
Description: This command stores the current room as your default
enter room. You may wish to type 'start' in your
workroom. So that you will start the game in your
workroom rather then adv_inner.c
Related topics: Quit.
^#^
stat^#^
SUBTOPIC-creator^#^
-=[ Help ]=-
command: stat
Usage: stat <player|monster|item>
Description: Stat gives you a lot of information about an item,
player or monster. It automatically checks if the item
is within the mudlibs guidelines and notifies the
creator if an object is illegal.
Admin have to change guideline arrays in stat.h to suit
their mudlib guidelines.
Related topics: skstat.
^#^
slay living^#^
SUBTOPIC-cleric^#^
________________________________________________________________
()_______________________________________________________________)
| Prayer: Slay Living Sphere: Necromancy |
| Level: 30 Cost: 35 |
| Component: none. Usage: slay living who |
| Description: |
| |
| This prayer will cause the prayer's target to die by |
| ripping the victims soul from their very body, if the |
| victim does not resist the prayer. |
| |
| |
|_______________________________________________________________|
()_______________________________________________________________)
^#^
slow poison^#^
SUBTOPIC-cleric^#^
________________________________________________________________
()_______________________________________________________________)
| Prayer: Slow Poison Sphere: Necromancy |
| Level: 3 Cost: 3 |
| Component: none. Usage: slow poison who |
| Description: |
| |
| This prayer will allow the cleric to slow the effects of |
| poison on the prayer's target. |
| |
| |
| |
|_______________________________________________________________|
()_______________________________________________________________)
^#^
spiritual hammer^#^
SUBTOPIC-cleric^#^
________________________________________________________________
()_______________________________________________________________)
| Prayer: Spiritual Hammer Sphere: Combat |
| Level: 4 Cost: 4 |
| Component: None. Usage: spiritual hammer |
| Description: |
| |
| The prayer will forge a spiritual war hammer that the |
| cleric can use. |
| |
| |
| |
|_______________________________________________________________|
()_______________________________________________________________)
^#^
starburst^#^
SUBTOPIC-cleric^#^
________________________________________________________________
()_______________________________________________________________)
| Prayer: Starburst Sphere: Stellar |
| Level: 8 Cost: 8 |
| Component: None. Usage: starburst who |
| Description: |
| |
| This prayer will cause a small star to burst on the prayer's |
| target. It is known that this prayer may double its effects |
| during the night. |
| |
| |
|_______________________________________________________________|
()_______________________________________________________________)
^#^
stellar sphere^#^
SUBTOPIC-cleric^#^
_________________________________________________________
()________________________________________________________)
| Prayers from the Stellar Sphere |
| |
| Starburst Gate |
| Lt (light) |
| Dimensional Fold |
| Dimensional Fold Other |
| Dimensional Fold Party |
| Time Shift |
| Time Shift Other |
| Time Shift Party |
|_______________________________________________________|
()________________________________________________________)
^#^
sts^#^
SUBTOPIC-cleric^#^
________________________________________________________________
()_______________________________________________________________)
| Prayer: Sticks to Snakes Sphere: Nature |
| Level: 11 Cost: 11 |
| Component: branch or stick Usage: sts |
| Description: |
| |
| This prayer will allow the cleric to animate a stick to |
| act like a snake. Some of the snakes are quite poisonous. |
| The snake will attack anyone the cleric is attacking. |
| |
| |
|_______________________________________________________________|
()_______________________________________________________________)
^#^
sbf^#^
SUBTOPIC-mage^#^
______________________________ ______________________________
__/ \/ \__
| /| |: |:||
||:| Spell: SBF(Sin's Black Flame)|: Description: |:||
||:| School: Necromancy |: |:||
||:| Cost: 1 |: The spell causes poisonous |:||
||:| Level: 1 |: black flames to burn the |:||
||:| Usage: sbf who |: designated victim. |:||
||:| |: |:||
||:| Related Spells: |: |:||
||:| None. |: |:||
||:| |: |:||
||:|_____________________________ |: _____________________________|:||
||/______________________________\|:/______________________________\||
|_______________________________ _______________________________|
'----`
^#^
scare^#^
SUBTOPIC-mage^#^
______________________________ ______________________________
__/ \/ \__
| /| |: |:||
||:| Spell: Scare |: Description: |:||
||:| School: Charm |: |:||
||:| Cost: 14 |: This spell scares a |:||
||:| Level: 14 |: creature. The creature is so|:||
||:| Usage: scare who |: scared it runs away. |:||
||:| |: |:||
||:| Related Spells: |: |:||
||:| None. |: |:||
||:| |: |:||
||:|_____________________________ |: _____________________________|:||
||/______________________________\|:/______________________________\||
|_______________________________ _______________________________|
'----`
^#^
scry^#^
SUBTOPIC-mage^#^
______________________________ ______________________________
__/ \/ \__
| /| |: |:||
||:| Spell: Scry |: Description: |:||
||:| School: Divination |: |:||
||:| Cost: 12 |: This spell enables the |:||
||:| Level: 12 |: caster to scry on a player |:||
||:| Usage: scry who |: or monster. The spell needs |:||
||:| Component: Gem |: a gem to use as a scrying |:||
||:| Related Spells: |: object. |:||
||:| None. |: |:||
||:| |: |:||
||:|_____________________________ |: _____________________________|:||
||/______________________________\|:/______________________________\||
|_______________________________ _______________________________|
'----`
^#^
shadow door^#^
SUBTOPIC-mage^#^
______________________________ ______________________________
__/ \/ \__
| /| |: |:||
||:| Spell: Shadow Door |: Description: |:||
||:| School: Illusion |: |:||
||:| Cost: 11 |: This spell causes a door |:||
||:| Level: 11 |: to be made out of shadow |:||
||:| Usage: shadow door |: stuff. When you step |:||
||:| |: through the door you step |:||
||:| Related Spells: None. |: out of another door which |:||
||:| |: is located in an area |:||
||:| |: nearby. |:||
||:|_____________________________ |: _____________________________|:||
||/______________________________\|:/______________________________\||
|_______________________________ _______________________________|
'----`
^#^
shadow monster^#^
SUBTOPIC-mage^#^
______________________________ ______________________________
__/ \/ \__
| /| |: |:||
||:| Spell: Shadow Monster |: Description: |:||
||:| School: Illusion |: |:||
||:| Cost: 15 |: This spell makes a monster |:||
||:| Level: 15 |: out of shadow stuff. The |:||
||:| Usage: shadow monster |: monster will attack |:||
||:| |: whatever the caster is |:||
||:| Related Spells: None. |: attacking, or waits until |:||
||:| |: the caster attacks. |:||
||:| |: |:||
||:|_____________________________ |: _____________________________|:||
||/______________________________\|:/______________________________\||
|_______________________________ _______________________________|
'----`
^#^
shield^#^
SUBTOPIC-mage^#^
______________________________ ______________________________
__/ \/ \__
| /| |: |:||
||:| Spell: Shield |: Description: |:||
||:| School: Abjuration |: |:||
||:| Cost: 2 |: This spell causes an |:||
||:| Level: 3 |: invisible shield to appear |:||
||:| Usage: shield |: in front of the caster. |:||
||:| |: This gives the caster added |:||
||:| Related Spells: |: protection against attacks. |:||
||:| None. |: |:||
||:| |: |:||
||:|_____________________________ |: _____________________________|:||
||/______________________________\|:/______________________________\||
|_______________________________ _______________________________|
'----`
^#^
shooting stars^#^
SUBTOPIC-mage^#^
______________________________ ______________________________
__/ \/ \__
| /| |: |:||
||:| Spell: Shooting Stars |: Description: |:||
||:| School: Conjuration |: |:||
||:| Cost: 13 |: This spell conjures small |:||
||:| Level: 13 |: shooting stars that burst |:||
||:| Usage: shooting stars who |: on the designated target. |:||
||:| Component: rock or stone |: |:||
||:| Related Spells: |: |:||
||:| None. |: |:||
||:| |: |:||
||:|_____________________________ |: _____________________________|:||
||/______________________________\|:/______________________________\||
|_______________________________ _______________________________|
'----`
^#^
spell immunity^#^
SUBTOPIC-mage^#^
______________________________ ______________________________
__/ \/ \__
| /| |: |:||
||:| Spell: Spell Immunity |: Description: |:||
||:| School: Abjuration |: |:||
||:| Cost: 14 |: This spell gives the caster |:||
||:| Level: 14 |: an immunity to a specific |:||
||:| Usage: spell immunity <spel-|: spell. The spell must be |:||
||:| -lname> |: named accurately. |:||
||:| Related Spells: |: |:||
||:| None. |: |:||
||:| |: |:||
||:|_____________________________ |: _____________________________|:||
||/______________________________\|:/______________________________\||
|_______________________________ _______________________________|
'----`
^#^
stoneskin^#^
SUBTOPIC-mage^#^
______________________________ ______________________________
__/ \/ \__
| /| |: |:||
||:| Spell: Stoneskin |: Description: |:||
||:| School: Abjuration |: |:||
||:| Cost: 14 |: This spell gives the caster |:||
||:| Level: 14 |: a temporary immunity to all |:||
||:| Usage: stoneskin |: physical attacks. |:||
||:| |: |:||
||:| Related Spells: |: |:||
||:| None. |: |:||
||:| |: |:||
||:|_____________________________ |: _____________________________|:||
||/______________________________\|:/______________________________\||
|_______________________________ _______________________________|
'----`
^#^
suggest^#^
SUBTOPIC-mage^#^
______________________________ ______________________________
__/ \/ \__
| /| |: |:||
||:| Spell: Suggest |: Description: |:||
||:| School: Charm |: |:||
||:| Cost: 10 |: This spell can cause a |:||
||:| Level: 10 |: humanoid to do the caster's |:||
||:| Usage: suggest who command |: suggestion. A failed |:||
||:| |: suggestion may or may not |:||
||:| Related Spells: |: cause a fight. This depends |:||
||:| Demand. |: upon the persuasivenes of |:||
||:| |: the caster. |:||
||:|_____________________________ |: _____________________________|:||
||/______________________________\|:/______________________________\||
|_______________________________ _______________________________|
'----`
^#^
search^#^
SUBTOPIC-general^#^
-=[ Help ]=-
command: search
Usage: search room
search <item>
Description: If you stop and search. You may find what is
hidden.
Related topics: listen, smell.
^#^
smell^#^
SUBTOPIC-general^#^
-=[ Help ]=-
command: smell
Usage: smell
smell <item>
Description: If you stop and smell you may smell something.
Related topics: listen, search.
^#^
save_object^#^
SUBTOPIC-efun^#^
EFUN save_object()
SYNOPSIS
void save_object(string name)
DESCRIPTION
Save values of variables of this object in the file "name".
It is illegal to have '.' or space in the field name, or
prepend the name with "/". The function saves the values
of all GLOBAL int, string (whether a variable, array, or
mapping) to a text file. The variable will not be saved if
it has a type directive of 'static'.
3.1.2
Objects in /obj can save_object to any directory. Objects
in /players/ can only be saved into subdirectories of the
creator.
Mudos & Amylaar
The mudlib has been set up to allow creators to save
anywhere, except to restricted subdirectories for player
saves, and mail. A directory, "ob_saves/" has been made to
save non-creator specific saves, eg. bulletin boards.
EXAMPLE
string name; /* saved */
int level; /* saved */
static int tmp_level; /* NOT saved */
object guild_ob; /* NOT saved */
void save_guild_member() {
if(name) save_object("players/zilanthius/guild/saves/"+ name);
}
SEE ALSO
restore_object()
^#^
set_heart_beat^#^
SUBTOPIC-efun^#^
EFUN set_heart_beat()
SYNOPSIS
int set_heart_beat(status flag)
DESCRIPTION
This will tell the driver to enable or disable a heart beat
for this object. A driver heart beat call, calls the
function heart_beat() in the object every 2 seconds. It is
enabled if the flag is 1, and disabled if the flag is 0. If
the heart beat has a run time error, the heart beat will
stop.
EXAMPLE
/* heart beat concept in monster.c */
int hit_player(int dam) {
if(!primary_attack) set_heart_beat(1); /* start heart beat if
....etc attacked */
}
void init() {
if(interactive(this_player()) set_heart_beat(1); /* start heart
....etc if player enters room */
}
void heart_beat() {
if(...no players in room && ...fully healed) {
set_heart_beat(0); /* stop heart beat */
return;
}
....etc
}
SEE ALSO
call_out(). ^#^
set_light^#^
SUBTOPIC-efun^#^
EFUN set_light()
SYNOPSIS
int set_light(int n)
DESCRIPTION
An object is by default dark. It can be set to not dark by
calling set_light(1). The environment will the also get
this light. The returned value is the total number of
lights in this room. Note that the value of the argument is
added to the light of the current argument! So a
set_light(0) will return the current light status.
EXAMPLE
void test_dark() { return (set_light(0) > 1) ? 0 : 1; }
SEE ALSO
^#^
set_living^#^
SUBTOPIC-efun^#^
EFUN set_living_name()
SYNOPSIS
void set_living_name(string name);
DESCRIPTION
Set a living name on an object that is living. After this
has been done, the object can be found with "find_living()".
SEE ALSO
enable_commands(), find_living(), find_player().
^#^
shadow^#^
SUBTOPIC-efun^#^
EFUN shadow()
SYNOPSIS
object shadow(object ob, int flag);
DESCRIPTION
If `flag' is 1, then current object will shadow `ob'. If
`flag' is 0, then either 0 will be returned, or the object
that is already shadowing `ob'.
An object that defines the funtion "query_prevent_shadow()"
to return 1 can't be shadowed, and the "shadow()" function
will return 0 instead of `ob'.
If an object `a' shadows an object `b', then all
"call_other(func)" to `b' will be redirected to `a'. If
object `a' has not defined the function, then the call will
be forwarded to `b' (as if there were no shadow). There is
only one object that can call functions in `b' with
call_other(), and that is `a'. Not even object `b' can
"call_other()" itself. All normal (internal) function calls
inside `b' will however remain internal to `b'.
There are two ways to remove the shadow. Either destruct it,
or the object that was shadowed. In the latter case, the
shadow will also be destructed automatically.
The result is that it is possible to hide an object behind
another one, but everything can be totally transparent. The
shadow() efunction makes it possible to change the behavior
of an object without changing the code for the object in
question.
NOTE: The only legal shadows allowed, must be from objects
in the directory /obj/shadows. Only admin have access to
this directory. Anyone can make shadows, but the shadow
objects must be approved.
SEE ALSO
destruct()
^#^
sizeof^#^
SUBTOPIC-efun^#^
EFUN sizeof()
SYNOPSIS
int sizeof(mixed *arg);
DESCRIPTION
Return the number of elements in the array <arg>. If <arg>
is not an array it will fail.
Mudos/array
The argument <arg> can also be a mapping.
EXAMPLE
status simple_who() {
int i;
for(i = 0; i < sizeof(users()); i++) {
write(users()[i]->query-name() +"\n");
}
return 1;
}
SEE ALSO
allocate(), [], ({}).
^#^
sort_array^#^
SUBTOPIC-efun^#^
EFUN sort_array()
SYNOPSIS
mixed *sort_array(mixed *arr, string fun, object ob);
DESCRIPTION
Returns an array with the same elements as `arr', but quick-
sorted in descending order according to the rules in
`ob->fun()'. `ob->fun()' will be passed two arguments for
each call. It should return -1, 0, or 1, depending on the
relationship of the two arguments (lesser, equal to,
greater than).
EXAMPLE
int sort_by_level(int level1, int level2) {
return (level1 < level2) ? -1 : (level1 != level2);
}
status who_by_level() {
int i;
object *user;
user = sort_array(users(),"sort_by_level", this_object());
for(i = sizeof(user); i--) {
write(user[i]->query_level() +"\t"+
user[i]->query_name() +"\n");
}
return 1;
}
SEE ALSO
filter_array(), [], allocate(), ({}).^#^
sscanf^#^
SUBTOPIC-efun^#^
EFUN sscanf()
SYNOPSIS
int sscanf(string str, string fmt,mixed var1, mixed var2
...)
DESCRIPTION
Parse a string `str' using the format `fmt'. `fmt' can con-
tain strings separated by "%d" and "%s". Every "%d" and "%s"
corresponds to one of `var1', `var2'... "%d" will give a
number, and "%s" will give a string. The * may be used in a
format specifier (e.g. %*d and %*s) to allow integers or
strings (respectively) to be skipped over in the input
string (without being assigned to a variable). The LPC
sscanf() is similar to its C counterpart however it does
behave somewhat differently. It is not necessary (or possi-
ble) to pass the address of variables into sscanf (simply
pass the name of the variable). Another difference is that
in the LPC sscanf(), sscanf(str, "%s %s", str1, str2) will
parse the first word in str into str1 and the remainder of
str into str2.
The number of matched "%d" and "%s" is returned.
Notes: sscanf() will scream if str is not initialized as a
string. The format sometimes fails with the char '\%' with
some drivers (Mudos for example).
EXAMPLE
status wield(string str) {
status left;
if(!str) {
notify_fail("wield what?\n");
return 0;
}
if(sscanf(str,"%s in left hand",str)) left = 1;
sscanf(str,"%s in right hand",str);
....etc
}
SEE ALSO
extract(), explode().
^#^
stringp^#^
SUBTOPIC-efun^#^
EFUN stringp()
SYNOPSIS
int stringp(mixed arg);
DESCRIPTION
Return 1 if `arg' is a string.
SEE ALSO
pointerp(), objectp(), intp().
^#^
strlen^#^
SUBTOPIC-efun^#^
EFUN strlen()
SYNOPSIS
int strlen(string str);
DESCRIPTION
strlen() returns the number of characters in the string
`str'.
EXAMPLE
string last_letter(string str) {
if(!str || str == "") return "";
return str[(strlen(str)-1)..(strlen(str)-1)];
}
SEE ALSO
sizeof(), extract(), []^#^
send_imp^#^
SUBTOPIC-efun32^#^
SYNOPSIS
int send_imp(string host, int port, string message)
DESCRIPTION
Sends The message in an UDP packet to the given host and port
number. Causes a privilege violation.
Returns 1 on success, 0 on failure.
SEE ALSO
receive_imp(M)
^#^
set_auto_include_string^#^
SUBTOPIC-efun32^#^
SYNOPSIS
void set_auto_include_string(string arg)
DESCRIPTION
The arg will be automatically included into every compiled LPC
object. This is useful to enforce global definitions, e.g.
``#pragma combine_strings'' or ``#pragma strict_types''. The
calling object needs to be privileged by the master object.
Note that the auto-include-string is cleared when the master
object is reloaded.
SEE ALSO
privilege_violation(M), pragma(LPC), master(M)
^#^
set_bit^#^
SUBTOPIC-efun32^#^
SYNOPSIS
string set_bit(string str, int n)
DESCRIPTION
Return the new string where bit n is set in string str. Note
that the old string str is not modified.
Each character contains 6 bits. So you can store a value
between 0 and 63 in one character (2^6=64). Starting character
is the blank " " which has the value 0. The first charcter in
the string is the one with the lowest bits (0-5).
The new string will automatically be extended if needed.
EXAMPLES
string s;
s=set_bit("?",5);
Because "?" has a valueof 31 the variable s will now contain
the charcter "_" wich is equal to 63 (31+2^5=63).
string s;
s=set_bit("78",3);
s=set_bit(s,8);
s will now contain the string "?<".
SEE ALSO
clear_bit(E), test_bit(E)
^#^
set_extra_wizinfo^#^
SUBTOPIC-efun32^#^
SYNOPSIS
void set_extra_wizinfo(object ob, mixed extra)
DESCRIPTION
Sets extra info in the wizlist for the specified object /
wizard. The first arg can also be a file_name. Causes a
privilege violation.
SEE ALSO
set_extra_wizinfo_size(E), wizlist_info(E)
^#^
set_extra_wizinfo_size^#^
SUBTOPIC-efun32^#^
SYNOPSIS
void set_extra_wizinfo_size(int)
DESCRIPTION
Indicate that the wizlist should contain an array of this size
with extra info foreach wizard. Causes a privilege violation.
SEE ALSO
set_extra_wizinfo(E), wizlist_info(E)
^#^
set_is_wizard^#^
SUBTOPIC-efun32^#^
SYNOPSIS
int set_is_wizard(object ob, int n)
DESCRIPTION
Change object ob's wizardhood flag.
If n is 0, it is cleared, if n is, it is set, if n is -1 the
current status is reported. The return value is always the new
value of the flag. Using this function sets a flag in the
parser, that affects permissions for dumpallobj etc, which are
by default free for every user.
^#^
set_living_name^#^
SUBTOPIC-efun32^#^
SYNOPSIS
void set_living_name(string name)
DESCRIPTION
Set a living name on an object. The name will be entered into
the hash table for the living names, but find_living() will
only find it after the object has actually been marked as
``being alive'' by calling enable_commands(). When this is done,
the object can be found with find_living().
An object can only have one name that can be searched for with
find_living().
SEE ALSO
find_living(E), find_player(E), enable_commands(E)
^#^
set_modify_command^#^
SUBTOPIC-efun32^#^
SYNOPSIS
object set_modify_command(object)
object set_modify_command(string)
DESCRIPTION
All commands for the current object (that must obviously be
interactive) will be passed to ob->modify_command() before
actually being executed. The argument can be passed an object
or a file_name.
When set_modify_command() was called, the parser won't expand
the standard abbreviations n,e,s,w,nw,sw,ne,se for that user
anymore.
0 as argument will stop the command modification and reinstall
the standard abbreviations.
The return value is the object that was previously set with
set_modify_command(), if any.
This mechanism is intended to expand aliases on quicktypers
or the like.
SEE ALSO
command(E), modify_command(A)
^#^
set_prompt^#^
SUBTOPIC-efun32^#^
SYNOPSIS
string set_prompt(mixed, object ob)
DESCRIPTION
Set the prompt given by the first argument for the interactive
object instead of the default ``> ''. If the second argument
is omitted, this_player() is used as default. The first arg
can be a string, a closure, an int or an object.
^#^
set_this_object^#^
SUBTOPIC-efun32^#^
SYNOPSIS
void set_this_object(object object_to_pretend_to_be);
DESCRIPTION
This is a privileged function, only to be used in the master
object or in the simul_efun object.
It changes the result of this_object() in the using function,
and the result of previous_object() in functions called in
other objects by call_other(). Its effect will remain till
there is a return of an external function call, or another
call of set_this_object(). While executing code in the master
object's program or the primary simul_efun object's program,
set_this_object() is granted even if this_object() is altered
by set_this_object(). This does not apply to functions
inherited from other programs.
Use it with extreme care to avoid inconsistencies. After a
call of set_this_object(), some LPC-constructs might behave in
an odd manner, or even crash the system. In particular, using
global variables or calling local functions ( except by
call_other ) is illegal.
With the current implementation, global variables can be
accessed, but this is not guaranteed to work in subsequent
versions.
Allowed are call_other, map functions, access of local
variables (which might hold array pointers to a global array),
simple arithmetic and the assignment operators.
SEE ALSO
this_object(E), set_this_player(E)
^#^
set_this_player^#^
SUBTOPIC-efun32^#^
SYNOPSIS
void set_this_player(object ob)
DESCRIPTION
Change the current command giver to ob. Causes a privilege
violation.
SEE ALSO
set_this_object(E), this_player(E)
^#^
seteuid^#^
SUBTOPIC-efun32^#^
SYNOPSIS
int seteuid(string str)
DESCRIPTION
Set effective uid to str. The calling object must be
privileged to do so by the master object. In most
installations it can always be set to the current uid of the
object, to the uid of the creator of the object file, or to 0.
When this value is 0, the current object's uid can be changed
by export_uid(), and only then.
Objects with euid 0 cannot load or clone other objects.
SEE ALSO
export_uid(E), getuid(E), geteuid(E), native(C)
^#^
sin^#^
SUBTOPIC-efun32^#^
SYNOPSIS
float sin(float)
DESCRIPTION
Returns the sinus of the argument.
^#^
slice_array^#^
SUBTOPIC-efun32^#^
SYNOPSIS
mixed *slice_array(mixed *array, int from, int to)
string slice_array(string arr, int from, int to)
mixed *arr[from .. to]
DESCRIPTION
Returns an array that is a slice of the array <arr> from the
index <from> to the index <to>. Indexes are numbered 0 to
sizeof(arr)-1.
The expression arr[from .. to] is equivalent to
slice_array(arr,from,to).
If <arr> is not an array or indexes are outside the limits of
<arr> 0 will be returned.
Note also that you can use the '+' und '- operators on arrays.
slice_array() IS NO LONGER SUPPORTED! USE THE SYMBOLIC FORM
INSTEAD!
EXAMPLES
foo[0..1] are the first two elements / chars
foo[0..<1] is the while array / string except the last element.
Note that the syntax for ``counting from last element'' has
changed between versions 3.1.J and 3.1.K from ``-1'' to ``<1''.
foo[0..-1] is now an empty string / array.
SEE ALSO
member_array(E), sizeof(E)
^#^
sprintf^#^
SUBTOPIC-efun32^#^
SYNOPSIS
string sprintf(string fmt, ...)
DESCRIPTION
Most of the characters in the format string (FMT) get passed
straight through to the output (ie: printed or put in the
return string), to format the arguments into the string it's
nessasary to include an argument format string (AFS) in the
FMT. An AFS is a series of characters starting with a percent
sign "%" and terminated with a argument type specifier. To
include a "%" sign in the output, it is nessasary to include a
double percent sign "%%".
Valid argument type specifiers are:
"s" : the argument is a string.
"d" : the argument is an integer to be included in decimal
representation.
"i" : same as "d".
"o" : the argument is an integer to be included in octal
representation.
"x" : the argument is an integer to be included in hexidecimal
representation.
"X" : as "x" except letters are capitalised.
e,E,f,F,g,G like in c.
"O" : the argument is an LPC datatype to be printed in an arbituary
format, this is for debugging purposes. If the argument is an
object then the function object_name() on the master object
is called with the object as a parameter, the string returned
is included in brackets at the end of object file name. If
0 is returned then nothing is appended after the file name.
Between the percent sign and the argument type specifier in
the AFS, the following modifiers can be included to specify
the formatting information. Order is not important unless
otherwise specified. "n" is used to specify a integer, which
can be a "*" in which case the next argument is used as the
number.
Modifiers:
n specifys the field size, if prepended with a zero then the pad
string is set to "0".
"."n specifies the presision, for simple (not columns or tables)
strings specifies the truncation length.
":"n n specifies the fs _and_ the presision, if n is prepended by a zero
then the pad string is set to "0".
"'X'" the pad string is set to the char(s) between the single quotes,
if the field size is also prepended with a zero then which ever
is specified last will overrule.
NOTE: to include "'" in the pad string, you must use "\\'"
(as the backslash has to be escaped past the interpreter),
similarly, to include "\" requires "\\\\".
" " pad positive integers with a space.
"+" pad positive integers with a plus sign.
"-" left adjusted within field size.
NB: std (s)printf() defaults to right justification, which is
unnatural in the context of a mainly string based language
but has been retained for "compatability" ;)
"|" centered within field size.
"=" column mode. Ignored unless the argument type specifier is s.
Field size must be specified, if presision is specified then it
specifies the width for the string to be wordwrapped in, if not
then the field size is. The field size specifies the width of
the column.
"#" table mode. Ignored unless the argument type specifier is s.
Field size must be specified, if presision is specified then it
specifys the number of columns in the table, otherwise the
number is "optimally" generated. Table mode is passed a list
of slash-n separated 'words' which are put in a format similar
to that of ls.
"@" the argument is an array. the corresponding AFS (minus all
"@") is applyed to each element of the array.
SEE ALSO
printf(E)
^#^
sqrt^#^
SUBTOPIC-efun32^#^
SYNOPSIS
float sqrt(float)
DESCRIPTION
Returns the square root of the argument.
^#^
strstr^#^
SUBTOPIC-efun32^#^
SYNOPSIS
int strstr (string str, string str2, int pos)
DESCRIPTION
Returns the index of str2 in str searching from position pos.
If str2 is not found in str, -1 is returned. The returned
index is relativ to the pos parameter, not to the beginning of
the string.
SEE ALSO
strlen(E), sscanf(E), sprintf(E), explode(E)
^#^
swap^#^
SUBTOPIC-efun32^#^
SYNOPSIS
void swap(object obj)
DESCRIPTION
Swap out an object. This efun is only used for system internal
debugging and can cause a crash.
^#^
symbol_function^#^
SUBTOPIC-efun32^#^
SYNOPSIS
closure symbol_function(string arg)
closure symbol_function(string arg, object ob)
DESCRIPTION
Constructs a lfun closure, efun closure or operator closure
from the first arg (string or symbol). For lfuns, the second
arg is the object that the lfun belongs to. (Ob can also be
specified as file_name of the object).
EXAMPLES
symbol_function("efun::users") -> #'users
symbol_function("QueryProp", other_obj) -> other_obj->QueryProp()
SEE ALSO
lambda(E), quote(E)
^#^
symbolp^#^
SUBTOPIC-efun32^#^
SYNOPSIS
int symbolp(mixed arg)
DESCRIPTION
Returns true, if arg is a symbol.
EXAMPLES
symbolp('foo) returns 1.
SEE ALSO
intp(E)
^#^
showsmallnewmalloced^#^
SUBTOPIC-driver^#^
NAME
showsmallnewmalloced
DESCRIPTION
Shows a list of recently allocated small memory blocks.
If the O_IS_WIZARD flag is used in the mudlib (i.e. if
set_is_wizard() was called), this command is allowed only for
users that have this flag set.
SEE ALSO
malloc(D), status(D), memory(C), objects(C), debug_info(E),
set_is_wizard(E)
^#^
status^#^
SUBTOPIC-driver^#^
NAME
status
status tables
status swap
DESCRIPTION
This command is hardcoded into the drivers input routine.
It displays information about the run status of the system.
If the O_IS_WIZARD flag is used in the mudlib (i.e. if
set_is_wizard() was called), this command is allowed only for
users that have this flag set.
SEE ALSO
malloc(D), memory(C), objects(C), debug_info(E), set_is_wizard(E)
^#^
save_ed_setup^#^
SUBTOPIC-efun32^#^
SYNOPSIS
int save_ed_setup(object who, int code)
DESCRIPTION
Save individual option settings of the builtin ed, encoded
into code, for the user denoted by who. These functions are
located in the master object so that the local gods can decide
what strategy they want to use. suggestions:
A setup file for every user.
advantages: transparent to the user
independent of user count
disadvantage: extra file access at ed invocation
An array in the master object, users are searched by member_array
advantage: easy to implement
disadvantage: performance degradation with high user counts
An AVL-tree to access users by name
advantage: can fit any need
disadvantage: hard to implement, will need more
overhead on small and medium
installations than it can ever make
good by lg(usercount) complexity
Dedicated flags in every user object.
advantages: easy to implement
independent of user count
Will also work for nusers w/o file
access privileges.
disadvantage: care has to be taken to avoid
collision with other uses of the flags
in the user object
SEE ALSO
ed(E), retrieve_ed_setup(M), valid_write(M),
get_ed_buffer_save_file_name(M)
^#^
slow_shut_down^#^
SUBTOPIC-efun32^#^
SYNOPSIS
void slow_shut_down(int minutes)
DESCRIPTION
Schedule a shutdown for the near future. minutes is the
desired time in minutes till the shutdown:
six, if just the user reserve has been put into use.
one, if the (smaller) master reserve has been put into use as
well.
The interpreter calls this function when it runs low on
memory. At this time, it has freed its reserve, but since it
won't last long, the interpreter needs to be shut down. The
delay is to give the users the opportunity to finish their
current tasks. This function might load an 'Armageddon' object
and tell it what to do. Then the Armageddon will perform the
shutdown.
Technical: The memory handling of the interpreter includes
three reserved areas: user, system and master. All three are
there to insure that the system shuts down gracefully when the
memory runs out: the user area to give the users time to
quit normally, the others to enable emergency-logouts when the
user reserve is used up as well.
The areas are allocated at start of the interpreter, and
released when no more memory could be obtained from the host.
In such a case, one of the remaining areas is freed (so the
operation can continue a short while) and a garbage collection
is initiated. If the garbage collection recycles enough memory
(either true garbage or by the aid of the quota_demon) to
reallocate the areas, all is fine, else the system shut down
is invoked by a call to this function.
SEE ALSO
quota_demon(M), shutdown(E), malloc(D), memory(C)
^#^
steal^#^
SUBTOPIC-thief^#^
-=[ Steal ]=-
Command: steal
Usage: steal <amount> coins from <who>
steal <item> from <who>
Description: This command allows you to steal something from someone.
However, this might upset some people, and start fights.
Example: steal gem from dwarf
Related Topics: move silently, hide in shadows.
^#^
send_erq^#^
SUBTOPIC-efun321^#^
SYNOPSIS
int send_erq(closure callback, string|int * data, int request)
DESCRIPTION
A request of given type ('request', default is 0), equipped
with the given 'data', is sent to the erq. If 'callback' is
set to a closure, it will be called when the response from the
erq arrives, if the response carries enough data to work on:
void <closure>(int * response_data, int len)
The data given to send_erq() may be either a string, or an
array of integers, which are then interpreted as characters.
The various requests are defined in /sys/driverhooks.h.
The result returned is 0 on failure, or non-zero on success.
HISTORY
Introduced in 3.2.1@61.
SEE ALSO
attach_erq_demon(E), erq(D)
^#^
set_buffer_size^#^
SUBTOPIC-efun321^#^
SYNOPSIS
int set_buffer_size(int size)
DESCRIPTION
Changes the socket buffer size for this_interactive() to size,
up to a preconfigured maximum, result is the old buffer size
(or -1 on systems which aren't able to change the socket
buffer).
Modifying the buffer size may result in a better IO
throughput, but can also worsen it.
HISTORY
Introduced in 3.2.1@34
SEE ALSO
^#^
set_connection_charset^#^
SUBTOPIC-efun321^#^
SYNOPSIS
void set_connection_charset(int* bitvector, int quote_iac)
DESCRIPTION
set the set of characters that can be output to the
interactive user (this does not apply to binary_message() ) .
bitvector is interpreted as an array of 8-bit-values and might
contain up to 32 elements. Character n is allowed to be output
if sizeof(bitvector) > n/8 && bitvector[n/8] & (1 << n%8) .
This affects the interactive struct of this_object(), if
present.
If quote_iac is 0 and char 255 is allowed to be output, IAC
will be output unmodified.
If quote_iac is 1 and char 255 is allowed to be output,
char 255 will be quoted so that it is not interpreted as IAC
by the telnet protocol.
HISTORY
Introduced in 3.2.1@40
SEE ALSO
binary_message(E)
^#^
set_driver_hook^#^
SUBTOPIC-efun321^#^
SYNOPSIS
void set_driver_hook(int what, closure arg)
void set_driver_hook(int what, string arg)
void set_driver_hook(int what, string * arg)
DESCRIPTION
This privileged efun sets the driver hook 'what' (values are
defined in /sys/driverhooks.h) to 'arg'.
The exact meanings and types of 'arg' depend of the hook set.
To remove a hook, set 'arg' to 0.
These hooks exist:
H_MOVE_OBJECT0
H_MOVE_OBJECT1
arg: unbound lambda
Mandatory hooks implementing the move_object() efun.
H_LOAD_UIDS
H_CLONE_UIDS
arg: unbound lambda or lfun closure
Mandatory hooks to determine the (e)uid of new objects.
H_CREATE_SUPER
H_CREATE_OB
H_CREATE_CLONE
H_RESET
H_CLEAN_UP
arg: lambda closure (H_CLEAN_UP also accepts a lfun
closure), function name.
Optional hooks for creation/reset/clean up-actions.
H_MODIFY_COMMAND
arg: lambda closure, lfun closure, function name, mapping
Optional hook for modifying player commands before the
parser sees them.
H_NOTIFY_FAIL
arg: lambda closure, lfun closure, string.
Mandatory hook to issue the default message if an entered
command couldn't be parsed and no notify_fail() command is
in effect.
H_NO_IPC_SLOT
arg: string.
Optional hook specifying the 'sorry' messages if logins are
rejected due to fullness of the mud.
H_INCLUDE_DIRS
arg: lambda closure, lfun closure, string array.
Semi-mandatory hook specifying the directories where <>-type
include files are searched.
H_TELNET_NEG
arg: lambda closure, lfun closure, string.
Optional hook to specifiy how to perform a single telnet
negotiation.
See hooks(C) for a detailed discussion.
HISTORY
Introduced in 3.2.1@1 as efun309(), renamed to
set_driver_hook() in 3.2.1@13
SEE ALSO
hooks(C)
^#^
symbol_variable^#^
SUBTOPIC-efun321^#^
SYNOPSIS
closure symbol_variable(string arg)
closure symbol_variable(symbol arg)
closure symbol_variable(int arg)
DESCRIPTION
Constructs an identifier (lfun) closure from the global
variable arg of this_object(). The variable may be given as a
symbol, by name or by its ordinal number in the objects
variable table.
If there is no such variable, or if it is not visible outside
the object, 0 is returned.
If the argument is an integer, and the variable is inherited
and private in the inherited object (i.e. hidden), then a
privilege violation will occur.
HISTORY
Enabled since 3.2.1@8
EXAMPLES
int base;
int var;
symbol_variable("var") -> #'<this_object>->var
symbol_variable(0) -> #'<this_object>->base
SEE ALSO
lambda(E), quote(E), symbol_function(E)
^#^
strength^#^
SUBTOPIC-mage^#^
______________________________ ______________________________
__/ \/ \__
| /| |: |:||
||:| Spell: Strength |: Description: |:||
||:| School: Alteration |: |:||
||:| Cost: 9 |: This spell makes the target |:||
||:| Level: 9 |: stronger. They are able to |:||
||:| Usage: strength target |: carry more then usual. |:||
||:| Components: giant or dragon |: |:||
||:| head |: |:||
||:| Related Spells: |: |:||
||:| None. |: |:||
||:| |: |:||
||:|_____________________________ |: _____________________________|:||
||/______________________________\|:/______________________________\||
|_______________________________ _______________________________|
'----`