Try this
Code:
on *:TEXT:*:#: {
if ($regex($1-,/!take([1-9]\d?)/i)) { 
if ($nick != BOT) { return }
var %number = $regml(1) 
msg # take $+ %number
   }
}