Hey, so I’m currently writing a script that responds to commands – the response to commands work, however I’m trying to have a delay across all commands.
on *:text:*:#shinylunatone: {
if (%command. [ $+ [ $1 ] ]) {
//used to debug, this is the main issue here
msg $chan %commanddelay+5000 $ticks
if(%commanddelay+5000 < $ticks) {
msg $chan %command. [ $+ [ $1 ] ]
set %commanddelay $ticks
}
}
}
Basically I’m checking if five seconds have passed before responding to the command (which have been added in variables). It’s recording the %commanddelay variable fine, however it’s not adding the 5000ms onto it. When test messaging the channel with %commanddelay+5000, it gives a blank space instead and so the second if-statement will always be true and thus there will never be a delay between commands. I was just looking for some help into whether this is incorrect or another approach would be better. Thank you