Jump to content

Xiija

Resident
  • Content Count

    681
  • Joined

  • Last visited

Community Reputation

187 Excellent

2 Followers

About Xiija

  • Rank
    Lotus Eater

Recent Profile Visitors

1,123 profile views
  1. I've never tried it, but i wonder if one could use KFM with a list of one position, and just keep changing that list item, and then running KFM again....hmm
  2. Xiija

    http request

    @meady212 here is what the code looks like for the pic i posted ... http_response(key request_id, integer status, list metadata, string body) { if (request_id == gHttpRequestId1) { list my_list = llParseString2List( llGetTimestamp(), [ "T", "."], [] ); string date = llList2String(my_list,0); string time = llList2String(my_list,1); string title = pad("Second Life Grid Status"); gBuildText += title; gBuildText += " "; // add a space under the title gBuildText += pad( "Updated: " + date + ", " + time ); if (status == 200 && llSubStringIndex(body, "<status>") != -1) { gBuildText += pad( "Grid: " + cutString(body, "status") ); gBuildText += pad( "Inworld: " + cutString(body, "inworld") ); gBuildText += pad( "Signups: " + cutString(body, "signups") ); gBuildText += ""; // add a space under the signups // gBuildText += pad( "Logged in past 60 days: " + cutString(body, "logged_in_last_60") ); } gHttpRequestId2 = llHTTPRequest("http://status.secondlifegrid.net/history.rss", [HTTP_BODY_MAXLENGTH, 4096], ""); } else if (request_id == gHttpRequestId2) { if (status == 200 && llSubStringIndex(body, "<item>") != -1) { string commitData = cutString(body, "item"); gBuildText += pad( cutString(commitData, "title") ); gBuildText += pad( cutString(commitData, "pubDate") ); } display(); } } // end http
  3. Xiija

    http request

    if you are using the pad function i showed, you can pad each line by ... using it? gBuildText += pad( "Grid: " + cutString(body, "status") ); gBuildText += pad( "Inworld: " + cutString(body, "inworld") ); to move something up, just change the order it is added to the list... so from gBuildText += cutString(commitData, "title"); gBuildText += cutString(commitData, "link"); gBuildText += cutString(commitData, "pubDate"); change to gBuildText += cutString(commitData, "title"); gBuildText += cutString(commitData, "pubDate"); // this was moved up gBuildText += cutString(commitData, "link"); to remove something, just don't add it in... delete the ... gBuildText += ... line you don't want. hope this helps
  4. Xiija

    http request

    not sure how to mark a spoiler, but here is the centering bit for adding spaces... then you could just do ... string title = pad("Second Life Grid Status"); to center that text?
  5. Xiija

    http request

    your board prolly has 6 .... 8-faced prims per line (96 chars of text per line) you could check each line length, subtract that from 96 and divide that in half to get how many spaces to pad each line with. .. or just add padding spaces manually in your text. for your http & time stuff, it would prolly be something close to this? http_response(key request_id, integer status, list metadata, string body) { if (request_id == gHttpRequestId1) { list my_list = llParseString2List( llGetTimestamp(), [ "T", "."], [] ); string date = llList2String(my_list,0); string time = llList2String(my_list,1); gBuildText += "Second Life Grid Status"; gBuildText += " "; gBuildText += "Updated: " + date + ", " + time; if (status == 200 && llSubStringIndex(body, "<status>") != -1) { gBuildText += "Grid: " + cutString(body, "status"); gBuildText += "Inworld: " + cutString(body, "inworld"); gBuildText += "Signups: " + cutString(body, "signups"); gBuildText += "Logged in past 60 days: " + cutString(body, "logged_in_last_60"); } gHttpRequestId2 = llHTTPRequest("http://status.secondlifegrid.net/history.rss", [HTTP_BODY_MAXLENGTH, 4096], ""); } else if (request_id == gHttpRequestId2) { if (status == 200 && llSubStringIndex(body, "<item>") != -1) { string commitData = cutString(body, "item"); gBuildText += cutString(commitData, "title"); gBuildText += cutString(commitData, "link"); gBuildText += cutString(commitData, "pubDate"); } display(); } } // end http in this example, gBuildText is a list, not a string, ( list gBuildText = []; ) and the display function i used is something like this... display() { integer x = 0; do { llMessageLinked(-1,DISPLAY_STRING, llList2String( gBuildText ,x),(string)x ); x = x + 1; } while (x < 10); }
  6. here is a very simplified example, with a few events, of the logic flow? state_entry() { if(llGetAttached() ) { llRequestPermissions(llGetOwner(), PERMISSION_OVERRIDE_ANIMATIONS | PERMISSION_TAKE_CONTROLS ); } } attach( key k ) { if ( k != NULL_KEY ) { llRequestPermissions(llGetOwner(), PERMISSION_OVERRIDE_ANIMATIONS | PERMISSION_TAKE_CONTROLS ); } } run_time_permissions(integer perm) { if( perm & PERMISSION_TAKE_CONTROLS ) { llTakeControls( CONTROL_DOWN|CONTROL_UP|CONTROL_FWD|CONTROL_BACK|CONTROL_LEFT|CONTROL_RIGHT |CONTROL_ROT_LEFT|CONTROL_ROT_RIGHT, TRUE, TRUE); } if ( perm & PERMISSION_OVERRIDE_ANIMATIONS ) { // replace normal anims with your car anims .... i.e. ... car_going_fast, car_idle, car_normal_speed llSetAnimationOverride( "Running", car_going_fast); llSetAnimationOverride( "Standing", car_idle); llSetAnimationOverride( "Walking", car_normal_speed); } } control( key _id, integer _level, integer _edge ) { float speed = 5.0; if( _level & CONTROL_FWD) { if( llGetAgentInfo(llGetOwner() ) & AGENT_ALWAYS_RUN ) { llApplyImpulse(< speed,0,0>,TRUE); } } }
  7. Something to test with ... integer numberOfColumns = 3; integer numberOfRows = 3; default { state_entry() { } touch_start(integer num_detected) { key id = llDetectedKey(0); key owner = llGetOwner(); integer face = llDetectedTouchFace(0); vector touchST = llDetectedTouchST(0); integer currentCellNumber = llFloor( touchST.x * numberOfColumns ) + ( numberOfRows - llCeil( touchST.y * numberOfRows ) ) * numberOfColumns + 1; llOwnerSay("cell number: " + (string)currentCellNumber ); } }
  8. Xiija

    http request

    you can display text with an Xyzzy text board.. they are 1 $L .... https://marketplace.secondlife.com/p/Mesh-Xyzzytext-Display-Board-960-Char-96-x-10/4244711
  9. Xiija

    http request

    If it is for the Grid status, you can also look at RSS feeds or mebbe use the twitter api? https://twitter.com/SLGridStatus
  10. kewl for anyone else wanting to play with google app scripts, there is a nice little vid here ... GoogleAppScript
  11. If you are in an experience, you can use key-value scripts for persistence , if not, you can use google forms + sheets, make your own google app, or ...use or run a server with some db code. I'm having luck with using Repl.it to store urls, but it is mostly for small instances, not something with a ton of customers etc, and you would need something like Uptime Robot to ping your server there to keep it alive.
  12. arg! i have something like this in inv somewhere... 60k inv, cant find it! it's like, an rp speech converter, from like zorgon to something lol ... mebbe its on Ferd's or the script library...
  13. There is a newer npm library for google sheets here ... https://theoephraim.github.io/node-google-spreadsheet/#/ incase you can use js in your own server etc...
  14. I've tested a repl.it with NeDB and it seems to work ok... prolly not for a large deploy tho?
  15. @Kacie Zapedzki this seems to work for me... float amt = 180; default { state_entry() { } touch_start(integer total_number) { llSetLinkPrimitiveParamsFast( LINK_THIS, [ PRIM_ROTATION,llGetLocalRot() * llEuler2Rot( <0, 0, (amt*=-1)> * DEG_TO_RAD) ]); } }
×
×
  • Create New...