Jump to content

Gayngel

Resident
  • Posts

    183
  • Joined

  • Last visited

Everything posted by Gayngel

  1. You can do this with a Corrade bot or Smartbot. Corrade is free, Smartbot is a weekly paid subscription. You will have to look at their API documentation.
  2. You can store links by name. integer link1; integer link2; integer link3; integer link 4; default { state_entry() { integer total = llGetNumberOfPrims(); integer i; for(i = 0; i < total; ++ i) { integer link = llGetLinkName(i); if(link == "Link1") link1 = i; else if(link == "Link2") link2 = i; else if(link == "Link3") link3 = i; else if(link == "Link4") link4 = i; } } } Note: This is only a very basic example, there might be better ways to store links like in a list or linksetdata if that's what you need.
  3. You don't need the Google Cloud Platform. You just need a Google App Script as a go-between your LSL script and your Google Sheet. Google App Script is free and easy to use if you know Javascript. I've used a Google App Script to a Sheet for about 10 years and haven't had to pay a penny.
  4. That is how it's supposed to work but on the ground it really doesn't. All the bot does is give you the run around trying a million fixes you've tried before and then tells you to e-mail support where you waste more time going back and forth when really the issue can be resolved or logged as a bug to be fixed in 5 minutes if you could just speak to a person in live chat or a phone call, its frustrating as hell dealing with support bots.
  5. Just read the year in review post and just want to say please please please Linden Labs do not relegate support to an AI chatbot! Every company that has done this has the worst customer service!
  6. You can also look at using the linkset_data event of Linkset Data instead of link messages and filter for what data was added or changed.
  7. This set of scripts is a basic example of how to store a URL of a server prim to a spreadsheet which can be retrieved from a client prim: Google App Script: https://pastebin.com/HRh49Haq Server Prim script: https://pastebin.com/65kkFsDW Client Prim Script: https://pastebin.com/UYJtu22J
  8. Since I can't make edits to posts when needed please read this document to hire me: https://docs.google.com/document/d/1kjJbJH4JmXXE07sXj6vkM_wXDy0o9q--nn_2oA93jzc/edit?usp=sharing Make a booking here: https://forms.gle/NsSikWmQaUFLz6xN7&nbsp; Testimonials (see comments):
  9. All my rental systems are going crazy here. "***Error*** Maybe the system is in maintenance. Please try again later."
  10. I've got hundreds of items listed on one of my stores. When there's a sale I don't want to go through each listing and edit the price to half off or whatever percentage I want to knock off, that's too painstaking. There should be a button somewhere to select % off all items for a certain amount of time. Please make it easier for us Lindens!
  11. Well that's where the new functions llLinksetDataCountFound & llLinksetDataDeleteFound will be useful.
  12. It's not bad per se, just not as efficient as getting them all at once.
  13. Because the list to too large for script memory so have to do it in stages. For someone who doesn't understand regex and/or are proficient at it, it is far simpler to use indexes. I might use that pattern now though. Thanks Wulfie.
  14. I get what you mean about racing but that can be mitigated by only editing LSD in one script and/or through control flow. All I want is something like this: // linkset data contains the following kv pairs // "a9ba2797-81af-429d-9833-51127ad5593c", "1" // "apple, 0" // "4ab1ec43-b2c0-4ded-8154-bb3b9cc9cbec", "1" // "banana, 0" integer tot = llLinkSetDataCountKeys(); integer i; for(i = tot; i > -1; -- i) { if(llLinkSetDataType(i,DATA_TYPE_KEY)) // imaginary function that casts key found by index and then evaluate it to check if it is a valid key llLinksetDataIdxDelete(i); //imaginary function that deletes a key by its index } Far simpler than having to add and search a pattern... and with a large database, having to search several times over to make sure all keys are caught. Edit: llLinksetDataDeleteFound might work for my purposes though once it arrives... if keys that are not to be deleted are made protected and keys that are to be deleted are unprotected. Or just delete all keys containing a pattern. Edit edit: Some llLinksetDataArray functions would be nice actually. I've made a feature request: https://jira.secondlife.com/browse/BUG-234166
  15. Linkset data really needs an index or FIFO system to be able to iterate over entries and do things like delete the oldest entries or loop through all keys and delete a key if it evaluates to a UUID, etc. It's very frustrating not being able to edit keys with an unknown regex pattern... or even know if all the keys with the pattern are returned for that matter.
  16. Thank you @Frionil Fang . I stuck your script in a new prim and it worked at first but if I try edit the range it just returns status 200 & the max length of chars again. If I change the range back to yours it also returns status 200 & the max length of chars again. It seems to be buggy. Edit: From reading the docs and elsewhere I think it might always work if we can get the right HTTP_MIMETYPE and/or the right mix of range and content-range.
  17. Even with GET I'm getting the same result, it's just returning all the text instead of the range.
  18. The wiki for llHTTPRequest says you can set a custom range of data returned with the content-range custom header. I've tried implementing the header in a request but it just returns the whole data instead of the range. I think I;m not writing it correctly or something. llHTTPRequest(url,[HTTP_BODY_MAXLENGTH,16384,HTTP_CUSTOM_HEADER,"Content-Range","bytes 3440-6900/*", HTTP_METHOD,"POST"],"");
  19. You can either reset the scripts on owner change or attach like this: integer permsGranted = FALSE; key owner; default { attach(key id) { if(id) { llResetScript(); } } changed(integer change) { if(change & CHANGED_OWNER) { llResetScript(); } } state_entry() { owner = llGetOwner(); llRequestPermissions(owner, PERMISSION_CONTROL_CAMERA | PERMISSION_TRIGGER_ANIMATION | PERMISSION_TRACK_CAMERA); } run_time_permissions(integer perm) { if(perm & PERMISSION_CONTROL_CAMERA && perm & PERMISSION_TRIGGER_ANIMATION && perm & PERMISSION_TRACK_CAMERA) { permsGranted = TRUE; } } touch_end(integer num) { if(llDetectedKey(0) == owner && permsGranted == TRUE) { llOwnerSay("perms granted"); // do stuff } } }
  20. FWIW there are many free hosting sites that come with a free SQL database. Gives you more space than Linkset data if you ever need it. I use 000webhost.com a lot.
  21. Sorry for the double post. You can totally avoid a sensor (which can be laggy) for this anyway by doing this: key doctorKey = "a9ba2797-81af-429d-9833-51127ad5593c"; // change this to the uuid of the doctor integer ChInCmdLine220 = -220; integer listen_handle; integer isDoctorNear; //***Checks if paired doctor is within range of 2.5 meters each time a command is heard from bracelet integer checkDoctorRange(key id) { vector obj_pos = llGetPos(); // get the position of the button (this script) list tmp = llGetObjectDetails(id, [OBJECT_POS]); // get the position of the doctor in a list vector doctor_pos = llList2Vector(tmp,0); // assign the position from the list to a variable // compare a distance between two vectors. if(llVecDist(obj_pos,doctor_pos) <= 2.5) return 1; // // if the postion of the button and doctor is within range of 2.5 meters return 1 else return 0; //return 0 if not in range } default { /// default stuff state_entry() { // do other stuff then change state state PAIRED; } } //Doctor touches a bracelet that sends message to this button (this script). //Script/button checks if message was sent by doctor. //Then script/button checks if the doctor is within range (2.5 meters). //--intial parameters here //--functions here //--doctor touches the button (this object) and pairs to this button, assigning themself as the doctor. //------------- (STATE PAIRED) --------------- state PAIRED //start listening { state_entry() //for paired state { // llOwnerSay("state PAIRED"); //LISTENERS listen_handle = llListen (ChInCmdLine220, "", "", ""); //COMMAND CHANNEL - listens to bracelet on CH -220 for commands // best to assign llListen to a handle so at any point you dont need the listener open can remove it with llListenRemove() } //end state_entry listen (integer channel, string name, key id, string message) { if (ChInCmdLine220==channel) //CH -220 //=================START CHANNEL -220/COMMAND { if(llGetOwnerKey(id) == doctorKey) // if the owner of the object sending the message is the doctor { isDoctorNear = checkDoctorRange(doctorKey); // or isDoctorNear = checkDoctorRange(llGetOwnerKey(id)); if (isDoctorNear==0) { llOwnerSay("Doctor is too far away."); //doctor not in range - go back to beginnine } else{ llOwnerSay("Doctor is nearby."); //--Process commands here based on command received from the bracelet } } // end if(llGetOwnerKey(id) == doctorKey) }//end channel } // end listen } //end state PAIRED
×
×
  • Create New...