Hmm... It’s not very clear why you use the Service Bot to send messages to the channel instead of your mIRC Bot doing it directly, because this complicates everything.
Nevertheless, it seems to me that the puzzle of your idea has almost come together into something understandable and therefore I have added some improvements to your latest code.

Try using this variant 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 $chan }
}
alias -l bot_start {
  bs say $1 Va beh...nessuno parla allora parlo io...
  rand_msg $1 | .timerRANDMSG 0 60 rand_msg $1
}
alias -l bot_stop { .timerBOTSTART off | .timerRANDMSG off }
alias -l rand_msg { bs say $1 $read(addons\miefrasibot\frasibot.txt) }


Description:

  • Every time someone on the channel writes something, the timer will restart, starting again to count down 1800 secs before the start of sending random messages.
  • In the code need to change the nick "ServiceBot" to the nick of your service bot on the channel to prevent the timer from being activated after its messages.
  • Only the channel operator with the @ sign will be able to execute the "!ON" and "!OFF" commands.
  • When sending the "!ON" command, the bot bypasses the wait and immediately begins writing random phrases with a delay of 60 seconds.
  • When the "!OFF" command is sent, the bot stops both timers.


🌐 http://forum.epicnet.ru πŸ“œ irc.epicnet.ru 6667 #Code | mIRC scripts, help, discuss, examples