Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- key uuid = "a9ba2797-81af-429d-9833-51127ad5593c"; // add a uuid to check if it is an avatar or not.
- key query;
- default
- {
- state_entry()
- {
- llSetTimerEvent(0.0);
- llSetTimerEvent(3.0); // begin a timer event for a timeout period. if the timer event triggers the uuid is not an avatar
- query = llRequestAgentData(uuid, DATA_NAME); // only a valid avatar uuid will trigger an agent data request query
- }
- dataserver(key queryid, string data)
- {
- if(queryid == query) // only a valid avatar uuid will trigger an agent data request query
- {
- llSetTimerEvent(0.0); // since the data request was triggerd, the uuid is an avatar so stop the timer before the timeout.
- llSay(0,(string)uuid +" is an avatar with a name of " + data );
- }
- }
- timer()
- {
- llSetTimerEvent(0.0);
- llSay(0,(string)uuid +" is not an avatar."); // if the timer event triggers the uuid is not an avatar
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement