mIRC Homepage
i need this script
I=!stream mod on
bot =only stream text activated
I=!stream mod off
bot=all text command working

i need disable some text commands.
What is this ?

Please make again the post by giving a better description about your problem in order to help you.

Posting only the code doesn't really helping out us to understand you and help you.
sorry.
You need to provide here all the commands in order to fix them with that you want for, also when you paste all the !commands then specify which of them are stream related and which are not in order to understand.
how to turn on-off Text commands?
Not sure I got your question but if you want to turn off some commands...

You can use a global variable(using "set") and every time you want to turn off some commands you will set the variable On. On each command that you want to be able to turn off you can just simply add an if statement that will check if that variable is On. If it's On, you just return (or halt).

Hope it helped.
Originally Posted By: lostay
Not sure I got your question but if you want to turn off some commands...

You can use a global variable(using "set") and every time you want to turn off some commands you will set the variable On. On each command that you want to be able to turn off you can just simply add an if statement that will check if that variable is On. If it's On, you just return (or halt).

Hope it helped.

example please.
This is an example code of the !commands ON/OFF

Code:
ON *:TEXT:!commands *:#: {
  if ($2 == ON) {
    if (!%commands) { set %commands 1 | .msg $chan ( $+ $nick $+ ): All the text commands have been enabled! }
    elseif (%commands) { .msg $chan ( $+ $nick $+ ): The text commansd are already enabled! }
  }
  if ($2 == OFF) {
    if (%commands) { unset %commands | .msg $chan ( $+ $nick $+ ): All the text commands have been disabled! }
    elseif (!%commands) { .msg $chan ( $+ $nick $+ ): The text commansd are already disabled! }
  }
}
thanks for helping.i have one question.
Code:
on *:TEXT:1:* { msg $chan $nick 1 }
on *:TEXT:2:* { msg $chan $nick 2 }
on *:TEXT:3:* { msg $chan $nick 3 }
on *:TEXT:4:* { msg $chan $nick 4 }

how to turn on-off only 1 and 2 text?
Try use this code:

Code:
ON *:TEXT:1:* { 
  if (%commands) { msg $chan $nick 1 }
}
thanks for helping all working. only this thing not working.

Code:
ON $*:TEXT: { 
  if (%commands)
  /^\w+ are you here\?$/iS:#: $IIF($1 ison $chan, MSG $chan $1 is here., MSG $chan $1  is not here.)
}
Use this code:

Code:
ON $*:TEXT:/^\w+ are you here\?$/iS:#: { 
  if (%commands) {
    if ($1 ison $chan) { msg $chan $1 is here. }
    elseif ($1 !ison $chan) { msg $chan $1  is not here. }
  }
}
Code:
ON *:TEXT:!commands *:#: {
  if ($2 == ON) {
    if (!%commands) { set %commands 1 | .msg $chan ( $+ $nick $+ ): All the text commands have been enabled! }
    elseif (%commands) { .msg $chan ( $+ $nick $+ ): The text commansd are already enabled! }
  }
  if ($2 == OFF) {
    if (%commands) { unset %commands | .msg $chan ( $+ $nick $+ ): All the text commands have been disabled! }
    elseif (!%commands) { .msg $chan ( $+ $nick $+ ): The text commansd are already disabled! }
  }
}


how to add command if (nick == x3pos)
Use this code:

Code:
ON *:TEXT:!commands *:#: {
  if ($nick == x3pos) {
    if ($2 == ON) {
      if (!%commands) { set %commands 1 | .msg $chan ( $+ $nick $+ ): All the text commands have been enabled! }
      elseif (%commands) { .msg $chan ( $+ $nick $+ ): The text commansd are already enabled! }
    }
    if ($2 == OFF) {
      if (%commands) { unset %commands | .msg $chan ( $+ $nick $+ ): All the text commands have been disabled! }
      elseif (!%commands) { .msg $chan ( $+ $nick $+ ): The text commansd are already disabled! }
    }
  }
}
© mIRC Discussion Forums