If I understood correctly from the translation of your message, you want to use two scripts in one file in the following view:
Code
menu menubar {
  -
  Color Talker $chr(9) $+([,$iif($group(#talker).status == on,ON,OFF),])
  .Turn $chr(9) $iif($group(#talker).status == on,OFF,ON) { $iif($group(#talker).status == on,.disable,.enable) #talker | echo -a * Color Talker is now: $iif($group(#talker).status == on,ON,OFF) }
  .-
  .Color $chr(9) $+([,%color,])
  ..$submenu($colmenu($1))
}

alias -l colmenu { var %i 1, %n 00 | while (%i <= 16) { if ($1 == %i) return Color %n $colname(%n) : colval %n | inc %i | if (%i <= 10) %n = $+(0,$calc(%i - 1)) | else %n = $calc(%i - 1) } }
alias -l colval { %color = $1 | echo -a * Color: $1 $colname($1) - $+($chr(3),%color,text,$chr(3)) }
alias -l colname { return $+($chr(40),$replace($1,00,White,01,Black,02,Navy,03,Green,04,Red,05,Brown,06,Purple,07,Orange,08,Yellow,09,Light Green,10,Teal,11,Light Blue,12,Blue,13,Pink,14,Dark Grey,15,Grey),$chr(41)) }

#talker off
on *:INPUT:*: if (/* !iswm $1) { var %c $+($chr(3),%color,$1-,$chr(3)) | !msg $target $iif(c isincs $chan($target).mode,$strip(%c),%c) | halt }
#talker end


ON *:INPUT:*: {
  if ( $1 == ha ): { say Ha.Ha.Ha | halt }
  if ( $1 == haa ): { say Ha.Ha.Ha.Ha.Ha.Ha.Ha.Ha.Ha | halt }
  if ( $1 == he ): { say He.He.He | halt }
  if ( $1 == hee ): { say He.He.He.He.He.He.He.He.He | halt }
  if ( $1 == ho ): { say Ho.Ho.Ho | halt }
  if ( $1 == hoo ): { say Ho.Ho.Ho.Ho.Ho.Ho.Ho.Ho.Ho | halt }
  if ( $1 == hi ): { say Hi.Hi.Hi | halt }
  if ( $1 == hii ): { say Hi.Hi.Hi.Hi.Hi.Hi.Hi.Hi.Hi | halt }
}

In this case, your second code will only work as long as the "ON INPUT" event handler from the first code is in the "OFF" state, controlled by the group settings: #talker off
More about groups here: https://en.wikichip.org/wiki/mirc/groups

You cannot use multiple "ON INPUT" event handlers enabled in one or more different scripts, because in most cases they will conflict, or only the one that is higher/first in the order list of loaded scripts will work. The only way is to combine the functionality of several similar scripts to work with one "ON INPUT" event handler, if you need to use it.

Also, there is a minor syntax error in your second code: if ( $1 == ha ): { say Ha.Ha.Ha | halt }
After the closing bracket of the if () condition, there is no need to put a colon ":" - remove it from all lines where there is a condition.

However, I don't quite understand why you keep doing this separately when I've already created a working variant of the script for you that can work just as well as if it were two separate scripts, similar to what you are trying to do ...


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