/age script

UPDATE: There was a problem with this script - it has been fixed now.  Please replace the version you have with the version below :)

A few people have requested my dodgy age script, so I’m going to post it here so I can just give the url to anyone who requests it!

To use it, you need mIRC.  Click the ’scripts’ button on your toolbar (it looks like a green box with ‘/a’ in it), then click the aliases tab.  Scroll to the bottom, and paste the following code.  Press ok, and you’re done.  Use /age in the channel, and it will output your age.

/age {
  if ( %dnaiss == $null ) {
    set %dnaiss $$?-="Birth ? Format dd.mm.yyyy hh:mm (24h time)"
  }
  //set %agebirth $ctime(%dnaiss)
  //set %ageepochp $ctime
  //set %agedurations %ageepochp - %agebirth
  //set %ageinyears %agedurations
  %ageinyears = %ageinyears / 3600
  %ageinyears = %ageinyears / 24
  %ageinyears = %ageinyears / 365.2425
  %ageinyears = $floor(%ageinyears)
  //set %ageyearsmicro %ageinyears
  %ageyearsmicro = %ageyearsmicro * 365.2425
  %ageyearsmicro = %ageyearsmicro * 24
  %ageyearsmicro = %ageyearsmicro * 3600
  //set %timesincebirthday %agedurations - %ageyearsmicro
  //set %ageduration $duration(%timesincebirthday)
  /say I am %ageinyears years %ageduration old
}

I’m sure it could be improved upon, but hey it works.  Have fun!



Comments are closed.