Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

money transfer

Bitz Tani
Registered User
Join date: 18 Dec 2006
Posts: 2
12-22-2006 06:33
Hello all,

A semi-new scripter here. Working on a item that will cost $1 for advanced use. So it will be spread around for free with basic options ( those are used on_rezz and with touch ). The advanced use is on voice command.

if the user wants to use the advanced options it takes $1. From all that I read I only got more and more confused. So I tought it was wiser to just ask it in a fresh tread.

How do I get the money from the user to me, without being the owner of the object ? I want it to be freely spread for the free options. Wich I believe means that it changes owner each time.

There is a llGiveMoney, but from what I read this can't be used to send money towards me, but only from me to the advanced user. Wich isn't exactly what I want :-)

Is there a way to let the object receive the money and then use the llGiveMoney to let the object hand it over to me ? Or is there a single command that does those two steps for me ?
Yumi Murakami
DoIt!AttachTheEarOfACat!
Join date: 27 Sep 2005
Posts: 6,860
12-22-2006 07:39
From: Bitz Tani
There is a llGiveMoney, but from what I read this can't be used to send money towards me, but only from me to the advanced user. Wich isn't exactly what I want :-)

Is there a way to let the object receive the money and then use the llGiveMoney to let the object hand it over to me ? Or is there a single command that does those two steps for me ?


llGiveMoney gives money from the account of the person who owns the object running the script. So if you include an llGiveMoney in the script, that pays money to you, then when someone else runs the script you will get your L$1.

However, there are a few caveats! Number one is that the user has to give permission first for llGiveMoney to work, and you have to ask for it explicitly: llRequestPermissions(llGetOwner(),PERMISSION_DEBIT);. The problem with this is that the permissions dialog is the same for an item that pays L$1 once as it is for an item that keeps on paying L$10000 over and over again until the account is empty. You need to make sure that the user knows exactly what you're going to do.

Problem number two is that llGiveMoney fails silently if the owner doesn't have enough money. So if you just use llGiveMoney, someone with L$0 could use the advanced features for free as the system would have no way of telling that the attempt to give money is failing. The usual way around this is to have the user use the in-world pay button to pay money to the object, which will trigger a money event only if the user actually has enough money. When they use the pay button, they will be paying money to themselves since they own the object, but the object can then llGiveMoney the money on to the actual intended recipients.

If you get the chance, take a look at how a land ring object is set up, as it uses basically this system to process the payments for joining and creating rings.
Bitz Tani
Registered User
Join date: 18 Dec 2006
Posts: 2
12-22-2006 07:53
This does make it a lot more clear.
Only a few more new things to learn. Gonna go look for the "land ring object" as well.

Thanks for the reply. Helps me a lot :-)
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
12-22-2006 08:24
What you are after was covered under a commision script previously discussed here