mIRC Home    About    Download    Register    News    Help

Print Thread
#243802 28/12/13 07:03 PM
Joined: Dec 2013
Posts: 5
Z
zaza Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
Z
Joined: Dec 2013
Posts: 5
hi guys. i need some help.

on *:TEXT:hi:#: { msg $chan hi $nick }
i want to add a parameter here. if someone repeat "hi" 2 times in 2 second or columns bot will answer different reply for second "hi".
some kind of flood protection.

like that:
user: hi
bot: hi
user: hi
bot: dont repeat

zaza #243815 29/12/13 04:13 PM
Joined: Dec 2013
Posts: 10
T
Pikka bird
Offline
Pikka bird
T
Joined: Dec 2013
Posts: 10
Try:
Code:
on *:TEXT:hi:#: {
  var %used = $iif(%hi. [ $+ [ $chan ] $+ . ] [ $+ [ $nick ] ] == $null,0,$v1)
  if ( %used > 0 ) .msg $chan dont repeat $nick
  else .msg $chan hi $nick

  inc %used
  set -u5 %hi. [ $+ [ $chan ] $+ . ] [ $+ [ $nick ] ] %used
}

zaza #243852 04/01/14 07:27 AM
Joined: Dec 2013
Posts: 5
Z
zaza Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
Z
Joined: Dec 2013
Posts: 5
thanks for answer bro. so how can i add more repeat answers.
like that

like that:
user: hi
bot: hi
user: hi
bot: dont repeat
user: hi
bot: i sad dont repeat
user: hi
bot: im gonna kick u if you say again hi


Link Copied to Clipboard