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
tipjar Phaze TipJar  

Phaze TipJar

A tipjar made with two spheres. The top will pop when touched

Category: tipjar
By : Ferd Frederix
Created: 2016-05-02 Edited: 2016-05-02
Worlds: Second Life

the Zip file

Download all files for Phaze TipJar
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. Butterflies.lsl
Get file # 2. Script.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 //Keknehv Psaltery Updated Version of DONATION BOX By jean cook, ama omega, and nada epoch Debugged by YadNi Monde.
2 // changed into a butterfly dispenser by Ferd Frederix
3 // (LoL) Yea, that s a Bunch O Peeps =)
4
5 //Summary: The following script will make an object accept donations on your behalf.
6 //Usage: stick it on any object you own(my favorite is a top hat), and it will promptly display:
7 //"<your name>'s donation hat.
8 //Donate if you are so inclined."
9 //at which point anyone can right click on it and give you a tip. also, the script tells the donator thanks, and then tells you who donated how much
10 //also shows the total amount donated
11
12
13
14 integer totaldonated = 103793;
15 string owner;
16
17 default
18 {
19 on_rez( integer sparam )
20 {
22 }
24 {
25 llSetPayPrice(PAY_HIDE, [50 ,100, 200, 500]);
26 owner = llKey2Name( llGetOwner() );
27 llSetText( owner + "'s Tip Jar.\nRelease the butterflies!",<.25,1,.65>,1);
28 }
29
30 money(key id, integer amount)
31 {
32
33 totaldonated += amount;
34 string name= llKey2Name(id);
35 llSetText( owner + "'s Tip Jar.\nRelease the butterflies!\n \nLast Donor:\n " + name + " gave $L" + (string)amount ,<.25,1,.65>,1);
36 //llInstantMessage(id,"Thanks for the tip! I really appreciate it. ~ Ferd Frederix");
37
38 if(amount == 1)
39 llSay(0,"Uhh, thanks I think, " + name );
40
41 if(amount > 0)
42 llSay(0,"Thanks for the tip, " + name +"! I really appreciate it. ~ Ferd Frederix");
43 else if(amount > 100)
44 llSay(0,"Thanks for the awesome tip, " + name +"! I appreciate it. ~ Ferd Frederix");
45 else if(amount > 300)
46 llSay(0,"Thanks for the AWESOME tip, " + name +"! I really appreciate it. ~ Ferd Frederix");
47
48 llInstantMessage(llGetOwner(),(string)llKey2Name(id)+" donated $" + (string)amount);
49
50 llMessageLinked(LINK_ALL_OTHERS, 0, "touched", "");
51 llPlaySound("pop",1.0);
53 llSetTimerEvent(10.0);
54 llEmail("fred@mitsi.com",(string)llKey2Name(id)+" donated $" + (string)amount,"");
55 }
56 touch_start(integer total_number)
57 {
58 llWhisper(0,"Butterfly Tip Jar for 'Phase Demesnes', total donated so far: " + (string) totaldonated );
59 }
60
61 timer()
62 {
64 llSetTimerEvent(0.0);
65 }
66 }

Phaze TipJar

This paricle script released butterflies from my tipjar when it was tipped.

Category: tipjar
By : Ferd Frederix
Created: 2016-05-02 Edited: 2016-05-02
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 // Particle Script 0.4j
2 // Created by Ama Omega 3-7-2004
3 // Updated by Jopsy Pendragon 5-11-2004
4 // For classes/tutorials/tricks, visit the Particle Labratory in Teal
5 // Values marked with (*) are defaults.
6
7 integer flagger = 0;
8
9 // SECTION ONE: APPEARANCE -- These settings affect how each particle LOOKS.
10 integer glow = TRUE; // TRUE or FALSE(*)
11 vector startColor = <1,1,1>; // RGB color, black<0,0,0> to white<1,1,1>(*)
12 vector endColor = <1,1,1>; //
13 float startAlpha = 1.0; // 0.0 to 1.0(*), lower = more transparent
14 float endAlpha = 1.0; //
15 vector startSize = <0.0,0.0,0>; // <0.04,0.04,0>(min) to <10,10,0>(max>, <1,1,0>(*)
16 vector endSize = <0.05,0.05,0>; // (Z part of vector is discarded)
17 string texture = "44c04376-637b-ef18-9404-723acd0fce91"; // Texture used for particles. Texture must be in prim's inventory.
18
19 // SECTION TWO: FLOW -- These settings affect how Many, how Quickly, and for how Long particles are created.
20 // Note,
21 integer count = 1; // Number of particles created per burst, 1(*) to 4096
22 float rate = 1; // Delay between bursts of new particles, 0.0 to 60, 0.1(*)
23 float age = 5.0; // How long each particle lives, 0.1 to 60, 10.0(*)
24 float life = 0.0; // When to stop creating new particles. never stops if 0.0(*)
25
26 // SECTION THREE: PLACEMENT -- Where are new particles created, and what direction are they facing?
27 float radius = 0.15; // 0.0(default) to 64? Distance from Emitter where new particles are created.
28 float innerAngle = .1 ; // "spread", for all ANGLE patterns, 0(default) to PI
29 float outerAngle = .1; // "tilt", for ANGLE patterns, 0(default) to TWO_PI, can use PI_BY_TWO or PI as well.
30 integer pattern = PSYS_SRC_PATTERN_ANGLE_CONE; // Choose one of the following:
31 // PSYS_SRC_PATTERN_EXPLODE (sends particles in all directions)
32 // PSYS_SRC_PATTERN_DROP (ignores minSpeed and maxSpeed. Don't bother with count>1 )
33 // PSYS_SRC_PATTERN_ANGLE_CONE (set innerangle/outerange to make rings/cones of particles)
34 // PSYS_SRC_PATTERN_ANGLE (set innerangle/outerangle to make flat fanshapes of particles)
35 vector omega = <0,0,0>; // How much to rotate the emitter around the <X,Y,Z> axises. <0,0,0>(*)
36 // Warning, there's no way to RESET the emitter direction once you use Omega!!
37 // You must attach the script to a new prim to clear the effect of omega.
38
39 // SECTION FOUR: MOVEMENT -- How do the particles move once they're created?
40 integer followSource = FALSE; // TRUE or FALSE(*), Particles move as the emitter moves, (TRUE disables radius!)
41 integer followVel = TRUE; // TRUE or FALSE(*), Particles rotate towards their direction
42 integer wind = FALSE; // TRUE or FALSE(*), Particles get blown away by wind in the sim
43 integer bounce = FALSE; // TRUE or FALSE(*), Make particles bounce on Z altitude of emitter
44 float minSpeed = 0.04; // 0.01 to ? Min speed each particle is spit out at, 1.0(*)
45 float maxSpeed = 0.08; // 0.01 to ? Max speed each particle is spit out at, 1.0(*)
46 vector push = <0,0,-0.03>; // Continuous force pushed on particles, use small settings for long lived particles
47 key target = ""; // Select a target for particles to arrive at when they die
48 // can be "self" (emitter), "owner" (you), "" or any prim/persons KEY.
49
50 // SECTION FIVE: Ama's "Create Short Particle Settings List"
51 integer enableoutput = FALSE; // If this is TRUE, clicking on your emitter prim will cause it to speak
52 // very terse "shorthand" version of your particle settings. You can cut'n'paste
53 // this abbreviated version into a call to llParticleSystem([ ]); in another script.
54 // Pros: Takes up far less scripting space, letting you focus on the rest of your code.
55 // Cons: makes tune your settings afterwards rather awkward
56
57 // === Don't muck about below this line unless you're comfortable with the LSL scripting language ====
58
59 // Script variables
60 integer pre = 2; //Adjust the precision of the generated list.
61 integer flags;
62 list sys;
63 integer type;
64 vector tempVector;
65 rotation tempRot;
66 string tempString;
67 integer i;
68
69
70 Play()
71 {
72 //llOwnerSay("Touched");
73 count = 10;
74 age = 30;
75 //minSpeed = 1.0;
76 maxSpeed = 0.5 ;
77 endSize = <1.5,1.5,0>; // (Z part of vector is discarded)
78 float x = llFrand(0.1);
79 float y = llFrand(0.1);
80 push = <x,y,0.03>; // Continuous force pushed on particles
81 wind = TRUE;
82 updateParticles();
83 llSleep(8);
84 reset();
85 updateParticles();
86 }
87
88
89
90 reset()
91 {
92
93 count = 1; // Number of particles created per burst, 1(*) to 4096
94 age = 5.0; // How long each particle lives, 0.1 to 60, 10.0(*)
95 maxSpeed = 0.08; // speed issued at
96 endSize = <0.05,0.05,0>; // (Z part of vector is discarded)
97 push = <0,0,-0.03>; // Continuous force pushed on particles
98 wind = FALSE;
99
100
101 }
102
103 updateParticles()
104 {
105 flags = 0;
106 if(target == "owner") target = llGetOwner();
107 if(target == "self") target = llGetKey();
108 if(glow) flags = flags | PSYS_PART_EMISSIVE_MASK;
109 if(bounce) flags = flags | PSYS_PART_BOUNCE_MASK;
110 if(startColor != endColor) flags = flags | PSYS_PART_INTERP_COLOR_MASK;
111 if(startSize != endSize) flags = flags | PSYS_PART_INTERP_SCALE_MASK;
112 if(wind) flags = flags | PSYS_PART_WIND_MASK;
113 if(followSource) flags = flags | PSYS_PART_FOLLOW_SRC_MASK;
114 if(followVel) flags = flags | PSYS_PART_FOLLOW_VELOCITY_MASK;
115 if(target != "") flags = flags | PSYS_PART_TARGET_POS_MASK;
116 sys = [ PSYS_PART_MAX_AGE,age,
117 PSYS_PART_FLAGS,flags,
118 PSYS_PART_START_COLOR, startColor,
119 PSYS_PART_END_COLOR, endColor,
120 PSYS_PART_START_SCALE,startSize,
121 PSYS_PART_END_SCALE,endSize,
122 PSYS_SRC_PATTERN, pattern,
124 PSYS_SRC_ACCEL, push,
130 PSYS_SRC_INNERANGLE,innerAngle,
131 PSYS_SRC_OUTERANGLE,outerAngle,
132 PSYS_SRC_OMEGA, omega,
133 PSYS_SRC_MAX_AGE, life,
134 PSYS_SRC_TEXTURE, texture,
135 PSYS_PART_START_ALPHA, startAlpha,
136 PSYS_PART_END_ALPHA, endAlpha
137 ];
138 float newrate = rate;
139 if(newrate == 0.0) newrate=.01;
140 if( (age/rate)*count < 4096) llParticleSystem(sys);
141 else {
142 llInstantMessage(llGetOwner(),"Your particle system creates too many concurrent particles.");
143 llInstantMessage(llGetOwner(),"Reduce count or age, or increate rate.");
144 llParticleSystem( [ ] );
145 }
146
147 }
148
149 default
150 {
152 {
153 reset();
154 updateParticles();
155 }
156
157 touch_start(integer total_number)
158 {
159 llSay(0,"Butterfly Tip Jar for 'Phase Demesnes', pay it to pop!");
160 }
161
162 link_message(integer sender_num, integer num, string msg, key id)
163 {
164 Play();
165 }
166
167
168 }

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