Jump to content

Gayngel

Resident
  • Posts

    124
  • Joined

  • Last visited

Everything posted by Gayngel

  1. I'm experimenting with storing data off-world using free resources and right now I'm trying out making pastes in pastebin. When I try make a new paste I get this error in http_response: The pastebin api at https://pastebin.com/doc_api says that data must be sent as UTF-8 so I've set MIMETYPE and ACCEPT to "text/plain;charset=utf-8" but still getting the error. Can anyone figure how to get past this error? // Script created by Gayngel of The Script Yard. // Follow the numbered steps in this script to set up and understand how this script works.. // Step 1: string api_key = ""; //To make a paste to pastebin you must have a pastebin account. Once you have created a pastebin account go to the pastebin api to retrieve you unique api key. The pastebin api is at https://pastebin.com/doc_api. You can also click the api button at the top of the website on pastebin.com to go to the api. Look for the section that shows your unique api key like in this screenshot https://i.imgur.com/Q1ul8Th.png. For example if your unique pi key is c46e0524312gbgh103bedh1aba2zj1l3 then the line in this script should be: string api_key = "c46e0524312gbgh103bedh1aba2zj1l3"; // N.B: Do NOT ever give out your api key to anyone!!! If you intend to sell this script in your object make the script no mod as no one should ever see your api key. If someone accesses your api key they can create spam pastes on your account and/or delete your pastes. It is probably best not to sell this in an object because each copy of the object will create a new paste on your account. You can only have a limited amount of unlisted/private pastes on a free pastebin account. // Step 2: string privacy = "2"; // Set the privacy of the paste your are going to make. // Set this 0 if you want the paste to be public for everyone to see on pastebin. // Set this to 1 if you want the paste to be public on pastebin but unlisted. // Set this to 2 if you want the paste to be private so only you can see it on pastebin. // Step 3: string paste_lang = ""; // If the text you are pasting is a programming/scripting language you can set this as the language key to make the paste highlight the program's syntax. For exmple if you want your paste to highlight in LSL the line in this script should look like this: string paste_lang = "lsl2"; //You can see a list of all highlighting keys on the pastebin api https://i.imgur.com/K5caEju.png // Leave this blank if the text you want to paste is not a program/script string paste_url = ""; //The url you get returned from pastebin when you make a paste. Leave this blank on first creating the paste. Once you get the URL to the created paste the script will tell you the URL to it. You can then copy and paste the URL to this line. string paste_message; // The message you want to send as a paste. You will set/write this in an event or function. integer coins; // a variable you can paste to and get from your paste. Number of coins collected. integer lives; // another variable you can paste to and get from your paste. Number of lives you have. integer goombahs; // another variable you can paste to and get from your paste. Number of goombahs you squashed. integer koopas; // another variable you can paste to and get from your paste. Number of koopa shell you kicked. key owner; key req; default { state_entry() { owner = llGetOwner(); } touch_end(integer num) { ++ coins; // increment coins ++lives; // increment lives; ++goombahs; // increment goombahs; ++koopas; // increment koopas; //Step 4 //Write the data you want to send as a paste paste_message = "message=Itsa you Mario! You have " + (string)lives + "lives left. You collected " + (string)coins + "coins. Your princess is in another castle\ngoombahs="+(string)goombahs+"\nkoopas="+(string)koopas; if(paste_url == "") // This will create the new paste. Since you haven't made a paste before the paste_url is blank. So a new paste will be created and return a url to the paste. { // curl_setopt($ch, CURLOPT_POSTFIELDS, 'api_option=paste&api_user_key='.$api_user_key.'&api_paste_private='.$api_paste_private.'&api_paste_name='.$api_paste_name.'&api_paste_expire_date='.$api_paste_expire_date.'&api_paste_format='.$api_paste_format.'&api_dev_key='.$api_dev_key.'&api_paste_code='.$api_paste_code.''); req = llHTTPRequest("https://pastebin.com/api/api_post.php?api_option=paste&api_dev_key="+llEscapeURL(api_key)+"&api_paste_private="+llEscapeURL(privacy)+"&api_paste_name="+llEscapeURL("test_lsl")+"&api_paste_code="+llEscapeURL(paste_message),[HTTP_MIMETYPE,"text/plain;charset=utf-8",HTTP_METHOD,"POST",HTTP_EXTENDED_ERROR,TRUE, HTTP_ACCEPT, "text/plain;charset=utf-8"],"Ping"); } else // This will update the paste. Since a paste was created there is a URL to it. Delete the paste and create a new one. { } } http_request(key reqID, string method, string body ) { llOwnerSay("REQUEST: " + body); } http_response(key reqID, integer status, list metadata, string body) { llOwnerSay("RESPONSE:" +body + " STATUS:" + (string)status + "METADATA: " + llList2CSV(metadata)); } }
  2. That math and rotation stuff gives me a headache.🥴 It works though, thank you Lucia.
  3. I really want to detect if a sitter on an object presses the ESC key to reset the camera, but of course that is not possible. The next best thing is to get the camera pos/rot and compare to the desired pos/rot. I defined a camera rot/pos using llSetCameraEyeOffset and llSetCameraAtOffset so when the ESC key is pressed the camera snaps to my defined pos/rot. I want to be able to get the camera pos/rot from when an avatar is sitting on the object and see if the camera is say <2,3,1> and at 90 degrees both pos&rot relative to the object. Using a timer I want to compare if the camera is at the desired pos/rot but llGetCameraPos and llGetCameraRot use region co-ordinates while llSetCameraEyeOffset and llSetCameraAtOffset use local co-ordinates. Is there a way to get local pos from a region pos or vice versa so I can compare? The script would looksomething like: vector cam_pos; roatation sitRot; default { state_entry() { llSitTarget(<0.3,0.0,0.2>,ZERO_ROTATION); sitRot = llAxisAngle2Rot(<0.0, 0.0, 90.0>, 0.0 * DEG_TO_RAD); cam_pos = <2, 0, 1> * sitRot; llSetCameraEyeOffset(<0.05, 0.1, 1.5> * sitRot); llSetCameraAtOffset(cam_pos); } changed(integer change) { if(change & CHANGED_LINK) { if(llAvatarOnSitTarget() != NULL_KEY) llRequestPermissions(llAvatarOnSitTarget() PERMISSION_TRACK_CAMERA); else lSetTimerEvent(0.0); } } run_time_permissions(integer perm) { if(perm & PERMISSION_TRACK_CAMERA) { llSetTimerEvent(0.0); llSetTimerEvent(1.0); } } timer() { vector avi_pos = llGetCameraPos(); if(cam_pos == avi_pos) // this is what I need to compare. How can I compare a region pos to a local pos? { // do stuff } } }
  4. https://about.fb.com/news/2021/08/introducing-horizon-workrooms-remote-collaboration-reimagined/
  5. Well I thought this post was about me (since you spoke to me inworld about it) up until you saying the scripter gave you a cost to produce this ban/security system, but I did not give you any quote on cost. I said to you that my RL commitments are taking priority right now. I don't know who else you spoke to, but all I'll say is if I did have the time to produce the system: bells, whistles, security features & all; for L$50k I would give you the system full perm and all rights.
  6. You can write a check for a sim restart with llRequestSimulatorData before storing your data or processing it: http://wiki.secondlife.com/wiki/LlRequestSimulatorData There is a "stopping" value returned when calling DATA_SIM_STATUS which will tell you if a region is about to stop/shutdown/restart.
  7. I need to resize some meshes with llSetScale() but I only want to resize one side of the mesh. Is there way to do a path cut in Blender?
  8. I've been trying to work with Google App Script in Open Sim using the same scripts I have in SL but get no input/response from the App script. It seems like OpenSim URLs are not recognized by Google. If anyone can get scripts in Open Sim to work with Google App Script please let me know how you did it.
  9. @Xiija You can use URL parameters to send variables. Instead of using the body of the POST, just append the variables to the URL. i.e: After the App Script URL add a "?" then a key/id pair separated by "&" e.g: llHTTPRequest("https://script.google.com/macros/s/AKlycby72IWfkiup3YZdHtGk2bHSX147nhalhawYCKufV5vgvAFXsrNQ/exec?uuid=a9ba2797-81af-429d-9833-51127ad5593c&name=Gayngel&timestamp=2021/02/27-10:32",[HTTP_METHOD,POST],"") In the App Script you then retrieve the data from the e argument in doPost(e). The e argument represents the group of requests parameters you specify. To get each data separately you append the specified key to the e parameter field. doPost(e) { var uuid = e.parameter.uuid; // Will be a9ba2797-81af-429d-9833-51127ad5593c var name = e.parameter.name; // Will be Gayngel var timestamp = e.paramter.timestamp; // Wil be 2021/02/27-10:32 }
  10. MP4 doesn't work actually. Issues with licensing. Live streams encode to MP4 which is why they don't work. @Qie Niangao How are you getting them to play? Edit: Nevermind I read previous posts elsewhere. Needs FS Beta or the newest SL Viewer.
  11. If you have the SURL you can trying logging into the place. Copy and paste the SURL to a notepad or something and extract the region and co-ordinates of the place. i.e everything that comes after "https://maps.secondlife.com/secondlife/" For example: https://maps.secondlife.com/secondlife/Bonaire03/111/130/22/ <------ Copy out Bonaire03/111/130/22/ At the login second life paste the region and co-ordinates in the "Last Location / Home / Type region box". Then just click login. You will either be logged into the place you want to visit or a safe zone if it does not exist anymore.
  12. I've been using Google App Script to store date in a sheet for scripts for about 3-4 years now. I sell a greeter that can store about 200k visitor UUIDs and data like responses to ""Can we use display your profile pic here?", who took a landmdark, how long the avatar stayed on the parcel, unique visitor counts, etc. Google Sheets and App Script are really a robust way to store persistent data.
  13. Looking to rent a private island 1/4 sim residential/commercial use and club allowed. Club will be used only once a month.
  14. Is there a UDF somewhere that can iterate over multiple lists and delete duplicate elements and keep the element in just one list? (sort of like the .zip()function in Python) e.g: list a = ["Apples"]; list b = ["Apples"]; list c = ["Apples"]; if the element "Apples" in list a is also in list b and list c delete it from both list b and c.
  15. I am a programmer with 5 years experience in scripting with LSL. I enjoy building custom systems ground-up and will provide low lag solutions to my customer's specifications. I can write simple, minor fixes to existing scripts, tip jars, club systems, dialog menus, detections, HUDs and vendors to more advanced systems such as pose systems, RLV, vehicles, pathfinding, weaponry, SL experiences and HTTP for external coms to websites and databases. (Also experienced in HTML/CSS, php, SQL, Ruby, Rails, Python and Javascript ) Script adaptations and library resources if used will be fully cited. I work closely with my clients providing working demos of their products with full perm models (with user license) on completion and delivery. Note: Models will be mockups to present the functioning script, clients must finalise prim designs and builds themselves. Clients may also visit my workshop to see the progress made on their projects. Price is dependent on complexity of the project. Scripts will be full perm on payment . Delivery may be a few hours to weeks also dependent on script complexity and work load. IM me inworld or visit The Script Yard for a consultation. If I'm offline IMs will go to email and will get back to you ASAP. (Forwarning: Adult rated profile) Copy/paste this link to the nearby chat window in your viewer, press enter then click on my name in chat to open my profile: secondlife:///app/agent/a9ba2797-81af-429d-9833-51127ad5593c/about Marketplace Store: https://marketplace.secondlife.com/stores/149734
  16. I have a json string that consists of key/value pairs, each pair a JSON_OBJECT. The values are JSON_OBJECTs that contain key/value pairs themselves. So JSON_OBJECTs nested in a JSON_OBJECT. e.g: {main_key, {nested_key,nested_value,nested_key,nested_value,nested_key,nested_value},{main_key,{nested_key,nested_value,nested_key,nested_value}},{main_key,{nested_key,nested_value,nested_key,nested_value}}} Is there a way to get the main_key in the JSON_OBJECT by searching the nested_value? Like can I llListFindList(blah blah blah) - 1 or something similar?
  17. For those who don't know, Glaznah Gassner is the creator/developer of Smartbots.😛
  18. I find using SLPPF in a loop instead of doing every prim all at once produces better results but of course you have to tolerate your object changing colour prim by prim over a few seconds rather than all immediately. If you can live with that caveat then try a loop. It may of course just be the sim you are trying your script on is very laggy so try it on a quieter region.
  19. Laughs at the people who say they won't touch RAR archives. How do you live on the Internet without them??? Will give Black Dragon a try as I have a very small hard drive so need something portable.
  20. Gayngel

    Login Issues

    I am also experiencing this problem, account is definitely logged out and on Windows 10. Submitted a support ticket did not get a sufficient answer, was just told to uninstall and re-install the newest version of my viewer.
  21. You could use llGetAgentList in another script and link message the list length to your existing script.
  22. Just creating the breedable pet itself is probably going to cost at least $US1000. Script animating and/or animeshing is a long tedious process, not to mention creating a formula that generates a unique pet out of the milllion and one variations, and all the attributes that the breedable should have. 1000 might even be too low, I've heard some crazy amounts offered (US5k upwards) and that's without a web database. But if you've found someone to do it cheaper then God help them they're probably crying themselves to bed lol.
  23. This is very concerning I think for people who hardly make use of processing credit... What if someone who never buys lindens nor cashes out suddenly gets a gift from a friend and now wants to process it to Paypal or their bank account? A year later having made no transactions has their account made inactive and starts to accrue interest and has to pay it... This just seems unfair to be penalized for hardly ever using a service. I am sure others here can think of similar situations for why they hardly process credit out but they are now going to penalized for doing it just once. This is just setting off lots of alarm bells and a great big "UUUUH NO NOT HAPPENING!" from me.
  24. LL posted this today: https://community.secondlife.com/blogs/entry/2577-important-changes-to-your-second-life-account-introducing-tilia/ The Tilia TOS states: This is very concerning I think for people who hardly make use of processing credit... What if someone who never buys lindens nor cashes out suddenly gets a gift from a friend and now wants to process it to Paypal or their bank account? A year later having made no transactions has their account made inactive and starts to accrue interest and has to pay it... This just seems unfair to be penalized for hardly ever using a service. I am sure others here can think of similar situations for why they hardly process credit out but they are now going to penalized for doing it just once. This is just setting off lots of alarm bells and a great big "UUUUH NO NOT HAPPENING!" from me.
×
×
  • Create New...