mIRC Home    About    Download    Register    News    Help

Print Thread
#254839 05/09/15 09:09 PM
Joined: Aug 2015
Posts: 12
A
Airfox Offline OP
Pikka bird
OP Offline
Pikka bird
A
Joined: Aug 2015
Posts: 12
I need your help. Some people just spamming my commands and I want to put a 10 secound cooldown for every command (Globalcooldown for every command after 1 command) in. Plz I need your help.


on *:TEXT:*subscribed*:#: {

if ($nick == twitchnotify) && ( $4 == $null) {
.msg # trilluxeHutAb trilluxeHutAb Willkommen! $1 trilluxeHutAb trilluxeHutAb
}

elseif ($nick == twitchnotify) && ( $4 isnum ) {
.msg # trilluxeHutAb trilluxeHutAb $1 danke für dein $4 monatigen Re-Sub! trilluxeHutAb trilluxeHutAb
}
}


on *:TEXT:*!disconnect*:#: if ( $nick == airfox_konsti) { .msg # Bot goes offline! HeyGuys } { /disconnect }
elseif { .msg # $nick Du bist nicht befugt diesen Command auszuführen! }


on *:TEXT:*!cmds*:#: { .msg # $nick !baaland - !kookser - !trillleague - !tiltluxe - !hacker - !eltern - !kotze - !cmd2 für die 2. Seite! }

on *:TEXT:*!cmd2*:#: { .msg # $nick !bb - !mutter - !nicetomeet1337 - !führer - !yolonese - !ossi - !eselreiteriderination - !relluc_ - }

on *:TEXT:*!baaland*:#: { .msg # Baaland ist ein absolut geisteskranker CS Profi. }

on *:TEXT:*!kookser*:#: { .msg # GiveAway? TriHard }

on *:TEXT:*!trillleague*:#: { .msg # "Ich bin's, ich bin's!"-TrilluXe }

on *:TEXT:*!tiltluxe*:#: { .msg # "Natürlich bin ich tilt ihr F*tzen" - Tiltluxe, 2k15 }

on *:TEXT:*!hacker*:#: { .msg # "Ich habe kein Bock mehr auf CS nach dem Game"-TrilluXe 2k15 }

on *:TEXT:*!eltern*:#: { .msg # "Ich fick gleich meine Eltern." - TrilluXe 2k15 }

on *:TEXT:*!kotze*:#: { .msg # "Oh ist das ein Kotze" TrilluXe 2k15 }

on *:TEXT:*!bb*:#: { .msg # "B! B!" -Trilluxe 2k14 }

on *:TEXT:*!mutter*:#: { .msg # "Meine Mutter brät noch rein" Felix 2k15 }

on *:TEXT:*!nicetomeet1337*:#: { .msg # TriHard /timeout nicetomeet1337 1 TriHard }

on *:TEXT:*!führer*:#: { .msg # "Der war drauf, dass hätte mir der Führer bestätigt!" - TrilluXe 2k15 }

on *:TEXT:*!yolonese*:#: { .msg # "HDF du Schwuchtel!" - Yolonese 30.8.15 21.48 }

on *:TEXT:*!ossi*:#: { .msg # "Scheiß Ossi mannn!" TrilluXe 2k15 }

on *:TEXT:*!eselreiteriderination*:#: { .msg # "Dieser hässliche brillentragende Tankwart hat große Fresse" - Eselreiteriderination 2k15 }

on *:TEXT:*!relluc_*:#: { .msg # Gibt mit ne SCAR Storm und will ein eigenden Command staiyLegit }

on *:TEXT:*!ignore*:#: { /ignore $2 }

on *:TEXT:*!*:#: { .msg # }

Just ignore the quoates laugh Just fun!!!

Last edited by Airfox; 05/09/15 09:29 PM.
Joined: Feb 2015
Posts: 243
O
Fjord artisan
Offline
Fjord artisan
O
Joined: Feb 2015
Posts: 243
what you have to do is.. check if a variable DOESNT exist..
e.g
Code:
if (!%cooldown) {
set -u10 %cooldown 1
"do the rest script as it is"
}

that way you get a 10 second cool down. add this in all your text events!
If the variable doesnt exist it will set it and -u10 will unset it automatically after 10 seconds. If it exists it wont do nothing because that means the cooldown is on.
Good Luck! smile

Joined: Aug 2015
Posts: 12
A
Airfox Offline OP
Pikka bird
OP Offline
Pikka bird
A
Joined: Aug 2015
Posts: 12
It workin for 1 user. It works when person A writes "!cmds" and 2 sec. later "!cmd2". But I doesn't work when person A writes "!cmds" and the second person "!cmds" and "!cmd2".

All commands should coolin down D:

Last edited by Airfox; 05/09/15 10:23 PM.
Joined: Feb 2015
Posts: 243
O
Fjord artisan
Offline
Fjord artisan
O
Joined: Feb 2015
Posts: 243
Well.. if you added this if statement to all those text events it should be working by now.Maybe you put it only in 1 text event?
Or you forgot to put it in some of them. Maybe the cooldown had passed when you tried the 2nd command?

Joined: Aug 2015
Posts: 12
A
Airfox Offline OP
Pikka bird
OP Offline
Pikka bird
A
Joined: Aug 2015
Posts: 12
http://puu.sh/k1cok/2d46e0a460.png I dunno D: I did what you said to me. And the wrote it 2 sec. later.


Last edited by Airfox; 05/09/15 10:32 PM.
Joined: Aug 2015
Posts: 12
A
Airfox Offline OP
Pikka bird
OP Offline
Pikka bird
A
Joined: Aug 2015
Posts: 12
WORKING!

Joined: Feb 2015
Posts: 243
O
Fjord artisan
Offline
Fjord artisan
O
Joined: Feb 2015
Posts: 243
Great! Glad it worked!

Joined: Sep 2015
Posts: 18
R
Pikka bird
Offline
Pikka bird
R
Joined: Sep 2015
Posts: 18
You could make it so if they send more than 3 messages every 5 secs they get kicked. I personally don't know the code I am simply letting you know that I have dont it in the past and this is another option for you


Code:
 $I.am.REDxPHOEN 

Code:
 $I.am.THE.one.AND.only 

Code:
 $I.am.THE.best 

Link Copied to Clipboard