Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Script needed - gift certificate kind o' thingie

Candie Apple
Senior Mumbler
Join date: 1 Apr 2003
Posts: 477
03-14-2004 10:34
I would like to be able to give gift certificates for my trees, and for others to be able to give gift certificates for them as well.

I'd like the recipient of the gift certificate to be able to purchase a tree (they're always $5) using the gift certificate instead of money. Or if they pay L$5 and use the gift certificate somehow to get a refund.

This would avoid my having to be available for the person to get their refund, and also avoid my having to go through acct hist etc to validate the gift certificate.

Also, any ideas for a way to automatically issue a gift certificate, e.g., buy 6 get a gift certificate for 1 free tree?

Thanks,
Candie
Nexus Nash
Undercover Linden
Join date: 18 Dec 2002
Posts: 1,084
03-14-2004 16:40
Hey Candie!

What is the purchase type you use for the trees? 'Buy' or 'Pay'?
If you have 'Buy' no it's not possible to catch those events.
If you are willign to convert them to 'Pay' method then you we could set it to any denomination of trees! like every 5 you buy you can get a free one\ or the gift certificate.

As for the gift certificates... i'm still thinking of a secure way! When I come up with one i'll tell you! (I think I made like 3 versions and every version I made, I found a way to hack it!)
_____________________
AyAn4m1 Noir
Member
Join date: 16 Jan 2004
Posts: 19
03-15-2004 13:05
Nexus, what method are you using? You could probably use the new llRemoteLoadScript functions to have something like this:

Agent drops "Gift Certificate" object onto box / tree / whatever. That box has a script waiting for a changed_inventory. On that event, it rezzes the gift object and tries to RemoteLoad it with a PIN. If the load fails, it's a fake object. If it works, then the box llGiveInventory's the Agent.

Candie, if you want this kind of script, send me an IM and I'll script it for you.

EDIT: Spelling.
Nexus Nash
Undercover Linden
Join date: 18 Dec 2002
Posts: 1,084
03-16-2004 14:12
Well, yes you could do it like that... but man that's ugly!
_____________________
Ama Omega
Lost Wanderer
Join date: 11 Dec 2002
Posts: 1,770
03-16-2004 15:26
Can it wait? With 1.3 there will be some very good methods for creating secure gift cards. They will still only work with 'pay' methods, but it will be much, much easier to prevent potential abuse or exploitation.

For those curious, the idea I have is to have an object or database (either works post 1.3) that maintains a list of the keys of gift certs given away, and removes the key once the gift cert is used. Vending boxes would communicate to the object or database, and an automated way could be used to generate valid no copy, no mod gift certificates that added the keys to the list.

Actually... if you have a vending machine and would like for the gift certs to be used just for that vending machine then it is very possible to create a secure way. Have the vending machine generate the gift certificates! It can keep a list of the ones that will work and remove them as necessary. What isn't possible til 1.3 is having a gift cert that works on lots of machines around the world.
_____________________
--
010000010110110101100001001000000100111101101101011001010110011101100001
--
Nexus Nash
Undercover Linden
Join date: 18 Dec 2002
Posts: 1,084
03-16-2004 16:10
Damn Ama reads my mind!!! I can't wait for the XML stuff! I've been screwing around in Java to implement my database!

But ya that would be awsome! Regs the keys on the database... when a machine gets a giftcertificate it checks with the database and returns true or false! OMG PLUS YOU COULD MAKE A MACHINE THAT HANDS OUT COUPONS!!! *DROOL* DAMN IT LINDENS! GIMME GIMME GIMME GIMME GIMME GIMME GIMME GIMME GIMME GIMME GIMME GIMME GIMME GIMME GIMME GIMME GIMME !!!!
_____________________
Ama Omega
Lost Wanderer
Join date: 11 Dec 2002
Posts: 1,770
03-16-2004 16:16
Who says it has to only return true or false? What is to prevent variable amount gift certificates or coupons and only spending a part of them? Spend some and update the database.
_____________________
--
010000010110110101100001001000000100111101101101011001010110011101100001
--
AyAn4m1 Noir
Member
Join date: 16 Jan 2004
Posts: 19
03-16-2004 16:25
With 1.3 I'm going to be working on a SQL server. That way, anyone familar with ASP / .NET can operate database modules with simple, standardized queries. All I'm waiting on is dbase functionality / writing to notecards.
Candie Apple
Senior Mumbler
Join date: 1 Apr 2003
Posts: 477
03-16-2004 17:17
Thank you for your responses. Someone has offered to develop this for me after 1.3 comes out.

Candie