Quote:
Whan i give command to bot "-nick" the script will /nick $2-
but if nick is already in use i need to start the timer and maybe every 10 sec to try to change the given nick and when te nick will change the timer must stop


you might try thiis
Code:
on 500:TEXT:*-nick:*:{
  if ($me != $$2) { nickcheck $2 }
}
alias nickcheck {
  nick $1
  .timernick 1 1 nickcheck2 $1
}
alias nickcheck2 {
  if ($me != $1) { .timernick 1 10 nickcheck $1 }
}

when the command is received the first bit checks that the nick is not already the requested nick (command accidently given twice)
then sends the nick to the alias that will change the nick. I did this so that if the nick is already in use the second alias that has the timer can act like a recursive loop with the first alias.
the timer in the first alias may need to be a longer delay depending on average lag to the server.