Not a whole script, just a function to convert quickly between USD and L$.
I figure since other people already have scripts that do this, I should ask for copies before re-inventing the wheel.

These forums are CLOSED. Please visit the new forums HERE
Converting USD -> L$ at market rates |
|
|
Angel Fluffy
Very Helpful
Join date: 3 Mar 2006
Posts: 810
|
11-22-2006 11:52
Hi. I'm looking for a working, open source function that when passed a USD value returns the equivalent value in L$, at current market rates.
Not a whole script, just a function to convert quickly between USD and L$. I figure since other people already have scripts that do this, I should ask for copies before re-inventing the wheel. ![]() _____________________
Volunteer Portal (FAQs!) : https://wiki.secondlife.com/wiki/Volunteer_Portal
JIRA / Issue Tracker : http://jira.secondlife.com (& http://tinyurl.com/2jropp) |
|
Francis Chung
This sentence no verb.
Join date: 22 Sep 2003
Posts: 918
|
11-22-2006 13:17
I'm not sure this helps you at all, but this is what I use. It's written in C.
Prior to LindeX, Gaming Open Market was the norm, and they calculated rates in USD/L$1000 - that's how we used to think about rates. This also helped me identify exactly how much LL was skimming with the LindeX. (LL's fees are significantly higher than GOM's fees were) CODE
_____________________
--
~If you lived here, you would be home by now~ |
|
Angel Fluffy
Very Helpful
Join date: 3 Mar 2006
Posts: 810
|
11-22-2006 14:14
Interesting script, thanks for posting it!
It does have some interesting math in it, but it doesn't have a way to figure out what the current exchange rate is, which is really what I am after ![]() _____________________
Volunteer Portal (FAQs!) : https://wiki.secondlife.com/wiki/Volunteer_Portal
JIRA / Issue Tracker : http://jira.secondlife.com (& http://tinyurl.com/2jropp) |
|
Jacques Groshomme
Registered User
Join date: 16 Mar 2005
Posts: 355
|
11-22-2006 14:44
As was mentioned in your linked thread, there is no way for LSL to be inately aware of the exchange rate.
The only solution around is to use XMLRPC or HttpRequest to interact with a script running on a web server somewhere that does a "screen scrape" of secondlife.reuters.com. The caveat to that is if Reuters changes the layout or wording of their page significantly, it may bork the whole deal. |
|
Joannah Cramer
Registered User
Join date: 12 Apr 2006
Posts: 1,539
|
11-22-2006 14:48
it doesn't have a way to figure out what the current exchange rate is, which is really what I am after ![]() The way it seems to be done is, you have script pull the current exchange rate from external web site, which in turn pulls it from statistics page on LL page. Sol Columbia has vendor system written around such setup, you might want to talk with her about providing you with customized module for just readout of the exchange rate, or something to this effect. |
|
Angel Fluffy
Very Helpful
Join date: 3 Mar 2006
Posts: 810
|
11-25-2006 15:20
Hi. I'm half done with the problem... I now have scripts which fetch the current L$/USD exchange rate from a 3rd party website, adjust it so it fits up against the LindeX rate, and writes the result to a very simple web-page that can be queried by a script.
The LSL-side look-up of this value from the website should be relatively simple. I might post an open-source implementation of this soon, in case there is anyone else that wants to set prices in USD and not have to worry about what the LindeX does. _____________________
Volunteer Portal (FAQs!) : https://wiki.secondlife.com/wiki/Volunteer_Portal
JIRA / Issue Tracker : http://jira.secondlife.com (& http://tinyurl.com/2jropp) |
|
Angel Fluffy
Very Helpful
Join date: 3 Mar 2006
Posts: 810
|
11-25-2006 18:17
Ok, I have scripted an orb for parcel tier/rent collection. You basically rez it on a parcel, tell it who the parcel belongs to, and whether they are renting or buying, and how big the parcel is. It will then query a remote perl script on a webserver (which is where you keep your pricing info, so you can update it for all orbs at once), which will calculate the current exchange rate and send the orb back a number of L$ that the orb should charge in tier/rental per month.
People can then pay the orb this amount to extend their time on the parcel. When they are paid up, the orb goes small and its text disappears (but they can touch it to see the details). When they become overdue it sends them regular reminders until they pay - totally automated... and when they pay it increases their time. If they don't pay, it also IMs the sim owner or rental manager saying who they are, where they are, how big the parcel is and how overdue they are. I'm thinking about releasing it as open source (if I don't do much more work on it) or as a commercial product (if I work on it a bit more so it's polished and stuff). It has some safeguards built into it (e.g. it does NOT require refund permission... it only accepts payments, it cannot pay other people, hence income splitting and refunds are not possible atm). But yeah, still working on it. Thanks for the help guys ![]() _____________________
Volunteer Portal (FAQs!) : https://wiki.secondlife.com/wiki/Volunteer_Portal
JIRA / Issue Tracker : http://jira.secondlife.com (& http://tinyurl.com/2jropp) |