A
/ \ _ Play Now Nemesis on
| | | | _______ _ _ _______ _______ _ _______
| |\ | | | ____| | \ / | | ____| / ____| | | / ____|
/-------/-------------------------------------------------------------------,
O= Home <=XX| About News Pics Adventurers Wizards Download Connect >
\-------\-------------------------------------------------------------------'
| | \ | | |____ | | | | | |____ ___ \ \ | | ___ \ \
| | \_| |_______| |_| |_| |_______| |_______/ |_| |_______/
\ /
V
Documentation Area
Document Path: /doc/object/id
Lfun: id - identify an object
Synopsis:
int id(string ident)
Description:
This function is used to identify an object. It is called with a
describing string that the player typed. For example "apple" in
"get apple". In LPMUD slang those strings are called id's after the
name of this function.
Return value:
Id should return 1 for all adequate id-strings, else 0.
Examples:
In the case of an apple the id function would look like this:
id(s) { return s=="apple" || s=="an apple"; }
You can call short() from within id() if it makes sense to do so
(usually it does).
To check the id of an object you can also call it directly.
See also:
This page was generated in LPC
Imprint / Impressum