CHAPTER 13
280
TRANSACTION
BASICS
REDISTRIBUTING
WEALTH
SELLING IT!
RENTALS AND
SERVICES
GAMBL...
UH... GAMES
OF SKILL
SUMMARY
TRANSACTION BASICS
When you pay an object, you are transferring money from your account into the account of the person or
group that owns the object. The scripts in a paid object are notified of the transfer details and can react to
it, for example by giving an object to a paying avatar. Scripts may also give money to avatars by transferring
money out of your account to theirs: you can program objects to give rewards, to pay salaries, or even to
act as a bank teller by sharing a single account with multiple avatars.
Who gets the money? It's transferred to the object's owner. If the object is group-deeded, the money
temporarily goes into the group's account, to be disbursed when there is enough to distribute to all
members who have the Make/Receive Group Payments option enabled.
Figure 13.1 shows a pop-up menu you might see when you pay an object. This is the default menu,
with four buttons and a box for entering your own amounts. You can change or hide any of these amounts
if, for instance, you want to accept payment of only one specific price.
Figure 13.1: Paying an
object
Second Life allows scripted objects to move money around on your behalf. Because you wouldn't
want objects asserting free rein over your account without your knowledge, you'll be asked to grant
objects special permissions before they request money from your account. Figure 13.2 shows how this
looks: the menu's yellow background is clearly different from the rest of the permissions menus. If you
grant permission, you really want to get it right; remember, you are playing with real money. You'll want to
thoroughly debug your scripts before you grant permission, because one endless loop around a payment or
one misplaced decimal point can clean out your account remarkably quickly.

Get Scripting Your World: The Official Guide to Second Life® Scripting now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.