Problem with limiting bot to post every 30 minutes - 20/08/16 03:10 PM
Hello
Basicly I have two users on the same server and channel.
I need anyone to be able to start the game with !play command.
Only one game every half hour allowed.
I'm using $me to identify which user is going to say what.
The problem I'm having is with the 1 game / half hour rule.
I have a variable (%posted) that I set to unset after 1800s inside the if statement that checks if %posted is set to is_set.
Code here:
If I remove if (%posted != is_set) { } it works as "planned" but with it added only one of the bots are posting.
Im assuming its not possible to do it like this or what have I missed?
plz help
Basicly I have two users on the same server and channel.
I need anyone to be able to start the game with !play command.
Only one game every half hour allowed.
I'm using $me to identify which user is going to say what.
The problem I'm having is with the 1 game / half hour rule.
I have a variable (%posted) that I set to unset after 1800s inside the if statement that checks if %posted is set to is_set.
Code here:
Code:
on *:TEXT:!play:#: { if (%posted != is_set) { set -u1800 %posted is_set if ($me == svensson) { timer 1 100 msg $chan 100seconds timer 1 200 msg $chan 200seconds } elseif ($me == bot_swe) { timer 1 50 msg $chan 50seconds timer 1 150 msg $chan 150seconds } } }
If I remove if (%posted != is_set) { } it works as "planned" but with it added only one of the bots are posting.
Im assuming its not possible to do it like this or what have I missed?
plz help