A
          / \      _                                               Nemesis on 
          | |     | |  _______   _        _   _______    _______   _    _______
          | |\    | | |   ____| |  \    /  | |   ____|  /   ____| | |  /   ____|
 /-------/-------------------------------------------------------------------,
O= Home <=XX|  About  News  Pics  Adventurers  Wizards  Download  Connect     >
 \-------\-------------------------------------------------------------------'
          | |   \   | |  |____  | |      | | |  |____   ___ \  \  | |  ___ \  \
          | |     \_| |_______| |_|      |_| |_______| |_______/  |_| |_______/
          \ /
           V  

Documentation Area

Document path: /doc/lib/query_user_data


Simul efun: query_user_data - get information about players/wizards

Synopsis:
	mixed query_user_data(string name)

Description:
	Partial restore of player/wizard with name "name".
	This a substitution for restore_object() of players' and
	wizards' .o-files.
	Only some game related data is accessable.

Return value:
	An array of 2 arrays:
	({ /* sizeof() == 2 */
	  ({ /* sizeof() == 12 */
	    "active",
	    "title",
	    "level",
	    "alignment",
	    "al_title",
	    "gender",
	    "age",
	    "host",
	    "last_login",
	    "domain",
	    "guild",
	    "testplayer"
	  }),
	  ({ /* sizeof() == 12 */
	    <int active>,  // 3: logged in, 2: active, 1: inactive,
			// 0: does not exists, see 'man user_exists'
	    <string title>,
	    <int level>,
	    <int alignment>,
	    <string alignment_title>,
	    <int gender>,
	    <int age>,     // in heart_beats!
	    <string host>,
	    <int last_login>,
	    <string domain>,
	    <string guild>,
	    <string testplayer>
	  })
	})

Examples:
	mixed data = query_user_data(player_name);

	int active = data[1][member_array("active", data[0])];
	int level = data[1][member_array("level", data[0])];

	Or (doesn't always work - don't know when):
	int active = assoc("active", data);
	int level = assoc("level", data);

Note:
	The order of elements returned in the array is not guaranteed.
	The values should be fetched by the labels like in the "Examples".
	Valid labels are shown in "Return value:".

See also:


This page was generated in LPC

Imprint / Impressum