Hello, I have just started using the osbot API, just testing things out on my runescape account. I have an okay amount of coding experience, so feel free to answer this question as technically as you want to.
Let's say that, for instance, in my code, I talk to a butler and because of that, my state has changed to "States.TALKING_TO_BUTLER" (I know that using states is not the most efficient way to program bots, I am just doing it so I can get familiar with the API). While I am in dialogue with the butler, I expect to press continue once, and then I want to select "Go to bank...". Here is my issue: Once I have invoked dialogues.clickContinue(), there is a delay in the game before dialogues.selectOption("Yes") will work. So, if I have the two lines of code next to each other:
dialogues.clickContinue();
dialogues.selectOption("Yes");
The "yes" option is never selected because it is invoked before it is actually visible in game. The only way I have found to fix this problem so far is to use the sleep function in-between the invocations, but I think this is inefficient since the waiting period is dependent upon my in-game latency.