amandajohanna Nordenskiold
Registered User
Join date: 19 Feb 2009
Posts: 3
|
12-11-2009 20:59
I have a question for you guys who know about scripting:
I run a few fashion shops, and got this idea to give away some high quality outfits to newbies, so the question is simply - is it possible to write (or get) a script that will detect if an av is maximum 30 days old and if that is the case, then give the content of a box to him or her for free, but prevent older avs to get it?
|
Kaluura Boa
Polygon Project
Join date: 27 Mar 2007
Posts: 194
|
12-11-2009 21:03
The answer is yes... but this is not the right forum. If you want a finished product, go to "Products wanted".
_____________________
It's hard to tell gender from names around here but if you care, Kaluura = he. And I exist elsewhere than in SL but who cares? 
|
Kayaker Magic
low carbonated footprint
Join date: 11 Sep 2008
Posts: 109
|
12-11-2009 21:28
The answer is yes, and this could be the right place to ask if it is possible or how it is done. It doesn't appear to me that amandajohanna is asking you to write it yet. The long answer is: llRequestAgentData can request DATA_BORN which is sent back to the script through a dataserver event. This arrives as a string in the format 2009-11-31 so you will have to hack that up and do some date math to turn it into an age in days. llGetDate returns todays date in the same format.
|
Innula Zenovka
Registered User
Join date: 20 Jun 2007
Posts: 1,825
|
12-12-2009 03:24
amandajohanna -- as people have said, it's certainly possible to do. In fact, there's an example of how to something very like it at  . That gives a notecard to people who collide with it (tread on it) if, and only if, they are under a certain age. It wouldn't be too difficult to change it to give an object to people under a certain age who touch it, to my mind -- and if you want to have a go at adapting it yourself, I'll be happy to help here.
|
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
|
12-12-2009 06:06
there's also a money tree script around here somewhere that does the same thing. although if you don't have heavy advertising in newbie areas, or a location in a major newbie mall, you might want to expand your date range to ~90 days (or easier, anytime withing x months, way less math)
there's a couple of date functions on this forum, and the LSL Portal script library that can help as well.
if you're just looking to buy the needed script, products wanted forum is your fastest bet.
_____________________
| | . "Cat-Like Typing Detected" | . This post may contain errors in logic, spelling, and | . grammar known to the SL populace to cause confusion | | - Please Use PHP tags when posting scripts/code, Thanks. | - Can't See PHP or URL Tags Correctly? Check Out This Link... | - 
|