Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- integer total;
- intger perms;
- list avkeys = [
- "a9ba2797-81af-429d-9833-51127ad5593c","10",
- "12b085db-fe7f-4cd3-8ef1-d11bb6dbd036","40"
- //List the keys of avatars who should get a
- // share of the amount paid and the
- // percentage they should receive.
- ]
- default
- {
- state_entry()
- {
- total = llGetListLength(avkeys);
- llReqeustPermissions(llGetOwner(),PERMISSION_DEBIT);
- }
- run_time_permissions(integer perm)
- {
- if (perm & PERMISSION_DEBIT)
- {
- perms = TRUE;
- }
- }
- money(key id, integer amount)
- {
- if(perms)
- {
- integer x = 0;
- for( ; x < total; x = x+2)
- {
- key partner = (key)llList2String(avkeys,x);
- integer percentage = (integer)llList2String(avkeys,x+1);
- float share = (percentage / 100.0) * (float)amount;
- llTransferLindenDollars(partner,(integer)share);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement