Jump to content

Vendor inventory to inventory


Devon Humburg
 Share

You are about to reply to a thread that has been inactive for 1644 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

I am trying to make this vendor work right, right now it just Rezzs the object to in world, what I want to do is have it go into the inventory of the person clicking on it, can anyone help, I don't have a clue on how to do it or the command I need to look up.

 

here's the code broken down so there are no //comments except 1 as it has coding in it.

 

thanks in advance !

count()
{
    integer Anzahl= llGetInventoryNumber(INVENTORY_OBJECT);
    string INHALT=llGetObjectDesc();
    string Ausgabe=INHALT+" "+(string)Anzahl;
    llSetText(Ausgabe, <0,1,0>, 1.5);
}

default
{
    on_rez(integer start_param)
    {
        count();
    }
    
    state_entry()
    {
        llAllowInventoryDrop(TRUE);
        llSetTimerEvent(300);
        count();
    }

    touch_start(integer total_number)
    {
        integer number = 0;
        if(llGetInventoryNumber(INVENTORY_OBJECT) == 0)
        {
            llWhisper(0,"Sorry ... Nothing left!");
        } else {
            if (llDetectedGroup(number))
                 llRezObject(llGetInventoryName(INVENTORY_OBJECT,0), llGetPos()+<0,0,.5>,ZERO_VECTOR,ZERO_ROTATION,0);
            else
                llWhisper(0, "Wrong active group!");
//            llGiveInventory(llDetectedKey(0),llGetInventoryName(INVENTORY_OBJECT,0));
        }
        count();
    }
    
    changed(integer change)
    {
        if (change & CHANGED_INVENTORY)
        {
            count();
        }
    }
    
    timer()
    {
        count();
    }
}

 

 

Link to comment
Share on other sites

1 hour ago, Devon Humburg said:

I am trying to make this vendor work right, right now it just Rezzs the object to in world, what I want to do is have it go into the inventory of the person clicking on it, can anyone help, I don't have a clue on how to do it or the command I need to look up.

Create a box. In the General properties, set the box to SELL, choose GIVE CONTENTS, set a price. This is a very serious response based on the description of what you want to do. Vendors are way overrated and really only necessary if you have more items to sell than you have LI to display them.

Edited by Alyona Su
  • Like 4
Link to comment
Share on other sites

If the transfer from vendor to recipient takes place within the same sim (region, sorry Patch), I highly recommend using http://wiki.secondlife.com/wiki/LlGiveInventoryList instead.

This function has two big advantages: (i) the recipient only needs to click 'Accept' once for a series of transferred items, and (ii) there's no need to wear/rez anything to unpack.

Edited by Arduenn Schwartzman
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 1644 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...