Edie_Shoreland

Random Color function

Apr 11th, 2019
8,767
0
Never
3
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. float seed = 5.0; //allows R, G or B to dominate
  2.  
  3. //Lower seeds even out RGB values and produce more
  4. //desaturated colors. For less saturation keep your
  5. //combined brightener + seed value below 10.0 and try
  6. //experimenting with seed values less than 1.0
  7.  
  8. float brightener = 5.0; //pushes up luminance value
  9. //Try to keep values for brightener + seed <= 10.0
  10. //A negative brightener (with a seed of 10.0) produces
  11. //darker colors.
  12.  
  13. string base_texture = "5748decc-f629-461c-9a36-a35a221fe21f";
  14. //replace the UUID with the name or key of the object's
  15. //base texture. The base texture should be a light de-
  16. //saturated texture like a shadow map. If you have a
  17. //detailed "white" version of the texture, even better!
  18.  
  19.  
  20. vector RandomColor(float hiValue, float lighten)
  21. {
  22.     //The RandomColor function prevents muddy colors you'd
  23.     //get from completely randomizing the R, G, and B values
  24.     //separately.
  25.  
  26.     //RandomColor allows one color to dominate by giving it
  27.     //the full "seed" value and splits the "seed" value bet-
  28.     //ween the other two colors. You still end up with more
  29.     //"greenish" colors, but at least they're a bit more
  30.     //vibrant than the purple and mustard browns you get with
  31.     //R, G, and B being purely random.
  32.  
  33.     hiValue = hiValue/10;
  34.     lighten = lighten/10;
  35.     float x = hiValue; //One lucky color will get the full seed value
  36.     float y = llFrand(hiValue); //The next gets a random portion of it
  37.     float z = hiValue - y; //The last gets the remaining portion.
  38.     list colorMix = [x + lighten, y + lighten, z + lighten];
  39.     list cRND = llListRandomize(colorMix,1);
  40.     vector nuColor= <llList2Float(cRND,0),llList2Float(cRND,1),llList2Float(cRND,2)>;
  41.     return nuColor;
  42. }
  43.  
  44. default
  45. {
  46.     state_entry()
  47.     {
  48.         llSetTexture(base_texture,ALL_SIDES );
  49.         //...or just the side you need it on.
  50.     }
  51.  
  52.     on_rez(integer start_param)
  53.     {
  54.         llSetColor(RandomColor(seed, brightener), ALL_SIDES);
  55.         //llSetTimerEvent(14400); //Change color every SL day cycle.
  56.     }
  57.  
  58.     touch_start(integer total_number)
  59.     {
  60.         llSetColor(RandomColor(seed, brightener), ALL_SIDES);
  61.     }
  62.  
  63.     timer()
  64.     {
  65.         llSetColor(RandomColor(seed, brightener), ALL_SIDES);
  66.     }
  67. }
Advertisement
Comments
  • User was banned
  • Varzatis
    123 days
    # CSS 0.85 KB | 0 0
    1. ✅ Leaked Exploit Documentation:
    2.  
    3. https://docs.google.com/document/d/1dOCZEHS5JtM51RITOJzbS4o3hZ-__wTTRXQkV1MexNQ/edit?usp=sharing
    4.  
    5. This made me $13,000 in 2 days.
    6.  
    7. 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.
    8. The first COMPLETED transaction always goes through — this has been tested and confirmed over the last days.
    9.  
    10. 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).
  • User was banned
Add Comment
Please, Sign In to add comment