napa182 commented on a Page, Simple On/Off Script  -  Apr 01, 2009

@ The_Almighty_Duelist if you cant find $iif in the help by typing /help $iif then maybe you should update ur mIRC =/

here is just another way to do it. well just 1 of many ways...

on *:TEXT:!commandhere:#: {
  if (%on.off) { code here }
  else { msg # Pissoff }
}
on $@*:TEXT:/^(!on|!off)$/S:#: {
  if ($nick isop $chan) { 
    $iif($regml(1) == !on,set %on.off on,unset %on.off)
    msg # Script is now $iif(%on.off,on.,off.)
  }
}

or like this with flood control

on $@*:TEXT:/^(!on|!off)$/S:#: {
  if ($nick isop $chan && !$($+(%,onoff,.,flood),2)) { 
    set -u3 $+(%,onoff,.,flood) on
    $iif($regml(1) == !on,set,unset) %on.off on
    msg # Script is now $iif(%on.off,on.,off.)
  }
}
 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.