birthday countdown script

By A_A on Aug 18, 2007

a simple script to countdown how long it is until your birthday.
You simply type !addb to set your birthday and type !b to see how long it is until your birthday.

on *:join:#A_A: { << You can change A_A to any channel you want or get rid of it to include all channels. you can also delete the first 2 lines if you don't want to notice people on how to use the script. enjoy

on *:join:#A_A: {
  notice $nick Type !addb <name> <month> <day> to set your birthday. Type !b <name> to see how long it is until your birthday. 
}
on *:TEXT:!addb *:#: {
  if ($2) && ($read(bday.txt,s,$2)) { 
    /msg $chan This name is already on the birthday list.
    halt
  } 
  if ($2 != $read(bday.txt,s,$2)) && ($2) { 
    write bday.txt $2,$3-
    /msg $chan Your birthday has been recorded under the name $2 $+ . type !b <name> to see how long you have until your birthday 
    halt  
  } 
}  
on *:TEXT:!b *:#: {
  if ($2) && ($read(bday.txt,s,$2)) && ( $calc($ctime($read(bday.txt,s,$2) $asctime(yyyy) 00:00:00) - $ctime) > 0 ) { 
    /msg $chan There are $duration( $calc( $ctime($read(bday.txt,s,$2) $asctime(yyyy) 00:00:00) - $ctime)) left until $read(bday.txt,s,$2) and $2 $+ 's birthday!!! 
    halt  
  }

  elseif ($2) && ($read(bday.txt,s,$2)) {  
    /msg $chan There are $duration($calc($ctime($read(bday.txt,s,$2) $calc($asctime(yyyy)+1) 00:00:00) - $ctime)) left until $read(bday.txt,s,$2) or $2 $+ 's birthday
    halt  
  }
  if ($2 != $read(bday.txt,s,$2)) { 
    /msg $chan I'm sorry $nick $+ . This name is not in my list of birthdays. 
  }
}

Comments

Sign in to comment.
duckz   -  Feb 13, 2009

Nevermind ....

 Respond  
guest598594   -  Aug 21, 2007

A_A u look funny :P

 Respond  
guest598594   -  Aug 21, 2007

.\'s are fine, they prevent timer halt timer started and stuff like that...ive been lookin for a countdown script

 Respond  
Anti   -  Aug 18, 2007

heh rofl..

 Respond  
A_A   -  Aug 18, 2007

i know its just a bad habit ive got adding / or . b4 commands :(

 Respond  
Godzilla   -  Aug 18, 2007

Don\'t add / before msg and all, looks messy.... Otherwise good work out there mate :)

 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.