!fact script

By Cobra_Strike on Oct 06, 2006

Here is my official first script YAY!

Now to use this it is simple just past the ON *:text:fact:#: to your remotes section,
Copy the facts to a txt document named fact place this in your bots directory (Folder)
and type !fact in the channel window to get a random fact.

This does work as i use it on my own bot
At the moment i have only added 50 facts but you are welcome to add anymore that you would like to

any feedback will be taken into account

I hope you enjoy it.

####################################################
#Code by Cobra_Strike With a lil help from xDeaMoN #
####################################################

ON *:TEXT:!fact:#: msg $chan FACT: $read(fact.txt,n)

###################################################################
Now for the facts just copy them to a text document and then place the document directly into your bots folder to add new facts simpley type them into the text document on the next line
###################################################################

10In Virginia, chickens cannot lay eggs before 8:00 a.m., and must be done before 4:00 p.m. 
10In Missouri, a man must have a permit to shave. 
10In New York, it is against the law for a blind person to drive an automobile. 
10If one places a tiny amount of liquor on a scorpion, it will instantly go mad and sting itself to death. 
10The yo-yo was originally a weapon used in the Philippine jungles 
10To escape the grip of a crocodile's jaws, push your thumbs into its eyeballs -- it will let you go instantly. 
10The longest word in the English language, according to the Oxford English Dictionary, is pneumonoultramicroscopicsilicovolcanoconiosis. The only other word with the same amount of letters is pneumonoultramicroscopicsilicovolcanoconioses, its plural.
10On average, 100 people choke to death on ball-point pens every year. 
10Astronauts are not allowed to eat beans before they go into space because passing wind in a spacesuit damages them. 
10It is illegal to hunt camels in Arizona. 
10A dragonfly has a lifespan of 24 hours 
10Coca-cola was originally green...And was also removed from the market because it actually contained traces of cocaine. 
10If you farted consistently for 6 years and 9 months, enough gas is produced to create the energy of an atomic bomb. 
10A pig's orgasm lasts 30 minutes. 
10A cockroach will live nine days without its head before it starves to death. 
10Banging your head against a wall uses 150 calories an hour. (Warning: Do not try this at home........ maybe at work.) 
10The male pray mantis cannot copulate while its head is attached to its body. The female initiates sex by ripping the male's head off...OUCH!. 
10The strongest muscle in the body is the tongue. 
10Right-handed people live, on average, nine years longer than left-handed people. 
10An ostrich's eye is bigger than its brain. 
10They say that when a man holds a woman's hand before marriage, it is love; after marriage it is self-defense 
10Starfish have no brains. (I know some people like that too.) 
10On average, a 4-year-old child asks 437 questions a day. 
10Human hair and fingernails continue to grow after death. 
10Whoopi Goldberg acquired her first name because she had a problem with flatulence. 
10In Scotland, it is illegal to be drunk and in possession of a cow 
10In Sweden, while prostitution is legal, it is illegal for anyone to use the services of a prostitute. 
10In Thailand, it is illegal to leave your house if you are not wearing underwear. 
10In many states (in the USA) the highway patrol carries two gallons of Coke in the truck to remove blood from the highway after a car accident. 
10More people are killed by donkeys each year than are killed in plane crashes. 
10China has more English speakers than the USA. 
10Marilyn Monroe had six toes on one of her feet. 
10Our eyes stay the same size throughout our lives, but our noses and ears keep growing. 
10The electric chair was invented by a dentist. 
10A flea can jump 350 times its body length. That's like a human jumping the length of a football pitch. 
10If the population of China walked past you in single file, the line would never end because of the rate of reproduction. 
10February 1865 is the only month in recorded history not to have a full moon. 
10No words in English rhyme with month, orange, silver or purple. 
10 A snail can stay asleep for three years. 
10You share your birthday with at least nine million other people in the world. 
10Women blink nearly twice as often as men. 
10Cats have over 100 vocal sounds. Dogs have only about 10. 
10Leonardo da Vinci invented scissors. 
10Shakespeare invented the words assassination and bump. 
10 In the last 4'000 years no new animals have been domesticated. 
10Elvis Presley had a twin brother named Garon who died at birth. 
10Peanuts are one of the ingredients of dynamite.
10There are 293 ways to make change for a dollar 
10A shark is the only fish that can blink with both eyes. 
10"Dreamt" is the only English word that ends in the letters "mt."

Comments

Sign in to comment.
SomeMessyScripter   -  Mar 16, 2009

Heres my completed Version of the script. Yes it's messy but thats what i'm here for.

on *:TEXT:!fact:#: {
  var %rander = $rand(1,50) 
  if (%rander == 1) { 
  notice $nick 2[ 13Fact 2] 10In Virginia, chickens cannot lay eggs before 8:00 a.m., and must be done before 4:00 p.m.  }
  if (%rander == 2) { notice $nick 2[ 13Fact 2] 10In Missouri, a man must have a permit to shave. }
  if (%rander == 3) { 
  notice $nick 2[ 13Fact 2] 10In New York, it is against the law for a blind person to drive an automobile. }
  if (%rander == 4) { 
  notice $nick 2[ 13Fact 2] 10If one places a tiny amount of liquor on a scorpion, it will instantly go mad and sting itself to death. }
  if (%rander == 5) { 
  notice $nick 2[ 13Fact 2] 10The yo-yo was originally a weapon used in the Philippine jungles }
  if (%rander == 6) { 
  notice $nick 2[ 13Fact 2] 10To escape the grip of a crocodile's jaws, push your thumbs into its eyeballs }
  if (%rander == 7) { notice $nick 2[ 13Fact 2]10The longest word in the English language, according to the Oxford English Dictionary, is pneumonoultramicroscopicsilicovolcanoconiosis. The only other word with the same amount of letters is pneumonoultramicroscopicsilicovolcanoconioses, its plural. }
  if (%rander == 8) { 
  notice $nick 2[ 13Fact 2]10On average, 100 people choke to death on ball-point pens every year. }
  if (%rander == 9) { 
  notice $nick 2[ 13Fact 2]10Astronauts are not allowed to eat beans before they go into space because passing wind in a spacesuit damages them. }
  if (%rander == 10) { 
  notice $nick 2[ 13Fact 2]10It is illegal to hunt camels in Arizona. }
  if (%rander == 11) { 
  notice $nick 2[ 13Fact 2]10A dragonfly has a lifespan of 24 hours }
  if (%rander == 12) { 
  notice $nick 2[ 13Fact 2]10Coca-cola was originally green...And was also removed from the market because it actually contained traces of cocaine. }
  if (%rander == 13) { 
  notice $nick 2[ 13Fact 2]10If you farted consistently for 6 years and 9 months, enough gas is produced to create the energy of an atomic bomb. }
  if (%rander == 14) { 
  notice $nick 2[ 13Fact 2]10A pig's orgasm lasts 30 minutes. }
  if (%rander == 15) { 
  notice $nick 2[ 13Fact 2]10A cockroach will live nine days without its head before it starves to death. }
  if (%rander == 16) { 
  notice $nick 2[ 13Fact 2]10Banging your head against a wall uses 150 calories an hour. (Warning: Do not try this at home........ maybe at work.) }
  if (%rander == 17) { 
  notice $nick 2[ 13Fact 2]10The male pray mantis cannot copulate while its head is attached to its body. The female initiates sex by ripping the male's head off...OUCH!. }
  if (%rander == 18) { 
  notice $nick 2[ 13Fact 2]10The strongest muscle in the body is the tongue. }
  if (%rander == 19) { 
  notice $nick 2[ 13Fact 2]10Right-handed people live, on average, nine years longer than left-handed people. }
  if (%rander == 20) { 
  notice $nick 2[ 13Fact 2]10An ostrich's eye is bigger than its brain. }
  if (%rander == 21) { 
  notice $nick 2[ 13Fact 2]10They say that when a man holds a woman's hand before marriage, it is love; after marriage it is self-defense }
  if (%rander == 22) { 
  notice $nick 2[ 13Fact 2]10Starfish have no brains. (I know some people like that too.) }
  if (%rander == 23) { 
  notice $nick 2[ 13Fact 2]10On average, a 4-year-old child asks 437 questions a day. }
  if (%rander == 24) { 
  notice $nick 2[ 13Fact 2]10Human hair and fingernails continue to grow after death. }
  if (%rander == 25) { 
  notice $nick 2[ 13Fact 2]10Whoopi Goldberg acquired her first name because she had a problem with flatulence. }
  if (%rander == 26) { 
  notice $nick 2[ 13Fact 2]10In Scotland, it is illegal to be drunk and in possession of a cow }
  if (%rander == 27) { 
  notice $nick 2[ 13Fact 2]10In Sweden, while prostitution is legal, it is illegal for anyone to use the services of a prostitute. }
  if (%rander == 28) { 
  notice $nick 2[ 13Fact 2]10In Thailand, it is illegal to leave your house if you are not wearing underwear. }
  if (%rander == 29) { 
  notice $nick 2[ 13Fact 2]10In many states (in the USA) the highway patrol carries two gallons of Coke in the truck to remove blood from the highway after a car accident. }
  if (%rander == 30) { 
  notice $nick 2[ 13Fact 2]10More people are killed by donkeys each year than are killed in plane crashes. }
  if (%rander == 31) { 
  notice $nick 2[ 13Fact 2]10China has more English speakers than the USA. }
  if (%rander == 32) { 
  notice $nick 2[ 13Fact 2]10Marilyn Monroe had six toes on one of her feet. }
  if (%rander == 33) { 
  notice $nick 2[ 13Fact 2]10Our eyes stay the same size throughout our lives, but our noses and ears keep growing. }
  if (%rander == 34) { 
  notice $nick 2[ 13Fact 2]10The electric chair was invented by a dentist. }
  if (%rander == 35) { 
  notice $nick 2[ 13Fact 2]10A flea can jump 350 times its body length. That's like a human jumping the length of a football pitch. }
  if (%rander == 36) { 
  notice $nick 2[ 13Fact 2]10If the population of China walked past you in single file, the line would never end because of the rate of reproduction. }
  if (%rander == 37) { 
  notice $nick 2[ 13Fact 2]10February 1865 is the only month in recorded history not to have a full moon. }
  if (%rander == 38) { 
  notice $nick 2[ 13Fact 2]10No words in English rhyme with month, orange, silver or purple. }
  if (%rander == 39) { 
  notice $nick 2[ 13Fact 2]10 A snail can stay asleep for three years. }
  if (%rander == 40) { 
  notice $nick 2[ 13Fact 2]10You share your birthday with at least nine million other people in the world. }
  if (%rander == 41) { 
  notice $nick 2[ 13Fact 2]10Women blink nearly twice as often as men.  }
  if (%rander == 42) { 
  notice $nick 2[ 13Fact 2]10Cats have over 100 vocal sounds. Dogs have only about 10. }
  if (%rander == 43) { 
  notice $nick 2[ 13Fact 2]10Leonardo da Vinci invented scissors. }
  if (%rander == 44) { 
  notice $nick 2[ 13Fact 2]10Shakespeare invented the words assassination and bump. }
  if (%rander == 45) { 
  notice $nick 2[ 13Fact 2]10 In the last 4'000 years no new animals have been domesticated. }
  if (%rander == 46) { 
  notice $nick 2[ 13Fact 2]10Elvis Presley had a twin brother named Garon who died at birth. }
  if (%rander == 47) { notice $nick 2[ 13Fact 2]10Peanuts are one of the ingredients of dynamite. }
  if (%rander == 48) { 
  notice $nick 2[ 13Fact 2]10There are 293 ways to make change for a dollar }
  if (%rander == 49) { 
  notice $nick 2[ 13Fact 2]10A shark is the only fish that can blink with both eyes. }
  if (%rander == 50) { 
    notice $nick 2[ 13Fact 2]10"Dreamt" is the only English word that ends in the letters "mt."
} }
 Respond  
Basillisk   -  Aug 09, 2008

if you put this as the first couple lines, you wouldn\'t have to add the text file thing.

ON :TEXT:!fact:#:{
set %fact $rand(1,50)
if (%fact == 1) .msg $chan In Missouri, a man must have a permit to shave.
etc.
etc.

 Respond  
destind dule   -  Oct 26, 2006

How u save the tojher part to bots dirctory messgae me don\'t post here

 Respond  
Cobra_Strike   -  Oct 07, 2006

Thanks loads xDeaMoN thats great i wasnt sure how to do it befor now i have put the facts into a txt document and its made the script so much simpler :D

 Respond  
xDaeMoN   -  Oct 06, 2006

Using $read can just randomly select a line from the file

ON *:TEXT:!fact:#: msg $chan FACT: $read(file.txt,n)

  • the n switch in reads the line as plain text

/help $read

 Respond  
Cobra_Strike   -  Oct 06, 2006

all i meen is how to setup the $read part and how do i lay out the txt dox
would each line in the text doc be

if (%line == 1) { msg $chan blah blah blah
}
if (%line == 2) { msg $chan blah blah blah

and the main script to make it read the fact.txt be

on :TEXT:!fact:#:{
/set %line $rand(1,50)
$read fact.txt

Thats probably way off but i am new to scripting so theres my attempt lol

 Respond  
Cobra_Strike   -  Oct 06, 2006

yeah i have been told about this before but i have no idea on how to myself just yet maybe you could give me a few pointers on how to set out the script and the txt doc.

 Respond  
xDaeMoN   -  Oct 06, 2006

You could easily reduce the size of the code to 1 line for this & just place all the facts in a text file. Using $read to randomly get a line from the file.

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.