A
/ \ _ Play Now Nemesis on
| | | | _______ _ _ _______ _______ _ _______
| |\ | | | ____| | \ / | | ____| / ____| | | / ____|
/-------/-------------------------------------------------------------------,
O= Home <=XX| About News Pics Adventurers Wizards Download Connect >
\-------\-------------------------------------------------------------------'
| | \ | | |____ | | | | | |____ ___ \ \ | | ___ \ \
| | \_| |_______| |_| |_| |_______| |_______/ |_| |_______/
\ /
V
Documentation Area
Document Path: /doc/living/query_name
Lfun: query_name - get the name from a living
Synopsis:
string query_name(int arg)
Description:
The query_name call returns the name of the living.
Without any argument arg (or 0) the name is returned capitalised.
This is the old default behaviour!
With an argument the name is returned as it was set via
set_cap_name (see 'man monster/set_cap_name'). Currently this only
is implemented in obj/monster! obj/player (and obj/wizard) ignores
this new feature.
Return value:
A string containing the name
If it is dead, "Some mist" is returned.
It it is invisible, "Someone" or "Somebody" is returned
If a player is logging in, before he has typed his name, "Logon" is
returned.
Examples:
// here name always is capitalised: e.g. "Paoso" or "A rat":
string name = this_player()->query_name();
// here name2 can be capitalised: "a rat" or "Paoso":
string name2 = this_player()->query_name(1);
Note:
The new feature via the argument is intended for much nicer messages
e.g. during combat: With 'query_name(1)' it fits into a sentence and
not only at the beginning of it: "You hit a rat very hard." but also
"You hit Mr Burke hard.".
See also:
This page was generated in LPC
Imprint / Impressum