Join us in Outworldz at www.outworldz.com:9000 or follow us:

Search dozens of selected web sites for OpenSim and LSL script

New! Script Meta-Search will search thousands of scripts here and at other sites for LSL or Opensim scripts.
Loading

Want to add a script or a project? Upload it and a half million people will see it and your name here this year.

Home   Show All
Category: Contributor: Creator
Money Simple_profit_splitter  

Simple_profit_splitter

Simple_profit_splitter

Category: Money
By : Adalace Jewell
Created: 2010-11-16 Edited: 2010-11-16
Worlds: Second Life

the Zip file

Download all files for Simple_profit_splitter
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. Simple_profit_splitter_1.lsl
1 // Simple profit splitter in % of amount, with dialog pay menu
2
3
4 // By Adalace Jewell
5
6
7 integer percentage = 20; //The percentage of money to give to the person with the UUI key
8 key nonprofit_resp1 = "19de8e15-a3eb-4908-ab1a-c8a958b8a176"; // Change this UUI key with yours
9 string nonprofit_name1 = "your name here"; // Enter the name of your organization here
10
11
12
13 key nonprofit_resp2 = "97981694-0f2c-48a0-8203-208e4d65dfdc"; // Change this UUI key with yours
14 string nonprofit_name2 = "your name here"; // Enter the name of the organization receiving the split % here
15
16
17
18
19 default
20 {
21 on_rez(integer start_param)
22 {
24 }
25
27 {
28 llSetText("Simple Donation split to Nonprofits 1.1", <0.0,1.0,0.0>, 1);
30 }
31
33 {
34 if(perms > 0)
35 {
36 state permok;
37 }
38 }
39 }
40
41
42 state permok
43 {
44 money(key id, integer amount)
45 {
46 llGiveMoney(nonprofit_resp1, llRound(amount * (float)(percentage/100.0)));
47 llGiveMoney(nonprofit_resp2, llRound(amount * (float)(percentage/100.0)));
48 llWhisper(0, "Thank you for your donation to " + (string)nonprofit_name1);
49 llWhisper(0, "Thank you for your donation to " + (string)nonprofit_name2);
50 }
51 }

Back to the Best Free Tools in Second Life and OpenSim.