Jump to content

gwenavive

Resident
  • Posts

    89
  • Joined

  • Last visited

Everything posted by gwenavive

  1. Or should i say Listing Wastements I had 2 and found 1 going through each item 1 by 1 but can't find the second. Is there soming in my account that would list all current one i can manage from there?
  2. Thanks Rolig i'll check there. I did see something about google sheets before but not what i'm after but as you say, i can find more there
  3. I've been trying out a few examples found on google. I've ensured that port 12043 is open on my web server. I'm able to receive an echo from the php code on the server when i touch the prim but i would like to be able to call the Advanced_HTTP_Request() function in PHP from the SL Prim and also post back a result without echo as that changes the actual web page. So far i haven't been able to push string from the server. Only get from SL. Here's the LSL i'm testing: default { state_entry() { llRequestSecureURL(); } touch_start(integer total_number) { //Asking for Server URL at database/////////// //Packing info// string URL = "http://xest.com/trymeon.php"; list parameters = [HTTP_METHOD,"POST",HTTP_MIMETYPE, "application/x-www-form-urlencoded"]; string bodySend = "objectName="; //End packing info// //send the request key kSentRequest =llHTTPRequest(URL, [HTTP_METHOD, "POST"], "some string"); //llOwnerSay("Debugging: Send html-request" + (string)URL + (string)hudName); //End of asking for Server URL///////////////// } http_response( key request_id, integer status, list metadata, string body ) { list msgList = llParseString2List(body,["|"],[]); llOwnerSay("meta = " + (string)metadata); llOwnerSay("Received from the Server: " + llList2String(msgList, 1)); } http_request(key id, string method, string body) { llOwnerSay("body = " + body); llOwnerSay("method = " + method); if ((method == URL_REQUEST_GRANTED)) { llOwnerSay("URL: " + body); } else if (method == "POST") { llOwnerSay("PHP script sent: {" + body + "}"); llHTTPResponse(id, 200, "PHP script sent: {" + body + "}"); } } } And here is the PHP code on my server: <?php echo "LSL Script answered:<br>"; echo Advanced_HTTP_Request("https://simhost-0923742528556b07e.aditi.secondlife.io:12043/cap/b30cc72c-0ecc-7ed4-ceda-238b3625e36e", "Hello script, how are you ?"); function Advanced_HTTP_Request($Host, $PostData = "") { $Method = "POST"; if (empty($PostData)) { $Method = "GET"; } $Port = 80; if (strtolower(substr($Host, 0, 5)) == "https") { $Port = 443; } $Host = explode("//", $Host, 2); if (count($Host) < 2) { $Host[1] = $Host[0]; } $Host = explode("/", $Host[1], 2); if ($Port == 443) { $SSLAdd = "ssl://"; } $Host[0] = explode(":", $Host[0]); if (count($Host[0]) > 1) { $Port = $Host[0][1]; $Host[0] = $Host[0][0]; } else { $Host[0] = $Host[0][0]; } $Socket = fsockopen($SSLAdd.$Host[0], $Port, $Dummy1, $Dummy2, 10); //echo "socket = " + $Socket + "<br>"; //echo "host = " + $Host[0] + "<br>"; echo "port = " + $Port + "<br>"; echo "|This is coming from an echo in php on the kavini server|"; if ($Socket) { fputs($Socket, "$Method /$Host[1] HTTP/1.1\r\n". "Host: $Host[0]\r\n". "Content-type: application/x-www-form-urlencoded\r\n". "User-Agent: Opera/9.01 (Windows NT 5.1; U; en)\r\n". "Accept-Language: de-DE,de;q=0.9,en;q=0.8\r\n". "Accept-Charset: iso-8859-1, utf-8, utf-16, *;q=0.1\r\n". "Content-length: ".strlen($PostData)."\r\n". "Connection: close\r\n". "\r\n". $PostData); $Tme = time(); while(!feof($Socket) && $Tme + 30 > time()) { $Res = $Res.fgets($Socket, 256); } fclose($Socket); } $Res = explode("\r\n\r\n", $Res, 2); //echo $Res[0] + "<br>"; return $Res[1]; } ?>
  4. This is a permanent one. Appologies. https://discord.gg/q4uCYeFMTr
  5. Thanks Innula, perfect and elegant as well. All in one line Appreciated.
  6. Thats the hard bit, it's on Pay not on Touch without having a 2 step process of a sign saying someone has to touch it first then they can right click to pay. most don't read so probably get frustrated right clicking and can't pay
  7. I think i'm missing something. this is to get the info of the avatar that is about to pay an object and to check if they are in the same group as the object is
  8. Looking at that now but only seems to be for prims unless i'm missing something?
  9. Thanks Lucia, what would llSameGroup() be checking for or with?
  10. Thanks Rolig, does that also include the group they are wearing at that moment?
  11. Trying to find another way to see if a person is wearing the group tag to restrict payment to the object only for group members as llDetectedGroup seems to only work in the touch event. i considered making it a 2 step process by enabling payment after touch but surely there has to be a better way i hope.
  12. Agreed Rolig, the project gave me enough headaches and keeping things tight in a laggy world is always good
  13. One of those "Wizzard of Oz" things. Who knows what goes on behind the curtain but damn it's pretty
  14. This youtube video is what i've done so far and using in my store now before my new central server version to make it a lot easier to setup and mange. https://www.youtube.com/watch?v=TsjbPZOk_Cs
  15. Works perfectly Rolig i can't thank you enough for persisting with my mushy brain at moments lol Yay
  16. Hi Molly and thanks. My current stands are working in my store using the AVsitter system with my own codes for the rest and each object/outfit is in the stand itself. Same as if the stand is the actual item on the wall someone clicks. What i'm doing now is making it easier for other makers to use by having a central server to box everything like a caspervend dropbox and each stand only needs a config card making it much easier for makers to manage 100 or more stands This will be a full easy to manage system for other makers not just myself. Being a maker i know how time consuming the store can be Appreciate the input though
  17. I made a function i can call with the kAv and don't need to add the full one as i can then just use the function to connect with the new object anytime Amazing thinking. Not like thinking outside the box, more like, what there's a box? lol Stupid question now, how can i access the start_param from the on_rez event to set the description with the value now? then that should be it
  18. Thanks Rolig i love that idea and tried to look at that earlier but as it's an integer i couldn't work out how or even to retrieve that parameter in the rezzed object. the only way i can get the code to compile is like this integer start_param = (integer)Key2Packed(aviKey); key getkey = Packed2Key((string)start_param); llOwnerSay("(((((((((((((((((((((((((( packed key = " + (string)getkey); and the value of getkey is (((((((((((((((((((((((((( packed key = ffc0ffc0-ffc0-ffc1-ffc0-ffc0ffc0ffc0 i noticed that anna left a comment there that a NULL_KEY will return that but the actual key is correct yet it works with using his example variables and generatekey (((((((((((((((((((((((((( packed key = 耷滢盫⤶严䍁㥻ێ㢘 (((((((((((((((((((((((((( original key = dd84ed96-522c-9c0b-8642-72b70d5d70f1 i may have a extra space in my variable i'll check i think you might be on to something though. i'm excited now i found that if the key is converted to a string and back to a string it works fine. trying to cast to an integer it always equals 0
  19. Taking some time away has cleared the mind i think, hope. The rezzer holds onto the claimed_rez_key variable which is set on the if (msg == "REZ") from the pose stands llRegionSayTo(id, tmo_channel, "ATTACH|" + (string)claimed_rez_key); is to the new rezzed object with the kAv being in the claimed_rez_key variable. the "claimed_rez_key" variable can be be changed by any other stand at any time before the rezzer can receive the if (command == "REZZED") from the newly rezzed object, so if person 1 sent a request and claimed_rez_key is person 1 and person 2 sends a request at the same time and the rezzer hasn't been able to send llRegionSayTo(id, tmo_channel, "ATTACH|" + (string)claimed_rez_key); for person 1 yet. claimed_rez_key now equals person 2 so person 1's object now is controlled/named for person 2 not person 1 as that was the value of the claimed_rez_key variable at the time of sending attach to person 1's object. the only solution i can see which doesn't seem possible with LSL would be to have a return value for the llRezAtRoot or be able to send the newly rezzed the data along with llRezAtRoot at the point of making it rez. i think that explains better how i'm seeing the logic and timing being an issue.
  20. My mind is almost mush by now lol. i appreciate your efforts and hope not getting frustrated yes in step 1 the rezzer captures both the pose stand and avatars kAv's when a request is received by the rezzer from a pose stand the rezzer then rezzes a different object not another pose stand, lets say a prim cone object and places that over at the requesting pose stand. the rezzer then sets the description of the newly rezzed object to the kAV of the avatar so everyone knows that avatar is in control of that object now, then sends the new object a command to attach which sets off the llAttachToAvatarTemp where the permissions ask the avatar to attach or not. letting the object know the kAv of the avatar is so that when the avatar gets off the pose stand, the rezzer can tell that object to detach this is where not being able to set the new object with the correct kAv means that an avatar on another pose stand can have their rezzed object detached when another avatar gets off. i can't seem to change my brain thinking (a bit mushy at the moment) the critical moment in my mind is when the rezzer receives the "REZ" from a pose stand having the "controller kAv" (aka Pose Stand UUID and Avatar UUID), then rezzing that new object and waiting to hear back from the new object that it exists before the rezzer can set it's description to the new "controller kAv" when the "controller kAv" can change from another request from another pose stand before it can send out the command to the new object to set its description to the "controller kAv" when the "controller kAv", is a third party to the process. so if 2 objects have been rezzed by the rezzer having 2 pose stands request them, at the point of the rezzer setting their descriptions with the "controller kAv", both receive the "controller kAv" of the last person who clicked in that sequence. Setting both objects to the same "Controller kAv" I do appreciate you taking the time to help me out here. means a lot.
  21. I may be confusing myself no doubt. Been working on this for hours to solve. the avatar sits on a prim (stand) and gets a dialog message of what to rez the stand then sends a request to the rezzer (server containing the object) the rezzer (server) then rezzes that object and can't let the object know that the stand was the one who wants it so the objects on rez can only get the kAv of the rezzer (server) and not the stand that requested it. other than waiting for the new object to let it know it's there by sending "REZZED" to the rezzer and the rezzer then sending a command to set the description to the stand kav for example so the hard bit for me is that the "REZ" call comes from the prim (stand) and the "REZZED" comes from the object both going to the Rezzer (server) and how in timing only as i think there's no other way? to marry the 2 up. works perfectly if both stand select to rez things in turn but gets a little confused when everyone clicking and clicking lol so i think on your point 2. Rezzer creates a new object, the object would only be able to get the kAv of the rezzer and not the stand requesting it? Not sure if i'm confusing things more now. i hope not and that makes it all clearer. My brain is blury lol
  22. Thanks Rolig. I forgot to mention that the llRezAtTarger comes from the one server which has the objects in its contents inventory so the rezzed object can only know of the server and not the requester which is my problem i think. Does that make a difference to your thinking or i missed something?
  23. I know i'm asking a few questions on this project but i only ask once i've spent hours and hours and get no where and need the assistance of the more knowledgable scripters out there. Situation: an avatar sitting on my rezzer stand requests to rez an object. in the on_rez event for that object it lets the server know it was rezzed and sends its UUID via listen with "REZZED|UUID" in the "REZZED" received, it then does llRegionSayTo that object to set the description with the UUID of the avatar UUID that requested it. Problem: 2 avatars sitting on my rezzer stands each, request to rez the same object each at the same time. Without being able to use llRezAtTarget and parse the requesting avatar's UUID, the object alone has no idea who requested it at that point and is left to the timing of the listen event to sort that out. The rezObject function does know the avatar UUID when doing calling the rezObject function with llRezAtTarget Server Code: listen(integer channel,string command,key id,string message) { list messagelist = llParseString2List(message,["|"],[]); string command = llList2String(messagelist,0); if (command == "REZZED") { //Received from the object's on_rez event llOwnerSay("++++ from rezzed item: " + message); llRegionSayTo(llList2Key(messagelist,2), tmo_channel, "SetObjectOwner|" + (string)claimed_rez_key); llRegionSayTo(llList2Key(messagelist,2), tmo_channel, "ATTACH|" + (string)claimed_rez_key); } if (command == "REZ") { //Received from the requesting stand llOwnerSay("+++ Rez a new item: " + message); list posrot = llParseString2List(pos,["~"],[]); //Function for llRezAtTarget rezObject(llList2String(messagelist, 0), claimed_name, mesh, llList2String(messagelist, 3), (vector)llList2String(posrot, 0), (vector)llList2String(posrot, 1), llList2String(messagelist, 5)); claimed_rez_key = llList2String(messagelist, 0); } } Because the 2 commands received aren't aware of each other and left up to timing, the claimed_rez_key is unreliable for multiple avatars Does anyone have any suggestions of a more reliable way i could do this to ensure that the correct avatar UUID is set to the right rezzed object as i'm unable to rez an object with any set values?
  24. Yes for loops get a bit grumpy when someone changes the count during a remove item Thanks everyone. I managed to make the code tighter with the llListFindList. Appreciated
×
×
  • Create New...