Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Vendor to sell items that are no copy?

Gaz Ranger
Registered User
Join date: 1 Nov 2006
Posts: 5
04-18-2007 08:12
Okay, here's the idea... I'm thinking of working with someone to create a line of limited edition thingies. Basically I would design them, and they would build them, but the finished products coming back to me would be no mod/copy.

There would be 10 of each design, and then that's it, they're gone. So my question is if there's any type of script out there where I could load the 10 copies of the product into a prim, and every time someone uses the buy option, it would give out ONE of the items only, as opposed to all of them? (Ideally with a nice hovering text that will display to one and all how many are left?)
Lucius Obviate
Evil Incarnate
Join date: 5 Dec 2006
Posts: 15
04-18-2007 08:34
If I understand what your saying correctly you have x amount of designs with 10 copies of each availible for sale. Theoretically what you would do is create a variable for each item. So you would have item x and an integer for item x. Set it up so that everytime item x is sold the coresponding integer has 1 added to it. Once that integer is == 10 the vendor would delete it from its inventory. I'm not expert on vending, just getting into it but in theory that is what I think needs to be done.
Kenn Nilsson
AeonVox
Join date: 24 May 2005
Posts: 897
04-18-2007 09:59
Actually...all you need to do is load those 10 items into the vendor and when someone purchases, llGiveInventory(buyer, item); Just don't loop the llGiveInventory() and you'll be fine. Once the 10 items are gone...that'll be it.

You may want to have an inventory check after each purchase and if the inventory of a select item is gone, you may wish to change the sales picture to something like "Sold Out" and disable the purchase ability.
_____________________
--AeonVox--

Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms chasing ghosts, eating magic pills, and listening to repetitive, addictive, electronic music.
RobbyRacoon Olmstead
Red warrior is hungry!
Join date: 20 Sep 2006
Posts: 1,821
04-18-2007 10:15
From: Kenn Nilsson
Actually...all you need to do is load those 10 items into the vendor and when someone purchases, llGiveInventory(buyer, item); Just don't loop the llGiveInventory() and you'll be fine. Once the 10 items are gone...that'll be it.

You may want to have an inventory check after each purchase and if the inventory of a select item is gone, you may wish to change the sales picture to something like "Sold Out" and disable the purchase ability.


Quick note: Those 10 items will need to each have a unique name, it is not possible to put 10 identically named products in an object's contents.

Call it a feature: You just bought "My fantastic limited item #1 of 10" or something like that :)


.
_____________________
Yumi Murakami
DoIt!AttachTheEarOfACat!
Join date: 27 Sep 2005
Posts: 6,860
04-18-2007 11:08
If I recall correctly, there are some odd restrictions on scripts giving out no-copy items. It may be that you just can't give them to other objects, but I'm not sure.

Also if they are "no copy" inside the vendor, then if the vending process breaks (because of an SL failure) then you have no way of fixing this for the customer without giving them another one of the scarce copies.
Sys Slade
Registered User
Join date: 15 Feb 2007
Posts: 626
04-18-2007 11:15
Possibly of one of these Yumi?
From: someone
No-copy objects can not be given from attachments.

From: someone
If the recipient is an object, and the object already has something in its inventory with this name, then Second Life will check to see if the object being given differs from the object already existing in the recipient's inventory, or if it is another copy of the same object (ie, the object is being given multiple times). If it is the same object being given multiple times, nothing happens at all, and the recipient's inventory does not change. If the object is deemed to be a different object with the same name, it will create a new copy with an incremented number, as if a user manually placed an item with a duplicate name into an object's inventory.

http://rpgstats.com/wiki/index.php?title=LlGiveInventory

Giving no copy items from a vendor should just remove the item from the inventory as it gives it.
Kenn Nilsson
AeonVox
Join date: 24 May 2005
Posts: 897
04-18-2007 12:39
The other restriction for no-copy items within an object is that they cannot be rezzed by the object (as the object cannot 'rezz a copy'). But yes...no-copy items in a vendor is fine.
_____________________
--AeonVox--

Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms chasing ghosts, eating magic pills, and listening to repetitive, addictive, electronic music.