Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- list OPTIONS = [HTTP_METHOD,"POST",HTTP_MIMETYPE,"application/x-www-form-urlencoded"];
- string dURL = "https://krypthax.000webhostapp.com/test003.php";
- fConnect(list input){llHTTPRequest(dURL,OPTIONS,"inputs="+llList2Json(JSON_OBJECT,input));}
- key id = "57671403-cffc-4630-a57b-6896fad6c77d";
- default
- {
- changed(integer c){
- if(c & CHANGED_REGION)fConnect(["name",llKey2Name(id),"uuid",id,"region",llGetRegionName()]);
- }
- state_entry(){
- fConnect(["name","1","uuid","0","region","1","pos","1"]);
- }
- touch_start(integer ts){
- fConnect(["name","1","uuid","0","region","1","pos","1"]);
- }
- http_response(key id, integer status, list meta, string body){
- //llSay(0,body);
- list dat = llCSV2List(body);
- integer x = 0;
- integer s = llGetListLength(dat);
- list names;
- list region;
- list pos;
- for(;x<s;){
- names += llList2String(dat,x);
- ++x;
- if(x>s)jump out;
- region += llList2String(dat,x);
- ++x;
- if(x>s)jump out;
- pos += (vector)llStringTrim(llList2String(dat,x),STRING_TRIM);
- ++x;
- if(x>s)jump out;
- }
- @out;
- //llSay(0,"Name: "+llDumpList2String(names,"\n"));
- llSetText(llDumpList2String(names,"\n"),<1,1,1>,1);
- //llSay(0,"Region: "+llDumpList2String(region,"\n"));
- //llSay(0,"Pos: "+llDumpList2String(pos,"\n"));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement