Originally Posted By: pball
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+) $+ /g)
    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.


The idea does work, although there's 1 flaw to it. It's case-sensitive, so if someone types Cheer10 instead of my defined 'cheer' keyword, it won't register. Any way to fix that? I tried putting both 'Test' and 'test'in the keywords, but that just seems to double the input(So 2 cheers of 5 are 10, would become 20)