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 Tree Money Tree  

Money Tree

Makes a Money Tree. This is the Leaf Prim

Category: Money Tree
By : Ferd Frederix
Created: 2014-02-20 Edited: 2016-06-01
Worlds: Second Life

the Zip file

Download all files for Money Tree
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. Leaf.lsl
Get file # 2. Tree.lsl

This script by Ferd Frederix may be used in any manner, modified, and republished.  Unless specified otherwise, my scripts are always free and open source.  Objects made with these scripts may be sold with no restrictions.  All I ask is that you point others to this location should they ask you about it and to not sell this script, unless it is for $0 L. Please help improve my work by reporting bugs and improvements.

1
2 // Put this in a a prim
3 // Put this prim in the server
4 // It will fall and if touched, send money
5
6 integer channel = -76576; // a very secret number/password also found in the boxes that fall.
7
8 integer ready = FALSE;
9
10 default
11 {
12 on_rez(integer param)
13 {
14 ready = param; // for safety, we make it so if rezzed with no param, it does not spend money
15 llSetTimerEvent((float) param);
17 }
18 timer()
19 {
20 llDie();
21 }
22 touch_start(integer total_number)
23 {
24 if(ready) {
25 llSay(channel,llDetectedKey(0));
26 llDie();
27 }
28 }
29 }

Money Tree

Makes a Money Tree. This is the Tree Prim

Category: Money Tree
By : Ferd Frederix
Created: 2014-02-20 Edited: 2016-06-01
Worlds: Second Life


This script by Ferd Frederix may be used in any manner, modified, and republished.  Unless specified otherwise, my scripts are always free and open source.  Objects made with these scripts may be sold with no restrictions.  All I ask is that you point others to this location should they ask you about it and to not sell this script, unless it is for $0 L. Please help improve my work by reporting bugs and improvements.

1 // Add a prim to this prims inventory with the FallingScript in it.
2
3 integer Amount = 1; // Give one Linden each time.
4 integer Max = 100; // the max $L to give away, then stop giving
5
6 integer rezTime = 10; // The boxes will rez for 10 seconds, then die
7 float DIST = 10; // Boxes will be rezzed within this radius of the giver. (!!! MAX = 10 )
8 // How often to rez objects
9 float min = 60; // one minute minimum
10 float max = 300; // 5 minutes sometimes
11 integer channel = -76576; // a very secret number/password also found in the boxes that fall.
12 integer Given;
13 default
14 {
16 {
18 }
19
20 run_time_permissions(integer permissions)
21 {
22 if(permissions & PERMISSION_DEBIT)
23 {
24 llListen(channel,llGetInventoryName(INVENTORY_OBJECT,0),"",""); // listen for givers we rezzed by name
25 llSetTimerEvent(llFrand(max - min) + min);
26 }
27 }
28
29 timer()
30 {
31 vector myPos = llGetPos(); // this giver is HERE
32 myPos.x = llFrand(DIST*2) - DIST + myPos.x; // Make it +/- DIST away
33 myPos.y = llFrand(DIST*2) - DIST + myPos.y;
34
35 // And rez it with a start parameter
37 }
38
39 listen(integer channel, string name, key id, string message)
40 {
41 if(Given > Max) {
42 llSetTimerEvent(0); // stop giving
43 llInstantMessage(llGetOwner(), "Out of money to give");
44 llSetText("Balance: 0 " , <1,0,0>,1.0); // red text
45 return;
46 }
47
48 Given += Amount;
49 key avatarKey = (key) message;
50 llGiveMoney(avatarKey, Amount);
51 llSetText("Balance: " + (string) (Max - Given), <0,0,1>,1.0);// Green text
52 }
53
54 }

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