Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

llGetExchange() or similar...

Alfred Lardner
Mad Scripter.
Join date: 28 Dec 2005
Posts: 28
01-10-2006 23:46
LSL needs a function to calculate RL/SL exchange rates. If nothing else, something that gives the current rate of exchange would be nice. A serverside change would be required, but it's calling on data that's already on the LL servers because of the currency exchange system.
_____________________
Needlessly complicating LSL since 2005.
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
01-11-2006 05:14
The trouble is it only works on the LL exchange, historicaly there have been many buissness running exchanges (that were subsequently pushed out of the market with the LL's exchange); resulting in multiple exchange rates. Creating a function for LL's exchange would give undue advantage to LL.

Also it would be easy to spam the function with thousands of requests with multiple scripts probably bringing the exchange to its knees. Build a real script that extracts the rate from the webpage.
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river.
- Cyril Connolly

Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence.
- James Nachtwey
Alfred Lardner
Mad Scripter.
Join date: 28 Dec 2005
Posts: 28
01-11-2006 09:48
I'm not asking for a script to actually do L$ -> USD transactions. I'd just like a dynamically-extracted number to go by in-script. Spamming problems could be corrected by having a script delay, or by storing the required value as a number on the Grid servers and have them synch up with the exchange. Load-wise, it's no more intensive than a Dataserver call. Using the official exchange rate won't hurt other sites, because a script can't do business with them anyway. The use I planned to put it to was for time estimation. To be specific, I wanted a donation unit that could query the server, convert to USD, and (when given the appropriate pricing data) estimate how much of a paid service can be obtained based on those donation figures.

As for writing a 'real script,' I'd gladly do so if you could explain how to do website extraction and parsing from LSL, keeping in mind that I do not have, nor can I afford webspace for offsite PHP parsing.
_____________________
Needlessly complicating LSL since 2005.