Ok, this should capture a number from 0-99. At the moment I can't think of a way to capture 1-99 using only regex, but this will exit if the number is 0, so basically the same thing
on *:TEXT:*:#: {
if ($regex($1-,/^!take([1-9]?[0-9])$/i)) {
var %number = $regml(1)
if (%number == 0) { return }
}
}