Here is a very easy one. I didn't make it so it saves away messages if you (the bot) closes mIRC. I didn't think it made sense to have it do that because the people could return by the time the bot is started again. If you decide you want it saved, let me know.

Code:
on *:start: {
  hmake AwayTable 50
}

on *:text:!afk*:#yourchannel: {
  var %time = $ctime
  if (!$hget(AwayTable)) { hmake AwayTable 50 }
  hadd AwayTable $nick $iif($2,$2-,Unknown) %time
  msg $chan $nick is away @ $+ $time(%time)
}

on *:text:!back:#yourchannel: {
  if ($hget(AwayTable,$nick)) {
    msg $chan $nick is back from $gettok($v1,1- $calc($gettok($v1,0,32) - 1) $+ .  $nick was gone for $duration($calc($ctime - $gettok($v1,$gettok($v1,0,32),32))) $+ .
    hdel AwayTable $nick
  }
  else msg $chan You're not away.
}

on *:text:*:#yourchannel: {
  if ($right($1-,1) == ? && $hget(AwayTable,$left($1,-1)) && !$2) {
    var %data = $hget(AwayTable,$left($1,-1))
    msg $chan $left($1,-1) is away $chr(40) $+ $gettok(%data,1- $calc($gettok(%data,0,32) -1),32) $+ $chr(41) since $time($gettok(%data,$gettok(%data,0,32),32)) $+ .
  }
}

on *:part:#yourchannel: {
  if ($hget(AwayTable,$nick)) {
    hdel AwayTable $nick
  }
}

on *:quit: {
  if ($hget(AwayTable,$nick)) {
    hdel AwayTable $nick
  }
}


Use:

<nick> !afk reason
<bot> nick is away @time.

<user2> nick?
<bot> nick is away (reason) since time.

<nick> !back
<bot> nick is back from reason. nick was gone for 1min 5secs.

You need the ? after the nick and nothing else for the bot to respond with the away info for that user.

Change the #yourchannel to the channel name that you want to use this on. If you want it for more channels, you can, but it's really designed for one and going away in one will make you away in all and so on.