Most likely you won't be able to do it the way shown in your example, but I have created another way to solve your idea.

You can try using this variant of the script code:
Code
on *:TEXT:*:#:{
  if ($var($+(prefix_,$chan),1).value isin $1-) {
    msg $chan Found dynamic variable with name04 $+(%,prefix_,$chan) and value:04 $v1
  }
}

Note: This script will only run if you have a global dynamic variable saved in your mIRC (for bot) with the name of the channel where a message was sent by another user whose text matches the text value of this variable.

For example, enter this command in your bot's #test channel window: //set -s %prefix_ $+ $chan New trigger text

This will create a global dynamic variable with the channel name "%prefix_#test" and the value "New trigger text" as an event trigger.


Screenshot of testing the script:

    [Linked Image from i.postimg.cc]


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