Don't click here unless you want to be banned.

LSL Wiki : word scramble

HomePage :: PageIndex :: RecentChanges :: RecentlyCommented :: UserSettings :: You are crawl338.us.archive.org
Word Scramble Script (NOT A GAME)
If you want i can come up with a random word function too.
//Put this in an object and say "scramble:WORD" and it will scramble WORD. Simple Eh?

//***********************************************
//Scripted By Second Proctor
//Do Not Remove this Tag
//***********************************************

string scramble(string word)
{
    @restart;
    list t;
    integer i;
    for(i=0;i<llStringLength(word);i++)t = (t = [])+t+[llGetSubString(word,i,i)];
    for(i=0;i<10;i++)t = llListRandomize(t,i+llRound(llFrand(i)));
    
    string d = llDumpList2String(t,"");
    if(d == word) jump restart;
    return d;
}

default
{
    state_entry()
    {
        llSay(0,(string)scramble("Scramble"));
    }
}
There is one comment on this page. [Display comments/form]