i try your plugin using the code you provided on the First Post but after i got the "All threads were closed" message the bot is not stopping.
Yes all threads are closed but it just the bot is not stopping. I have to add "Stop Script" node after the "All threads were closed" node in order for the bot to stopped
Here is the video : http://screencast.com/t/qpyELjRD5m
Is this just me or is that the way the plugin works?
Damn...I didn't notice that happening because I had stop command at the end of my testing code (and some other code bellow).
I was able to reproduce that: it worked the first time, and failed the second: http://screencast.com/t/oLo0G4Nu
However, that's really strange....it looks like that threads are not actually closed, although we reached "decrement" function inside thread. That makes me think that for some reason UBot doesn't close the threads once the end of thread container is reached. :/ That's why I don't think the problem is in plugin but rather with UBot, because plugin only provides counting of threads, which actually works.
As a workaround I think you are safe by adding stop command at the end of the script, since all threads should already be done by then (I don't think your thread code is actually executed at that time).
I'm investigating this issue now and will get back with answers later.