Advertisement
worstbull

Get Avatar Info

Dec 5th, 2013
228
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. list Queue;
  3.  
  4. default {
  5.     touch_end( integer d ) {
  6.         key av = llDetectedKey(0);
  7.         string name = llDetectedName(0);
  8.         if (llSubStringIndex(name, " Resident") != -1)
  9.         { //no last name
  10.             name = llGetSubString(name, 0, llSubStringIndex(name, " Resident")-1);
  11.         }
  12.         else
  13.         {
  14.             name = llGetSubString(name, 0, llSubStringIndex(name, " ")-1) + "." + llGetSubString(name, llSubStringIndex(name, " ")+1, -1);
  15.         }
  16.        
  17.         Queue += [
  18.             llHTTPRequest("http://chromebackend.net/s/Groups/" + name, [], ""),
  19.             av
  20.         ];
  21.     }
  22.    
  23.     http_response( key k, integer s, list m, string b ) {
  24.         integer Ptr     = llListFindList(Queue,[k]);
  25.         if(!~Ptr) return;
  26.        
  27.         key av          = llList2Key(Queue,Ptr+1);
  28.         Queue           = llDeleteSubList(Queue,Ptr,Ptr+1);
  29.        
  30.         list x          = llParseString2List(b,["%^"],[]);
  31.         string SystemMessage = llList2String(x,0);
  32.              x          = llParseString2List(llList2String(x,1),["%#"],[]);
  33.         list Names      = llParseString2List(llList2String(x,0),["%$"],[]);
  34.         list Keys       = llParseString2List(llList2String(x,1),["%$"],[]);
  35.         list Descs      = llParseString2List(llList2String(x,2),["%$"],[]);
  36.         list Images     = llParseString2List(llList2String(x,3),["%$"],[]);
  37.        
  38.         llRegionSayTo(av, PUBLIC_CHANNEL, "Your groups are:\n- "+llDumpList2String(Names,"\n- "));
  39.     }
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement