Guest User

Untitled

a guest
May 17th, 2018
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. key GenKey() {
  2. string chars = "0123456789abcdef";
  3. string out;
  4. integer x;
  5. integer y;
  6. for (x = 1; x < 6; x++) {
  7. if (x == 1) for (y = 0; y < 8; y++) {
  8. integer index = (integer)llFrand(llStringLength(chars));
  9. out += llGetSubString(chars, index, index);
  10. }
  11. if (x == 2 || x == 3 || x == 4) for (y = 0; y < 4; y++) {
  12. integer index = (integer)llFrand(llStringLength(chars));
  13. out += llGetSubString(chars, index, index);
  14. }
  15. if (x == 5) for (y = 0; y < 12; y++) {
  16. integer index = (integer)llFrand(llStringLength(chars));
  17. out += llGetSubString(chars, index, index);
  18. } if (x != 5) out += "-";
  19. } return out;
  20. }
Add Comment
Please, Sign In to add comment