Saturday, January 3, 2015

MiRC : Auto response "hello" and "salam" keyword room channel


Hi there! I already share MiRC remote script for auto greeting (on join) and auto Islamic greeting. Now i want to share a script that will reply on channel when someone said "hello" or "salam". My script will execute within defined time interval. Check it out.

on *:TEXT:hello:#:{
  if ((%wait.ctime !isnum) || ((%wait.ctime isnum) && (%wait.ctime < $ctime))) {
    /msg $chan Hello $nick , how are you?
    /msg $chan Welcome to $chan
    ; Will respond with next delay time 30 seconds
    set %wait.ctime $calc($ctime + 30)
  }
}

on *:TEXT:salam:#:{
  if ((%wait.ctime !isnum) || ((%wait.ctime isnum) && (%wait.ctime < $ctime))) {
    /msg $chan salam, $nick
    ; Will respond with next delay time 10 seconds
    set %wait.ctime $calc($ctime + 10)
  }
}

For "hello" keyword the script will execute between 30 seconds and for "salam" keyword between 10 seconds. Should be not a problem now to prevent room spamming. Hope you enjoy it. Thanks.

No comments:

Post a Comment