Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Any way to fetch the L$/$ exchange rate?

Richard Meiklejohn
Registered User
Join date: 15 May 2006
Posts: 45
05-18-2006 10:20
Is there a way for a script to obtain the current exchange rate for use in pricing calculations?
Nexus Nash
Undercover Linden
Join date: 18 Dec 2002
Posts: 1,084
05-18-2006 10:48
Not from LSL. (IW)
_____________________
Static Sprocket
Registered User
Join date: 10 Feb 2006
Posts: 157
05-18-2006 10:57
From outside of SecondLife you can retrieve this information.

I have in my little workshop in Jinsil (159/233), in the corner a Lindex Exchange display for sale for L$1. Stone cone, in front of the black backdrop.

What the system does is send an email out of SL, which is received and processed by a sendmail filter which runs some PHP code that scrapes the Second Life website, and returns the data via XML-RPC to the object in-world... Whew... That's a mouth full.

Once the HTTPRequest functionallity is made available on the main grid, I will be updating the system to use that -- which will greatly simplify the whole process.

The current one uses four scripts, seperated by functionality that talk to each other via link messages. The display script is modify, so you can see what the link_message with the exchange data looks like.

I don't currenly warrenty the service -- and it may be disconntinued at any time -- but your free to buy a copy and use as you see fit.

Once the HTTPRequest functionality is available, I am toying with the idea of making a networked vendor system that can automatically float prices based on the current exchange rate, with some special "rounding rules." Rules would include things like, "don't change prices unless the exchange rate is at least 10% off from when the last time price was set." Or to provide price "grid snap" -- for say only multiples of L$50 or L$100. As well as floor and ceiling prices.


P.S. Please ignore the half finished works-in-progress laying strewn around the floor :)
_____________________
Geuis Dassin
Filming Path creator
Join date: 3 May 2006
Posts: 565
05-18-2006 11:02
look in the scripting library. there's a php script for scraping the lindex webpage. it has the info you want.
Richard Meiklejohn
Registered User
Join date: 15 May 2006
Posts: 45
05-18-2006 11:03
Ah. Of course. Thanks guys. A scraping approach makes sense, although it seems a little strange to have to jump through those kind of hoops. Maybe it should be a feature request.

I'll check it out!