To count some action in a set amount of time, you can use something like this:

Code:

alias test {
  inc -u30 %counter 1
  if (%counter >= 20) {
    return 1
  }
  else {
    return 0
  }
}



This code will increment once each time it is called. If the counter is higher than 19, it will return a 1, otherwise it will return a 0. Obviously, you would modify this code to fit into an event or raw.

-genius_at_work