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();
}
}