Top

Age (yours and theres)


mIRC Code
+ 2 likes
Please Register to submit score.
Bookmark and Share
Average Score  4.5 (of 2 scores)
Date Added  Jul 18, 2009
Last Updated  Jul 18, 2009

Introduction

When you load this script allow it to initialize because it will
ask you for your Date of Birth and save it as a variable.
The basic command is:
/age (day/month/year)

If you use "/age" on it's own, it will say how old you are based
on the DOB you gave on initialization. To change your DOB use:
/age.setdob day/month/year

Using "/age day/month/year" will say how old that DOB is today.


Enjoy =)

Grab the Code

on *:load:{ set %dob $$?="Please enter your Date of Birth in this format: day/month/year. $crlf $+ (i.e 14/3/83)" }
alias age {
  if ( $1 != $null ) {
    age.calc $duration($calc($ctime - $ctime($1)))
    msg $active You are %age.years years $+ , %age.weeks weeks $+ , and %age.days old.
  }
  else {
    age.calc $duration($calc($ctime - $ctime(%dob))) 
  msg $active I am %age.years years $+ , $calc(%age.weeks - 3 ) weeks $+ , and %age.days old!   }
unset %age.* }
alias age.calc {
  set %age.rawweeks $remove($$1,wks)
  set %age.days $2
  set %age.weeks $calc(%age.rawweeks % 52)
  set %age.years $calc((%age.rawweeks - %age.weeks) / 52)
}
alias age.setdob { set %dob $$?="Please enter your Date of Birth in this format: day/month/year. $crlf $+ (i.e 14/3/83)" }
 

Comments

  (4)  RSS
Solitude
Comments: 23
 
mIRC Snippet:  Age (yours and theres)
Posted on Jul 18, 2009 7:45 pm
Nice. It works fine for me...6/10, lol?
pickle16
Comments: 21
 
mIRC Snippet:  Age (yours and theres)
Posted on Jul 18, 2009 7:52 pm
cool :o
(2009)(08:44:42pm)(Jul18) <&Pickle> I am 15 years, 44 weeks, and 2days old!
Purplebeard
Comments: 21
 
mIRC Snippet:  Age (yours and theres)
Posted on Jul 19, 2009 6:05 pm
thank you =)
WorldDMT
Comments: 171
 
mIRC Snippet:  Age (yours and theres)
Posted on Jul 20, 2009 10:39 am
u can do also this
Code:
on *:load:age.setdob


my result is "You are 27 years, 3 weeks, and 3days old."
no i'm not 27 yet XD

u have to make sur if $active is a chan or query

u can do this also

Code:
alias age {
  if ($1) var %d $date($ctime($1),dd/mm/yyyy)
  if (!%dob) {
    var %x $$?="Please enter your Date of Birth in this format: day/month/year."
    set %dob $date($ctime(%x),dd/mm/yyyy)
  }
  tokenize 47 $iif($1,%d,%dob)
  var %a $calc($date(yyyy) - $3 - 1),%b $calc($date(m) - $2 + 11),%c $calc($date(d) - $1 + $iif($istok(1.3.5.7.8.10.12,$date(m),46),30,29)))
  msg $active $iif($+($1,/,$2,/,$3) == %dob,I am,You are) %a years $+ , %b months $+ , and %c day $+ $iif(%c > 1,s) old!
}



Commenting Options

Register or Login to Hawkee.com or use your Facebook or Twitter account by clicking the corresponding button below.

  
Bottom