Birthday Calendar

By Kerli on Apr 10, 2010

This is a simple bot (preferably) birthday calendar snippet where you can record your birthday and search for someone else's birthday. I searched and couldn't find one like this, so... On an actual birthday, your bot (or you) will wish said person a happy birthday. I'm pretty sure the joining part is very redundant, but after trying, I couldn't fix that. :/

Well, enjoy this 100% made-by-me script! Also, this script has been tested, but not a whole lot. IF you find any errors that I missed, be sure to tell me below. Oh, and to prevent any confusion, %c is a command identifier. Commonly used by prefabs like YourBot. Feel free to modify it if needed.

;birthday calendar scripting
on *:text:*setbday*:#:{
  if ($1 == %c $+ setbday) {
    if ($2 != $null) {
      if ($3 != $null) {
        if ($4 != $null) {
          set %bday. [ $+ [ $nick ] ] $2 $+ / $+ $3 $+ / $+ $4
          .notice $nick 10Your birthday has been logged as $2 $+ / $+ $3 $+ / $+ $4 $+ , $nick $+ .
        }
        else { .notice $nick 10Incorrect: use %c $+ setbday <date in 2 digits; first = 01> <month in 2 digits; April = 04> <year in 4 digits your next birthday is>. }
      }
      else { .notice $nick 10Incorrect: use %c $+ setbday <date in 2 digits; first = 01> <month in 2 digits; April = 04> <year in 4 digits your next birthday is>. }
    }
    else { .notice $nick 10Incorrect: use %c $+ setbday <date in 2 digits; first = 01> <month in 2 digits; April = 04> <year in 4 digits your next birthday is>. }
  }
}
on *:text:*bday*:#:{
  if ($1 == %c $+ bday) {
    if ($2 != $null) {
      if (%bday. [ $+ [ $2 ] ] != 0) {
        .notice $nick 10Birthday recorded for $2 $+ : %bday. [ $+ [ $2 ] ]
      }
      else { .notice $nick 10No birthday recorded for $2 $+ . }
    }
    else { .notice $nick 10Incorrect: use %c $+ bday <nick>. }
  }
}
on *:text:*calendarinfo*:#:{
  if ($1 == %c $+ calendarinfo) {
    .notice $nick 10To set your birthday, type %c $+ setbday <date in 2 digits; first = 01> <month in 2 digits; April = 04> <year in 4 digits your next birthday is>.
    .notice $nick 10To check someone else's birthday, type %c $+ bday <nick>.
    .notice $nick 10To review this list again, type %c $+ calendarinfo. $date
  }
}
on 1:JOIN:*:{
  if ($date == %bday. [ $+ [ $nick ] ]) {
    .notice $nick 10Happy birthday $nick $+ ! Make sure you reset your birthday, $nick $+ .
    .msg $chan It's $nick $+ 's birthday! Make sure you wish $nick a happy birthday! 
  }
}
on 105!:JOIN:*:{
  if ($date == %bday. [ $+ [ $nick ] ]) {
    .notice $nick 10Happy birthday $nick $+ ! Make sure you reset your birthday, $nick $+ .
    .msg $chan It's $nick $+ 's birthday! Make sure you wish $nick a happy birthday! 
  }
}
on 995!:JOIN:*:{
  if ($date == %bday. [ $+ [ $nick ] ]) {
    .notice $nick 10Happy birthday $nick $+ ! Make sure you reset your birthday, $nick $+ .
    .msg $chan It's $nick $+ 's birthday! Make sure you wish $nick a happy birthday! 
  }
}
on 1000!:JOIN:*:{
  if ($date == %bday. [ $+ [ $nick ] ]) {
    .notice $nick 10Happy birthday $nick $+ ! Make sure you reset your birthday, $nick $+ .
    .msg $chan It's $nick $+ 's birthday! Make sure you wish $nick a happy birthday! 
  }
}
on 1500!:JOIN:*:{
  if ($date == %bday. [ $+ [ $nick ] ]) {
    .notice $nick 10Happy birthday $nick $+ ! Make sure you reset your birthday, $nick $+ .
    .msg $chan It's $nick $+ 's birthday! Make sure you wish $nick a happy birthday! 
  }
}
on 1600!:JOIN:*:{
  if ($date == %bday. [ $+ [ $nick ] ]) {
    .notice $nick 10Happy birthday $nick $+ ! Make sure you reset your birthday, $nick $+ .
    .msg $chan It's $nick $+ 's birthday! Make sure you wish $nick a happy birthday! 
  }
}
on 2500!:JOIN:*:{
  if ($date == %bday. [ $+ [ $nick ] ]) {
    .notice $nick 10Happy birthday $nick $+ ! Make sure you reset your birthday, $nick $+ .
    .msg $chan It's $nick $+ 's birthday! Make sure you wish $nick a happy birthday! 
  }
}

Comments

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.