Bot Age Script

By blackvenomm666 on Jun 13, 2011

It was requested of me so i made it. Here is my simple age script for a bot. Add to a new remotes file then save it. whenever someone joins the channel the bot will ask their age they do !age agehere ex !age 18 and the bot stores it from then on it won't ask them their age. To check a persons age do !checkage nickhere. To update someones age they can do !updateage newagehere. So if they have a birthday they can update it. Once the persons age is given it will auto voice them

on !*:join:#: {
  .set %agenick $nick
  if (!$readini(age.ini, age,$address($nick,4))) {
    .timer 1 4 msg $chan $nick please give your age this is an 18+ room to store your age for future use type !age agehere ex !age 18
    var -s %curr 1, %nick $nick($chan,0)
    while (%curr <= %nick) { 
      if ($nick($chan,%curr) isop #) {
        .notice $nick($chan,%curr) %agenick $+ 's age is unknown
      }
      inc %curr
    }
  }
  elseif ($readini(age.ini, age,$address($nick,4))) {
    var -s %curr 1, %nick $nick($chan,0)
    while (%curr <= %nick) { 
      if ($nick($chan,%curr) isop #) {
        .notice $nick($chan,%curr) %agenick $+ 's age is $readini(age.ini, age,$address($nick,4))
      }
      inc %curr
    }
  }
}
on $*:TEXT:/^(!age)/Si:#:{
  if ($readini(age.ini, age,$address($nick,4))) {
    msg $chan $nick your age is already known
  }
  else { writeini age.ini age $address($nick,4) $2
    writeini age.ini age $nick $2
    .msg $chan ty $nick for giving me your age it is now stored
    var -s %curr 1, %nick $nick($chan,0)
    while (%curr <= %nick) { 
      if ($nick($chan,%curr) isreg #) {
        .mode $chan +v $nick($chan,%curr)
      }
      inc %curr
    }
  }
}
on $*:TEXT:/^(!updateage)/Si:#:{
  writeini age.ini age $address($nick,4) $2
  writeini age.ini age $nick $2

}
on $*:TEXT:/^(!checkage)/Si:#:{
  if (!$readini(age.ini, age,$2)) {
    msg $chan $nick $2 $+ 's age isnt known
  }
  else { if ($readini(age.ini, age,$2)) {
      msg $chan $2 $+ 's age is $readini(age.ini, age,$2)
    }
  }
}

Comments

Sign in to comment.
Jethro   -  Jun 13, 2011

You do know that people fib about their ages, right? Age scripts, for those who have coded it then and now, don't really serve a valid purpose of age verification. Just food for thought.

dma  -  Nov 23, 2015

im 12

Sign in to comment

Sharky_Dude   -  Jun 13, 2011

Excellent coding Ryan.
and it's a shame Jethro_ too many people do lie.

NcGal123  -  Feb 21, 2013

So does it kick if people dont age in? I mean in semi new at this and really need a good age bot. The last one i used just kept repeating itself.

Sign in to comment

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.