What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Plug-Ins » Readable Misspeller StuffPlug NG Talker

Readable Misspeller StuffPlug NG Talker
Author: Message:
J-Thread
Full Member
***

Avatar

Posts: 467
Reputation: 8
– / Male / –
Joined: Jul 2004
RE: Readable Misspeller StuffPlug NG Talker
quote:
It is having some problems with 3 letter words, I'll figure it out, eventually.

The answer is really obvisious.... But well, i'll help you, here it is.
code:
function talker(input) {
// Unreader written by Improfane 2005
// Please do not remove this message
// original concept: http://216.239.59.104/search?q=cache:R79FQj60fnkJ...t.davis/Cmabrigde/ (Google Cache)
var words = /[a-z]+/gi
// regular expression to grab all words

input_length = input.length ; // length of entire string
var matches = input.match(words) ; // list of all words
for (cur_word=0; cur_word < matches.length ; cur_word++) { //cycle through each word
word = matches[cur_word] // current word
cur_word_length = word.length ; // current word length
if(cur_word_length > 3) {
cur_word_middle = word.substring(1,cur_word_length-1) ; // the middle part of the word, from the 2nd letter to the 2nd to last letter

new_middle = scramble(cur_word_middle) ; // scrambles the middle word

input = input.replace(cur_word_middle, new_middle ) ; // makes change to original string
}
}

return input
}

function scramble(input) { // scrambles any input
// written by Improfane 2005
var new_word = "" ;

for (cur_letter=0 ; cur_letter = input.length ; cur_letter++) { // cycle through each letter
random_letter = input.charAt(ranNum(0,input.length)) // get random letter from the possible characters available
input = input.replace(random_letter,"") ; // remove the used letter from the possible characters available
new_word += random_letter ; // adds the random letter to the new string
}
return new_word ; // returns the scrambled word
}


function ranNum(nFrom,nTo) {
return Math.floor(nFrom + (nTo-nFrom + 1) * Math.random()) ;
// returns a random number
}
10-08-2005 10:34 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Readable Misspeller StuffPlug NG Talker - by Improfane on 10-08-2005 at 10:32 AM
RE: Readable Misspeller StuffPlug NG Talker - by t1a0s on 10-08-2005 at 11:47 AM
RE: Readable Misspeller StuffPlug NG Talker - by DragonX on 10-08-2005 at 11:54 AM
RE: Readable Misspeller StuffPlug NG Talker - by qgroessl on 10-08-2005 at 12:09 PM
RE: Readable Misspeller StuffPlug NG Talker - by Impheatus on 10-08-2005 at 02:38 PM
RE: Readable Misspeller StuffPlug NG Talker - by cardshark on 10-08-2005 at 03:41 PM
RE: Readable Misspeller StuffPlug NG Talker - by Improfane on 10-08-2005 at 04:51 PM
RE: Readable Misspeller StuffPlug NG Talker - by spokes on 10-08-2005 at 05:44 PM
RE: Readable Misspeller StuffPlug NG Talker - by prashker on 10-08-2005 at 05:56 PM
RE: Readable Misspeller StuffPlug NG Talker - by J-Thread on 10-08-2005 at 10:34 PM
RE: Readable Misspeller StuffPlug NG Talker - by CookieRevised on 10-08-2005 at 10:38 PM
RE: RE: Readable Misspeller StuffPlug NG Talker - by Improfane on 10-09-2005 at 12:00 AM
RE: RE: RE: Readable Misspeller StuffPlug NG Talker - by CookieRevised on 10-09-2005 at 12:44 PM
RE: Readable Misspeller StuffPlug NG Talker - by dotNorma on 10-09-2005 at 01:45 AM
RE: Readable Misspeller StuffPlug NG Talker - by TheBlasphemer on 10-09-2005 at 10:58 AM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On