mIRC Home    About    Download    Register    News    Help

Print Thread
#273509 17/07/25 11:26 PM
Joined: Feb 2025
Posts: 19
abi Offline OP
Pikka bird
OP Offline
Pikka bird
Joined: Feb 2025
Posts: 19
Is there an error on this script?

Quote
; Color Talker v1.1 - by entropy 2018
; Only use this script on channels where you are chan op! (or you might get banned)

menu channel {
-
Color Talker $chr(9) $+([,$iif($group(#talker).status == on,On,Off),])
.Turn $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,])
..Color 00 (White) { %color = 00 | mymsg %color }
..Color 01 (Black) { %color = 01 | mymsg %color }
..Color 02 (Navy) { %color = 02 | mymsg %color }
..Color 03 (Green) { %color = 03 | mymsg %color }
..Color 04 (Red) { %color = 04 | mymsg %color }
..Color 05 (Brown) { %color = 05 | mymsg %color }
..Color 06 (Purple) { %color = 06 | mymsg %color }
..Color 07 (Orange) { %color = 07 | mymsg %color }
..Color 08 (Yellow) { %color = 08 | mymsg %color }
..Color 09 (Light Green) { %color = 09 | mymsg %color }
..Color 10 (Teal) { %color = 10 | mymsg %color }
..Color 11 (Light Blue) { %color = 11 | mymsg %color }
..Color 12 (Blue) { %color = 12 | mymsg %color }
..Color 13 (Pink) { %color = 13 | mymsg %color }
..Color 14 (Dark Grey) { %color = 14 | mymsg %color }
..Color 15 (Grey) { %color = 15 | mymsg %color }
-
}
alias mymsg {
if ($1 == 00) { echo -a * Color: 00 - White }
if ($1 == 01) { echo -a * Color: 01 - Black }
if ($1 == 02) { echo -a * Color: 02 - Navy }
if ($1 == 03) { echo -a * Color: 03 - Green }
if ($1 == 04) { echo -a * Color: 04 - Red }
if ($1 == 05) { echo -a * Color: 05 - Brown }
if ($1 == 06) { echo -a * Color: 06 - Purple }
if ($1 == 07) { echo -a * Color: 07 - Orange }
if ($1 == 08) { echo -a * Color: 08 - Yellow }
if ($1 == 09) { echo -a * Color: 09 - Light Green }
if ($1 == 10) { echo -a * Color: 10 - Teal }
if ($1 == 11) { echo -a * Color: 11 - Light Blue }
if ($1 == 12) { echo -a * Color: 12 - Blue }
if ($1 == 13) { echo -a * Color: 13 - Pink }
if ($1 == 14) { echo -a * Color: 14 - Dark Grey }
if ($1 == 15) { echo -a * Color: 15 - Grey }
}
#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

I tried a simple script

Quote
;----------;
;Emoji Chat;
;----------;

ON *:INPUT:*: {
if ( $1 == o ): { say oOo | halt }
}

After I made it and did the experiment and the result was

Quote
[18:07:23:03] <+nick> oOo
[18:07:23:03] <+nick> o

abi #273512 19/07/25 01:08 PM
Joined: Jan 2012
Posts: 368
Pan-dimensional mouse
Offline
Pan-dimensional mouse
Joined: Jan 2012
Posts: 368
Originally Posted by abi
Is there an error on this script?
I tried using this script code and it didn't give me any errors. Everything works properly.
But in my opinion, this construct looks quite cumbersome due to many repeating lines, so one could try to optimize this code, making it more compact.


🌐 https://forum.epicnet.ru 📜 irc.epicnet.ru 6667 #Code | mIRC scripts, help, discuss, examples
abi #273515 19/07/25 05:45 PM
Joined: Jan 2012
Posts: 368
Pan-dimensional mouse
Offline
Pan-dimensional mouse
Joined: Jan 2012
Posts: 368
Ok, I made some changes to the code for optimization, so now you can try using my variant:
Code
menu channel {
  -
  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


🌐 https://forum.epicnet.ru 📜 irc.epicnet.ru 6667 #Code | mIRC scripts, help, discuss, examples
Epic #273519 21/07/25 05:58 AM
Joined: Feb 2025
Posts: 19
abi Offline OP
Pikka bird
OP Offline
Pikka bird
Joined: Feb 2025
Posts: 19
Originally Posted by Epic
Ok, I made some changes to the code for optimization, so now you can try using my variant:
Code
menu channel {
  -
  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

Thank you for the response but when I use the script there is an error that I got I used MIRC version 7.81. The error is in the picture

[Linked Image from pasteboard.co]

abi #273521 21/07/25 09:15 PM
Joined: Jan 2012
Posts: 368
Pan-dimensional mouse
Offline
Pan-dimensional mouse
Joined: Jan 2012
Posts: 368
Originally Posted by abi
... when I use the script there is an error that I got I used MIRC version 7.81.

The error is in the picture:

[Linked Image from i.ibb.co]

〰〰〰〰〰〰〰〰〰〰〰〰〰〰〰〰〰〰〰〰〰〰〰〰〰〰〰〰〰〰〰〰〰〰〰〰〰〰〰〰〰〰〰〰〰〰〰〰〰〰〰〰〰〰〰〰〰〰〰〰

This script code was tested by me on mIRC v7.81 and it works fine/good.

My screenshot:

    [Linked Image from i.ibb.co]

You may have other scripts installed that may affect the operation and display of this script's menu. Try installing this code in a clean/new script window without other scripts in it, and also, for diagnostics, try disabling other scripts one by one to identify the script that breaks this script.


🌐 https://forum.epicnet.ru 📜 irc.epicnet.ru 6667 #Code | mIRC scripts, help, discuss, examples
Epic #273522 22/07/25 07:50 AM
Joined: Feb 2025
Posts: 19
abi Offline OP
Pikka bird
OP Offline
Pikka bird
Joined: Feb 2025
Posts: 19
Quote
You may have other scripts installed that may affect the operation and display of this script's menu. Try installing this code in a clean/new script window without other scripts in it, and also, for diagnostics, try disabling other scripts one by one to identify the script that breaks this script.
oke i try

Epic #273523 22/07/25 11:19 AM
Joined: Feb 2025
Posts: 19
abi Offline OP
Pikka bird
OP Offline
Pikka bird
Joined: Feb 2025
Posts: 19
Originally Posted by Epic
You may have other scripts installed that may affect the operation and display of this script's menu. Try installing this code in a clean/new script window without other scripts in it, and also, for diagnostics, try disabling other scripts one by one to identify the script that breaks this script.
I have turned off all the scripts and tried one by one to see the error but when I used the error script the same as the picture I gave

abi #273524 23/07/25 06:05 PM
Joined: Jan 2012
Posts: 368
Pan-dimensional mouse
Offline
Pan-dimensional mouse
Joined: Jan 2012
Posts: 368
This is quite strange. We are using the same version of mIRC, but this script works fine for me, but not for you. Apparently you are doing something wrong or your client is broken.

Try download new mIRC and install it in a different folder, then load only this script into the tab "Remote" using the key "ALT+R" combination, to see what happens.

You can also connect to my IRC server and join the #Code channel to discuss your problem in chat. Perhaps I or someone else can help you solve this problem.


🌐 https://forum.epicnet.ru 📜 irc.epicnet.ru 6667 #Code | mIRC scripts, help, discuss, examples
Epic #273525 24/07/25 03:32 AM
Joined: Feb 2025
Posts: 19
abi Offline OP
Pikka bird
OP Offline
Pikka bird
Joined: Feb 2025
Posts: 19
Originally Posted by Epic
This is quite strange. We are using the same version of mIRC, but this script works fine for me, but not for you. Apparently you are doing something wrong or your client is broken.

Try download new mIRC and install it in a different folder, then load only this script into the tab "Remote" using the key "ALT+R" combination, to see what happens.

You can also connect to my IRC server and join the #Code channel to discuss your problem in chat. Perhaps I or someone else can help you solve this problem.


my script
Quote
;----------;
;Emoji Chat;
;----------;

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 }
}
Thank you for the response and maybe you can try the script that you modified with my script you might find where the error

abi #273526 24/07/25 05:55 PM
Joined: Jan 2012
Posts: 368
Pan-dimensional mouse
Offline
Pan-dimensional mouse
Joined: Jan 2012
Posts: 368
Originally Posted by abi
... maybe you can try the script that you modified with my script ...
If your problem was that you wanted to borrow the idea from the first script to create a new/similar script based on it, which will display text laughter, there is another way to do it.

Try using this script code:
Code
menu channel {
  -
  Ha-Ha $chr(9) $+([,$iif($group(#haha).status == on,ON,OFF),])
  .Turn $chr(9) $iif($group(#haha).status == on,OFF,ON) { $iif($group(#haha).status == on,.disable,.enable) #haha | echo -a * Ha-Ha is now: $iif($group(#haha).status == on,ON,OFF) }
  .-  
  .ha: say $rephaha(ha)
  .haa: say $rephaha(haa)
  .he: say $rephaha(he)
  .hee: say $rephaha(hee)
  .ho: say $rephaha(ho)
  .hoo: say $rephaha(hoo)
  .hi: say $rephaha(hi)
  .hii: say $rephaha(hii)
  -
}

alias -l rephaha {
  if ($1 == ha) { return Ha.Ha.Ha }
  if ($1 == haa) { return Ha.Ha.Ha.Ha.Ha.Ha.Ha.Ha.Ha }
  if ($1 == he) { return He.He.He }
  if ($1 == hee) { return He.He.He.He.He.He.He.He.He }
  if ($1 == ho) { return Ho.Ho.Ho }
  if ($1 == hoo) { return Ho.Ho.Ho.Ho.Ho.Ho.Ho.Ho.Ho }
  if ($1 == hi) { return Hi.Hi.Hi }
  if ($1 == hii) { return Hi.Hi.Hi.Hi.Hi.Hi.Hi.Hi.Hi }
}

#haha off
on *:INPUT:*: if (/* !iswm $1) { !msg $target $iif($rephaha($1),$v1,$1-) | halt }
#haha end

Screenshot of testing the script on mIRC v7.81:

     [Linked Image from i.ibb.co]


🌐 https://forum.epicnet.ru 📜 irc.epicnet.ru 6667 #Code | mIRC scripts, help, discuss, examples
Epic #273530 25/07/25 01:05 PM
Joined: Feb 2025
Posts: 19
abi Offline OP
Pikka bird
OP Offline
Pikka bird
Joined: Feb 2025
Posts: 19
Thank you for answering my question and making my script more but the same error when I activated Talker brokers and it seems I have to change my script all because the modification is the same as I show

abi #273531 25/07/25 06:45 PM
Joined: Jan 2012
Posts: 368
Pan-dimensional mouse
Offline
Pan-dimensional mouse
Joined: Jan 2012
Posts: 368
If your goal was to use several scripts at the same time, changing/formatting the message text before sending it to the active window, then need to do it differently.
In this case, can use only one/common "ON INPUT" event handler for all such scripts so that they do not conflict with each other.
Also, in the handler, the text must be changed/formatted in turn by each function, depending on the ON/OFF state, before it is sent to the active window.

I combined the two scripts into one hybrid, so now you can try using this code:
Code
menu channel {
  -
  $iif(%color_talker,$style(1)) Color Talker $chr(9) $iif(%color_talker,ON,OFF)
  .$iif(%color_talker,INPUT $chr(8195) OFF,INPUT $chr(8195) ON) : if (%color_talker) %color_talker = $false | else %color_talker = $true | echo -a * Color Talker is now: $iif(%color_talker,ON,OFF)
  .-
  .Color $chr(9) $+([,%color,])
  ..$submenu($colmenu($1))

  $iif(%haha,$style(1)) Ha-Ha $chr(9) $iif(%haha,ON,OFF)
  .$iif(%haha,INPUT $chr(8195) OFF,INPUT $chr(8195) ON) : if (%haha) %haha = $false | else %haha = $true | echo -a * Ha-Ha is now: $iif(%haha,ON,OFF)
  .-  
  .$item(ha) : say $textrep(ha)
  .$item(haa) : say $textrep(haa)
  .$item(he) : say $textrep(he)
  .$item(hee) : say $textrep(hee)
  .$item(ho) : say $textrep(ho)
  .$item(hoo) : say $textrep(hoo)
  .$item(hi) : say $textrep(hi)
  .$item(hii) : say $textrep(hii)
}

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,test 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)) }
alias -l item { return $1 $+($chr(8195),-,$chr(8195)) $textrep($1) }
alias -l textrep {
  if ($1 == ha) { return Ha.Ha.Ha }
  if ($1 == haa) { return Ha.Ha.Ha.Ha.Ha.Ha.Ha.Ha.Ha }
  if ($1 == he) { return He.He.He }
  if ($1 == hee) { return He.He.He.He.He.He.He.He.He }
  if ($1 == ho) { return Ho.Ho.Ho }
  if ($1 == hoo) { return Ho.Ho.Ho.Ho.Ho.Ho.Ho.Ho.Ho }
  if ($1 == hi) { return Hi.Hi.Hi }
  if ($1 == hii) { return Hi.Hi.Hi.Hi.Hi.Hi.Hi.Hi.Hi }
}

on *:INPUT:*:{
  if (/* !iswm $1) {
    var %text $1-
    if (%haha) %text = $iif($textrep($gettok(%text,1,32)),$v1 $gettok(%text,2-,32),%text)
    if (%color_talker) %text = $+($chr(3),%color,%text,$chr(3))
    !msg $target $iif(c isincs $chan($target).mode,$strip(%text),%text) | halt
  }
}

P.S. This script code was tested by me in mIRC v7.81 and works fine/good, so any comments about it not working will be rejected/ignored :-]


🌐 https://forum.epicnet.ru 📜 irc.epicnet.ru 6667 #Code | mIRC scripts, help, discuss, examples
Epic #273532 26/07/25 01:17 PM
Joined: Feb 2025
Posts: 19
abi Offline OP
Pikka bird
OP Offline
Pikka bird
Joined: Feb 2025
Posts: 19
Thank you for the response I still want to ask but you already look unhappy to teach this fool. I will ask you, you try the script with your separate script not to be put together like the answer so that all my scrips can be changed so that it doesn't error anymore, but you are just high blood pressure
u r script
Quote
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

my script
Quote
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 }
}

abi #273534 26/07/25 09:50 PM
Joined: Jan 2012
Posts: 368
Pan-dimensional mouse
Offline
Pan-dimensional mouse
Joined: Jan 2012
Posts: 368
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
Epic #273535 27/07/25 08:19 AM
Joined: Feb 2025
Posts: 19
abi Offline OP
Pikka bird
OP Offline
Pikka bird
Joined: Feb 2025
Posts: 19
Thank you for your response EPIC smile You really hope to separate each script and give all the names to your script combining while I initially asked by giving 2 separate scripts

abi #273538 27/07/25 01:50 PM
Joined: Jan 2012
Posts: 368
Pan-dimensional mouse
Offline
Pan-dimensional mouse
Joined: Jan 2012
Posts: 368
You can leave it as is or split it into 2, 3, 5 or even 100500 scripts, but it won't change anything.

1. If you will use several "ON INPUT" event handlers in one script, combining several different scripts that follow each other, then only one handler will be able to send a message in the active window, the one that is enabled and located above the others.

2. If you make several different scripts saved in different files, then a conflict or duplication of the "ON INPUT" work may occur, that is, your message text will be processed and sent to the active window several times with different views of formatting, depending on the script, although you send only one message.

So, if you want all similar scripts to work correctly and only one message to be sent to in the active window, without duplication, then this problem can be solved only by combining scripts that will work using a one "ON INPUT" event handler.


🌐 https://forum.epicnet.ru 📜 irc.epicnet.ru 6667 #Code | mIRC scripts, help, discuss, examples
Epic #273546 29/07/25 09:09 AM
Joined: Feb 2025
Posts: 19
abi Offline OP
Pikka bird
OP Offline
Pikka bird
Joined: Feb 2025
Posts: 19
Thank you Epic, I am new to this script so I did a lot of errors when it made it and I tried to combine it still error and didn't even function so I could not continue it

abi #273598 10/08/25 11:27 AM
Joined: Feb 2025
Posts: 19
abi Offline OP
Pikka bird
OP Offline
Pikka bird
Joined: Feb 2025
Posts: 19
Quote
;-----------;
;Saying Chat;
;-----------;

ON *:INPUT:*:{
if ( $1 == ty ): { say $2 $3 $4 $5 $6 $7 $8 $9 $10 $11 $12 $13 $14 $15 $16 $17 $18 $19 $20 $21 $22 $23 $24 $25 $26 $27 $28 $29 $30 ? | halt }
if ( $1 == mety ): { me nanya $3 $4 $5 $6 $7 $8 $9 $10 $11 $12 $13 $14 $15 $16 $17 $18 $19 $20 $21 $22 $23 $24 $25 $26 $27 $28 $29 $30 ? | halt }
}

Quote
On *:INPUT:*:{
if ( $1 == takbir ): { say mengucapkan Allahu Akbar $2 $3 $4 $5 $6 $7 $8 $9 $10 $11 $12 $13 $14 $15 $16 $17 $18 $19 $20 | halt }
if ( $1 == amin ): { say mengucapkan aamiin ya rabbal`alamin $2 $3 $4 $5 $6 $7 $8 $9 $10 $11 $12 $13 $14 $15 $16 $17 $18 $19 $20 | halt }
}

Quote
On *:INPUT:*:{
if ( $1 == assalam ): { say mengucapkan salam assalamu'alaikum warahmatullah wabarakatuh $2 $3 $4 $5 $6 $7 $8 $9 $10 $11 $12 $13 $14 $15 $16 $17 $18 $19 $20 | halt }
if ( $1 == ols ): { amsg mengucapkan salam assalamu'alaikum warahmatullah wabarakatuh $2 $3 $4 $5 $6 $7 $8 $9 $10 $11 $12 $13 $14 $15 $16 $17 $18 $19 $20 | halt }
}

I have 3 scripts made by me separately to combine it how sorry just learning

abi #273601 11/08/25 07:15 AM
Joined: Jan 2012
Posts: 368
Pan-dimensional mouse
Offline
Pan-dimensional mouse
Joined: Jan 2012
Posts: 368
Here's what the combined code might look like, replace the necessary words and text with what you need:
Code
on *:INPUT:*:{
  if (/* !iswm $1) {
    if ($1 == word1) { say $1 your text $2- | halt }
    if ($1 == word2) { say $1 your text $2- | halt }
    if ($1 == word3) { say $1 your text $2- | halt }
    if ($1 == word4) { amsg $1 your text $2- | halt }
    if ($1 == word5) { me $1 your text $2- | halt }
    if ($1 == word6) { ame $1 your text $2- | halt }
  }
}

P.S. I hope that it is you who is learning, and not AI instead of you.


🌐 https://forum.epicnet.ru 📜 irc.epicnet.ru 6667 #Code | mIRC scripts, help, discuss, examples
Epic #273603 13/08/25 03:27 AM
Joined: Feb 2025
Posts: 19
abi Offline OP
Pikka bird
OP Offline
Pikka bird
Joined: Feb 2025
Posts: 19
Originally Posted by Epic
Here's what the combined code might look like, replace the necessary words and text with what you need:
Code
on *:INPUT:*:{
  if (/* !iswm $1) {
    if ($1 == word1) { say $1 your text $2- | halt }
    if ($1 == word2) { say $1 your text $2- | halt }
    if ($1 == word3) { say $1 your text $2- | halt }
    if ($1 == word4) { amsg $1 your text $2- | halt }
    if ($1 == word5) { me $1 your text $2- | halt }
    if ($1 == word6) { ame $1 your text $2- | halt }
  }
}

P.S. I hope that it is you who is learning, and not AI instead of you.

Thank you your response @epic as I said earlier they have a different script with a different name, which I ask how to combine it without changing the script and you change it if as you do the same


Link Copied to Clipboard