If you're referring to a nickname in the target channel assosciated with the action then you can check each action to see if it contains a nickname that's currently on that channel:
on *:action:*:#:{
var %m
;; Build a regular expression based on the words in the action
.echo -q $regsub($1-,/\s/g,\\E|\\Q,%m)
var %x = 1
;; Loop through any found nicknames
while ($fline(#,$+(/^,$chr(40),\Q,%m,\E,$chr(41),$/iS),%x,3)) {
;; Increase a hash table item storing the number of times the found nickname has been mentioned in actions
hinc -m actions $nick(#,$ifmatch)
inc %x
}
}
;; Reload the stored data when mIRC starts
on *:start:{
hmake actions
hload actions actions.hsh
}
;; Save our data when the mIRC session ends
on *:exit:{ hsave -o actions actions.hsh }
Currently it will only increase the item once no matter how many times a particular nickname is mentioned in the action. If you want it to increase it by the number of times a nick is mentioned then use hinc -m actions $nick(#,$ifmatch) $regex($1-,$+(/(?<=^|\s),$nick(#,$ifmatch),(?=\s|$)/iS))