Wispy Smoke Script

Expired

// Wallace’s Wispy incense - April 3, 2007
// Jopsy’s Particle System Template v5 - Jan 28 2005
// — inspired/derived from Ama Omega’s 3-6-2004
//
// DEFAULT settings are commented at the end of each line, eg:
// varibletype SETTINGNAME = Sample-Setting; // default-setting
//
// For more on particles, visit the Particle Labratory in Teal!
// This script may be used freely used in items for sale.
mySetParticles()
{
//===============================================================
// PART-1 - APPEARANCE - Settings for how each particle LOOKS
vector START_SCALE = <0.04, 0.08, 0.0 >; // <1.0, 1.0, 0.0 >
vector END_SCALE = <0.4, 0.8, 0.0 >; // <1.0, 1.0, 0.0 >
vector START_COLOR = <0.5, 0.5, 0.5 >; // <1.0, 1.0, 1.0 >
vector END_COLOR = <0.5, 0.5, 0.5 >; // <1.0, 1.0, 1.0 >
float START_ALPHA = 0.3; // 1.00
float END_ALPHA = 0.0; // 1.00
integer INTERP_COLOR = TRUE; // FALSE
integer INTERP_SCALE = TRUE; // FALSE
integer EMISSIVE = TRUE; // FALSE
string TEXTURE = “”; // ""
// START/END: refers to the birth and death time of each particle.
// SCALE: particle height/width, from 0.04 to 4.0. (no depth)
// ALPHA: sets transparency, from invis = 0.0 to opaque = 1.0
// START_ALPHA is ignored if it is less than END_ALPHA
// COLOR: vectors , each 0.00 to 1.00
// INTERP_COLOR: enables/disables END_COLOR and END_ALPHA
// INTERP_SCALE: enables/disables END_SCALE
// EMISSIVE: enables/diables particle ‘glow’
// TEXTURE: name of a texture in the emitter-prim’s inventory
// or the asset id key of any texture
//======================
// Part-2 - FLOW - These settings affect how Many, how Quickly,
// and for how Long particles are present
float AGE = 20.00; // 10.00
float RATE = 0.1; // 0.10
integer COUNT = 1; // 1
float LIFE = 0.0; // 0.0
// AGE: How many seconds each particle lives, 0.1 to 60
// RATE: Seconds between particle bursts, 0.0 to 60
// COUNT: Number of particles per burst, 1 to 4096
// LIFE Number of seconds to wait before shutting off 0.1 to 60
// 0.0 never stops
//==========================
// Part-3 - 3 PLACEMENT — Where are new particles created, and what
// direction are they facing?
integer PATTERN = PSYS_SRC_PATTERN_ANGLE; // PSYS_SRC_PATTERN_DROP
float RADIUS = 0.01; // 0.00
float ANGLE_BEGIN = 0.00; // 0.00
float ANGLE_END = 0.05; // 0.00
vector OMEGA = <0.00, 0.00, 0.60 >; // <0.00, 0.00, 0.00 >
//float INNERANGLE = 0.00; // 0.00
//float OUTERANGLE = 0.00; // 0.00
// PATTERN: must be set to one of the following:
// PSYS_SRC_PATTERN_EXPLODE sends particles in all directions
// PSYS_SRC_PATTERN_DROP ignores minSpeed and maxSpeed.
// PSYS_SRC_PATTERN_ANGLE_CONE use ANGLE settings to make rings/cones
// PSYS_SRC_PATTERN_ANGLE use innerangle/outerangle to make flat
// wedges
// RADIUS: distance between emitter and each new particle, 0.0 to 64?
// ANGLE_BEGIN: for both ANGLE patterns, 0 to PI(3.14159)
// ANGLE_END: for both for ANGLE patterns, 0 to PI.
// OMEGA: How much to rotate the emitter around the axises
// after each burst. Set OMEGA to all 0’s to reset/disable it.
// INNER/OUTER ANGLE: Depreciated. Old versions of ANGLE_BEGIN/_END.
// Can still be used to make lop-sided angle displays though.
//==========================
// Part-4 - MOVEMENT - How do the particles move once they’re created?
integer FOLLOW_SRC = FALSE; // FALSE
integer FOLLOW_VELOCITY = TRUE; // FALSE
integer WIND = FALSE; // FALSE
integer BOUNCE = FALSE; // FALSE
float SPEED_MIN = 0.01; // 1.00
float SPEED_MAX = 0.05; // 1.00
vector ACCEL = <0.00, 0.00, 0.02 >; // <0.00, 0.00, 0.00 >
integer TARGET_POS = FALSE; // FALSE
key TARGET = llGetKey(); // llGetKey();
// FOLLOW_SRC: moves particles when emitter moves. It will disable RADIUS!
// FOLLOW_VELOCITY: Particles rotate towards their heading
// WIND: Sim’s Wind will push particles
// BOUNCE: Make particles bounce above the Z altitude of emitter
// SPEED_MIN: 0.01 to ?, slowest speed of new particles, 1.0(*)
// SPEED_MAX: 0.01 to ?, fastest speed of new particle, 1.0(*)
// SPEED_ is ignored for the DROP pattern.
// ACCEL: a continuous force pushed on particles,
// use SMALL settings for long lived particles
// TARGET_POS: If FALSE(*), TARGET value is ignored.
// TARGET: Select a target for particles to arrive at when they die
// key TARGET = llGetKey(); // particles return to the emitter
// key TARGET = llGetOwner(); // particles home in on owner
// You can have another object llSay(999,llGetKey);
// and grab the key with this object by using the listen()
// event handler.
//=====================
list particle_parameters = [
PSYS_PART_FLAGS, (
( EMISSIVE * PSYS_PART_EMISSIVE_MASK ) |
( BOUNCE * PSYS_PART_BOUNCE_MASK ) |
( INTERP_COLOR * PSYS_PART_INTERP_COLOR_MASK ) |
( INTERP_SCALE * PSYS_PART_INTERP_SCALE_MASK ) |
( WIND * PSYS_PART_WIND_MASK ) |
( FOLLOW_SRC * PSYS_PART_FOLLOW_SRC_MASK ) |
( FOLLOW_VELOCITY * PSYS_PART_FOLLOW_VELOCITY_MASK ) |
( TARGET_POS * PSYS_PART_TARGET_POS_MASK ) ),
PSYS_PART_START_COLOR, START_COLOR,
PSYS_PART_END_COLOR, END_COLOR,
PSYS_PART_START_ALPHA, START_ALPHA,
PSYS_PART_END_ALPHA, END_ALPHA,
PSYS_PART_START_SCALE, START_SCALE,
PSYS_PART_END_SCALE, END_SCALE,
PSYS_SRC_PATTERN, PATTERN,
PSYS_SRC_BURST_PART_COUNT, COUNT,
PSYS_SRC_BURST_RATE, RATE,
PSYS_PART_MAX_AGE, AGE,
PSYS_SRC_ACCEL, ACCEL,
PSYS_SRC_BURST_RADIUS, RADIUS,
PSYS_SRC_BURST_SPEED_MIN, SPEED_MIN,
PSYS_SRC_BURST_SPEED_MAX, SPEED_MAX,
PSYS_SRC_TARGET_KEY, TARGET,
PSYS_SRC_ANGLE_BEGIN, ANGLE_BEGIN,
PSYS_SRC_ANGLE_END, ANGLE_END,
//PSYS_SRC_INNERANGLE, INNERANGLE,
//PSYS_SRC_OUTERANGLE, OUTERANGLE,
PSYS_SRC_OMEGA, OMEGA,
PSYS_SRC_MAX_AGE, LIFE,
PSYS_SRC_TEXTURE, TEXTURE
];
llParticleSystem( particle_parameters ); // Turns on the particle hose!
}
default
{
state_entry() {
mySetParticles();
// llSetTimerEvent(60); // uncomment to set auto-off for 60 seconds
}
timer() {
llSetTimerEvent( 0 ); // Turn off the alarm clock
llSleep(6);
llParticleSystem( [ ] ); // Turn off the particles
// updateParticles(); // Or use this to update/change the particle
// system
}
touch_start(integer i) {
mySetParticles(); // touch to reset/turn on the particles
// llSetTimerEvent(60); // reset the alarm clock
}
}
 

 

Falling Leaves Particle Script

Expired

Put this Script in your tree and add a leaf texture....great for fall leaves. Just change the name of the texture.

// Particle Script 0.5
// Created by Ama Omega
// 3-26-2004
 
// Mask Flags - set to TRUE to enable
integer glow = TRUE;            // Make the particles glow
integer bounce = FALSE;          // Make particles bounce on Z plane of object
integer interpColor = FALSE;     // Go from start to end color
integer interpSize = TRUE;      // Go from start to end size
integer wind = TRUE;           // Particles effected by wind
integer followSource = FALSE;    // Particles follow the source
integer followVel = TRUE;       // Particles turn to velocity direction
 
// Choose a pattern from the following:
// PSYS_SRC_PATTERN_EXPLODE
// PSYS_SRC_PATTERN_DROP
// PSYS_SRC_PATTERN_ANGLE_CONE_EMPTY
// PSYS_SRC_PATTERN_ANGLE_CONE
// PSYS_SRC_PATTERN_ANGLE
integer pattern =  PSYS_SRC_PATTERN_EXPLODE;
 
// Select a target for particles to go towards
// "" for no target, "owner" will follow object owner 
//    and "self" will target this object
//    or put the key of an object for particles to go to
key target = "";
 
// Particle paramaters
float age = 15;                  // Life of each particle
float maxSpeed = .5;            // Max speed each particle is spit out at
float minSpeed = .5;            // Min speed each particle is spit out at
string texture = "TextureNameHere";                 // Texture used for particles, default used if blank
float startAlpha = 1;           // Start alpha (transparency) value
float endAlpha = 0;           // End alpha (transparency) value
vector startColor = <1 .0,1.0,1.0>;    // Start color of particles 
vector endColor = <1 .0,1.0,1.0>;      // End color of particles  (if interpColor == TRUE)
vector startSize = <.15,.15,.15>;     // Start size of particles 
vector endSize = <.15,.15,.15>;       // End size of particles (if interpSize == TRUE)
vector push = <0,0,0>;          // Force pushed on particles
 
// System paramaters
float rate = 1.5;            // How fast (rate) to emit particles
float radius = 3;          // Radius to emit particles for BURST pattern
integer count = 3;        // How many particles to emit per BURST 
float outerAngle = 1.0;    // Outer angle for all ANGLE patterns
float innerAngle = 1.0;    // Inner angle for all ANGLE patterns
vector omega = <0,0,0>;    // Rotation of ANGLE patterns around the source
float life = 0;             // Life in seconds for the system to make particles
 
// Script variables
integer pre = 2;          //Adjust the precision of the generated list.
 
integer flags;
list sys;
integer type;
vector tempVector;
rotation tempRot;
string tempString;
integer i;
 
string float2String(float in)
{
    return llGetSubString((string)in,0,pre - 7);
}
 
updateParticles()
{
    flags = 0;
    if (target == "owner") target = llGetOwner();
    if (target == "self") target = llGetKey();
    if (glow) flags = flags | PSYS_PART_EMISSIVE_MASK;
    if (bounce) flags = flags | PSYS_PART_BOUNCE_MASK;
    if (interpColor) flags = flags | PSYS_PART_INTERP_COLOR_MASK;
    if (interpSize) flags = flags | PSYS_PART_INTERP_SCALE_MASK;
    if (wind) flags = flags | PSYS_PART_WIND_MASK;
    if (followSource) flags = flags | PSYS_PART_FOLLOW_SRC_MASK;
    if (followVel) flags = flags | PSYS_PART_FOLLOW_VELOCITY_MASK;
    if (target != "") flags = flags | PSYS_PART_TARGET_POS_MASK;
    sys = [  PSYS_PART_MAX_AGE,age,
             PSYS_PART_FLAGS,flags,
             PSYS_PART_START_COLOR, startColor,
             PSYS_PART_END_COLOR, endColor,
             PSYS_PART_START_SCALE,startSize,
             PSYS_PART_END_SCALE,endSize, 
             PSYS_SRC_PATTERN, pattern,
             PSYS_SRC_BURST_RATE,rate,
             PSYS_SRC_ACCEL, push,
             PSYS_SRC_BURST_PART_COUNT,count,
             PSYS_SRC_BURST_RADIUS,radius,
             PSYS_SRC_BURST_SPEED_MIN,minSpeed,
             PSYS_SRC_BURST_SPEED_MAX,maxSpeed,
             PSYS_SRC_TARGET_KEY,target,
             PSYS_SRC_ANGLE_BEGIN,innerAngle, 
             PSYS_SRC_ANGLE_END,outerAngle,
             PSYS_SRC_OMEGA, omega,
             PSYS_SRC_MAX_AGE, life,
             PSYS_SRC_TEXTURE, texture,
             PSYS_PART_START_ALPHA, startAlpha,
             PSYS_PART_END_ALPHA, endAlpha
        ];
 
    llParticleSystem(sys);
}
 
default
{
    state_entry()
    {
        updateParticles();
    }
 
    touch_start(integer num)
    {
        llWhisper(0,"...Generating List...");
        for (i=1;i<42 ;i+=2)
        {
            type = llGetListEntryType(sys,i);
            if(type == TYPE_FLOAT)
            {
                tempString = float2String(llList2Float(sys,i));
                sys = llDeleteSubList(sys,i,i);
                sys = llListInsertList(sys,[tempString],i);
            }
            else if (type == TYPE_VECTOR)
            {
                tempVector = llList2Vector(sys,i);
                tempString = "<" + float2String(tempVector.x) + "," 
                    + float2String(tempVector.y) + "," 
                    + float2String(tempVector.z) + ">";
                sys = llDeleteSubList(sys,i,i);
                sys = llListInsertList(sys,[tempString],i);
            }
            else if (type == TYPE_ROTATION)
            {
                tempRot = llList2Rot(sys,i);
                tempString = "<" + float2String(tempRot.x) + "," 
                    + float2String(tempRot.y) + "," 
                    + float2String(tempRot.z) + "," 
                    + float2String(tempRot.s) + ">";
                sys = llDeleteSubList(sys,i,i);
                sys = llListInsertList(sys,[tempString],i);
            }
            else if (type == TYPE_STRING || type == TYPE_KEY)
            {
                tempString = "\"" + llList2String(sys,i) + "\"";
                sys = llDeleteSubList(sys,i,i);
                sys = llListInsertList(sys,[tempString],i);
            }
        }
        sys = llListSort(sys,2,TRUE);
        if (target == "") sys = llDeleteSubList(sys,38,39);
        else if (target == llGetKey() ) 
            sys = llListInsertList(llDeleteSubList(sys,39,39),["llGetKey()"],39);
        else if (target == llGetOwner() ) 
            sys = llListInsertList(llDeleteSubList(sys,39,39),["llGetOwner()"],39);
        if (texture == "") sys = llDeleteSubList(sys,24,25);
        if (!interpSize) sys = llDeleteSubList(sys,12,13);
        if (!interpColor) sys = llDeleteSubList(sys,6,7);
 
        llWhisper(0,"[" + llList2CSV(llList2List(sys,0,21)) + ",");
        llWhisper(0,llList2CSV(llList2List(sys,22,-1)) + "]");
    }
}

 

Pixie Sparkels

Expired

// Script Name: ziphren_pixie_sparkles_blue.lsl
// Author: Anonymous
// ziphren pixie sparkles blue.lsl

// Downloaded from : http://www.free-lsl-scripts.com/cgi/freescripts.plx?ID=1238

// This program is free software; you can redistribute it and/or modify it.
// Additional Licenes may apply that prevent you from selling this code
// You must leave any author credits and any headers intact in any script you use or publish.
///////////////////////////////////////////////////////////////////////////////////////////////////
// If you don't like these restrictions and licenses, then don't use these scripts.
//////////////////////// ORIGINAL AUTHORS CODE BEGINS ////////////////////////////////////////////


// ziphren pixie sparkles blue.lsl
// CATEGORY:Particles
// DESCRIPTION:ziphren pixie sparkles blue.lsl
// ARCHIVED BY:Ferd Frederix

particlesOn()
{
    integer flags = 0;
    flags = flags | PSYS_PART_EMISSIVE_MASK | PSYS_PART_INTERP_COLOR_MASK;
    flags = flags | PSYS_PART_WIND_MASK | PSYS_PART_FOLLOW_SRC_MASK;
    flags = flags | PSYS_PART_FOLLOW_VELOCITY_MASK;

    llParticleSystem([  PSYS_PART_MAX_AGE, 10.5,
                        PSYS_PART_FLAGS, flags,
                        PSYS_PART_START_COLOR, <0.45,1,1>,
                        PSYS_PART_END_COLOR, <0.45,1,1>,
                        PSYS_PART_START_SCALE, <0.3,0.3,0.3>,
                        PSYS_PART_END_SCALE, <0.3,0.3,0.3>, 
                        PSYS_SRC_PATTERN, PSYS_SRC_PATTERN_ANGLE_CONE,
                        PSYS_SRC_BURST_RATE, 2.6,
                        PSYS_SRC_ACCEL, <0,1.0,0>,
                        PSYS_SRC_BURST_PART_COUNT, 31,
                        PSYS_SRC_BURST_SPEED_MIN, 0.05,
                        PSYS_SRC_BURST_SPEED_MAX, 2.0,
                        PSYS_SRC_INNERANGLE, 0.5, 
                        PSYS_SRC_OUTERANGLE, 0.0,
                        PSYS_SRC_OMEGA, <0,0,0>,
                        PSYS_PART_START_ALPHA, 1.0,
                        PSYS_PART_END_ALPHA, 0.25
                        ]);
}

particlesOff()
{
    llParticleSystem([]);
}

default
{
    state_entry()
    {
        particlesOn();
    }
}// END //

 

Particle Fountain

Expired

// Jopsy's No-Frills Particle Script v2
// All settings below are 'defaults
integer mode;
default
{
    state_entry() {     
        llParticleSystem( [
            // Appearance Settings
        PSYS_PART_START_SCALE,(vector) <0.1,0.8,0>,// Start Size, (minimum .04, max 10.0?)
        PSYS_PART_END_SCALE,(vector) <0.2,0.3,0>, // End Size,  requires *_INTERP_SCALE_MASK
        PSYS_PART_START_COLOR,(vector) <1 ,1,1>,   // Start Color, (RGB, 0 to 1)
        PSYS_PART_END_COLOR,(vector) <.5,.5,1>,   // EndC olor, requires *_INTERP_COLOR_MASK
        PSYS_PART_START_ALPHA,(float) 0.9,        // startAlpha (0 to 1),
        PSYS_PART_END_ALPHA,(float) 0.5,          // endAlpha (0 to 1)
        PSYS_SRC_TEXTURE,(string) "",             // name of a 'texture' in emitters inventory
            // Flow Settings, keep (age/rate)*count well below 4096 !!!
        PSYS_SRC_BURST_PART_COUNT,(integer) 20,    // # of particles per burst
        PSYS_SRC_BURST_RATE,(float) 0.1,          // delay between bursts
        PSYS_PART_MAX_AGE,(float) 2.0,             // how long particles live
        PSYS_SRC_MAX_AGE,(float) 0,//15.0*60.0,       // turns emitter off after 15 minutes. (0.0 = never)
            // Placement Settings
        PSYS_SRC_PATTERN, PSYS_SRC_PATTERN_ANGLE_CONE, 
            // _PATTERN can be: *_EXPLODE, *_DROP, *_ANGLE, *ANGLE_CONE or *_ANGLE_CONE_EMPTY
        PSYS_SRC_BURST_RADIUS,(float) 0.1,        // How far from emitter new particles start,
        PSYS_SRC_INNERANGLE,(float) PI/20,          // aka 'spread' (0 to 2*PI), 
        PSYS_SRC_OUTERANGLE,(float) 0.0,          // aka 'tilt' (0(up), PI(down) to 2*PI),
        PSYS_SRC_OMEGA,(vector) <0,0,2 * PI>,          // how much to rotate around x,y,z per burst,
            // Movement Settings
        PSYS_SRC_ACCEL,(vector) <0,0,-3>,          // aka gravity or push, ie <0,0,-1.0> = down
        PSYS_SRC_BURST_SPEED_MIN,(float) 2.5,     // Minimum velocity for new particles
        PSYS_SRC_BURST_SPEED_MAX,(float) 3.5,     // Maximum velocity for new particles
        //PSYS_SRC_TARGET_KEY,(key) llGetOwner(), // key of a target, requires *_TARGET_POS_MASK
            // for *_TARGET try llGetKey(), or llGetOwner(), or llDetectedKey(0) even. :)
            
        PSYS_PART_FLAGS,      // Remove the leading // from the options you want enabled:              
             //PSYS_PART_EMISSIVE_MASK |           // particles glow
             PSYS_PART_BOUNCE_MASK |             // particles bounce up from emitter's 'Z' altitude
             //PSYS_PART_WIND_MASK |               // particles get blown around by wind
             //PSYS_PART_FOLLOW_VELOCITY_MASK |    // particles rotate towards where they're going
             //PSYS_PART_FOLLOW_SRC_MASK |         // particles move as the emitter moves
             PSYS_PART_INTERP_COLOR_MASK |       // particles change color depending on *_END_COLOR 
             PSYS_PART_INTERP_SCALE_MASK |       // particles change size using *_END_SCALE
             //PSYS_PART_TARGET_POS_MASK |         // particles home on *_TARGET key
         0 // Unless you understand binary arithmetic, leave this 0 here. :)
        ] );
        //sound
        
    }
    
    //touch_start(integer num) {
        //if (mode++) llResetScript(); // 2nd time touched?  start over
        //else llParticleSystem([ ]); // 1st time touched?  Turn particles off.
    //}
}