Jump to content

Xiija

Resident
  • Content Count

    637
  • Joined

  • Last visited

Community Reputation

160 Excellent

2 Followers

About Xiija

  • Rank
    Lotus Eater

Recent Profile Visitors

777 profile views
  1. Xiija

    storing data

    so, a kinda hacky trick... when you send your data to the form, use a "marker" your marker could be anything.. like .... ~start~ or .... ~end~ in this example, i used something easy to find.... @!@ ..... was my marker. so if the data you send is ...." HTTPtest 2-16-2019" ... just add your marker to that to get... @!@HTTPtest 2-16-2019 on the sheet, my cell ... ( c6) ...looked like this .... @!@HTTPtest 2-16-2019 string sheetID = "1MNKwhVqK8U8urzTWa_q0YtlGnYVn7SnICZBylstR2KE"; string sheetURL = "https://docs.google.com/spreadsheets/d/1MNKwhVqK8U8urzTWa_q0YtlGnYVn7SnICZBylstR2KE/pubhtml?gid=653993593&single=true&gid=0&output=txt&range=C6"; key selfCheckRequestId; default { state_entry() { } touch_start(integer total_number) { selfCheckRequestId = llHTTPRequest( sheetURL, [HTTP_METHOD, "GET", HTTP_VERBOSE_THROTTLE, FALSE, HTTP_BODY_MAXLENGTH, 16384], ""); } http_response(key id, integer status, list metaData, string body) { if (id == selfCheckRequestId) { string marker = "@!@"; integer start = llSubStringIndex(body,marker); integer end = llSubStringIndex(body, "</td>"); string fetch = llGetSubString(body,start + llStringLength(marker), end-1); llOwnerSay("\n response: \n" + fetch); } } } the inworld response from putting this code in a box and touching it was... the value of cell c6 (with the marker bit removed) as i said , this is hacky ... it may break depending on where "</td>" appears on the sheet... you ~could~ add an ending marker to your sent data ... mebbe it would look like ... @!@HTTPtest 2-16-2019 @!!@ to make is more safe to parse? the NEW google stuff has an API ( you have to get a key) ... https://developers.google.com/sheets/api/
  2. Xiija

    storing data

    @oOPussInBootsOo (ETA: ty to Puss for catching the mistaken link ) to see the id from my example, you have to use the ...pubhtml link, not the edit one just copy your sheet http link, but change it like so... https://docs.google.com/spreadsheets/d/1MNKwhVqK8U8urzTWa_q0YtlGnYVn7SnICZBylstR2KE/pubhtml ( click this link below and check the page source ) The link with the sheet ID
  3. Xiija

    storing data

    @Jazmina Voom when you right click your google spreadsheet, you choose 'view page source' ( at least i can in firefox) at the bottom of the source page you will see something like... <script type="text/javascript">activeSheetId = '653993593'; switchToSheet('653993593');</script></body></html> - when you want to GET the info from the linked google spreadsheet, your url looks something like this... "https://docs.google.com/spreadsheets/d/1MNKwhVqK8U8urzTWa_q0YtlGnYVn7SnICZBylstR2KE/pubhtml?gid=653993593&single=true&gid=0&output=txt&range=H4"; ( ...&range=H4...returns what is in cell H4 ) so the place where you see ... pubhtml?gid=653993593 ... is the sheet id from the page-source ( activeSheetId = '653993593'; ) so your response in the SecondLife GET request will return what is in that cell ( H4 in this example) from that google sheet Example: https://docs.google.com/spreadsheets/d/(your-sheet)/pubhtml?&gid=(your-sheet-id)&single=true&gid=0&output=txt&range=(what cell you want) links: the sheet from this example the actual url of the cell's return value SL wiki: How to handle a GET request
  4. Xiija

    Dice script

    heh, sry, was just codeblind.. dunno, i finally get it.. 4 - 8 = -4!
  5. Xiija

    Dice script

    just curious, why does 4 minus 0 = -4? lol i would have thought you would need to do integer RndX = -4 + (integer) llFrand(9.0);
  6. Xiija

    Question llPassTouches

    nice, @Wandering Soulstar .. it didn't work for me tho hmmm another way would be... if ( (llDetectedLinkNumber(0) == 0) || (llDetectedLinkNumber(0) == 1 && llGetNumberOfPrims() > 1) ) { // do your thang }
  7. Xiija

    SOLVED Object Sensor for Help!

    it would look something like this, but this doesnt f**cking work string inventory; string object; vector relativePosOffset = <1.0, 0.0, 0.2>; vector relativeVel = <0.0, 0.0, 0.0>; rotation relativeRot = <0.707107, 0.0, 0.0, 0.707107>; integer startParam = 0; float scanDistance = 2.0; float SCAN_INTERVAL = 5.0; integer items_contained; string name; integer rezcount; string objname; integer CountItems() { return items_contained = llGetInventoryNumber( INVENTORY_ALL ); // --items_contained; } SayCount() { name = llGetObjectName(); llSetText(name + "\n" + "Has " + (string)items_contained + " items.", <0.0,1.0,0.0>, 1 ); } rezzit() { object = llGetInventoryName(INVENTORY_OBJECT,0); //get name of the 1st object in inventory vector myPos = llGetPos(); rotation myRot = llGetRot(); vector rezPos = myPos+relativePosOffset*myRot; vector rezVel = relativeVel*myRot; rotation rezRot = relativeRot*myRot; llRezObject(object, rezPos, rezVel, rezRot, startParam); //rez the 1st object ++rezcount; llOwnerSay("rezcount: " + (string)rezcount +"\nObj: " + object ); } default { touch_start(integer count) { rezzit(); } object_rez(key id) // as soon as something is rez'd , turn on sensor { if( rezcount == 1) { objname = object; } else { objname = object + " 1"; } llOwnerSay("Sensor for:..." + objname ); llSensorRepeat( objname , "" , (PASSIVE|SCRIPTED), 10.0, PI, 10.0 ); } sensor( integer detected ) { while(detected--) { llOwnerSay(llDetectedName(detected)); } } no_sensor() // when item is taken, if any are left in inv, rez another { if( CountItems() ) rezzit(); } }
  8. Xiija

    Using Lists

    something like... list liked = ["one", "Two", "three"]; default { state_entry() { llListen(10, "","", ""); } listen( integer channel, string name, key id, string message ) { if(message) { if (!~llListFindList(liked,[message])) { llOwnerSay("adding *" + message + "* to list..."); liked += message; } else { llOwnerSay("already on list..."); } } } }
  9. Xiija

    NavigateTo a rez prim name! How do i do this?

    If it is dedicated, and you don't need to worry about sim resets etc, you could just get the base prim's key and use pursue? ReturnHome() { llPursue(BASE_PRIM_KEY_HERE, [PURSUIT_OFFSET, <-1.0, -1.0, 0.0>, PURSUIT_FUZZ_FACTOR, 0.2]); }
  10. Xiija

    Learning more about encryption

    may help? http://wiki.secondlife.com/wiki/CatEncryption
  11. Xiija

    trying to make a scanning hud

    sounds something like.... HUD sends a "ping" with llRegionSay ( or llWhisper() = 10m, llSay() = 20m, llShout() = 100m?) on a timer. avi has the response object on, and it is listening on the same channel as the "ping'. object reads its NC and sends a reply back to the HUD ? HUD adds avi to a list so that it doesn't spam the owner.
  12. Xiija

    Holding a key to active a secuence

    You may need to mess with it a bit...... integer count; integer flag; default { state_entry() { llRequestPermissions(llGetOwner(), PERMISSION_TAKE_CONTROLS); } run_time_permissions(integer perm) { if(PERMISSION_TAKE_CONTROLS & perm) { llTakeControls( CONTROL_FWD | CONTROL_BACK | CONTROL_LEFT | CONTROL_RIGHT | CONTROL_ROT_LEFT | CONTROL_ROT_RIGHT | CONTROL_UP | CONTROL_DOWN | CONTROL_LBUTTON | CONTROL_ML_LBUTTON , TRUE, TRUE); } } control(key id, integer level, integer edge) { integer start = level & edge; integer end = ~level & edge; integer held = level & ~edge; integer untouched = ~(level | edge); if (held & CONTROL_DOWN) { if( flag == 0 ) { flag = 1; llSetTimerEvent( 0.5); } } if( end ) { llOwnerSay("end"); llSetTimerEvent( 0.0); count = 0; flag = 0; } } timer() { llSetTimerEvent( 1.0); ++count; llOwnerSay( (string)count); } }
  13. Xiija

    Simplest Unpacker! ::: SCRIPT HELP :::

    i have an old unpacker that is free / open source.. dunno if lookin at the code will help ya... https://marketplace.secondlife.com/p/XMODS-Unpacker-Box-v-20/5872695
  14. Xiija

    Checking for Multiple Values in a List

    http://wiki.secondlife.com/wiki/LSL_Operators || .... && ....
×