mIRC Home    About    Download    Register    News    Help

Print Thread
#253443 14/06/15 05:41 AM
Joined: Oct 2014
Posts: 8
M
MsDiz Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
M
Joined: Oct 2014
Posts: 8
So I'm working on my roulette and what I want is for there to be a 2 minute cooldown for the whole command and a five minute cooldown per person for the same command AND for the bot to respond if it is on cooldown. I am having trouble doing all of that. I can get it to work with just a cooldown for the command but as soon as i try to add in a separate cooldown for a single person, it ignores the cooldown entirely and can be spammed nonstop.

Any help please? Also I'm pretty noobish sorry!



on *:TEXT:!Roulette:#: {
if ((!%floodroulette) || ($($+(%,floodroulette.,$nick),2))) {
set -u120 %floodroulette On
set -u600 %floodroulette. $+ $nick On
var %randnumber = $rand(1,8)

if (%randnumber == 1) {
msg $chan /me puts a bullet in one of the chambers and spins the cylinder. *chnk* She slams the cylinder in, stopping its movement, your fate is now sealed, $nick
.timer 1 3 msg $chan $nick tries to pull the trigger, their hands shaking... but is too afraid and drops the gun.
.timer 1 6 msg $chan Dizbot grabs the gun yelling, "YOU MUST COMPLETE THE ROULETTE!" and points the gun at $nick pulling the trigger.
.timer 1 9 msg $chan *BLAM!* The gun goes off. $nick is dead.
del.pts $+(#,.,$nick)
}
if (%randnumber == 2) {
msg $chan /me puts a bullet in one of the chambers and spins the cylinder. *chnk* She slams the cylinder in, stopping its movement, your fate is now sealed, $nick
.timer 1 3 msg $chan $nick raises the gun with a shaking hand....slowly squeezing the trigger...
.timer 1 6 msg $chan *CLICK!*...Empty...You live to see another day $nick
add.pts $+(#,.,$nick)
}
if (%randnumber == 3) {
msg $chan /me puts a bullet in one of the chambers and spins the cylinder. *chnk* She slams the cylinder in, stopping its movement, your fate is now sealed, $nick
.timer 1 3 msg $chan $nick raises the gun with a shaking hand....slowly squeezing the trigger...
.timer 1 6 msg $chan *Click!*... Nothing happened but... $nick got so scared that $nick shit in their pants and died.
del.pts $+(#,.,$nick)
}
if (%randnumber == 4) {
msg $chan /me puts a bullet in one of the chambers and spins the cylinder. *chnk* She slams the cylinder in, stopping its movement, your fate is now sealed, $nick
.timer 1 3 msg $chan With shaking hands $nick squeezes the trigger...
.timer 1 6 msg $chan *CLICK!* ..the chamber was empty...you feel warm with relief, but quickly realize the warmth was you pissing your pants. You die of embarassment.
del.pts $+(#,.,$nick)
}
if (%randnumber == 5) {
msg $chan /me puts a bullet in one of the chambers and spins the cylinder. *chnk* She slams the cylinder in, stopping its movement, your fate is now sealed, $nick
.timer 1 3 msg $chan $nick tries to pull the trigger, their hands shaking... but is too afraid and drops the gun.
.timer 1 6 msg $chan Dizbot grabs the gun yelling, "YOU MUST COMPLETE THE ROULETTE!" and points the gun at $nick pulling the trigger.
.timer 1 9 msg $chan *CLICK!*... the chamber is empty...you live another day, $nick
add.pts $+(#,.,$nick)
}
if (%randnumber == 6) {
msg $chan /me puts a bullet in one of the chambers and spins the cylinder. *chnk* She slams the cylinder in, stopping its movement, your fate is now sealed, $nick
.timer 1 3 msg $chan $nick tries to pull the trigger, their hands shaking... but is too afraid and drops the gun.
.timer 1 6 msg $chan Dizbot grabs the gun yelling, "YOU MUST COMPLETE THE ROULETTE!" and points the gun at $nick pulling the trigger.
.timer 1 9 msg $chan Dizbot trips and fires the gun while falling, shooting petercob1998tv, he is dead
add.pts $+(#,.,$nick)
}
if (%randnumber == 7) {
msg $chan /me puts a bullet in one of the chambers and spins the cylinder. *chnk* She slams the cylinder in, stopping its movement, your fate is now sealed, $nick
.timer 1 3 msg $chan $nick bravely raises the gun to their temple, and quickly jerks the trigger...
.timer 1 6 msg $chan *CLICK!*...Empty...You live to see another day $nick
add.pts $+(#,.,$nick)
}
if (%randnumber == 8) {
msg $chan /me puts a bullet in one of the chambers and spins the cylinder. *chnk* She slams the cylinder in, stopping its movement, your fate is now sealed, $nick
.timer 1 3 msg $chan $nick puts the gun to their head and after a moment of hesitation pulls the trigger...
.timer 1 6 msg $chan *CLICK!*...Empty...You live to see another day $nick
add.pts $+(#,.,$nick)
}
}
else {
msg $chan I'm not ready to go through that again! (Cool Down)
}
}


Total n00b smirk
Joined: May 2015
Posts: 249
Fjord artisan
Offline
Fjord artisan
Joined: May 2015
Posts: 249
Your on-text event conditions are a little bit wrong:
Code:
if ((!%floodroulette) || ($($+(%,floodroulette.,$nick),2))) {

That means:
(if command WASNT used last 120 secs)
OR (if user1 USED this command last 600 secs) then WORK.
You need (if WASNT) AND (if user DIDNT) then work:
Code:
if ((!%floodroulette) && (!$($+(%,floodroulette.,$nick),2))) {


Dont give a fish - teach to fish!
Joined: Oct 2014
Posts: 8
M
MsDiz Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
M
Joined: Oct 2014
Posts: 8
Awesomesauce!! thank you laugh


Total n00b smirk

Link Copied to Clipboard