1) Make a text event for !startriot that sets a global variable that will be cleared after X seconds. Let's call that variable %riot. In this event you also make a hashtable that stores nicknames and points

2) Make another text event that triggers on any text, but make this event /halt if %riot is not set. Here you add +1 to score of that $nick in the hashtable

3) Make an event for !endriot that unsets %riot and frees the hashtable, but first use this to sort the table so you get a top list

Code:
  // Sort table in descending order into a temp file (this can also be done in a custom window)
  hsave -n table file.tmp
  filter -ffcuten 2 32 file.tmp file.tmp

  // Get the Nth top value
  echo -a $hget(table,$gettok($read(file.tmp,N),1,32)).item