mIRC Homepage
Posted By: GimSheng Need Some help with script - 30/11/07 03:11 PM
How do i write a script that auto ignore the person that /notice me for more than one time?
Posted By: antisback Re: Need Some help with script - 30/11/07 04:00 PM
Several ways, you can either use user levels or ini files.

For simplicity i'll show you user levels, if it conflicts at all, just say and i'll write up ini files

something like
Code:
on 1:NOTICE:*:*:{ /auser 2 $address }
on 2:NOTICE:*:*:{ /auser 3 $address }
on 3:NOTICE:*:*:{ /timer 1 60 /ruser $address | /ignore -u60 $address }



thats from memory so it's probably a bit wrong
Posted By: DJ_Sol Re: Need Some help with script - 30/11/07 06:00 PM
Quote:
on *:notice:*:#:{
if (%notice [ $+ [ $nick ] ] > 1) { halt }
set -u5 %notice [ $+ [ $nick ] ] $true
}



I personally don't like this as it will block wanted notices but thats what you asked for. I made it so it will only last for 5 seconds. -u5
Posted By: TropNul Re: Need Some help with script - 02/12/07 09:43 AM
Code:
on *:notice:*:#:{
if (%notice [ $+ [ $nick ] ] > 1) { halt }
set -u5 %notice [ $+ [ $nick ] ] $true
}


This won't work. You never increment the variable and then
verify if it's greater than 1.
Also, the '#' will make the event listen only to channel notices.

This would be better imo.

Code:
On *:Notice:*:*:{
  HInc -mu60 NotIgn $nick 1
  If ($hget(NotIgn,$nick) > 1) {
    HDel NotIgn $nick
    Ignore $nick
  }
}


Regards
Posted By: Riamus2 Re: Need Some help with script - 02/12/07 11:07 AM
Originally Posted By: TropNul
Code:
on *:notice:*:#:{
if (%notice [ $+ [ $nick ] ] > 1) { halt }
set -u5 %notice [ $+ [ $nick ] ] $true
}


This won't work. You never increment the variable and then
verify if it's greater than 1.
Also, the '#' will make the event listen only to channel notices.


Other than the #, yes it will work. For that matter, with the #, it will still work if the notices are being sent to the channel instead of your nick. The IF only halts if the variable is set, though I'd drop the >1 check as it's not needed here. When it isn't set, it will set it for 5 seconds and NOT halt. That's what you want to have happen.

For a slightly modified version...

Code:
on *:notice:*:*:{
  if ($+(%,notice,$nick)) { halt }
  set -u5 %notice $+ $nick $true
}
© mIRC Discussion Forums