Code:
on *:text:*:#:{
  if ($1 == !stats) {
    if (%account [ $+ [ $nick ] ] == on) {
      if ($2 == $null) {
        /msg $chan 8,1¤7Your Stats8¤ 7Name:15 %name [ $+ [ $nick ] ] 8¤7Health:15 %health [ $+ [ $nick ] ] 8¤7Thirst:15 %thirst [ $+ [ $nick ] ] 8¤7Age:15 %age [ $+ [ $nick ] ] 8¤7Rank:15 %rank [ $+ [ $nick ] ]
      }
      else {
        /msg $chan 8,1¤7 $2 $+ 's Stats8,1¤ 7Name:15 %name [ $+ [ $2 ] ] 8¤7Health:15 %health [ $+ [ $2 ] ] 8¤7Thirst:15 %thirst [ $+ [ $2 ] ] 8¤7Age:15 %age [ $+ [ $2 ] ] 8¤7Rank:15 %rank [ $+ [ $2 ] ]
      }
    }
    elseif ($v1 == off) /msg $chan Sorry $nick $2 is on LOA, they set themself to LOA on %LOATIME [ $+ [ $nick ] ]
  }
  elseif ($1 == !LOA) {
    if (%account [ $+ [ $nick ] ] == on) {
      set %account [ $+ [ $nick ] ] off
      set %LOA [ $+ [ $nick ] ] ON
      set %LOATIME [ $+ [ $nick ] ] $asctime
      msg $chan $nick is now set to LOA.
    }
  }
  elseif ($1 == !LOAreturn) {
    if (%account [ $+ [ $nick ] ] == off) {
      set %account [ $+ [ $nick ] ] on
      set %LOA [ $+ [ $nick ] ] OFF
      unset %LOATIME [ $+ [ $nick ] ]
      msg $chan $nick has returned from LOA.
    }
  }
}
Try this


#mircscripting @ irc.swiftirc.net == the best mIRC help channel