View Single Post
  #180  
Old 02-16-2006, 12:17 AM
David Harrison's Avatar
David Harrison David Harrison is offline
Evil Overlord & Super Mod
 
Join Date: Dec 2002
Location: Manchester, UK
Posts: 6,293
Here's a nice randomly useless one, semi-inspired by Cinders.
Code:
String.prototype.makeStupid = function(stupidityLimit){

  var stupid		= new Array();
  var stupidness	= "";

  /*

	Add in your stupidisms here, the later they are declared, the less likely they
	are to occur.

  */

  stupid[stupid.length]	= "!";
  stupid[stupid.length]	= "1";
  stupid[stupid.length]	= "eleven";
  stupid[stupid.length]	= "twelve";
  stupid[stupid.length]	= "SHIFT+1";

  /*

	The higher the value of the "stupidityRareness" variable, the less often the
	later values in the array occur.

  */

  var stupidityRareness	= 20;

  for( var n=0; n < stupidityLimit; n++){
    stupidness		+= stupid[Math.floor(stupid.length * Math.pow(Math.random(),stupidityRareness))];
  }

  return this+stupidness;

}

alert("PWNZ0R8T3D!".makeStupid(50));
__________________
Every fight is a food fight when you’re a cannibal.

Last edited by David Harrison; 02-16-2006 at 12:21 AM.
Reply With Quote