Difference between revisions of "LlRequestAgentData"

From Second Life Wiki
Jump to navigation Jump to search
m (Doesn't seem to be necessary.)
m
Line 7: Line 7:
|p2_type=integer|p2_name=data|p2_desc=DATA_* flag
|p2_type=integer|p2_name=data|p2_desc=DATA_* flag
|func_footnote
|func_footnote
|func_desc=Requests '''{{LSL Param|data}}''' about agent '''{{LSL Param|id}}'''. When '''{{LSL Param|data}}''' is available the [[dataserver]] event will be raised
|func_desc=Requests {{LSLP|data}} about agent {{LSLP|id}}. When {{LSLP|data}} is available the [[dataserver]] event will be raised
|return_text=that is used to identify the [[dataserver]] event when it is raised.
|return_text=that is used to identify the [[dataserver]] event when it is raised.
|spec
|spec
|caveats=*DATA_BORN is not UTC. It is Pacific Time based.
|caveats=*[[DATA_BORN]] is not UTC. It is Pacific Time based.
*If you merely wish to show avatar name information in the viewer window, it may be more straightforward to avoid a DATA_NAME dataserver event and simply output: <lsl>llSay(0, "secondlife:///app/agent/" + (string)id + "/about");</lsl>
*If you merely wish to show avatar name information in the viewer window, it may be more straightforward to avoid a DATA_NAME dataserver event and simply output: <lsl>llSay(0, "secondlife:///app/agent/" + (string)id + "/about");</lsl>
|constants={{{!}} {{Prettytable|style=margin-top:0;margin-right:0;}}
|constants={{{!}} {{Prettytable|style=margin-top:0;margin-right:0;}}

Revision as of 10:02, 7 June 2012

Summary

Function: key llRequestAgentData( key id, integer data );
0.1 Forced Delay
10.0 Energy

Requests data about agent id. When data is available the dataserver event will be raised
Returns a key that is used to identify the dataserver event when it is raised.

• key id avatar UUID
• integer data DATA_* flag

data Constant Type Description
DATA_ONLINE 1 (integerboolean If the requested agent is online
DATA_NAME 2 string The requested agent's legacy name
DATA_BORN 3 string The account creation/"born on" date as a string in an ISO 8601 format of YYYY-MM-DD.
DATA_RATING 4 llCSV2List() Deprecated: Returns [0, 0, 0, 0, 0, 0]
Used to return: [pos_behavior, neg_behavior, pos_appearance, neg_appearance, pos_building, neg_building]
DATA_PAYINFO 8 (integermask Flag Description
PAYMENT_INFO_ON_FILE 0x1 If payment info is on file.
PAYMENT_INFO_USED 0x2 If payment info has been used.

Caveats

  • This function causes the script to sleep for 0.1 seconds.
  • DATA_BORN is not UTC. It is Pacific Time based.
  • If you merely wish to show avatar name information in the viewer window, it may be more straightforward to avoid a DATA_NAME dataserver event and simply output: <lsl>llSay(0, "secondlife:///app/agent/" + (string)id + "/about");</lsl>

Examples

<lsl>key owner_key; key owner_name_query; string owner_name;

default {

   state_entry()
   {
       owner_key = llGetOwner();
       owner_name_query = llRequestAgentData(owner_key, DATA_NAME);
   }
   dataserver(key queryid, string data)
   {
       if ( owner_name_query == queryid )
       {
           owner_name = data;
           llSay(0, "The owner of this script is called : " + owner_name );
       }
   }
}//Anylyn Hax 06:19, 23 July 2007 (PDT)</lsl>

See Also

Events

•  dataserver

Functions

•  llGetAgentInfo

Deep Notes

Signature

function key llRequestAgentData( key id, integer data );