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)
}
}
}
im 12