I guess i didnt explain the issue well. Yes i do know what is the condition i need to use, but the thing i couldnt do is how do i stop the action that the bot is currently doing.
What if the other player comes close when the bot is not sleeping?
Like how do i make a conditional action which is like the conditional sleep but does the action until the condition is met?