Jump to content

Laufiair Hexicola

Resident
  • Posts

    238
  • Joined

  • Last visited

Everything posted by Laufiair Hexicola

  1. Morning Rolig, I did see that but couldn't figure out where to put it where it didn't give me a syntax error(even after defining the integer).
  2. yeah I just thought of that and was playing with it, only I think the list or string is truncated. key http_request_id; float gap = 5.0; default { state_entry() { http_request_id = llHTTPRequest("https://translate.google.com/#en/ja/a%20test", [HTTP_USER_AGENT, "LSL_(Mozilla Compatible)"],""); llSetTimerEvent(gap); } http_response(key request_id, integer status, list metadata, string body) { if (request_id == http_request_id) { list result = llParseString2List(body,["<html><body>", ",", "</body></html>"],[]); string songtitle = llList2String(result,90); llSetText ((string)songtitle,<1,1,1>,1); } } timer() { llResetScript(); } } Is there a way to specifically search for the <span id=result_box class="short_text"></span> clause? I did try passing the list to whisper but it gave an error, and attempting to add the span i'm looking for after the <html><body> tags gave an error because the class is quited, but won't search for it otherwise. Also attempting to find the clause using the llList2String gave blank results after 40 so I figured it was truncated.
  3. Morning everyone, thought I'd try my hand at making a translator and so far it hasn't been going well. I have a pre-loaded string set up from Google Translator for now instead of local speech. Here's what i'm working with. key http_request_id; default { state_entry() { http_request_id = llHTTPRequest("https://translate.google.com/#en/ja/a%20test", [], ""); } http_response(key request_id, integer status, list metadata, string body) { if (request_id == http_request_id) { list mine = llParseString2List(body,["result_box"],[" "]); llSetText(mine, <1,1,1>, 1); } } } This is supose to call out to the results page, put the page into a list, and call the clause result_box and put it into llSetText. The full clause that gives the translated result is <span id=result_box class="short_text"></span>. When it compiles though, it says the alpha amount of llSetText is Function Call Mismatches type or number of arguments. Tried changing it to 0 and no results. If I comment out llSetText, it compiles fine. Moving llSetText doesn't work because then it can't find the list mine. I know i'm doing something wrong here, I just don't know what.
  4. Yep going to follow Fluffy and Innula's suggestions - as soon as I changed the llgiveinventory, it tried to find the cards as objects rather then notecards. I've always been able to use uuid's with llgiveinventory, but only static not dynamic. I was trying to piece together a script I thought was going to be simple and ended up being overly complex. Fluffy's script and setup works(thank you for that) and reminds me of how the halovends were setup.
  5. no it's designed to run through automatically, like a scrolling adboard, so if someone is interested in what the texture displays, they click it and are given the relevant notecard. Rolig nailed it - I figured there was something in the call to give the card, but just wasn't sure what. Now I know ^.^
  6. Thank you, I thought I was missing something simple, just wasn't sure - and that was it. Script works now. Thanks again folks.
  7. Thanks for replying and yeah, I was reading about that - only I don't want to give several items at once nor do i want it to give a notecard to a person in a folder. When a texture is displayed, i want it to give a notecard for that texture only - so only one notecard.
  8. Morning everyone, I've put together a script that slideshows images(which works as it's intended to). Now, I'm trying to add in a function so that when an image is shown, it allows a user to click it and get a notecard. Attempted using the similar method used for the images, but for some reason that's not working. Tells me function call mismatch for llgiveinventory. I did try to move the notes list to the touch_start, but that didn't change anything. Something that should be simple has once again proved to be difficult, so I come to the forum asking for help. Thanks, Logan list slides = ["24d13f9a-a8ea-28dd-b6d1-d4cb0d5215f8", //Akai Hane Texture "064bacee-ab78-a16f-d278-1ae4fcda65ff" //Starlight Construction Texture ]; list notes = ["", //Akai Hane Infocard "718d00be-2696-9124-48e3-9f1841059316" //Starlight Construction Infocard ]; integer index; newSlide() { string texture = llList2String(slides,index); llSetTexture(texture,1); index++; if(index>=llGetListLength(slides) ) index = 0; if(index>=llGetListLength(notes) ) index = 1; } default { state_entry() { llSetTimerEvent(7); index = 0; index = 1; newSlide(); } touch_start(integer num) { index = 1; key id = llDetectedKey(0); llGiveInventory(id, (list)notes); } timer() { newSlide(); } }
  9. wow that's um.. not sure how I overlooked that one, but yes - it's all working now. Thanks Love, Oz and Arton, appreciate it!
  10. That didn't do anything - even put an underscore between LSL and Mozilla and no change. It's displaying the text, but not the song name.
  11. Hello Oz, I changed the list and string around and it didn't seem to do anything. I did try to see if I could see the entire string and that didn't show anything either. key http_request_id; default { state_entry() { http_request_id = llHTTPRequest("http://198.15.88.42:8042/7.html", [HTTP_USER_AGENT, "LSL_Script_(Mozilla Compatible)"],""); } http_response(key request_id, integer status, list metadata, string body) { if (request_id == http_request_id) { list result = llParseString2List(body,["<html><body>", ", ", "</body></html>"],[]); string songtitle = llList2String(result,6); // list status = llCSV2List(songtitle); llSetText ("Now playing on Aristide Radio \n"+(string)songtitle,<1,1,1>,1); } } }
  12. I know the last reponse was back in October however it seemed relevent to post this in here. I'm trying to pull stats from a shoutcast v2 stream and while it gives me my floating text, it's not displaying the relevant info(the song title). I can confirm that my IP, while being v2, gives me stats from 7.html The script I'm working with: string stream = "http://198.15.88.42:8042"; key kSentRequest; default { state_entry() { kSentRequest=llHTTPRequest(stream + "/7", [HTTP_USER_AGENT, "LSL_Script (Mozilla Compatible)"],""); } http_response (key kRecRequest, integer intStatus, list lstMeta, string strBody) { if (kRecRequest == kSentRequest) { list html = llParseString2List(strBody,["<body>", "</body>"],[]); string info = (llList2String(html,6)); list status = llCSV2List(info); llSetText ("Now playing on Aristide Radio \n"+llList2String(status,6),<1,1,1>,1); kSentRequest = NULL_KEY; } } }
  13. I've been all over that thread and didn't see anything specific past what I updated in my script already (the line llHTTPRequest(stream + "/7.html", [HTTP_USER_AGENT, "LSL_Script (Mozilla Compatible)"],""); ). Also it was pointed out by someone who contacted me in world, but my stream's shoutcast v2. Not sure if that makes a difference or not. I might need to tack this on the bottom of that thread to get an answer.
  14. by the lack of replies i'm guessing no one knows anything about the change in llHTTPRequest enough to help me out.
  15. Trying to construct a script that displays song info and it's misbehaving. I've bult these before using this script as the base and have had no issue. Even changed the clauses due to the change in llhttprequest and it still refuses to display info. Maybe someone could look at it and see what's up? Would appreciate it. -Logan // 7.html gives the following in the body // 0 -> current listeners // 1 -> status // 2 -> listener peak // 3 -> max listeners // 4 -> reported listeners // 5 -> bitrate // 6 -> song string stream = "http://198.15.88.42:8042"; key kSentRequest; default { state_entry() { kSentRequest=llHTTPRequest(stream + "/7.html", [HTTP_USER_AGENT, "LSL_Script (Mozilla Compatible)"],""); } http_response (key kRecRequest, integer intStatus, list lstMeta, string strBody) { if (kRecRequest == kSentRequest) { // Strip the html out of the received information and just show what is inbetween the body tags list html = llParseString2List(strBody,["<body>", "</body>"],[]); string info = (llList2String(html,6)); list status = llCSV2List(info); llSetText ("Now playing on Aristide Radio \n"+llList2String(status,6),<1,1,1>,1); // llSay(0," Current Listeners: " + llList2String(status,0)); // llSay(0,"Status: " + llList2String(status,1)); // llSay(0,"listener peak: " + llList2String(status,2)); // llSay(0,"max listeners: " + llList2String(status,3)); // llSay(0,"reported listeners: " + llList2String(status,4)); // llSay(0,"bitrate: " + llList2String(status,5)); // llSay(0,"Song: " + llList2String(status,6)); kSentRequest = NULL_KEY; } } }
  16. Hello Innula, thanks that did it! I moved the listener claus to the event cash and it works now! I'll be fiddling around with the touch start as that will be an owner only feature. Appreciate everyone elses help in trying to get this to work also, Logan
  17. Oh ok I see what you're talking about - and no, that part of the menu hasn't been written yet. The magazine titles are written in a series of what else clauses and giveitem clauses. Let's see how that works lol...
  18. I did try and look for the button or code that let me do that but was unable to find it, so used quote. Apologies there. I have tried messing with the placement of the state but every time i move it to anyplace other then where it is, it throws a syntax error. Shortening or eliminating the timer event doesn't do anything.
  19. Exactly, thanks for hitting it right on the head. I took a menu script that already works and attempted to add a way so a visitor would have to pay the object first, then get the menu(which is why I call the menu at the very bottom). I did try to put the state cash up in the script but it gave a syntax error, so I figured I'd come to the forums and ask for some help in getting this script to work right. The point of the script is that it sits in a 1li magazine display and visitors pay the display first, then are allowed to make a selection. When I pay, it gives me the main dialog but then hangs when I choose a button other then close(like it's waiting for the pay event again). I'm just not sure how to go about correcting this.
  20. defined that already, unless i'm making a sub-menu of a sub-menu. string subMenu_01_Dialog = "MAGAZINES\nNot Implemented yet."; list subMenu_01_Buttons = ["Close"]; else if(message == "Magazines")open_menu(id, subMenu_01_Dialog, subMenu_01_Buttons);
  21. Evening everyone, putting a script together that'll go into a physical magazine rack(it's 1li so nothing's movable). When a visitor comes along, they buy from the rack and are presented with a menu where they can choose what they want.. only my secondary buttons don't seem to be doing anything when called from the mainmenu. I admit this is a mishmash of scripting and can generally follow along to get done what I'm looking to do, but this one confuses me so if there's anyone out there willing to help, would be appreciated. -Logan
  22. Evening Tedra, I have a few that will go anywhere on a region you want to go with no max heights, however they all go off x,y,z coordinates. You'd have to go to your destinations, write down their coordinates, then what you want to name them, then put them into the script. There's no way around this. -Logan
  23. No because most that have updated those scripts have used them in pets like Biobreeds, Kittycats, etc.. and those in particular haven't been touched by the common person because it was written with old code(even SL code has changed since 2015). You would have to pay a coder to rewrite them for you. If it doesn't make sense, ask a coder.
  24. So after reading a few articles and discussing some things with others, I'm no longer hunting for item creators. The simple fact being creators make stuff and patrons buy stuff. To achieve what i'm seeking i'll have to find the items I seek other ways. What does that mean for this Want Ad? It means I no longer need it. I can't delete it, so i'll let it slip into oblivion. Thanks everyone.
  25. glad you found what you were lookin for ^.^ Nice setting there btw...
×
×
  • Create New...