Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Vending script related question

Bhati Latte
Registered User
Join date: 28 Nov 2007
Posts: 29
02-12-2008 10:21
Hello all I need some help!

I want to create a poster that will sell a concert ticket & give out a notecard. I have look around the forum and found few vending script I’m thinking of using.

But I have some questions before I get started:
1. Can a script just keep giving out same item over and over? (ie: the ticket + notecard). Obviously, ticket they purchase for a set price and the notecard just goes with the ticket.
2. How can I get a list of names of the avs who bought the tickets? Because I need that information restrict entry to the concert. I have never sold anything before so I’m note sure if this info will be related to me automatically via email.

Thanks guys 
Pale Spectre
Registered User
Join date: 2 Sep 2005
Posts: 586
Hiro Vendor
02-12-2008 10:43
This is a good place to start:



Also available at places like Yadne's Junkyard.

It will maintain a limited list of purchases but it's also easy to mod to send you an IM for each purchase.
Bhati Latte
Registered User
Join date: 28 Nov 2007
Posts: 29
02-12-2008 16:14
Thanks Pale
Papalopulus Kobolowski
working mind
Join date: 11 Aug 2006
Posts: 326
02-12-2008 16:15
hiro vendin machine is a great vendor system, but you need something more easy to acomplish.

1. you need set, the request permissions debit, is the way the object can take payments or refound to the customers , and set the prices.
And yes the object can give the object over and over or set a limit if you whant.

2.you can have the avatar name ho has purchased, via list (has some limitations on space)
, instant message ( you get it when you are online or to you email box if you are not online or maybe via mail ( have some delay ( sleep ) and you can lost the name if other avatar try to buy very soon but you can "disable" the vendor in that delay time) or store the names in some database out side of sl via http request.


Also you can add the name to the parcel when the avatar pays the tickect , or how you say the avatar pay and get some object no copy no mod but transfer and in the moment of the event that avatar give you the note or object and you can set the acces manually too.
And in the touch event the link to some webpage.
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
02-12-2008 16:46
You can give out an object over and over from an object IF YOU HAVE COPY PERMISSIONS on it. You don't have to give the NEXT owner copy permissions, but you have to have them yourself in order for it not to disappear with the first give.
Bhati Latte
Registered User
Join date: 28 Nov 2007
Posts: 29
02-12-2008 19:36
From: Papalopulus Kobolowski
hiro vendin machine is a great vendor system, but you need something more easy to acomplish.

1. you need set, the request permissions debit, is the way the object can take payments or refound to the customers , and set the prices.
And yes the object can give the object over and over or set a limit if you whant.

2.you can have the avatar name ho has purchased, via list (has some limitations on space)
, instant message ( you get it when you are online or to you email box if you are not online or maybe via mail ( have some delay ( sleep ) and you can lost the name if other avatar try to buy very soon but you can "disable" the vendor in that delay time) or store the names in some database out side of sl via http request.


Also you can add the name to the parcel when the avatar pays the tickect , or how you say the avatar pay and get some object no copy no mod but transfer and in the moment of the event that avatar give you the note or object and you can set the acces manually too.
And in the touch event the link to some webpage.


I'm not a scripting expert, still learning. How do I get the avatars name and send it to my email? I mean, how do I write the code? Im planning of using the following script, so where should i insert this new code? Thanks !
Bhati Latte
Registered User
Join date: 28 Nov 2007
Posts: 29
02-12-2008 19:36
From: Bhati Latte
I'm not a scripting expert, still learning. How do I get the avatars name and send it to my email? I mean, how do I write the code? Im planning of using the following script, so where should i insert this new code? Thanks !



// vendor
// Wednesday Grimm
// June 10, 2003
//
// Simple vending script, gives correct change.

integer gPrice = 5; // cost of the item

// name of the item in object's inventory, to vend
string itemName = "test_note";

// two summary lines to describe the object
string summary1 = "this is a test note, it tests this script";
string summary2 = "it is very interesting. Cost is $5";

// give the item to a customer
dispense(key toWhom)
{
llGiveInventory(toWhom, itemName);
}

default
{
state_entry()
{
// we need this permission to give change
llRequestPermissions(llGetOwner(), PERMISSION_DEBIT);
}

touch_end(integer total_number)
{
// if someone touches object describe what's for sale
llWhisper(0, summary1);
llWhisper(0, summary2);
}

money(key id, integer amt)
{
if (amt >= gPrice)
{
// customer has given us at least enough money
amt -= gPrice;
dispense(id);
}
if (amt > 0) // give back change
{
llGiveMoney(id, amt);
}
}
}