Added the tree scripts, w/ comments
[ProgettoPaperellaDiGomma.git] / variableLifespan4-20hours.lsl
blob76b78252d0f57ff36a118c68acdfdd8752d0f888
1 //originally written by Davide Byron
2 //this code is released under the GPLv3
3 //
4 // this script just kills the tree root after a random time ranging from 3 to 7 hours.
5 // the root is not edible, and for this it's immortal, so another way of death is
6 // provided by this script. The so long distance between possible values is intended
7 // to make the tree population survive big lag spikes.
8 //
9 //dedicated to Mealea, thanks for the passion you put into things and for being able to pass it on to me :)
11 //seconds, so 20 hours
12 float Lifespan = 72000.0;
13 //seconds, so 4 hours
14 float LifespanBias = 14400.0;
19 default
22 state_entry()
24 //just trigger the timer
25 llSetTimerEvent( Lifespan + llFrand(LifespanBias) );
31 on_rez(integer param)
33 llResetScript();
39 timer()
41 //die silently...
42 llDie();