Jump to content

XbabylonX

Resident
  • Posts

    281
  • Joined

  • Last visited

Posts posted by XbabylonX

  1. Hello,

    Im looking to buy a vendor stand which gives things after payment but also has the ability to send it as a gift to a third person. I cant find any in marketplace.

    Could someone point me somewhere?

    Thank you very much!

  2. Thank you all for your answers.

    Was entirely my mistake, and a stupid one too.

    I bought an animation to do my tests but I was so excited for it, so much that I was adding in the chair's inventory the poseball of the animation. Of course I had first to rez it, drag the anim file into my inventory, and then place it in the chair.

    Im terrible sorry for your trouble.

    Now the script works perfect!

  3. Hello,

    I have the following code:

    key myRequest;
    string Who;
    default
    {
        state_entry()
        {
    
        }
        touch_start(integer number)
        {
        Who=llDetectedKey(0);
        llInstantMessage(Who,"Sending request to the server! Please wait...");
        myRequest=llHTTPRequest("http://example.com/Page.asp",
              [HTTP_METHOD, "POST",
               HTTP_MIMETYPE, "application/x-www-form-urlencoded"],
               "Who=" + llGetUsername(llDetectedKey(0)));
        }
    
        http_response(key request_id, integer status, list metadata, string body)
        {
                if (request_id == myRequest)
                {
    
                llInstantMessage(Who,body);
                }
        }
    }

     The scenario is as follows:

    Avatar clicks the prim and the code runs.

    If avatar wants to click it again, has to wait some seconds.

     

    As you understand, I want to protect my webserver from accepting mass requests with this button.

  4. Thank you for your answer.

    It throws an error

    integer price=100; default{    state_entry()    {    llSetPayPrice(PAY_HIDE, [PAY_HIDE ,PAY_HIDE, PAY_HIDE, PAY_HIDE]);    llRequestPermissions(llGetOwner(), PERMISSION_DEBIT);    }    run_time_permissions(integer perm)    {        if(perm & PERMISSION_DEBIT)            state cash;    }} state cash{    state_entry()    {    llSetPayPrice(price, [price ,PAY_HIDE, PAY_HIDE, PAY_HIDE]);    }    money(key id, integer amount)    {        if(amount != price)        {        llGiveMoney(id, amount);        llInstantMessage(id, "You paid "+(string)amount+", which is the wrong price, the price is: "+(string)price);        }        else        {        Who = id;        llInstantMessage(Who,"Sending request to the server");        myRequest=llHTTPRequest("http://example.com/Page.asp",        [HTTP_METHOD, "POST",        HTTP_MIMETYPE, "application/x-www-form-urlencoded"],        "Username=" + (string)Who);        llInstantMessage(id, "You paid the right price");        http_response(key request_id, integer status, list metadata, string body)        {            if (request_id == myRequest)            {            llInstantMessage(Who,body);            }        }        }    }}

    At the line I wrote  http_response(key request_id, integer status, list metadata, string body)

  5. Hello,

    Im using this script from here http://wiki.secondlife.com/wiki/LlSetPayPrice

    After recieving the payment (means inside the else condition) I want to inform my webserver and recieve back a response.

    What Im trying to do is to include inside the else the following code:

    key myRequest;
    string Who;
    
    Who=llDetectedKey(0);
    llInstantMessage(Who,"Sending request to the server");
        myRequest=llHTTPRequest("http://example.com/Page.asp",
              [HTTP_METHOD, "POST",
               HTTP_MIMETYPE, "application/x-www-form-urlencoded"],
               "Who=" + llGetUsername(llDetectedKey(0)));
        
    
        http_response(key request_id, integer status, list metadata, string body)
        {
                if (request_id == myRequest)
                {
    
                llInstantMessage(Who,body);
                }
        }

     The code above works perfect in other places Im using it but not in this scenario.

    Could someone give me instructions on how to make it work?

    Thank you very much!

  6. Hello,

    I use on  touch_start the llInstantMessage(llDetectedKey(0),"test");

    The person who clicked the prim, gets the test in local chat as he should.

    The same message method doesnt work inside a http_response as it says "Invalid Key passed to instant message."

    Could someone tell me how to make it work?

    Thank you!

×
×
  • Create New...