All pastes #809065 Raw Edit

Anonymous

public text v1 · immutable
·published 2007-12-08 05:50 UTC
rendered paste body
on *:TEXT:*:#novus: {
  if ( !math isin $1- ) {  
    notice $nick Welcome to IRC Brain Age©! Say !Addition, !Subtraction, !Multi, or !Division for the respective math problem. !Random for a random problem. 
  }
  if ( !addition isin $1- ) {
    set %randadd1 $rand(1,1000)
    set %randadd2 $rand(1,1000)
    notice $nick What is %randadd1 + %randadd2 $+ ?
  }
  if ( $calc(%randadd1 + %randadd2) isin $1- ) {
    notice $nick Correct! Try a new question!
  }
  if ( !subtraction isin $1- ) {
    set %randsub1 $rand(1,1000)
    set %randsub2 $rand(1,1000)
    notice $nick What is %randsub1 - %randsub2 $+ ?
  }
  if ( $calc(%randsub1 - %randsub2) isin $1- ) {
    notice $nick Correct! Try a new question!
  }
  if ( !multi isin $1- ) {
    set %randmulti1 $rand(1,100)
    set %randmulti2 $rand(1,100)
    notice $nick What is %randmulti1 * %randmulti2 $+ ?
  }
  if ( $calc(%randmulti1 * %randmulti2) isin $1- ) {
    notice $nick Correct! Try a new question!
  }
  if ( !division isin $1- ) {
    set %randdiv1 $rand(1,1000)
    set %randdiv2 $rand(1,1000)
    notice $nick What is %randdiv1 / %randdiv2 $+ ?
  }
  if ( $calc(%randdiv1 / %randdiv2) isin $1- ) {
    notice $nick Correct! Try a new question!
  }
}