It now checks if any cheers were counted before replying. If you add multiple keywords there will be a separate reply for each one, that can be fixed.

Code:
on *:text:*:#: {
  set -l %keywords 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
    }
    if ($($+(%,%kw),2) > 0) {
      msg $chan thanks for the $($+(%,%kw),2) cheers!
      writeini -n Cheers.ini $+(#,-,$date) %kw $calc($readini(Cheers.ini,$+(#,-,$date),%kw) + $($+(%,%kw),2))
    }
    inc %num
  }
}


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