Jump to content

Xiija

Resident
  • Posts

    909
  • Joined

  • Last visited

Everything posted by Xiija

  1. @Bavid Dailey yah, sadly the info from ... "http://158.69.74.203:80/stats?sid=1" ... was basic, no metadata either however their website has a contact mail for feedback or questions ... mail@swissgroove.ch .
  2. @Bavid Dailey does the station you are using show what encoding they are using? Looks like it's not UTF-8 mebbe? can you check with something like this? key XMLRequest; default { state_entry() { } touch_start(integer total_number) { string url = "http://whatisland.macchiatomedia.org:8118/stats?sid=1"; XMLRequest = llHTTPRequest( url , [HTTP_USER_AGENT, "XML-Getter/1.0 (Mozilla Compatible)", HTTP_METHOD, "GET", HTTP_MIMETYPE,"application/xml;charset=utf-8", HTTP_BODY_MAXLENGTH,16384, HTTP_PRAGMA_NO_CACHE,TRUE], ""); } http_response(key k,integer status, list meta, string body) { if(k == XMLRequest) { if(status != 200) { llOwnerSay("error code\n"); return; } llOwnerSay("Body: \n" + body); llOwnerSay("Meta: " + llDumpList2String( meta, "\n") ); } } } I checked this shoutcast station and i see this... ETA: sorry, i think that is the XML encoding, but you may still be able find the ID3 tags if they are included?.. if they are using non-standard encoding, they should list what they are using ?
  3. SL has no way to delete a topic?
  4. Edit: nvm, it was just authing folders & linking the sheet & app script
  5. my prims are now getting an "Access Denied" ... not sure what google changed. anyone have a working script that uses a google apps script to store a URL ? Thanx for any help
  6. I tried it with 64 2-meter tiles and a root prim under them all, but i think this code only works for one agent at a time? anyhoo, mebbe someone can use it ... integer old; integer new; default { state_entry() { llSetLinkPrimitiveParamsFast( LINK_ALL_OTHERS, [ PRIM_COLOR, ALL_SIDES, <0.0, 0.0, 0.0>, 1.0, PRIM_GLOW,ALL_SIDES,0.0 ]); } collision(integer num) { new = llDetectedLinkNumber(0); if( new != 1) { if(new != old) { llSetLinkPrimitiveParamsFast( new, [ PRIM_COLOR, ALL_SIDES, <1.0, 1.0, 1.0>, 1.0, PRIM_GLOW,ALL_SIDES,0.1]); llSetLinkPrimitiveParamsFast( old, [ PRIM_COLOR, ALL_SIDES, <0.0, 0.0, 0.0>, 1.0, PRIM_GLOW,ALL_SIDES,0.0]); old = new; } } llSensorRepeat("", "", AGENT_BY_LEGACY_NAME, 8.0, PI, 0.2); } no_sensor() { llSetLinkPrimitiveParamsFast( LINK_ALL_OTHERS, [ PRIM_COLOR, ALL_SIDES, <0.0, 0.0, 0.0>, 1.0, PRIM_GLOW,ALL_SIDES,0.0 ]); llSensorRemove(); old = 0; } }
  7. @jak Scribe mostly the above + the stuff on the wiki & llRotLookAt ... default { on_rez(integer start_param) { llResetScript(); } state_entry() { vector pos = llGetPos(); vector OwnerPos = llList2Vector(llGetObjectDetails( llGetOwner(),[OBJECT_POS]), 0); llRotLookAt( llRotBetween( <1.0, 0.0, 0.0>, llVecNorm( <OwnerPos.x, OwnerPos.y, pos.z> - pos ) ), 1.0, 0.4 ); } }
  8. or you could shorten the name to be used?... names += ":" + llGetSubString( llDetectedName(index++) , 0, 23);
  9. Just seeking a lil understanding.. the wiki says : llSitTarget( vector offset, rotation rot ); but when i use getlinkprimparams... it returns a list of 3 items? touch_start(integer total_number) { list ls = llGetLinkPrimitiveParams(LINK_THIS, [PRIM_SIT_TARGET]); vector zero = llList2Vector(ls, 0); vector one = llList2Vector(ls, 1); vector three = llList2Vector(ls, 2); integer len = llGetListLength( ls ); llOwnerSay("vecs: \n" + (string)zero + "\n " + (string)one + "\n " + (string) three + "\n LEN: " + (string)len ); }
  10. we used a skater HUD in sl roller derby, and the way we checked for speed huds was to allow only 1 scripted attachment, ( the skate HUD ). Just check participants on a timer mebbe?
  11. just curious, is anyone else seeing something like this? I can't shop past the first page, and sometimes not even that ... ( found items, none listed or shown )
  12. @ItHadToComeToThis If you sell on MP, then you kinda need a server for updates. ( repl.it + pingers is free ). if you only sell in a store with a vendor, you could use LsD & JSON.
  13. anyone else having problems with the MP ? .. when ever i change search params ( i.e. price, rights, etc ) and go to a second page, all i see is this ... any ideas...? this one was first page, just changed the search params...
  14. dunno if this helps but, i tried this in state_entry..., and its workin for me... if( llGetAttached() ) { llLinksetDataReset( ); take_camera_control(llGetOwner()); }
  15. @Todd Sivith tested this with 2 cylinder prims, seems to work ok... ( this script is in the root ) integer tog = -1; default { touch_start(integer total_number) { integer link = llDetectedLinkNumber(0); if( link == 2 ) { vector prim_pos = llList2Vector(llGetLinkPrimitiveParams( link, [PRIM_POSITION]),0); prim_pos = ( prim_pos - llGetPos() ) / llGetRot(); prim_pos.z += (0.25 * (tog = -tog) ); llSetLinkPrimitiveParamsFast( link, [PRIM_POSITION,prim_pos]); llPlaySound("4c8c3c77-de8d-bde2-b9b8-32635e0fd4a6", 1.0); } } }
  16. @Gayngel dunno if this helps, but here is a very simple example... ( the url i'm using is a quickie server i made on replit ) the send/recieve is all json LSL: key http_request_id; string URL = "https://SecLife-php-1.tikihed.repl.co/index.php"; default { state_entry() { } touch_start(integer total_number) { llOwnerSay("Sending..."); string j_obj = llList2Json( JSON_OBJECT, [ "name", llDetectedName(0), "region", llGetRegionName() ]); http_request_id = llHTTPRequest(URL , [ HTTP_METHOD, "POST", HTTP_MIMETYPE, "application/x-www-form-urlencoded", HTTP_BODY_MAXLENGTH, 16384, HTTP_PRAGMA_NO_CACHE, TRUE ], j_obj ); } http_request(key id, string method, string body) { integer responseStatus = 200; string responseBody = "my method"; if (method == "GET") { responseStatus = 200; responseBody = "ok"; } // else if (method == "POST") ...; // else if (method == "PUT") ...; // else if (method == "DELETE") { responseStatus = 403; responseBody = "forbidden"; } llHTTPResponse(id, responseStatus, responseBody); } http_response(key request_id, integer status, list metadata, string body) { llOwnerSay("\nHTTP Resp: \n \n" + body); } } PHP: <?php if ($_SERVER["REQUEST_METHOD"] == "POST") { $json = file_get_contents('php://input'); $data = json_decode($json); foreach($data as $key=>$value){ echo $key . " : " . $value . "\n"; } } ?>
  17. Does anyone have any experience setting up a server on an old laptop/computer? A lot of the things i script in SL use node.js express servers running on repl.it, and they will soon be disallowing keep-alive pingers, so i guess i will need one. I'm hoping to keep it small and simple, and have both linux and windows comps i can use. i'm thinking of something like a WEPN ( Windows, Express, Postgres & Node) or PERN stack. ( or LAMP for linux ). Thanx for any ...
  18. thanx all for the helps, I used csv and could do both an example for anyone looking for list pointers... string webStations; list jazz_a; list jazz_b; default { state_entry() { // JSON webStations = llList2Json( JSON_OBJECT, [] ); // or json2list from web jazz_a = [ "https://breakz-high.rautemusik.fm/?ref=radiobrowserinfo", "https://jam-high.rautemusik.fm/?ref=radiobrowser", "https://mixtapes.superstreams.de/", "https://mixtapes.electronicssounds.com/", "http://stream.laut.fm/ruffneck-smille?ref=radiode", "http://o89fm.de:8000/main", "https://stream.0nlineradio.com/latin?ref=radiobrowser", "https://stream.0nlineradio.com/remix?ref=radiobrowser", "http://strm112.1.fm/reggae_mobile_mp3" ]; jazz_b = [ "2-https://breakz-high.rautemusik.fm/?ref=radiobrowserinfo", "2-https://jam-high.rautemusik.fm/?ref=radiobrowser", "2-https://mixtapes.superstreams.de/", "2-https://mixtapes.electronicssounds.com/", "2-http://stream.laut.fm/ruffneck-smille?ref=radiode", "2-http://o89fm.de:8000/main", "2-https://stream.0nlineradio.com/latin?ref=radiobrowser", "2-https://stream.0nlineradio.com/remix?ref=radiobrowser", "2-http://strm112.1.fm/reggae_mobile_mp3" ]; string ja = llList2CSV(jazz_a); string jb = llList2CSV(jazz_b); webStations = llJsonSetValue (webStations, ["MAIN", "Jazz_a" ], ja); webStations = llJsonSetValue (webStations, ["MAIN", "Jazz_b" ], jb); string urls = llJsonGetValue (webStations, ["MAIN", "Jazz_a" ]); llOwnerSay("\ndata: " + urls); list j1 = llCSV2List( urls ); llOwnerSay("\nJSON data check: " + llList2String( j1, 0) ); list jmain = ["Jazz_a", "Jazz_b"]; // ================================= store list names as strings string jINDX = llList2String( jmain,0); // ============================= get a string name string main = llJsonGetValue (webStations, [ "MAIN" , jINDX ]); // ==== call JSON string/list with a string name llOwnerSay("\nMain:\n" + main + "\n Touch to get LsD data"); } touch_start(integer total_number) { // LsD string j1 = llList2CSV(jazz_a); string j2 = llList2CSV(jazz_b); llLinksetDataWrite( "j1" ,j1 );//====================================== make a key string llOwnerSay( "\nLsD data check: \n" + llLinksetDataRead("j1")); //====== check it is stored list jmain = ["j1", "j2"]; // ==================================== store key names as list of strings string jINDX = llList2String( jmain,0); // ========================= get a string name llOwnerSay( "\n J data: \n" + llLinksetDataRead( jINDX )); // ==== call LsD key with a string name list jlist_1 = llCSV2List( llLinksetDataRead( jINDX ) ); // ===== seperate string into csv llOwnerSay("\nLsD first entry:\n " + llList2String( jlist_1, 0) ); } }
  19. @bigmoe Whitfield here is an example of an embed .... you can do arrays & objects etc.. string slurl(key AvatarID) { string regionname = llGetRegionName(); vector pos = llList2Vector(llGetObjectDetails(AvatarID, [ OBJECT_POS ]), 0); return "http://maps.secondlife.com/secondlife/" + llEscapeURL(regionname) + "/" + (string)llRound(pos.x) + "/" + (string)llRound(pos.y) + "/" + (string)llRound(pos.z) + "/"; } key PostToDiscord(key AvatarID, string Message) { string SLURL = slurl(AvatarID); // call another function to get the slurl string user = llKey2Name( AvatarID ); list json = [ "username", llGetObjectName() + "", "embeds", llList2Json(JSON_ARRAY, [ llList2Json(JSON_OBJECT, [ "color", "100000", "title", "Server Location", "url", SLURL, "description", "\nSender's Profile: http://my.secondlife.com/" + llGetUsername(AvatarID) + "\n \nMsg from " + llGetUsername(AvatarID) + ": \n" + Message + "\n \n.", "author", llList2Json(JSON_OBJECT, [ "name", user, "icon_url", "https://my-secondlife-agni.akamaized.net/users/" + llGetUsername(AvatarID) + "/sl_image.png" ]), "footer", llList2Json(JSON_OBJECT, [ "icon_url", "https://my-secondlife-agni.akamaized.net/users/" + llGetUsername(AvatarID) + "/sl_image.png", "text", "XMODS Discord Embedder" ]) ]) ]), "avatar_url", "https://my-secondlife-agni.akamaized.net/users/" + llGetUsername(AvatarID) + "/thumb_sl_image.png" ]; return llHTTPRequest( WEBHOOK_URL , [ HTTP_METHOD, "POST", HTTP_MIMETYPE, "application/json", HTTP_VERIFY_CERT, TRUE, HTTP_VERBOSE_THROTTLE, TRUE, HTTP_PRAGMA_NO_CACHE, TRUE ], llList2Json(JSON_OBJECT, json) ); } .
  20. Has anyone come up with any inventive ways to do pointers in LSL ? I need to cycle thru a list of lists ! lol currently dealing with this grunginess... integer x; integer len = llGetListLength( Jazz ); for( x = 0; x < len; ++x ) { string node = (string)(x+1); string url = llList2String(Jazz,x); webStations = llJsonSetValue (webStations, ["Jazz", "NUM-" + node ], node); webStations = llJsonSetValue (webStations, ["Jazz", "NUM-" + node, "URL"], url); } // ==================== integer x2; integer len2 = llGetListLength( Rock ); for( x2 = 0; x2 < len2; ++x2 ) { string node = (string)(x2+1); string url = llList2String(Rock,x2); webStations = llJsonSetValue (webStations, ["Rock", "NUM-" + node ], node); webStations = llJsonSetValue (webStations, ["Rock", "NUM-" + node, "URL"], url); } // ======================== integer x3; integer len3 = llGetListLength( Reggae ); for( x3 = 0; x3 < len3; ++x3 ) { string node = (string)(x3+1); string url = llList2String(Reggae,x3); webStations = llJsonSetValue (webStations, ["Reggae", "NUM-" + node ], node); webStations = llJsonSetValue (webStations, ["Reggae", "NUM-" + node, "URL"], url); } // ================================ integer x4; integer len4 = llGetListLength( Country ); for( x4 = 0; x4 < len4; ++x4 ) { string node = (string)(x4+1); string url = llList2String(Country,x4); webStations = llJsonSetValue (webStations, ["Country", "NUM-" + node ], node); webStations = llJsonSetValue (webStations, ["Country", "NUM-" + node, "URL"], url); }
  21. yah, i just used the old way .. https://wiki.secondlife.com/wiki/Combined_Library#Replace
  22. mebbe only allow one user at a time? on touch, an InUse variable could be set to 1.... and on submit, back to 0 ? etc etc
  23. this has no ID, .. cant get it to work?... https://wiki.secondlife.com/wiki/LlReplaceSubString
×
×
  • Create New...