Code:
menu nicklist {
  Commands
  .Msg PVT: {
    inc %nick. [ $+ [ $$1 ] ]
    inc %total.msg.pvt
    msg $1 Hello $1 $+ , I have selected your name %nick. [ $+ [ $1 ] ] time(s). This action taken %total.msg.pvt time(s).
  }
  .Msg in chan: {
    inc %nick. [ $+ [ $$1 ] ]
    inc %total.msg.chan
    msg $chan Hello $1 $+ , I have selected your name %nick. [ $+ [ $1 ] ] time(s). This action taken %total.msg.chan time(s).
  }
  .Action PVT: {
    inc %nick. [ $+ [ $$1 ] ]
    inc %total.action.pvt
    describe $1 Hello $1 $+ , I have selected your name %nick. [ $+ [ $1 ] ] time(s). This action taken %total.action.pvt time(s).
  }
  .Action in chan: {
    inc %nick. [ $+ [ $$1 ] ]
    inc %total.action.chan
    describe $chan Hello $1 $+ , I have selected your name %nick. [ $+ [ $1 ] ] time(s). This action taken %total.action.chan time(s).
  }
}
;
;* $1 is normally the nick selected
;* inc %nick. [ $+ [ $$1 ] ] ; this keeps a count per nick, $$1 is used so that the code stops if there is no $1 value
;* inc %total.????.????      ; this keeps a track on the total for this specific action
;
on *:NICK:{
  if ($var(%nick. [ $+ [ $nick ] ] )) {
    set %nick. [ $+ [ $newnick ] ] %nick. [ $+ [ $nick ] ]
    unset %nick. [ $+ [ $nick ] ]
  }
}
;
;monitors and changes the nick variable when it detects a nick change *** this well only catch nick changes in channels you are in *** 
;