mIRC Home    About    Download    Register    News    Help

Print Thread
#207298 12/12/08 06:46 PM
Joined: Dec 2008
Posts: 4
D
Doyley Offline OP
Self-satisified door
OP Offline
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
} 

Doyley #207299 12/12/08 07:26 PM
Joined: Jul 2006
Posts: 4,149
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,149
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.

#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Wims #207304 12/12/08 08:35 PM
Joined: Dec 2008
Posts: 4
D
Doyley Offline OP
Self-satisified door
OP Offline
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.

Doyley #207306 12/12/08 09:16 PM
Joined: Jul 2006
Posts: 4,149
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,149
ah ah, yes there is, i miss a '1' in the hadd command, it's edited


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Doyley #207313 13/12/08 08:13 AM
Joined: Jan 2007
Posts: 1,156
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2007
Posts: 1,156
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.

DJ_Sol #207325 13/12/08 06:20 PM
Joined: Dec 2008
Posts: 4
D
Doyley Offline OP
Self-satisified door
OP Offline
Self-satisified door
D
Joined: Dec 2008
Posts: 4
Thanks very much guys!!


Link Copied to Clipboard