SHARE
TWEET

Untitled

a guest Jul 23rd, 2019 78 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. integer max = 100;
  2. integer min = 0;
  3.  
  4. integer random(integer min, integer max)
  5. {
  6.         key id = llGenerateKey();
  7.         string subid = "0x" + llGetSubString((string)id, -8, -1);
  8.         string subid2 = "0x" + llGetSubString((string)id, 0, 7);
  9.         string subid3 = "0x" + llGetSubString((string)id, -12, -9);
  10.         integer int = llAbs((integer)subid ^ (integer)subid2 ^ (integer)subid3);
  11.         string ints = "0." + llGetSubString((string)int, -7, -1);
  12.         integer rand = (integer)(max*((float)ints));                
  13.  
  14.         return min + rand;
  15. }
  16.  
  17. default
  18. {
  19.     state_entry()
  20.     {
  21.        
  22.     }
  23.    
  24.     touch_start(integer num)
  25.     {
  26.         llOwnerSay((string)random(min, max));
  27.     }
  28. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top