Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

commision scripts??

Adam Turk
Registered User
Join date: 24 Aug 2006
Posts: 44
08-27-2006 13:21
When i went to slexchange.com I saw tons of gamling machines that gave 10% of the profits to the creator of the script. I am wondering if any of you can hel me with making that type of script.
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
08-27-2006 13:36
http://secondlife.com/badgeo/wakka.php?wakka=LindenDollar
Adriana Caligari
Registered User
Join date: 21 Apr 2005
Posts: 458
08-27-2006 14:27
Basically first you tell the buyer that the object gives commission in the advert before they buy it :-)

The you have to get debit permissions in your script somewhere

CODE

llRequestPermissions( llGetOwner(),PERMISSION_DEBIT );


It is advisiable that you check that they say yes to these

CODE

run_time_permissions( integer p )
{
if ( p & PERMISSION_DEBIT )
{
go somewhere - do something
}
else
{
llOwnerSay ( "You need to give me permissions to pay the commission" );
llRequestPermissions( llGetOwner(),PERMISSION_DEBIT );
}
}



Then when you want to pay out commission you do a

CODE

llGiveMoney( llGetCreator(), amount );


Other than that all you have to do is build a game around it :-)

Have fun.
_____________________
Maker of quality Gadgets
Caligari Designs Store