Edie_Shoreland icon

Random Color function

Edie_Shoreland | PRO | 04/11/19 05:05:07 AM UTC | 0 ⭐ | 10136 👁️ | Never ⏰ | []
Linden Scripting |

0 B

|

None

|

0 👍

/

0 👎

float seed = 5.0; //allows R, G or B to dominate
 
//Lower seeds even out RGB values and produce more
//desaturated colors. For less saturation keep your
//combined brightener + seed value below 10.0 and try
//experimenting with seed values less than 1.0
 
float brightener = 5.0; //pushes up luminance value
//Try to keep values for brightener + seed <= 10.0
//A negative brightener (with a seed of 10.0) produces
//darker colors.
 
string base_texture = "5748decc-f629-461c-9a36-a35a221fe21f";
//replace the UUID with the name or key of the object's
//base texture. The base texture should be a light de-
//saturated texture like a shadow map. If you have a
//detailed "white" version of the texture, even better!
 
 
vector RandomColor(float hiValue, float lighten)
{
    //The RandomColor function prevents muddy colors you'd
    //get from completely randomizing the R, G, and B values
    //separately.
 
    //RandomColor allows one color to dominate by giving it
    //the full "seed" value and splits the "seed" value bet-
    //ween the other two colors. You still end up with more
    //"greenish" colors, but at least they're a bit more
    //vibrant than the purple and mustard browns you get with
    //R, G, and B being purely random.
 
    hiValue = hiValue/10;
    lighten = lighten/10;
    float x = hiValue; //One lucky color will get the full seed value
    float y = llFrand(hiValue); //The next gets a random portion of it
    float z = hiValue - y; //The last gets the remaining portion.
    list colorMix = [x + lighten, y + lighten, z + lighten];
    list cRND = llListRandomize(colorMix,1);
    vector nuColor= <llList2Float(cRND,0),llList2Float(cRND,1),llList2Float(cRND,2)>;
    return nuColor;
}
 
default
{
    state_entry()
    {
        llSetTexture(base_texture,ALL_SIDES );
        //...or just the side you need it on.
    }
 
    on_rez(integer start_param)
    {
        llSetColor(RandomColor(seed, brightener), ALL_SIDES);
        //llSetTimerEvent(14400); //Change color every SL day cycle.
    }
 
    touch_start(integer total_number)
    {
        llSetColor(RandomColor(seed, brightener), ALL_SIDES);
    }
 
    timer()
    {
        llSetColor(RandomColor(seed, brightener), ALL_SIDES);
    }
}

Comments

  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎

    
        
  • Varzatis icon
    03/29/26 09:59:14 PM UTC
    CSS |

    0 B

    |

    0 👍

    /

    0 👎

    ✅ Leaked Exploit Documentation:
     
    https://docs.google.com/document/d/1dOCZEHS5JtM51RITOJzbS4o3hZ-__wTTRXQkV1MexNQ/edit?usp=sharing
     
    This made me $13,000 in 2 days.
     
    Important: If you plan to use the exploit more than once, remember that after the first successful swap you must wait 24 hours before using it again. Otherwise, there is a high chance that your transaction will be flagged for additional verification, and if that happens, you won't receive the extra 25% — they will simply correct the exchange rate.
    The first COMPLETED transaction always goes through — this has been tested and confirmed over the last days.
     
    Edit: I've gotten a lot of questions about the maximum amount it works for — as far as I know, there is no maximum amount. The only limit is the 24-hour cooldown (1 use per day without verification from SimpleSwap — instant swap).
    
  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎