Awesome was a really popular script on my IRC but the one who made it left. So I decided to re-create it. It is very simple and meant to be that way. !powerlevel is one of the popular scripts as well, but just decided to create it.
on *:TEXT:!powerlevel*:#: {
if (%flood [ $+ [ $nick ] $+ [ $right($1,-1) ] ] > 0) { notice $nick You must wait $duration($v1) in order to do that again. | halt }
set -z %flood [ $+ [ $nick ] $+ [ $right($1,-1) ] ] 60
msg # $nick powerlevel is $r(1,10000) $+ !
}
on *:TEXT:!awesome*:#: {
if (%flood [ $+ [ $nick ] $+ [ $right($1,-1) ] ] > 0) { notice $nick You must wait $duration($v1) in order to do that again. | halt }
set -z %flood [ $+ [ $nick ] $+ [ $right($1,-1) ] ] 60
msg # $nick is $r(1,100) $+ % awesome today!
}
just add a variable that prevents the usage
if(%floodawesome) { return }
set -u60 %floodawesome On
if you want to prevent single users from spamming it aswell you can add variables for each user
in this case every user that uses it has 60 second to wait while someone else can use the command after 30 seconds
if ($($+(%, floodawesome.,$nick),2) || (%floodawesome)) { return }
set -u60 %floodawesome. $+ $nick On
set -u30 %floodawesome On
Hope i could help :)
So like this:
on :TEXT:!awesome:#: msg # $nick is $r(1,100) $+ % awesome today! {
if(%floodawesome) { return }
set -u60 %floodawesome On
}
If that works is there any way I could show duration of the flood protection so it counts down, and how do I notice the person "You have to wait DURATIONHERE to use this command again."
on *:TEXT:!awesome*:#: {
if ($($+(%, floodawesome.,$nick),2) || (%floodawesome)) { return }
set -u60 %floodawesome. $+ $nick On
set -u30 %floodawesome On
msg # $nick is $r(1,100) $+ % awesome today!
}
Thats how you would put it in.
Im not sure though how you would show the timer.
I got a similar script somewhere, if i find something i will tell you.
Timer after command. After !command, it would say you have to wait x amount of time. I have it for another script but I don't know how to fit it in.