Devon Humburg Posted September 26, 2019 Share Posted September 26, 2019 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 More sharing options...
Mollymews Posted September 26, 2019 Share Posted September 26, 2019 the code comments out (//) llGiveInventory. Uncomment that line to give the object if you don't want the script to rez then comment out the 4 lines beginning: if (llDetected... and ending in llWhisper... which rezzes the object Link to comment Share on other sites More sharing options...
Alyona Su Posted September 26, 2019 Share Posted September 26, 2019 (edited) 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 September 26, 2019 by Alyona Su 4 Link to comment Share on other sites More sharing options...
Devon Humburg Posted September 26, 2019 Author Share Posted September 26, 2019 I say vendor but it is a box that gives things to members of my home, and I want it to go straight to their inventory Link to comment Share on other sites More sharing options...
Devon Humburg Posted September 26, 2019 Author Share Posted September 26, 2019 Thank You Mollymews it worked like a charm 1 Link to comment Share on other sites More sharing options...
Arduenn Schwartzman Posted September 27, 2019 Share Posted September 27, 2019 (edited) 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 September 27, 2019 by Arduenn Schwartzman Link to comment Share on other sites More sharing options...
Recommended Posts
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