Well might not be the simplest way but this works and I'm pretty sure it'll do what you want.

All you have to do is add the keywords to the second line where cheer and test are. Then the script will count and add up all the numbers on those keywords.

Example:
cheer1 cheer3 cheer100 test20 test2 asdfa asdf asdf test5 asdfasd cheer4
That will count 108 for cheer and 27 for test

Code:
on *:text:*:#: {
  set -l %keywords cheer test
  set -l %num 1
  while ($gettok(%keywords,%num,32)) {
    set -l %kw $v1
    noop $regex($1-,/ $+ %kw $+ (\d+) $+ /iSg)
    set -l %num2 1
    while ($regml(%num2)) {
      set -l $+(%,%kw) $calc($($+(%,%kw),2) + $v1)
      inc %num2
    }
    writeini -n Emotes.ini $+(#,-,$date) %kw $calc($readini(Emotes.ini,$+(#,-,$date),%kw) + $($+(%,%kw),2))
    inc %num
  }
}


Let me know if this works out.

Last edited by pball; 21/05/17 06:26 PM. Reason: added case insensitive/strip control codes

http://scripting.pball.win
My personal site with some scripts I've released.