mIRC Homepage

Help Needed for a Script.

Posted By: Dracula

Help Needed for a Script. - 09/08/20 11:44 AM

Hey guys, i hope you all are doing good, i just need a help if anyone can make or send me a script if anyone has, the script should of activating the auto modes like (+m) when someone spams with particular no of words or lines (like on 200 words the script should activate the +m mode on channel). if anyone can help i will be glad <3. thanks
Posted By: rafa555

Re: Help Needed for a Script. - 14/08/20 09:34 PM

By number of characters

Quote

on *:text:*:#girc:{
var %1 = $remove($1-,$)

;if a person send a message with more than '300' characters it trigger the action
if ($len($strip(%1)) > 300) {

echo -a 4FLOOD: $nick said $len($strip(%1)) characters in one message.

mode # +m

}
}



By number of lines in a period of time

Quote
on *:text:*:#channel:{

;limite of lines before taking action
var %lines = 3

;interval of time (after the time the %var is reseted/removed)
var %time = 10

;set an %var with the person amount of lines sent
inc -u [ $+ [ %time ] ] %flood. [ $+ [ $nick ] ]

;if the number of lines the person said is the same or higher than the limit, it triggers the action
if (%flood. [ $+ [ $nick ] ] >= %lines) {

echo -a 4FLOOD: $nick said %lines in %time secs

mode # +m

;remove the %var
.unset %flood. [ $+ [ $nick ] ]

}
}


by number of words

Quote
on *:text:*:#channel:{

;20 is the limit of words
if ($0 >= 20) {

echo -a 4FLOOD: $nick said $0 words, limit: 20

mode # +m

}
}
© 2021 mIRC Discussion Forums