mIRC Home    About    Download    Register    News    Help

Print Thread
No Flood #207298
12/12/08 06:46 PM
12/12/08 06:46 PM
Joined: Dec 2008
Posts: 4
D
Doyley Offline OP
Self-satisified door
Doyley  Offline OP
Self-satisified door
D

Joined: Dec 2008
Posts: 4
Hi guys..

I'm pretty new to mirc script... probably a newb question.

I have the following script. Some idiots in the room I use it in think it's funny to trigger it over and over to get me autokicked. I would like a way to limit it to once per user every 5 minutes or something similar. Thanks.

Code:
on *:action:*slap*:#channel:{
  if %slaps == $null { set %slaps 0 }
  inc %slaps 1
  describe # slaps the slapper.
  /msg $chan Number of slappers slapped: %slaps
} 

Re: No Flood [Re: Doyley] #207299
12/12/08 07:26 PM
12/12/08 07:26 PM
Joined: Jul 2006
Posts: 3,518
France
W
Wims Offline
Hoopy frood
Wims  Offline
Hoopy frood
W

Joined: Jul 2006
Posts: 3,518
France
Code:
on *:action:*slap*:#channel:{
if (!$hget(nslfl,$wildsite)) {
hadd -mu300 nslfl $wildsite 1
inc %slaps
describe # slaps the slapper.
msg $chan Number of slappers slapped: %slaps
 }
} 
This will allow an address (not a nick, because they will change their nick..) to trigger this each 5 minutes, the line that put %slaps to 0 was useless.

Last edited by Wims; 12/12/08 09:16 PM.

Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: No Flood [Re: Wims] #207304
12/12/08 08:35 PM
12/12/08 08:35 PM
Joined: Dec 2008
Posts: 4
D
Doyley Offline OP
Self-satisified door
Doyley  Offline OP
Self-satisified door
D

Joined: Dec 2008
Posts: 4
Hey... thanks for your reply.

It doesn't seem to be working though, the same person can still trigger it within a few seconds. Is there a typo?

Thanks again.

Re: No Flood [Re: Doyley] #207306
12/12/08 09:16 PM
12/12/08 09:16 PM
Joined: Jul 2006
Posts: 3,518
France
W
Wims Offline
Hoopy frood
Wims  Offline
Hoopy frood
W

Joined: Jul 2006
Posts: 3,518
France
ah ah, yes there is, i miss a '1' in the hadd command, it's edited


Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: No Flood [Re: Doyley] #207313
13/12/08 08:13 AM
13/12/08 08:13 AM
Joined: Jan 2007
Posts: 1,156
Seattle
D
DJ_Sol Offline
Hoopy frood
DJ_Sol  Offline
Hoopy frood
D

Joined: Jan 2007
Posts: 1,156
Seattle
Code:
on *:action:*slap*:#channel:{
if (%slap. [ $+ [ $nick ] ]) { return }
set -u300 %slap. [ $+ [ $nick ] ] $true
  if %slaps == $null { set %slaps 0 }
  inc %slaps 1
  describe # slaps the slapper.
  /msg $chan Number of slappers slapped: %slaps
}


Use whatever address identifier you want instead of $nick.

Re: No Flood [Re: DJ_Sol] #207325
13/12/08 06:20 PM
13/12/08 06:20 PM
Joined: Dec 2008
Posts: 4
D
Doyley Offline OP
Self-satisified door
Doyley  Offline OP
Self-satisified door
D

Joined: Dec 2008
Posts: 4
Thanks very much guys!!