Re: !vguess addon
Epic
16/12/24 05:20 PM
My only problem is that message The next attempt is possible in XXX sec, when the game is unset. Shoud be enough just to have message Come up with a new number:STAY TUNED
I don't quite understand the essence of your request due to poor translation, which can distort the meaning of the question, but I will try to guess and answer correctly...
The message "
The next attempt is possible in XXX secs" is sent only to those users who have executed the command "
!number <number>" once.
Then they should wait 300 seconds, as written in this command:
hadd -mz number $nick 300
If someone guesses the secret number, the game resets all data, including hashes about the number of seconds to wait until the next attempt.
That is, if the bot is missing the variable
%number, you will not be able to execute the command "
!number", because this line will prevent it:
if (!%number) { msg $chan Come up with a new number: !game [number] | return }
If you want to hide the timeout before the next attempt from users and not write anything, then change this line:
if ($hget(number,$nick)) { notice $nick The next attempt is possible in $v1 secs. | return }
to:
if ($hget(number,$nick)) { return }
In any case, from my modest testing, this message should not be visible to users when the game is stopped or has not yet been launched.