0
      ON *:TEXT:*3rd*:*: {
      ON *:TEXT:*->*:*: {
      if ($nick == Nickname) {
        %value = $mid($1-, $calc($pos($1-, 3rd, 1) + 14), $calc($pos($1-, Second, $pos($1-, Second, 0)) - $pos($1-, 3rd, 1) - 23))
         }  
      }      
      if($nick == Nickname) {
      msg $chan $mid($1-, $calc($pos($1-, ->, 1) + 6), $calc($pos($1-, <-, $pos($1-, <-, 0)) - $pos($1-, ->, 1) - 9))
       msg $chan %value
      }
    }

Chatoutput goes like

Nickname: It's the 3rd candy

Nickname: It's the second candy

What i want to do is, if the text 3rd is in the sentence trigger ON *:TEXT:*->*:*: {

and make a %variable of the input of 3rd in %value with the text of 3rd and pass it to the other line.

If not 3rd is in the sentence do nothing.

I hope i'm clearly with what i want it to do hope someone can help me.

1 Answers1

0

first, you cant trigger an event with another

you can mix both in one

an example

on $*:text:/3rd.*->(.+)<-/iS:#:{
if ($nick == Nickname) {
%value = $regml(1)
msg $chan %value
}
}

what this script does is

on $:text:/3rd.->(.+)<-/iS:#:{

will match if "3rd" is on text, and if it is, catches texts that are between -> and <-

/iS i - will match for upper and lower cases
S - will strip any color codes, including bold, italic, and underline

%value = $regml(1) will give to %value the match between -> and <-

if ($nick == Nickname) { will trigger only for an specific Nickname

msg $chan %value will send the match text between -> and <- to channel

if it is not what you're looking for, tell me

Sirius_Black
  • 471
  • 3
  • 11