mIRC Home    About    Download    Register    News    Help

Print Thread
#260631 27/05/17 02:47 PM
Joined: Apr 2017
Posts: 14
K
Pikka bird
OP Offline
Pikka bird
K
Joined: Apr 2017
Posts: 14
Hey guys, so I've been trying to figure out a way so my script isn't impacted by cooldowns of another command. I want the less spammy scripts not be influenced by the cooldown of my Russian Roulette game and I'm looking for a way to do this for every individual command that I deem necessary.

Code:
on *:TEXT:!testing:#: {
  if (%TimerTest == off) {
    set %TimerTest on
    /timer1 1 10 /echo -a Cooldown over
    /timer1 1 10  msg $chan Command can be used again
    /timer1 1 10  set %TimerTest off
  }
  else if (%TimerTest == on) {
    msg $chan Cooldown!
  }
}


This is what I currently have, although it doesn't seem to work with every input I make it give me(Telling me the cooldown is over and the command can be used again) It also seems quite buggy, so I had to make myself a command to manually set %TimerTest to off.

Anyone have any suggestions or scripts that work for this purpose?

Joined: Jul 2016
Posts: 28
Z
Ameglian cow
Offline
Ameglian cow
Z
Joined: Jul 2016
Posts: 28
Try this:
Code:
on *:TEXT:!testing:#: {
  if (%TimerTest == $null) {
    set -u10 %TimerTest on
    /timer1 1 10 /echo -a Cooldown over
    /timer2 1 10  msg $chan Command can be used again
  }
  else if (%TimerTest == on) {
    msg $chan Cooldown!
  }
}


Link Copied to Clipboard