Another problem I faced regarding stop condition :
I added stop condition when slayer tasks ends, but what's happening is as follows :
1) slayer tasks ends
2) script automatically choses to logout right after combat, and get's the 10 second waiting period.
3) script closes
4) I'm still logged on.
A fix to this would be appreciated. Thanks!