Originally Posted by Fernet
Last thing: is there a command for random color for a text? I know about ctrl+k and a number can choose 1 color. But is there a combination to set a random color to a text?
I added something to the code so that your random messages from the file will be colored in a random color.

So, after updating, taking into account all the remarks and suggestions, you can try using this script code:
Code
on *:TEXT:*:#channel:{
  if ($nick == ServiceBot) { return }
  if ($nick isop $chan && $1 === !ON) { bot_stop | bot_start $chan }
  elseif ($nick isop $chan && $1 === !OFF) { bot_stop }
  else { bot_stop | .timerBOTSTART 1 1800 bot_start $unsafe($chan) }
}
alias -l bot_start {
  bs say $1 Va beh...nessuno parla allora parlo io...
  rand_msg $1 | .timerRANDMSG 0 60 rand_msg $unsafe($1)
}
alias -l bot_stop { .timerBOTSTART off | .timerRANDMSG off }
alias -l rand_msg {
  var %colors 2,3,4,5,6,7,8,9,10,11,12,13
  var %rc $gettok(%colors,$rand(1,$numtok(%colors,44)),44)
  bs say $1 $+(,%rc,$read(addons\miefrasibot\frasibot.txt,nt),)
}

You can add (separated by commas) or remove the desired colors in the variable value: var %colors 2,3,4,5,6,7,8,9,10,11,12,13


🌐 http://forum.epicnet.ru 📜 irc.epicnet.ru 6667 #Code | mIRC scripts, help, discuss, examples