Well I udnerstand why you use all the variables. It's nice for OTHER people to adjust easily.

$+(-u,%txtflood.secs) would be just fine.

Also, I like to check for flood on the first line, and inc the variable on the last line. This way, the first thing that happens in the script is it checks if it's a flood, not setting a variable. I'd also add the "if ($me !isop $chan) { return }" prefix to the event.

One more thing, with a flood you will want to check if the variable number is equal to or higher than the allowed number. It's a safe measure.



Code:
on @*:text:*:#:{
  if (%flood.lines. [ $+ [ $nick ] ] >= %txtflood.lines) { .msg #test -> txt flood by $nick | return }
  inc $+(-u,%txtflood.secs) %flood.lines. [ $+ [ $nick ] ]
}