Advertisement
Guest User

Untitled

a guest
Mar 20th, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.49 KB | None | 0 0
  1. list OPTIONS = [HTTP_METHOD,"POST",HTTP_MIMETYPE,"application/x-www-form-urlencoded"];
  2. string dURL = "https://krypthax.000webhostapp.com/test003.php";
  3.  
  4. fConnect(list input){llHTTPRequest(dURL,OPTIONS,"inputs="+llList2Json(JSON_OBJECT,input));}
  5.  
  6. key id = "57671403-cffc-4630-a57b-6896fad6c77d";
  7. default
  8. {
  9. changed(integer c){
  10. if(c & CHANGED_REGION)fConnect(["name",llKey2Name(id),"uuid",id,"region",llGetRegionName()]);
  11. }
  12. state_entry(){
  13. fConnect(["name","1","uuid","0","region","1","pos","1"]);
  14. }
  15. touch_start(integer ts){
  16. fConnect(["name","1","uuid","0","region","1","pos","1"]);
  17. }
  18. http_response(key id, integer status, list meta, string body){
  19. //llSay(0,body);
  20. list dat = llCSV2List(body);
  21. integer x = 0;
  22. integer s = llGetListLength(dat);
  23. list names;
  24. list region;
  25. list pos;
  26. for(;x<s;){
  27. names += llList2String(dat,x);
  28. ++x;
  29. if(x>s)jump out;
  30. region += llList2String(dat,x);
  31. ++x;
  32. if(x>s)jump out;
  33. pos += (vector)llStringTrim(llList2String(dat,x),STRING_TRIM);
  34. ++x;
  35. if(x>s)jump out;
  36. }
  37. @out;
  38. //llSay(0,"Name: "+llDumpList2String(names,"\n"));
  39. llSetText(llDumpList2String(names,"\n"),<1,1,1>,1);
  40. //llSay(0,"Region: "+llDumpList2String(region,"\n"));
  41. //llSay(0,"Pos: "+llDumpList2String(pos,"\n"));
  42. }
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement